Skip to content

Free, Open Source, Self-Hosted WhatsApp API Gateway

fix(dashboard): translate the proxy modal Save and row button labels

Yudhi Armyndharis01a10a5f935d
diff --git a/dashboard/src/i18n/locales.test.ts b/dashboard/src/i18n/locales.test.ts
index b2ac40a6e..60cf985a9 100644
--- a/dashboard/src/i18n/locales.test.ts
+++ b/dashboard/src/i18n/locales.test.ts
@@ -319,3 +319,23 @@ test('rtlLanguages only names shipped locales', () => {
assert.ok(rtl.length > 0, 'rtlLanguages parsed as empty — the anchor or the pattern has drifted');
for (const id of rtl) assert.ok(LOCALE_IDS.includes(id), `rtlLanguages names "${id}", which has no locale file`);
});
+
+// The parity checker flags a value identical to English only from 20 characters up, so a short label
+// left in English passes it. These pin the ones that sit next to translated text on a translated screen.
+const NON_EN_LOCALES = LOCALE_IDS.filter(id => id !== 'en');
+
+test('the proxy modal Save button is translated in every locale', () => {
+ for (const lng of NON_EN_LOCALES) {
+ assert.notEqual(i18n.t('common.save', { lng }), 'Save', `${lng} common.save is still English`);
+ }
+});
+
+test('the session proxy button uses the same script as the modal title it opens', () => {
+ const latin = /[A-Za-z]/;
+ for (const lng of LOCALE_IDS) {
+ // Latin-script locales, and he, whose title writes "proxy" too, keep the Latin term.
+ if (latin.test(i18n.t('sessions.proxy.title', { lng }))) continue;
+ const label = i18n.t('sessions.actions.proxy', { lng });
+ assert.ok(!latin.test(label), `${lng} sessions.actions.proxy is "${label}", the modal title is translated`);
+ }
+});
diff --git a/dashboard/src/i18n/locales/ar.json b/dashboard/src/i18n/locales/ar.json
index 8543b586e..1fdbac7b0 100644
--- a/dashboard/src/i18n/locales/ar.json
+++ b/dashboard/src/i18n/locales/ar.json
@@ -12,7 +12,7 @@
"cancel": "إلغاء",
"delete": "حذف",
"create": "إنشاء",
- "save": "Save",
+ "save": "حفظ",
"close": "إغلاق",
"showApiKey": "إظهار مفتاح API",
"hideApiKey": "إخفاء مفتاح API",
@@ -367,7 +367,7 @@
},
"actions": {
"view": "عرض",
- "proxy": "Proxy",
+ "proxy": "الوكيل",
"start": "بدء",
"stop": "إيقاف",
"reconnect": "إعادة الاتصال",
diff --git a/dashboard/src/i18n/locales/de.json b/dashboard/src/i18n/locales/de.json
index 416bf1371..3152d25fd 100644
--- a/dashboard/src/i18n/locales/de.json
+++ b/dashboard/src/i18n/locales/de.json
@@ -12,7 +12,7 @@
"cancel": "Abbrechen",
"delete": "Löschen",
"create": "Erstellen",
- "save": "Save",
+ "save": "Speichern",
"close": "Schließen",
"showApiKey": "API-Schlüssel anzeigen",
"hideApiKey": "API-Schlüssel ausblenden",
diff --git a/dashboard/src/i18n/locales/es.json b/dashboard/src/i18n/locales/es.json
index 9ab715f15..a2afb7d8f 100644
--- a/dashboard/src/i18n/locales/es.json
+++ b/dashboard/src/i18n/locales/es.json
@@ -12,7 +12,7 @@
"cancel": "Cancelar",
"delete": "Eliminar",
"create": "Crear",
- "save": "Save",
+ "save": "Guardar",
"close": "Cerrar",
"search": "Buscar",
"status": "Estado",
diff --git a/dashboard/src/i18n/locales/fr.json b/dashboard/src/i18n/locales/fr.json
index 2f42866f4..54aef223e 100644
--- a/dashboard/src/i18n/locales/fr.json
+++ b/dashboard/src/i18n/locales/fr.json
@@ -12,7 +12,7 @@
"cancel": "Annuler",
"delete": "Supprimer",
"create": "Créer",
- "save": "Save",
+ "save": "Enregistrer",
"close": "Fermer",
"showApiKey": "Afficher la clé API",
"hideApiKey": "Masquer la clé API",
diff --git a/dashboard/src/i18n/locales/he.json b/dashboard/src/i18n/locales/he.json
index 7c9f3d7fb..d253ad6f2 100644
--- a/dashboard/src/i18n/locales/he.json
+++ b/dashboard/src/i18n/locales/he.json
@@ -12,7 +12,7 @@
"cancel": "ביטול",
"delete": "מחיקה",
"create": "יצירה",
- "save": "Save",
+ "save": "שמירה",
"close": "סגירה",
"showApiKey": "הצג מפתח API",
"hideApiKey": "הסתר מפתח API",
diff --git a/dashboard/src/i18n/locales/ko.json b/dashboard/src/i18n/locales/ko.json
index 1839e2c96..452d0828c 100644
--- a/dashboard/src/i18n/locales/ko.json
+++ b/dashboard/src/i18n/locales/ko.json
@@ -12,7 +12,7 @@
"cancel": "취소",
"delete": "삭제",
"create": "생성",
- "save": "Save",
+ "save": "저장",
"close": "닫기",
"showApiKey": "API 키 표시",
"hideApiKey": "API 키 숨기기",
@@ -354,7 +354,7 @@
},
"actions": {
"view": "보기",
- "proxy": "Proxy",
+ "proxy": "프록시",
"start": "시작",
"stop": "중지",
"reconnect": "재연결",
diff --git a/dashboard/src/i18n/locales/pt-BR.json b/dashboard/src/i18n/locales/pt-BR.json
index 18ef1f1c7..3023a4ba4 100644
--- a/dashboard/src/i18n/locales/pt-BR.json
+++ b/dashboard/src/i18n/locales/pt-BR.json
@@ -12,7 +12,7 @@
"cancel": "Cancelar",
"delete": "Excluir",
"create": "Criar",
- "save": "Save",
+ "save": "Salvar",
"close": "Fechar",
"search": "Pesquisar",
"status": "Status",
diff --git a/dashboard/src/i18n/locales/te.json b/dashboard/src/i18n/locales/te.json
index 4e4d80e50..3166534d2 100644
--- a/dashboard/src/i18n/locales/te.json
+++ b/dashboard/src/i18n/locales/te.json
@@ -12,7 +12,7 @@
"cancel": "రద్దు చేయి",
"delete": "తొలగించు",
"create": "సృష్టించు",
- "save": "Save",
+ "save": "సేవ్ చేయి",
"close": "మూసివేయి",
"showApiKey": "API కీని చూపు",
"hideApiKey": "API కీని దాచు",
@@ -354,7 +354,7 @@
},
"actions": {
"view": "చూడు",
- "proxy": "Proxy",
+ "proxy": "ప్రాక్సీ",
"start": "ప్రారంభించు",
"stop": "ఆపివేయి",
"reconnect": "మళ్లీ కనెక్ట్ చేయి",
diff --git a/dashboard/src/i18n/locales/tr.json b/dashboard/src/i18n/locales/tr.json
index 72e584cd3..d7caf5589 100644
--- a/dashboard/src/i18n/locales/tr.json
+++ b/dashboard/src/i18n/locales/tr.json
@@ -12,7 +12,7 @@
"cancel": "İptal",
"delete": "Sil",
"create": "Oluştur",
- "save": "Save",
+ "save": "Kaydet",
"close": "Kapat",
"showApiKey": "API anahtarını göster",
"hideApiKey": "API anahtarını gizle",
diff --git a/dashboard/src/i18n/locales/zh-CN.json b/dashboard/src/i18n/locales/zh-CN.json
index 2b4e1314a..fef11b39a 100644
--- a/dashboard/src/i18n/locales/zh-CN.json
+++ b/dashboard/src/i18n/locales/zh-CN.json
@@ -12,7 +12,7 @@
"cancel": "取消",
"delete": "删除",
"create": "创建",
- "save": "Save",
+ "save": "保存",
"close": "关闭",
"showApiKey": "显示 API 密钥",
"hideApiKey": "隐藏 API 密钥",
@@ -354,7 +354,7 @@
},
"actions": {
"view": "查看",
- "proxy": "Proxy",
+ "proxy": "代理",
"start": "启动",
"stop": "停止",
"reconnect": "重新连接",
diff --git a/dashboard/src/i18n/locales/zh-HK.json b/dashboard/src/i18n/locales/zh-HK.json
index fa47c53c3..eac6e1b28 100644
--- a/dashboard/src/i18n/locales/zh-HK.json
+++ b/dashboard/src/i18n/locales/zh-HK.json
@@ -12,7 +12,7 @@
"cancel": "取消",
"delete": "刪除",
"create": "建立",
- "save": "Save",
+ "save": "儲存",
"close": "關閉",
"showApiKey": "顯示 API 金鑰",
"hideApiKey": "隱藏 API 金鑰",
@@ -354,7 +354,7 @@
},
"actions": {
"view": "查看",
- "proxy": "Proxy",
+ "proxy": "代理",
"start": "啟動",
"stop": "停止",
"reconnect": "重新連線",