mirror of
https://github.com/HeyPuter/puter.git
synced 2026-01-17 10:30:13 -06:00
dev: migrate toolbar labels to i18n
This commit is contained in:
@@ -1157,7 +1157,7 @@ async function UIDesktop(options) {
|
||||
ht += `<div class="toolbar-spacer"></div>`;
|
||||
|
||||
// create account button
|
||||
ht += `<div class="toolbar-btn user-options-create-account-btn ${window.user.is_temp ? '' : 'hidden'}" style="padding:0; opacity:1;" title="Save Account">`;
|
||||
ht += `<div class="toolbar-btn user-options-create-account-btn ${window.user.is_temp ? '' : 'hidden'}" style="padding:0; opacity:1;" title="${i18n('toolbar.save_account')}">`;
|
||||
ht += `<svg style="width: 17px; height: 17px;" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="48px" height="48px" viewBox="0 0 48 48"><g transform="translate(0, 0)"><path d="M45.521,39.04L27.527,5.134c-1.021-1.948-3.427-2.699-5.375-1.679-.717,.376-1.303,.961-1.679,1.679L2.479,39.04c-.676,1.264-.635,2.791,.108,4.017,.716,1.207,2.017,1.946,3.42,1.943H41.993c1.403,.003,2.704-.736,3.42-1.943,.743-1.226,.784-2.753,.108-4.017ZM23.032,15h1.937c.565,0,1.017,.467,1,1.031l-.438,14c-.017,.54-.459,.969-1,.969h-1.062c-.54,0-.983-.429-1-.969l-.438-14c-.018-.564,.435-1.031,1-1.031Zm.968,25c-1.657,0-3-1.343-3-3s1.343-3,3-3,3,1.343,3,3-1.343,3-3,3Z" fill="#ffbb00"></path></g></svg>`;
|
||||
ht += `</div>`;
|
||||
|
||||
@@ -1166,24 +1166,24 @@ async function UIDesktop(options) {
|
||||
|
||||
// refer
|
||||
if (window.user.referral_code) {
|
||||
ht += `<div class="toolbar-btn refer-btn" title="Refer" style="background-image:url(${window.icons['gift.svg']});"></div>`;
|
||||
ht += `<div class="toolbar-btn refer-btn" title="${i18n('toolbar.refer')}" style="background-image:url(${window.icons['gift.svg']});"></div>`;
|
||||
}
|
||||
|
||||
// github
|
||||
ht += `<a href="https://github.com/HeyPuter/puter" target="_blank" class="toolbar-btn" title="GitHub" style="background-image:url(${window.icons['logo-github-white.svg']});"></a>`;
|
||||
ht += `<a href="https://github.com/HeyPuter/puter" target="_blank" class="toolbar-btn" title="${i18n('toolbar.github')}" style="background-image:url(${window.icons['logo-github-white.svg']});"></a>`;
|
||||
|
||||
// do not show the fullscreen button on mobile devices since it's broken
|
||||
if (!isMobile.phone) {
|
||||
// fullscreen button
|
||||
ht += `<div class="toolbar-btn fullscreen-btn" title="Enter Full Screen" style="background-image:url(${window.icons['fullscreen.svg']})"></div>`;
|
||||
ht += `<div class="toolbar-btn fullscreen-btn" title="${i18n('toolbar.enter_fullscreen')}" style="background-image:url(${window.icons['fullscreen.svg']})"></div>`;
|
||||
}
|
||||
|
||||
// qr code button -- only show if not embedded
|
||||
if (!window.is_embedded)
|
||||
ht += `<div class="toolbar-btn qr-btn" title="QR code" style="background-image:url(${window.icons['qr.svg']})"></div>`;
|
||||
ht += `<div class="toolbar-btn qr-btn" title="${i18n('toolbar.qrcode')}" style="background-image:url(${window.icons['qr.svg']})"></div>`;
|
||||
|
||||
// search button
|
||||
ht += `<div class="toolbar-btn search-btn" title="Search" style="background-image:url('${window.icons['search.svg']}')"></div>`;
|
||||
ht += `<div class="toolbar-btn search-btn" title="${i18n('toolbar.search')}" style="background-image:url('${window.icons['search.svg']}')"></div>`;
|
||||
|
||||
|
||||
//clock
|
||||
|
||||
@@ -295,6 +295,12 @@ const en = {
|
||||
taskmgr_header_type: "Type",
|
||||
terms: "Terms",
|
||||
text_document: 'Text document',
|
||||
'toolbar.enter_fullscreen': 'Enter Full Screen',
|
||||
'toolbar.github': 'GitHub',
|
||||
'toolbar.refer': 'Refer',
|
||||
'toolbar.save_account': 'Save Account',
|
||||
'toolbar.search': 'Search',
|
||||
'toolbar.qrcode': 'QR Code',
|
||||
tos_fineprint: `By clicking 'Create Free Account' you agree to Puter's {{link=terms}}Terms of Service{{/link}} and {{link=privacy}}Privacy Policy{{/link}}.`,
|
||||
transparency: "Transparency",
|
||||
trash: 'Trash',
|
||||
|
||||
Reference in New Issue
Block a user