Skip to content

Commit 25ab608

Browse files
committed
i18n: add translation files for es_ES, fr_FR, de_DE, ja, pt_BR
Complete .po translation files for all 5 languages supported by the Escalated docs: Spanish, French, German, Japanese, and Portuguese (Brazil). All 437 strings are translated in every language. Also includes the generation scripts for future translation updates.
1 parent 69936a9 commit 25ab608

8 files changed

Lines changed: 12306 additions & 0 deletions

languages/escalated-de_DE.po

Lines changed: 1957 additions & 0 deletions
Large diffs are not rendered by default.

languages/escalated-es_ES.po

Lines changed: 1957 additions & 0 deletions
Large diffs are not rendered by default.

languages/escalated-fr_FR.po

Lines changed: 1957 additions & 0 deletions
Large diffs are not rendered by default.

languages/escalated-ja.po

Lines changed: 1957 additions & 0 deletions
Large diffs are not rendered by default.

languages/escalated-pt_BR.po

Lines changed: 1957 additions & 0 deletions
Large diffs are not rendered by default.

scripts/fill-remaining.js

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
const fs = require('fs');
2+
const path = require('path');
3+
const rootDir = path.resolve(__dirname, '..');
4+
5+
const remaining = {
6+
fr_FR: {
7+
'Define macro actions as a JSON array. Supported action types: change_status, change_priority, assign_to, add_tag, remove_tag, add_reply, add_note, change_department.': "Definir les actions de la macro en tant que tableau JSON. Types d'action pris en charge : change_status, change_priority, assign_to, add_tag, remove_tag, add_reply, add_note, change_department.",
8+
'Enter actions as a JSON array. Each action should have "type" and "value" keys.': 'Saisir les actions sous forme de tableau JSON. Chaque action doit avoir les cles "type" et "value".',
9+
'Enter conditions as a JSON array. Each condition should have "field", "operator", and "value" keys.': 'Saisir les conditions sous forme de tableau JSON. Chaque condition doit avoir les cles "field", "operator" et "value".',
10+
'JSON array of actions. Supported types: %s': "Tableau JSON d'actions. Types pris en charge : %s",
11+
'JSON array of conditions. Supported fields: %s': 'Tableau JSON de conditions. Champs pris en charge : %s',
12+
},
13+
de_DE: {
14+
'Define macro actions as a JSON array. Supported action types: change_status, change_priority, assign_to, add_tag, remove_tag, add_reply, add_note, change_department.': 'Makro-Aktionen als JSON-Array definieren. Unterstuetzte Aktionstypen: change_status, change_priority, assign_to, add_tag, remove_tag, add_reply, add_note, change_department.',
15+
'Enter actions as a JSON array. Each action should have "type" and "value" keys.': 'Aktionen als JSON-Array eingeben. Jede Aktion sollte die Schluessel "type" und "value" haben.',
16+
'Enter conditions as a JSON array. Each condition should have "field", "operator", and "value" keys.': 'Bedingungen als JSON-Array eingeben. Jede Bedingung sollte die Schluessel "field", "operator" und "value" haben.',
17+
'Filter by status': 'Nach Status filtern',
18+
'JSON array of actions. Supported types: %s': 'JSON-Array von Aktionen. Unterstuetzte Typen: %s',
19+
'JSON array of conditions. Supported fields: %s': 'JSON-Array von Bedingungen. Unterstuetzte Felder: %s',
20+
'Last Run': 'Letzte Ausfuehrung',
21+
'Last Used': 'Zuletzt verwendet',
22+
'Please rate the support you received for this ticket.': 'Bitte bewerten Sie den Support, den Sie fuer dieses Ticket erhalten haben.',
23+
'Policy:': 'Richtlinie:',
24+
'Tag created successfully.': 'Tag erfolgreich erstellt.',
25+
'Tag deleted successfully.': 'Tag erfolgreich geloescht.',
26+
'Tag updated successfully.': 'Tag erfolgreich aktualisiert.',
27+
'You are viewing this ticket as a guest. Bookmark this page to access your ticket later.': 'Sie sehen dieses Ticket als Gast. Setzen Sie ein Lesezeichen auf diese Seite, um spaeter darauf zuzugreifen.',
28+
},
29+
ja: {
30+
'Define macro actions as a JSON array. Supported action types: change_status, change_priority, assign_to, add_tag, remove_tag, add_reply, add_note, change_department.': 'マクロアクションをJSON配列として定義します。サポートされるアクションタイプ:change_status, change_priority, assign_to, add_tag, remove_tag, add_reply, add_note, change_department。',
31+
'Enter actions as a JSON array. Each action should have "type" and "value" keys.': 'アクションをJSON配列として入力してください。各アクションには "type" と "value" キーが必要です。',
32+
'Enter conditions as a JSON array. Each condition should have "field", "operator", and "value" keys.': '条件をJSON配列として入力してください。各条件には "field"、"operator"、"value" キーが必要です。',
33+
'Filter by status': 'ステータスでフィルター',
34+
'JSON array of actions. Supported types: %s': 'アクションのJSON配列。サポートされるタイプ:%s',
35+
'JSON array of conditions. Supported fields: %s': '条件のJSON配列。サポートされるフィールド:%s',
36+
'Last Run': '最終実行',
37+
'Last Used': '最終使用',
38+
'Please rate the support you received for this ticket.': 'このチケットで受けたサポートを評価してください。',
39+
'Policy:': 'ポリシー:',
40+
'Tag created successfully.': 'タグが正常に作成されました。',
41+
'Tag deleted successfully.': 'タグが正常に削除されました。',
42+
'Tag updated successfully.': 'タグが正常に更新されました。',
43+
'You are viewing this ticket as a guest. Bookmark this page to access your ticket later.': 'ゲストとしてこのチケットを閲覧しています。後でアクセスするためにこのページをブックマークしてください。',
44+
'You do not have permission to manage API tokens.': 'APIトークンを管理する権限がありません。',
45+
'SLA Compliance Rate': 'SLA遵守率',
46+
},
47+
pt_BR: {
48+
'Define macro actions as a JSON array. Supported action types: change_status, change_priority, assign_to, add_tag, remove_tag, add_reply, add_note, change_department.': 'Defina as acoes da macro como um array JSON. Tipos de acao suportados: change_status, change_priority, assign_to, add_tag, remove_tag, add_reply, add_note, change_department.',
49+
'Enter actions as a JSON array. Each action should have "type" and "value" keys.': 'Insira as acoes como um array JSON. Cada acao deve ter as chaves "type" e "value".',
50+
'Enter conditions as a JSON array. Each condition should have "field", "operator", and "value" keys.': 'Insira as condicoes como um array JSON. Cada condicao deve ter as chaves "field", "operator" e "value".',
51+
'Filter by status': 'Filtrar por status',
52+
'JSON array of actions. Supported types: %s': 'Array JSON de acoes. Tipos suportados: %s',
53+
'JSON array of conditions. Supported fields: %s': 'Array JSON de condicoes. Campos suportados: %s',
54+
'Last Run': 'Ultima execucao',
55+
'Last Used': 'Ultimo uso',
56+
'Please rate the support you received for this ticket.': 'Por favor, avalie o suporte que voce recebeu para este chamado.',
57+
'Policy:': 'Politica:',
58+
'Tag created successfully.': 'Tag criada com sucesso.',
59+
'Tag deleted successfully.': 'Tag excluida com sucesso.',
60+
'Tag updated successfully.': 'Tag atualizada com sucesso.',
61+
'You are viewing this ticket as a guest. Bookmark this page to access your ticket later.': 'Voce esta visualizando este chamado como visitante. Salve esta pagina nos favoritos para acessar seu chamado depois.',
62+
},
63+
};
64+
65+
for (const [locale, dict] of Object.entries(remaining)) {
66+
const poPath = path.join(rootDir, 'languages', `escalated-${locale}.po`);
67+
let content = fs.readFileSync(poPath, 'utf8');
68+
let updated = 0;
69+
70+
for (const [key, value] of Object.entries(dict)) {
71+
const escapedKey = key.replace(/\\/g, '\\\\').replace(/"/g, '\\"');
72+
const escapedValue = value.replace(/\\/g, '\\\\').replace(/"/g, '\\"');
73+
const searchStr = `msgid "${escapedKey}"\nmsgstr ""`;
74+
const replaceStr = `msgid "${escapedKey}"\nmsgstr "${escapedValue}"`;
75+
76+
if (content.includes(searchStr)) {
77+
content = content.replace(searchStr, replaceStr);
78+
updated++;
79+
}
80+
}
81+
82+
fs.writeFileSync(poPath, content);
83+
console.log(`${locale}: filled ${updated} remaining translations`);
84+
}

0 commit comments

Comments
 (0)