From f07c13a50cee790eec44bce2f6e56fbcbf73f9b0 Mon Sep 17 00:00:00 2001 From: Sam Atkins Date: Thu, 9 May 2024 15:11:54 +0100 Subject: [PATCH] feat: Show "Deleting /foo" in progress window when deleting files Previously we showed "Moving /foo" which was confusing. Also, make use of i18n replacements instead of gluing strings together, because other languages might put the words in a different order. For now, I've modified all the translations so that the "Moving foo" text will appear as it did before, but these will require someone who actually knows the different languages to check and correct them. --- src/helpers.js | 6 +++++- src/i18n/translations/ar.js | 2 +- src/i18n/translations/bn.js | 2 +- src/i18n/translations/br.js | 2 +- src/i18n/translations/da.js | 2 +- src/i18n/translations/de.js | 2 +- src/i18n/translations/emoji.js | 2 +- src/i18n/translations/en.js | 3 ++- src/i18n/translations/es.js | 2 +- src/i18n/translations/fa.js | 2 +- src/i18n/translations/fi.js | 2 +- src/i18n/translations/fr.js | 2 +- src/i18n/translations/hy.js | 2 +- src/i18n/translations/ig.js | 2 +- src/i18n/translations/it.js | 2 +- src/i18n/translations/ko.js | 2 +- src/i18n/translations/nb.js | 2 +- src/i18n/translations/nl.js | 2 +- src/i18n/translations/nn.js | 2 +- src/i18n/translations/pl.js | 2 +- src/i18n/translations/pt.js | 2 +- src/i18n/translations/ro.js | 2 +- src/i18n/translations/ru.js | 2 +- src/i18n/translations/sv.js | 2 +- src/i18n/translations/th.js | 2 +- src/i18n/translations/tr.js | 2 +- src/i18n/translations/ur.js | 2 +- src/i18n/translations/zh.js | 2 +- src/i18n/translations/zhtw.js | 2 +- 29 files changed, 34 insertions(+), 29 deletions(-) diff --git a/src/helpers.js b/src/helpers.js index ce2ffc481..2302e54fc 100644 --- a/src/helpers.js +++ b/src/helpers.js @@ -2199,6 +2199,8 @@ window.move_items = async function(el_items, dest_path, is_undo = false){ // indicates whether this is a recycling operation let recycling = false; + let status_i18n_string = 'moving_file'; + // -------------------------------------------------------- // Trashing // -------------------------------------------------------- @@ -2210,6 +2212,8 @@ window.move_items = async function(el_items, dest_path, is_undo = false){ trashed_ts: Math.round(Date.now() / 1000), }; + status_i18n_string = 'deleting_file'; + // update other clients if(window.socket) window.socket.emit('trash.is_empty', {is_empty: false}); @@ -2241,7 +2245,7 @@ window.move_items = async function(el_items, dest_path, is_undo = false){ // -------------------------------------------------------- // update progress window with current item being moved // -------------------------------------------------------- - progwin?.set_status(i18n('moving') + ' ' + html_encode(path_to_show_on_progwin)); + progwin?.set_status(i18n(status_i18n_string, path_to_show_on_progwin)); // execute move let resp = await puter.fs.move({ diff --git a/src/i18n/translations/ar.js b/src/i18n/translations/ar.js index a7b3f4e03..c429fd485 100644 --- a/src/i18n/translations/ar.js +++ b/src/i18n/translations/ar.js @@ -83,7 +83,7 @@ const ar = { log_in: "تسجيل الدخول", log_out: 'تسجيل خروج', move: 'يتحرك', - moving: "متحرك ", + moving_file: "متحرك %%", my_websites: "مواقعي الإلكترونية ", name: 'اسم', name_cannot_be_empty: 'لا يمكن أن يكون الاسم فارغًا', diff --git a/src/i18n/translations/bn.js b/src/i18n/translations/bn.js index e5a89f133..c90ebb551 100644 --- a/src/i18n/translations/bn.js +++ b/src/i18n/translations/bn.js @@ -82,7 +82,7 @@ const bn = { log_in: "প্রবেশ করুন", log_out: 'প্রস্থান', move: 'সরান', - moving: "চলন্ত", + moving_file: "চলন্ত %%", my_websites: "আমার ওয়েবসাইট", name: 'নাম', name_cannot_be_empty: 'নাম খালি রাখা যাবে না।', diff --git a/src/i18n/translations/br.js b/src/i18n/translations/br.js index 40ccc905b..be8fb93b7 100644 --- a/src/i18n/translations/br.js +++ b/src/i18n/translations/br.js @@ -102,7 +102,7 @@ const br = { log_into_another_account_anyway: 'Entrar com outra conta de qualquer maneira', log_out: 'Sair', move: 'Mover', - moving: "Movendo", + moving_file: "Movendo %%", my_websites: "Meus Sites", name: 'Nome', name_cannot_be_empty: 'Nome não pode ser vazio.', diff --git a/src/i18n/translations/da.js b/src/i18n/translations/da.js index 891fc56a0..a91d109fe 100644 --- a/src/i18n/translations/da.js +++ b/src/i18n/translations/da.js @@ -83,7 +83,7 @@ const da = { log_in: "Log ind", log_out: "Log ud", move: "Flyt", - moving: "Flytter", + moving_file: "Flytter %%", my_websites: "Mine websteder", name: "Navn", name_cannot_be_empty: "Navn kan ikke være tomt.", diff --git a/src/i18n/translations/de.js b/src/i18n/translations/de.js index 639d4b765..7f6b08588 100644 --- a/src/i18n/translations/de.js +++ b/src/i18n/translations/de.js @@ -83,7 +83,7 @@ const de = { log_in: "Einloggen", log_out: 'Ausloggen', move: 'Verschieben', - moving: "Verschiebe", + moving_file: "Verschiebe %%", my_websites: "Meine Webseiten", name: 'Name', name_cannot_be_empty: 'Name kann nicht leer sein.', diff --git a/src/i18n/translations/emoji.js b/src/i18n/translations/emoji.js index dfa41ee43..109dc7d21 100644 --- a/src/i18n/translations/emoji.js +++ b/src/i18n/translations/emoji.js @@ -92,7 +92,7 @@ const emoji = { log_into_another_account_anyway: '👤🔄', log_out: '🔚', move: '➡️', - moving: "➡️...", + moving_file: "➡️ %%...", my_websites: "🌐👤", name: '📛', name_cannot_be_empty: '📛❌', diff --git a/src/i18n/translations/en.js b/src/i18n/translations/en.js index edee54100..c575de5f9 100644 --- a/src/i18n/translations/en.js +++ b/src/i18n/translations/en.js @@ -86,6 +86,7 @@ const en = { delete: 'Delete', delete_account: "Delete Account", delete_permanently: "Delete Permanently", + deleting_file: "Deleting %%", deploy_as_app: 'Deploy as app', descending: 'Descending', desktop_background_fit: "Fit", @@ -142,7 +143,7 @@ const en = { looks_good: "Looks good!", manage_sessions: "Manage Sessions", move: 'Move', - moving: "Moving", + moving_file: "Moving %%", my_websites: "My Websites", name: 'Name', name_cannot_be_empty: 'Name cannot be empty.', diff --git a/src/i18n/translations/es.js b/src/i18n/translations/es.js index 917ef1c32..6d03e69a2 100644 --- a/src/i18n/translations/es.js +++ b/src/i18n/translations/es.js @@ -83,7 +83,7 @@ const es = { log_in: "Iniciar sesión", log_out: 'Cerrar sesión', move: 'Mover', - moving: "Moviendo", + moving_file: "Moviendo %%", my_websites: "Mis páginas web", name: 'Nombre', name_cannot_be_empty: 'El nombre no puede estar vacío.', diff --git a/src/i18n/translations/fa.js b/src/i18n/translations/fa.js index 1aecc6d17..8f5773614 100644 --- a/src/i18n/translations/fa.js +++ b/src/i18n/translations/fa.js @@ -84,7 +84,7 @@ const fa = { log_in: "ورود", log_out: 'خروج', move: 'انتقال', - moving: "انتقال", + moving_file: "انتقال %%", my_websites: "وبسایت های من", name: 'نام', name_cannot_be_empty: 'نام نمی تواند خالی باشد.', diff --git a/src/i18n/translations/fi.js b/src/i18n/translations/fi.js index 9dc4eb620..37a159dfa 100644 --- a/src/i18n/translations/fi.js +++ b/src/i18n/translations/fi.js @@ -116,7 +116,7 @@ const fi = { log_in: "Kirjaudu Sisään", log_out: 'Kirjaudu Ulos', move: 'Siirrä', - moving: "Siirretään", + moving_file: "Siirretään %%", my_websites: "Verkkosivustoni", name: 'Nimi', name_cannot_be_empty: 'Nimi ei voi olla tyhjä.', diff --git a/src/i18n/translations/fr.js b/src/i18n/translations/fr.js index 1ff642a61..5f6bbe0e2 100644 --- a/src/i18n/translations/fr.js +++ b/src/i18n/translations/fr.js @@ -82,7 +82,7 @@ const fr = { log_in: "Se connecter", log_out: "Se déconnecter", move: "Déplacer", - moving: "Déplacement en cours", + moving_file: "Déplacement en cours %%", my_websites: "Mes sites web", name: "Nom", name_cannot_be_empty: "Le nom ne peut pas être vide.", diff --git a/src/i18n/translations/hy.js b/src/i18n/translations/hy.js index 86ee13c6b..06cae2caa 100644 --- a/src/i18n/translations/hy.js +++ b/src/i18n/translations/hy.js @@ -83,7 +83,7 @@ const hy = { log_in: "Մուտք գործել", log_out: "Դուրս գալ", move: "Տեղափոխել", - moving: "Տեղափոխվում է", + moving_file: "Տեղափոխվում է %%", my_websites: "Իմ կայքերը", name: "Անուն", name_cannot_be_empty: "Անվան դաշտը չի կառող լինել դատարկ։", diff --git a/src/i18n/translations/ig.js b/src/i18n/translations/ig.js index 9276a8a85..f10d30941 100644 --- a/src/i18n/translations/ig.js +++ b/src/i18n/translations/ig.js @@ -126,7 +126,7 @@ const ig = { log_out: 'pụọ', manage_sessions: "Jikwaa Oge", move: 'Bugharịa', - moving: "Na Bugharịa", + moving_file: "Na Bugharịa %%", my_websites: "Weebụsaịtị m", name: 'Aha', name_cannot_be_empty: 'Aha enweghị ike ịbụ ihe efu.', diff --git a/src/i18n/translations/it.js b/src/i18n/translations/it.js index 6efe23db5..4be3baadc 100644 --- a/src/i18n/translations/it.js +++ b/src/i18n/translations/it.js @@ -83,7 +83,7 @@ const it = { log_in: "Accedi", log_out: 'Disconnettiti', move: 'Sposta', - moving: "Spostamento in corso", + moving_file: "Spostamento in corso %%", my_websites: "I miei siti web", name: 'Nome', name_cannot_be_empty: 'Il nome non può essere vuoto.', diff --git a/src/i18n/translations/ko.js b/src/i18n/translations/ko.js index f9f2c8f66..b7318a6e6 100644 --- a/src/i18n/translations/ko.js +++ b/src/i18n/translations/ko.js @@ -91,7 +91,7 @@ const ko = { log_in: "로그인", log_out: '로그아웃', move: '이동', - moving: "이동 중", + moving_file: "이동 중 %%", my_websites: "내 웹사이트", name: '이름', name_cannot_be_empty: '이름은 비워둘 수 없습니다.', diff --git a/src/i18n/translations/nb.js b/src/i18n/translations/nb.js index 6fdc67e45..478ef91e7 100644 --- a/src/i18n/translations/nb.js +++ b/src/i18n/translations/nb.js @@ -92,7 +92,7 @@ const nb = { log_into_another_account_anyway: 'Logg inn på en annen bruker uansett', log_out: "Logg ut", move: "Flytt", - moving: "Flytter", + moving_file: "Flytter %%", my_websites: "Mine nettsteder", name: "Navn", name_cannot_be_empty: "Navn kan ikke være tomt.", diff --git a/src/i18n/translations/nl.js b/src/i18n/translations/nl.js index 568af6fc5..c2d8b75fd 100644 --- a/src/i18n/translations/nl.js +++ b/src/i18n/translations/nl.js @@ -102,7 +102,7 @@ const nl = { log_into_another_account_anyway: 'Alsnog met ander account inloggen', log_out: 'Uitloggen', move: 'Verplaatsen', - moving: "Aan het verplaatsen", + moving_file: "Aan het verplaatsen %%", my_websites: "Mijn Websites", name: 'Naam', name_cannot_be_empty: 'Naam kan niet leeg zijn.', diff --git a/src/i18n/translations/nn.js b/src/i18n/translations/nn.js index 15d2e4d2a..ccadf63bc 100644 --- a/src/i18n/translations/nn.js +++ b/src/i18n/translations/nn.js @@ -83,7 +83,7 @@ const nn = { log_in: "Logg inn", log_out: "Logg ut", move: "Flytt", - moving: "Flyttar", + moving_file: "Flyttar %%", my_websites: "Mine nettstader", name: "Namn", name_cannot_be_empty: "Namn kan ikkje vere tomt.", diff --git a/src/i18n/translations/pl.js b/src/i18n/translations/pl.js index 74628cb27..7db047164 100644 --- a/src/i18n/translations/pl.js +++ b/src/i18n/translations/pl.js @@ -92,7 +92,7 @@ const pl = { log_into_another_account_anyway: 'Zaloguj się do innego konta mimo wszystko', log_out: 'Wyloguj się', move: 'Przenieś', - moving: "Przenoszenie", + moving_file: "Przenoszenie %%", my_websites: "Moje strony", name: 'Nazwa', name_cannot_be_empty: 'Nazwa nie może być pusta.', diff --git a/src/i18n/translations/pt.js b/src/i18n/translations/pt.js index 0d3468281..349c906ae 100644 --- a/src/i18n/translations/pt.js +++ b/src/i18n/translations/pt.js @@ -106,7 +106,7 @@ const pt = { log_into_another_account_anyway: 'Entrar com outra conta na mesma', log_out: 'Sair', move: 'Mover', - moving: "Movendo", + moving_file: "Movendo %%", my_websites: "Meus Sites", name: 'Nome', name_cannot_be_empty: 'Nome não pode ser vazio.', diff --git a/src/i18n/translations/ro.js b/src/i18n/translations/ro.js index 823b860c4..9bca3a483 100644 --- a/src/i18n/translations/ro.js +++ b/src/i18n/translations/ro.js @@ -82,7 +82,7 @@ const ro = { log_in: "Loghează-te", log_out: 'Deconectează-te', move: 'Mută', - moving: "Se mută", + moving_file: "Se mută %%", my_websites: "Site-urile mele", name: 'Nume', name_cannot_be_empty: 'Numele nu poate fi necompletat.', diff --git a/src/i18n/translations/ru.js b/src/i18n/translations/ru.js index bd15f3656..9d20d6c42 100644 --- a/src/i18n/translations/ru.js +++ b/src/i18n/translations/ru.js @@ -126,7 +126,7 @@ const ru = { log_out: 'Выйти', manage_sessions: "Управление Сеансами", move: 'Переместить', - moving: "Перемещается", + moving_file: "Перемещается %%", my_websites: "Мои Сайты", name: 'Имя', name_cannot_be_empty: 'Имя не может быть пустым.', diff --git a/src/i18n/translations/sv.js b/src/i18n/translations/sv.js index 6d7d1ece7..a05a5e76e 100644 --- a/src/i18n/translations/sv.js +++ b/src/i18n/translations/sv.js @@ -83,7 +83,7 @@ const sv = { log_in: "Logga in", log_out: "Logga ut", move: "Flytta", - moving: "Flyttar", + moving_file: "Flyttar %%", my_websites: "Mina webbplatser", name: "Namn", name_cannot_be_empty: "Namn kan inte vara tomt.", diff --git a/src/i18n/translations/th.js b/src/i18n/translations/th.js index 0be6cc909..2e7eeed67 100644 --- a/src/i18n/translations/th.js +++ b/src/i18n/translations/th.js @@ -91,7 +91,7 @@ const th = { log_into_another_account_anyway: "ต้องการเข้าสู่บัญชีอื่น", log_out: "ออกจากระบบ", move: "ย้าย", - moving: "กำลังย้าย", + moving_file: "กำลังย้าย %%", my_websites: "เว็บไซต์ของฉัน", name: "ชื่อ", name_cannot_be_empty: "ไม่สามารถปล่อยช่องชื่อให้ว่างได้", diff --git a/src/i18n/translations/tr.js b/src/i18n/translations/tr.js index 49e8ee23f..b440cb0b3 100644 --- a/src/i18n/translations/tr.js +++ b/src/i18n/translations/tr.js @@ -116,7 +116,7 @@ const tr = { log_out: "Çıkış Yap", manage_sessions: "Oturumları Yönet", move: "Taşı", - moving: "Taşınıyor", + moving_file: "Taşınıyor %%", my_websites: "Web Sitelerim", name: "Ad", name_cannot_be_empty: "Ad boş olamaz.", diff --git a/src/i18n/translations/ur.js b/src/i18n/translations/ur.js index f6492e402..af177e686 100644 --- a/src/i18n/translations/ur.js +++ b/src/i18n/translations/ur.js @@ -83,7 +83,7 @@ const ur = { log_in: "لاگ ان", log_out: 'لاگ آؤٹ', move: 'منتقل کریں', - moving: "منتقل ہو رہا ہے ", + moving_file: "منتقل ہو رہا ہے %%", my_websites: "میری ویب سائٹیں ", name: 'نام', name_cannot_be_empty: 'نام خالی نہیں ہو سکتا', diff --git a/src/i18n/translations/zh.js b/src/i18n/translations/zh.js index f8b976d0a..ee730ad71 100644 --- a/src/i18n/translations/zh.js +++ b/src/i18n/translations/zh.js @@ -87,7 +87,7 @@ const zh = { log_in: "登录", log_out: '登出', move: '移动', - moving: "移动", + moving_file: "移动 %%", my_websites: "我的网站", name: '名称', name_cannot_be_empty: '名称不能为空。', diff --git a/src/i18n/translations/zhtw.js b/src/i18n/translations/zhtw.js index 755fab818..25b1a3b08 100644 --- a/src/i18n/translations/zhtw.js +++ b/src/i18n/translations/zhtw.js @@ -113,7 +113,7 @@ const zhtw = { log_into_another_account_anyway: '無論如何都要登入另一個帳號', log_out: '登出', move: '移動', - moving: "正在移動", + moving_file: "正在移動 %%", my_websites: "我的網站", name: '名稱', name_cannot_be_empty: '名稱不能為空。',