Skip to content

Commit

Permalink
feat: Show "Deleting /foo" in progress window when deleting files
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
AtkinsSJ committed May 9, 2024
1 parent c12312c commit f07c13a
Show file tree
Hide file tree
Showing 29 changed files with 34 additions and 29 deletions.
6 changes: 5 additions & 1 deletion src/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
// --------------------------------------------------------
Expand All @@ -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});
Expand Down Expand Up @@ -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({
Expand Down
2 changes: 1 addition & 1 deletion src/i18n/translations/ar.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ const ar = {
log_in: "تسجيل الدخول",
log_out: 'تسجيل خروج',
move: 'يتحرك',
moving: "متحرك ",
moving_file: "متحرك %%",
my_websites: "مواقعي الإلكترونية ",
name: 'اسم',
name_cannot_be_empty: 'لا يمكن أن يكون الاسم فارغًا',
Expand Down
2 changes: 1 addition & 1 deletion src/i18n/translations/bn.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ const bn = {
log_in: "প্রবেশ করুন",
log_out: 'প্রস্থান',
move: 'সরান',
moving: "চলন্ত",
moving_file: "চলন্ত %%",
my_websites: "আমার ওয়েবসাইট",
name: 'নাম',
name_cannot_be_empty: 'নাম খালি রাখা যাবে না।',
Expand Down
2 changes: 1 addition & 1 deletion src/i18n/translations/br.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.',
Expand Down
2 changes: 1 addition & 1 deletion src/i18n/translations/da.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
Expand Down
2 changes: 1 addition & 1 deletion src/i18n/translations/de.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.',
Expand Down
2 changes: 1 addition & 1 deletion src/i18n/translations/emoji.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ const emoji = {
log_into_another_account_anyway: '👤🔄',
log_out: '🔚',
move: '➡️',
moving: "➡️...",
moving_file: "➡️ %%...",
my_websites: "🌐👤",
name: '📛',
name_cannot_be_empty: '📛❌',
Expand Down
3 changes: 2 additions & 1 deletion src/i18n/translations/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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.',
Expand Down
2 changes: 1 addition & 1 deletion src/i18n/translations/es.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.',
Expand Down
2 changes: 1 addition & 1 deletion src/i18n/translations/fa.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ const fa = {
log_in: "ورود",
log_out: 'خروج',
move: 'انتقال',
moving: "انتقال",
moving_file: "انتقال %%",
my_websites: "وبسایت های من",
name: 'نام',
name_cannot_be_empty: 'نام نمی تواند خالی باشد.',
Expand Down
2 changes: 1 addition & 1 deletion src/i18n/translations/fi.js
Original file line number Diff line number Diff line change
Expand Up @@ -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ä.',
Expand Down
2 changes: 1 addition & 1 deletion src/i18n/translations/fr.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
Expand Down
2 changes: 1 addition & 1 deletion src/i18n/translations/hy.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ const hy = {
log_in: "Մուտք գործել",
log_out: "Դուրս գալ",
move: "Տեղափոխել",
moving: "Տեղափոխվում է",
moving_file: "Տեղափոխվում է %%",
my_websites: "Իմ կայքերը",
name: "Անուն",
name_cannot_be_empty: "Անվան դաշտը չի կառող լինել դատարկ։",
Expand Down
2 changes: 1 addition & 1 deletion src/i18n/translations/ig.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.',
Expand Down
2 changes: 1 addition & 1 deletion src/i18n/translations/it.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.',
Expand Down
2 changes: 1 addition & 1 deletion src/i18n/translations/ko.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ const ko = {
log_in: "로그인",
log_out: '로그아웃',
move: '이동',
moving: "이동 중",
moving_file: "이동 중 %%",
my_websites: "내 웹사이트",
name: '이름',
name_cannot_be_empty: '이름은 비워둘 수 없습니다.',
Expand Down
2 changes: 1 addition & 1 deletion src/i18n/translations/nb.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
Expand Down
2 changes: 1 addition & 1 deletion src/i18n/translations/nl.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.',
Expand Down
2 changes: 1 addition & 1 deletion src/i18n/translations/nn.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
Expand Down
2 changes: 1 addition & 1 deletion src/i18n/translations/pl.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.',
Expand Down
2 changes: 1 addition & 1 deletion src/i18n/translations/pt.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.',
Expand Down
2 changes: 1 addition & 1 deletion src/i18n/translations/ro.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.',
Expand Down
2 changes: 1 addition & 1 deletion src/i18n/translations/ru.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ const ru = {
log_out: 'Выйти',
manage_sessions: "Управление Сеансами",
move: 'Переместить',
moving: "Перемещается",
moving_file: "Перемещается %%",
my_websites: "Мои Сайты",
name: 'Имя',
name_cannot_be_empty: 'Имя не может быть пустым.',
Expand Down
2 changes: 1 addition & 1 deletion src/i18n/translations/sv.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
Expand Down
2 changes: 1 addition & 1 deletion src/i18n/translations/th.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ const th = {
log_into_another_account_anyway: "ต้องการเข้าสู่บัญชีอื่น",
log_out: "ออกจากระบบ",
move: "ย้าย",
moving: "กำลังย้าย",
moving_file: "กำลังย้าย %%",
my_websites: "เว็บไซต์ของฉัน",
name: "ชื่อ",
name_cannot_be_empty: "ไม่สามารถปล่อยช่องชื่อให้ว่างได้",
Expand Down
2 changes: 1 addition & 1 deletion src/i18n/translations/tr.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
Expand Down
2 changes: 1 addition & 1 deletion src/i18n/translations/ur.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ const ur = {
log_in: "لاگ ان",
log_out: 'لاگ آؤٹ',
move: 'منتقل کریں',
moving: "منتقل ہو رہا ہے ",
moving_file: "منتقل ہو رہا ہے %%",
my_websites: "میری ویب سائٹیں ",
name: 'نام',
name_cannot_be_empty: 'نام خالی نہیں ہو سکتا',
Expand Down
2 changes: 1 addition & 1 deletion src/i18n/translations/zh.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ const zh = {
log_in: "登录",
log_out: '登出',
move: '移动',
moving: "移动",
moving_file: "移动 %%",
my_websites: "我的网站",
name: '名称',
name_cannot_be_empty: '名称不能为空。',
Expand Down
2 changes: 1 addition & 1 deletion src/i18n/translations/zhtw.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ const zhtw = {
log_into_another_account_anyway: '無論如何都要登入另一個帳號',
log_out: '登出',
move: '移動',
moving: "正在移動",
moving_file: "正在移動 %%",
my_websites: "我的網站",
name: '名稱',
name_cannot_be_empty: '名稱不能為空。',
Expand Down

0 comments on commit f07c13a

Please sign in to comment.