Browse Source

More translation

Sondre Njåstad 1 year ago
parent
commit
38f30f7138

+ 3 - 3
src/UI/UIWindow.js

@@ -314,7 +314,7 @@ async function UIWindow(options) {
                 // Loading spinner
                 h += `<div class="explorer-loading-spinner">`;
                     h +=`<svg style="display:block; margin: 0 auto; " xmlns="http://www.w3.org/2000/svg" height="24" width="24" viewBox="0 0 24 24"><title>circle anim</title><g fill="#212121" class="nc-icon-wrapper"><g class="nc-loop-circle-24-icon-f"><path d="M12 24a12 12 0 1 1 12-12 12.013 12.013 0 0 1-12 12zm0-22a10 10 0 1 0 10 10A10.011 10.011 0 0 0 12 2z" fill="#212121" opacity=".4"></path><path d="M24 12h-2A10.011 10.011 0 0 0 12 2V0a12.013 12.013 0 0 1 12 12z" data-color="color-2"></path></g><style>.nc-loop-circle-24-icon-f{--animation-duration:0.5s;transform-origin:12px 12px;animation:nc-loop-circle-anim var(--animation-duration) infinite linear}@keyframes nc-loop-circle-anim{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}</style></g></svg>`;
-                    h += `<p class="explorer-loading-spinner-msg">Loading...</p>`;
+                    h += `<p class="explorer-loading-spinner-msg">${i18n('loading')}...</p>`;
                 h += `</div>`;
             }
 
@@ -2920,7 +2920,7 @@ window.scale_window = (el_window)=>{
 window.update_explorer_footer_item_count = function(el_window){
     //update dir count in explorer footer
     let item_count = $(el_window).find('.item').length;
-    $(el_window).find('.explorer-footer .explorer-footer-item-count').html(item_count + ' item' + (item_count == 0 || item_count > 1 ? 's' : ''));
+    $(el_window).find('.explorer-footer .explorer-footer-item-count').html(item_count + ` ${i18n('item')}` + (item_count == 0 || item_count > 1 ? `${i18n('plural_suffix')}` : ''));
 }
 
 window.update_explorer_footer_selected_items_count = function(el_window){
@@ -2928,7 +2928,7 @@ window.update_explorer_footer_selected_items_count = function(el_window){
     let item_count = $(el_window).find('.item-selected').length;
     if(item_count > 0){
         $(el_window).find('.explorer-footer-seperator, .explorer-footer-selected-items-count').show();
-        $(el_window).find('.explorer-footer .explorer-footer-selected-items-count').html(item_count + ' item' + (item_count == 0 || item_count > 1 ? 's' : '') + ' selected');
+        $(el_window).find('.explorer-footer .explorer-footer-selected-items-count').html(item_count + ` ${i18n('item')}` + (item_count == 0 || item_count > 1 ? `${i18n('plural_suffix')}` : '') + ` ${i18n('selected')}`);
     }else{
         $(el_window).find('.explorer-footer-seperator, .explorer-footer-selected-items-count').hide();
     }

+ 1 - 1
src/UI/UIWindowDownloadProgress.js

@@ -29,7 +29,7 @@ async function UIWindowDownloadProgress(options){
             // Progress report
             h +=`<div style="margin-bottom:20px; float:left; padding-top:3px; font-size:15px; overflow: hidden; width: calc(100% - 40px); text-overflow: ellipsis; white-space: nowrap;">`;
                 // msg
-                h += `<span class="upload-progress-msg">${i18n('downloading')} <strong>${options.item_name ?? ''}</strong></span>`;
+                h += `<span class="upload-progress-msg">${i18n('downloading')}...<strong>${options.item_name ?? ''}</strong></span>`;
             h += `</div>`;
             // Progress
             h += `<div class="download-progress-bar-container" style="clear:both; margin-top:20px; border-radius:3px;">`;

+ 1 - 1
src/UI/UIWindowMyWebsites.js

@@ -68,7 +68,7 @@ async function UIWindowMyWebsites(options){
         margin-bottom: 50px;
         -webkit-font-smoothing: antialiased;
         -moz-osx-font-smoothing: grayscale;
-        color: #596c7c;">Loading...</p>`);
+        color: #596c7c;">${i18n('loading')}...</p>`);
     }, 1000);
 
     puter.hosting.list().then(function (sites){

+ 4 - 0
src/i18n/translations/en.js

@@ -63,9 +63,11 @@ const en = {
         html_document: 'HTML document',
         image: 'Image',
         invite_link: "Invite Link",
+        item: 'item',
         items_in_trash_cannot_be_renamed: `This item can't be renamed because it's in the trash. To rename this item, first drag it out of the Trash.`,
         jpeg_image: 'JPEG image',
         keep_in_taskbar: 'Keep in Taskbar',
+        loading: 'Loading',
         log_in: "Log In",
         log_into_another_account_anyway: 'Log into another account anyway',
         log_out: 'Log Out',
@@ -105,6 +107,7 @@ const en = {
         properties: "Properties",
         publish: "Publish",
         publish_as_website: 'Publish as website',
+        plural_suffix: 's',
         recent: "Recent",
         recover_password: "Recover Password",
         refer_friends_c2a: "Get 1 GB for every friend who creates and confirms an account on Puter. Your friend will get 1 GB too!",
@@ -125,6 +128,7 @@ const en = {
         save_session_c2a: 'Create an account to save your current session and avoid losing your work.',
         scan_qr_c2a: 'Scan the code below to log into this session from other devices',
         select: "Select",
+        selected: 'selected',
         select_color: 'Select color…',
         send: "Send",
         send_password_recovery_email: "Send Password Recovery Email",

+ 4 - 0
src/i18n/translations/nb.js

@@ -63,9 +63,11 @@ const nb = {
         html_document: "HTML-dokument",
         image: "Bilde",
         invite_link: "Invitasjonslenke",
+        item: 'element',
         items_in_trash_cannot_be_renamed: "Dette elementet kan ikke omdøpes fordi det er i papirkurven. For å omdøpe dette elementet, dra det først ut av papirkurven.",
         jpeg_image: "JPEG-bilde",
         keep_in_taskbar: "Behold i oppgavelinjen",
+        loading: 'Laster',
         log_in: "Logg inn",
         log_into_another_account_anyway: 'Logg inn på en annen bruker uansett',
         log_out: "Logg ut",
@@ -105,6 +107,7 @@ const nb = {
         proceed_to_login: 'Fortsett til innlogging',
         publish: "Publiser",
         publish_as_website: "Publiser som nettsted",
+        plural_suffix: 'er',
         recent: "Nylig",
         recover_password: "Gjenopprett passord",
         refer_friends_c2a: "Få 1 GB for hver venn som oppretter og bekrefter en konto på Puter. Vennen din får også 1 GB.",
@@ -125,6 +128,7 @@ const nb = {
         save_session_c2a: "Opprett en konto for å lagre gjeldende økt og unngå å miste arbeidet ditt.",
         scan_qr_c2a: "Skann koden nedenfor for å logge inn på denne økten fra andre enheter",
         select: "Velg",
+        selected: 'valgt',
         select_color: "Velg farge…",
         send: "Send",
         send_password_recovery_email: "Send e-post for gjenoppretting av passord",