Merge pull request #217 from BillionClaw/fix/upload-notification-i18n

This commit is contained in:
Dionisio Pozo
2026-03-17 07:58:21 +01:00
committed by GitHub
15 changed files with 23 additions and 11 deletions
+9 -11
View File
@@ -143,11 +143,11 @@ const notifications = (() => {
item.className = 'notif-item'; item.className = 'notif-item';
item.id = batchId; item.id = batchId;
const locale = window.i18n?.getCurrentLocale?.() || 'en'; const t = window.i18n?.t || ((k) => k);
const uploadingText = folderName const uploadingText = folderName
? (locale.startsWith('es') ? `📁 Subiendo ${_esc(folderName)}…` : `📁 Uploading ${_esc(folderName)}…`) ? `📁 ${t('upload.uploading')} ${_esc(folderName)}…`
: (locale.startsWith('es') ? 'Subiendo…' : 'Uploading…'); : t('upload.uploading');
const filesLabel = locale.startsWith('es') ? 'archivos' : 'files'; const filesLabel = t('upload.files');
item.innerHTML = ` item.innerHTML = `
<div class="notif-item-icon upload"><i class="fas fa-cloud-upload-alt"></i></div> <div class="notif-item-icon upload"><i class="fas fa-cloud-upload-alt"></i></div>
@@ -254,8 +254,8 @@ const notifications = (() => {
const pctEl = $(batchId + '-pct'); const pctEl = $(batchId + '-pct');
const statsEl = $(batchId + '-stats'); const statsEl = $(batchId + '-stats');
const locale = window.i18n?.getCurrentLocale?.() || 'en'; const t = window.i18n?.t || ((k) => k);
const filesLabel = locale.startsWith('es') ? 'archivos' : 'files'; const filesLabel = t('upload.files');
if (fillEl) fillEl.style.width = pctVal + '%'; if (fillEl) fillEl.style.width = pctVal + '%';
if (pctEl) pctEl.textContent = pctVal + '%'; if (pctEl) pctEl.textContent = pctVal + '%';
@@ -282,11 +282,9 @@ const notifications = (() => {
const curEl = $(batchId + '-current'); const curEl = $(batchId + '-current');
if (curEl) curEl.textContent = ''; if (curEl) curEl.textContent = '';
const locale = window.i18n?.getCurrentLocale?.() || 'en'; const t = window.i18n?.t || ((k) => k);
const filesLabel = locale.startsWith('es') ? 'archivos' : 'files'; const filesLabel = t('upload.files');
const completeText = locale.startsWith('es') const completeText = t('upload.complete', { count: successCount, total: totalFiles });
? `✅ ${successCount} / ${totalFiles} ${filesLabel} subidos`
: `✅ ${successCount} / ${totalFiles} ${filesLabel} uploaded`;
if (titleEl) titleEl.textContent = completeText; if (titleEl) titleEl.textContent = completeText;
if (iconEl) { if (iconEl) {
+1
View File
@@ -27,6 +27,7 @@
"upload_folder": "رفع مجلد", "upload_folder": "رفع مجلد",
"upload.uploading": "جارٍ الرفع...", "upload.uploading": "جارٍ الرفع...",
"upload.complete": "{count} / {total} تم رفعها", "upload.complete": "{count} / {total} تم رفعها",
"upload.files": "ملفات",
"rename": "إعادة التسمية", "rename": "إعادة التسمية",
"move": "نقل إلى...", "move": "نقل إلى...",
"move_to": "نقل إلى", "move_to": "نقل إلى",
+1
View File
@@ -27,6 +27,7 @@
"upload_folder": "Ordner hochladen", "upload_folder": "Ordner hochladen",
"upload.uploading": "Wird hochgeladen...", "upload.uploading": "Wird hochgeladen...",
"upload.complete": "{count} / {total} hochgeladen", "upload.complete": "{count} / {total} hochgeladen",
"upload.files": "Dateien",
"rename": "Umbenennen", "rename": "Umbenennen",
"move": "Verschieben nach...", "move": "Verschieben nach...",
"move_to": "Verschieben nach", "move_to": "Verschieben nach",
+1
View File
@@ -27,6 +27,7 @@
"upload_folder": "Upload folder", "upload_folder": "Upload folder",
"upload.uploading": "Uploading...", "upload.uploading": "Uploading...",
"upload.complete": "{count} / {total} uploaded", "upload.complete": "{count} / {total} uploaded",
"upload.files": "files",
"rename": "Rename", "rename": "Rename",
"move": "Move to...", "move": "Move to...",
"move_to": "Move to", "move_to": "Move to",
+1
View File
@@ -146,6 +146,7 @@
"upload_folder": "Subir carpeta", "upload_folder": "Subir carpeta",
"upload.uploading": "Subiendo...", "upload.uploading": "Subiendo...",
"upload.complete": "{count} / {total} subidos", "upload.complete": "{count} / {total} subidos",
"upload.files": "archivos",
"rename": "Renombrar", "rename": "Renombrar",
"move": "Mover a...", "move": "Mover a...",
"move_to": "Mover a", "move_to": "Mover a",
+1
View File
@@ -27,6 +27,7 @@
"upload_folder": "بارگذاری پوشه", "upload_folder": "بارگذاری پوشه",
"upload.uploading": "...در حال بارگذاری", "upload.uploading": "...در حال بارگذاری",
"upload.complete": "{count} / {total} بارگذاری شد", "upload.complete": "{count} / {total} بارگذاری شد",
"upload.files": "فایل‌ها",
"rename": "تغییر نام", "rename": "تغییر نام",
"move": "انتقال به...", "move": "انتقال به...",
"move_to": "انتقال به", "move_to": "انتقال به",
+1
View File
@@ -27,6 +27,7 @@
"upload_folder": "Téléverser un dossier", "upload_folder": "Téléverser un dossier",
"upload.uploading": "Envoi en cours...", "upload.uploading": "Envoi en cours...",
"upload.complete": "{count} / {total} envoyés", "upload.complete": "{count} / {total} envoyés",
"upload.files": "fichiers",
"rename": "Renommer", "rename": "Renommer",
"move": "Déplacer vers...", "move": "Déplacer vers...",
"move_to": "Déplacer vers", "move_to": "Déplacer vers",
+1
View File
@@ -27,6 +27,7 @@
"upload_folder": "फ़ोल्डर अपलोड करें", "upload_folder": "फ़ोल्डर अपलोड करें",
"upload.uploading": "अपलोड हो रहा है...", "upload.uploading": "अपलोड हो रहा है...",
"upload.complete": "{count} / {total} अपलोड हुईं", "upload.complete": "{count} / {total} अपलोड हुईं",
"upload.files": "फ़ाइलें",
"rename": "नाम बदलें", "rename": "नाम बदलें",
"move": "यहाँ ले जाएँ...", "move": "यहाँ ले जाएँ...",
"move_to": "यहाँ ले जाएँ", "move_to": "यहाँ ले जाएँ",
+1
View File
@@ -27,6 +27,7 @@
"upload_folder": "Carica cartella", "upload_folder": "Carica cartella",
"upload.uploading": "Caricamento...", "upload.uploading": "Caricamento...",
"upload.complete": "{count} / {total} caricati", "upload.complete": "{count} / {total} caricati",
"upload.files": "file",
"rename": "Rinomina", "rename": "Rinomina",
"move": "Sposta in...", "move": "Sposta in...",
"move_to": "Sposta in", "move_to": "Sposta in",
+1
View File
@@ -27,6 +27,7 @@
"upload_folder": "フォルダをアップロード", "upload_folder": "フォルダをアップロード",
"upload.uploading": "アップロード中...", "upload.uploading": "アップロード中...",
"upload.complete": "{count} / {total} アップロード完了", "upload.complete": "{count} / {total} アップロード完了",
"upload.files": "ファイル",
"rename": "名前を変更", "rename": "名前を変更",
"move": "移動先...", "move": "移動先...",
"move_to": "移動先", "move_to": "移動先",
+1
View File
@@ -27,6 +27,7 @@
"upload_folder": "폴더 업로드", "upload_folder": "폴더 업로드",
"upload.uploading": "업로드 중...", "upload.uploading": "업로드 중...",
"upload.complete": "{count} / {total} 업로드 완료", "upload.complete": "{count} / {total} 업로드 완료",
"upload.files": "파일",
"rename": "이름 변경", "rename": "이름 변경",
"move": "이동...", "move": "이동...",
"move_to": "이동 대상", "move_to": "이동 대상",
+1
View File
@@ -27,6 +27,7 @@
"upload_folder": "Map uploaden", "upload_folder": "Map uploaden",
"upload.uploading": "Uploaden...", "upload.uploading": "Uploaden...",
"upload.complete": "{count} / {total} geüpload", "upload.complete": "{count} / {total} geüpload",
"upload.files": "bestanden",
"rename": "Hernoemen", "rename": "Hernoemen",
"move": "Verplaatsen naar...", "move": "Verplaatsen naar...",
"move_to": "Verplaatsen naar", "move_to": "Verplaatsen naar",
+1
View File
@@ -27,6 +27,7 @@
"upload_folder": "Enviar pasta", "upload_folder": "Enviar pasta",
"upload.uploading": "Enviando...", "upload.uploading": "Enviando...",
"upload.complete": "{count} / {total} enviados", "upload.complete": "{count} / {total} enviados",
"upload.files": "arquivos",
"rename": "Renomear", "rename": "Renomear",
"move": "Mover para...", "move": "Mover para...",
"move_to": "Mover para", "move_to": "Mover para",
+1
View File
@@ -27,6 +27,7 @@
"upload_folder": "Загрузить папку", "upload_folder": "Загрузить папку",
"upload.uploading": "Загрузка...", "upload.uploading": "Загрузка...",
"upload.complete": "{count} / {total} загружено", "upload.complete": "{count} / {total} загружено",
"upload.files": "файлов",
"rename": "Переименовать", "rename": "Переименовать",
"move": "Переместить в...", "move": "Переместить в...",
"move_to": "Переместить в", "move_to": "Переместить в",
+1
View File
@@ -27,6 +27,7 @@
"upload_folder": "上传文件夹", "upload_folder": "上传文件夹",
"upload.uploading": "上传中...", "upload.uploading": "上传中...",
"upload.complete": "{count} / {total} 已上传", "upload.complete": "{count} / {total} 已上传",
"upload.files": "文件",
"rename": "重命名", "rename": "重命名",
"move": "移动到...", "move": "移动到...",
"move_to": "移动到", "move_to": "移动到",