dev: Replaced human-readable text with i18n keys (#1382)
Docker Image CI / build-and-push-image (push) Has been cancelled
Maintain Release Merge PR / update-release-pr (push) Has been cancelled
release-please / release-please (push) Has been cancelled
test / test (18.x) (push) Has been cancelled
test / test (20.x) (push) Has been cancelled
test / test (22.x) (push) Has been cancelled

* dev: Replaced human-readable text with i18n keys

* Add two missing keys in UIDesktop.js

* more i18n keys!

* add more keys

* Update UIWindow.js

---------

Co-authored-by: jelveh <nj@puter.com>
This commit is contained in:
Karan Singh
2025-07-30 06:27:18 +05:30
committed by GitHub
parent 9a7d34aec9
commit a15fdd0b6d
18 changed files with 141 additions and 68 deletions
+9 -9
View File
@@ -1163,7 +1163,7 @@ async function UIDesktop(options) {
ht += `</div>`;
// 'Show Desktop'
ht += `<a href="/" class="show-desktop-btn toolbar-btn antialiased hidden" target="_blank" title="Show Desktop">Show Desktop <img src="${window.icons['launch-white.svg']}" style="width: 10px; height: 10px; margin-left: 5px;"></a>`;
ht += `<a href="/" class="show-desktop-btn toolbar-btn antialiased hidden" target="_blank" title="${i18n('desktop_show_desktop')}">${i18n('desktop_show_desktop')} <img src="${window.icons['launch-white.svg']}" style="width: 10px; height: 10px; margin-left: 5px;"></a>`;
// refer
if (window.user.referral_code) {
@@ -1772,24 +1772,24 @@ $(document).on('contextmenu taphold', '.taskbar', function (event) {
// Only show position submenu on desktop devices
if (!isMobile.phone && !isMobile.tablet) {
menuItems.push({
html: "Position",
html: i18n('desktop_position'),
items: [
{
html: "Left",
html: i18n('desktop_position_left'),
checked: currentPosition === 'left',
onClick: function() {
window.update_taskbar_position('left');
}
},
{
html: "Bottom",
html: i18n('desktop_position_bottom'),
checked: currentPosition === 'bottom',
onClick: function() {
window.update_taskbar_position('bottom');
}
},
{
html: "Right",
html: i18n('desktop_position_right'),
checked: currentPosition === 'right',
onClick: function() {
window.update_taskbar_position('right');
@@ -1802,7 +1802,7 @@ $(document).on('contextmenu taphold', '.taskbar', function (event) {
// Add the "Show open windows" option for all devices
menuItems.push({
html: "Show open windows",
html: i18n('desktop_show_open_windows'),
onClick: function () {
$(`.window`).showWindow();
}
@@ -1810,7 +1810,7 @@ $(document).on('contextmenu taphold', '.taskbar', function (event) {
// Add the "Show the desktop" option for all devices
menuItems.push({
html: "Show the desktop",
html: i18n('desktop_show_desktop'),
onClick: function () {
$(`.window`).hideWindow();
}
@@ -2209,11 +2209,11 @@ document.addEventListener('fullscreenchange', (event) => {
if (document.fullscreenElement) {
$('.fullscreen-btn').css('background-image', `url(${window.icons['shrink.svg']})`);
$('.fullscreen-btn').attr('title', 'Exit Full Screen');
$('.fullscreen-btn').attr('title', i18n('desktop_exit_full_screen'));
window.user_preferences.clock_visible === 'auto' && $('#clock').show();
} else {
$('.fullscreen-btn').css('background-image', `url(${window.icons['fullscreen.svg']})`);
$('.fullscreen-btn').attr('title', 'Enter Full Screen');
$('.fullscreen-btn').attr('title', i18n('desktop_enter_full_screen'));
window.user_preferences.clock_visible === 'auto' && $('#clock').hide();
}
})