Skip to content

Commit 0a8e5da

Browse files
committed
refactor: simplify localization
1 parent 44acf08 commit 0a8e5da

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+112
-246
lines changed

bin/translations_download.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import AdmZip from 'adm-zip';
2626
import sortJson from 'sort-json';
2727

2828
const rootDir = path.resolve(__dirname, '..');
29-
const destinationPath = path.join(rootDir, 'electron/locale');
29+
const destinationPath = path.join(rootDir, 'electron/src/locale');
3030
const zipDir = path.join(rootDir, 'temp/i18n');
3131
const zipPath = path.join(zipDir, 'wire-desktop.zip');
3232

crowdin.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ project_id: 342373
22
base_path: .
33

44
files:
5-
- source: 'electron/locale/en-US.json'
5+
- source: 'electron/src/locale/en-US.json'
66
translation: '%locale%.json'
77
update_option: 'update_as_unapproved'

electron/src/global.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import type {Data as OpenGraphResult} from 'open-graph';
2323
import type {Static as amplify} from 'amplify';
2424

2525
import type * as EnvironmentUtil from './runtime/EnvironmentUtil';
26-
import type {i18nStrings, SupportedI18nLanguage} from './locale/locale';
26+
import type {i18nStrings, SupportedI18nLanguage} from './locale';
2727

2828
declare global {
2929
interface Window {

electron/src/lib/CertificateVerifyProcManager.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import {BrowserWindow, Certificate, Request as CertificateVerifyRequest, dialog}
2222
import * as fs from 'fs-extra';
2323
import * as path from 'path';
2424

25-
import {getText} from '../locale/locale';
25+
import {getText} from '../locale';
2626
import {getLogger} from '../logging/getLogger';
2727
import * as EnvironmentUtil from '../runtime/EnvironmentUtil';
2828

electron/src/lib/showDialog.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
*/
1919

2020
import {dialog, MessageBoxSyncOptions} from 'electron';
21-
import * as locale from '../locale/locale';
21+
import * as locale from '../locale';
2222

2323
export const showDialog = (message: string, title: string, type?: string): void => {
2424
const options: MessageBoxSyncOptions = {

electron/locale/ar-SA.json electron/src/locale/ar-SA.json

-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@
9090
"wrapperRemoveAccount": "إزالة الحساب",
9191
"menuEnableSpellChecking": "Enable Spell Checking",
9292
"menuCopyPicture": "Copy Picture",
93-
9493
"wrapperAddAccountErrorTitlePlural": "{{maximumAccounts}} accounts already active",
9594
"wrapperAddAccountErrorTitleSingular": "Account already active",
9695
"wrapperAddAccountErrorMessagePlural": "You can only be logged in with {{maximumAccounts}} accounts at once. Log out from one to add another.",

electron/locale/bn-BD.json electron/src/locale/bn-BD.json

-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@
9090
"wrapperRemoveAccount": "Remove Account",
9191
"menuEnableSpellChecking": "Enable Spell Checking",
9292
"menuCopyPicture": "Copy Picture",
93-
9493
"wrapperAddAccountErrorTitlePlural": "{{maximumAccounts}} accounts already active",
9594
"wrapperAddAccountErrorTitleSingular": "Account already active",
9695
"wrapperAddAccountErrorMessagePlural": "You can only be logged in with {{maximumAccounts}} accounts at once. Log out from one to add another.",

electron/locale/ca-ES.json electron/src/locale/ca-ES.json

-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@
9090
"wrapperRemoveAccount": "Remove Account",
9191
"menuEnableSpellChecking": "Enable Spell Checking",
9292
"menuCopyPicture": "Copy Picture",
93-
9493
"wrapperAddAccountErrorTitlePlural": "{{maximumAccounts}} accounts already active",
9594
"wrapperAddAccountErrorTitleSingular": "Account already active",
9695
"wrapperAddAccountErrorMessagePlural": "You can only be logged in with {{maximumAccounts}} accounts at once. Log out from one to add another.",

electron/locale/cs-CZ.json electron/src/locale/cs-CZ.json

-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@
9090
"wrapperRemoveAccount": "Odebrat účet",
9191
"menuEnableSpellChecking": "Enable Spell Checking",
9292
"menuCopyPicture": "Copy Picture",
93-
9493
"wrapperAddAccountErrorTitlePlural": "{{maximumAccounts}} accounts already active",
9594
"wrapperAddAccountErrorTitleSingular": "Account already active",
9695
"wrapperAddAccountErrorMessagePlural": "You can only be logged in with {{maximumAccounts}} accounts at once. Log out from one to add another.",

electron/locale/da-DK.json electron/src/locale/da-DK.json

-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@
9090
"wrapperRemoveAccount": "Fjern konto",
9191
"menuEnableSpellChecking": "Enable Spell Checking",
9292
"menuCopyPicture": "Copy Picture",
93-
9493
"wrapperAddAccountErrorTitlePlural": "{{maximumAccounts}} accounts already active",
9594
"wrapperAddAccountErrorTitleSingular": "Account already active",
9695
"wrapperAddAccountErrorMessagePlural": "You can only be logged in with {{maximumAccounts}} accounts at once. Log out from one to add another.",

electron/locale/de-DE.json electron/src/locale/de-DE.json

-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@
9090
"wrapperRemoveAccount": "Konto entfernen",
9191
"menuEnableSpellChecking": "Rechtschreibprüfung aktivieren",
9292
"menuCopyPicture": "Bild kopieren",
93-
9493
"wrapperAddAccountErrorTitlePlural": "{{maximumAccounts}} Konten bereits aktiv",
9594
"wrapperAddAccountErrorTitleSingular": "Konto bereits aktiv",
9695
"wrapperAddAccountErrorMessagePlural": "Sie können nur mit {{maximumAccounts}} Konten gleichzeitig angemeldet sein. Melden Sie sich von einem Konto ab, um ein weiteres hinzuzufügen.",

electron/locale/el-GR.json electron/src/locale/el-GR.json

-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@
9090
"wrapperRemoveAccount": "Κατάργηση Λογαριασμού",
9191
"menuEnableSpellChecking": "Enable Spell Checking",
9292
"menuCopyPicture": "Copy Picture",
93-
9493
"wrapperAddAccountErrorTitlePlural": "{{maximumAccounts}} accounts already active",
9594
"wrapperAddAccountErrorTitleSingular": "Account already active",
9695
"wrapperAddAccountErrorMessagePlural": "You can only be logged in with {{maximumAccounts}} accounts at once. Log out from one to add another.",

electron/locale/en-US.json electron/src/locale/en-US.json

-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@
9090
"wrapperRemoveAccount": "Remove Account",
9191
"menuEnableSpellChecking": "Enable Spell Checking",
9292
"menuCopyPicture": "Copy Picture",
93-
9493
"wrapperAddAccountErrorTitlePlural": "{{maximumAccounts}} accounts already active",
9594
"wrapperAddAccountErrorTitleSingular": "Account already active",
9695
"wrapperAddAccountErrorMessagePlural": "You can only be logged in with {{maximumAccounts}} accounts at once. Log out from one to add another.",

electron/locale/es-ES.json electron/src/locale/es-ES.json

-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@
9090
"wrapperRemoveAccount": "Eliminar Cuenta",
9191
"menuEnableSpellChecking": "Enable Spell Checking",
9292
"menuCopyPicture": "Copy Picture",
93-
9493
"wrapperAddAccountErrorTitlePlural": "{{maximumAccounts}} accounts already active",
9594
"wrapperAddAccountErrorTitleSingular": "Account already active",
9695
"wrapperAddAccountErrorMessagePlural": "You can only be logged in with {{maximumAccounts}} accounts at once. Log out from one to add another.",

electron/locale/et-EE.json electron/src/locale/et-EE.json

-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@
9090
"wrapperRemoveAccount": "Eemalda konto",
9191
"menuEnableSpellChecking": "Enable Spell Checking",
9292
"menuCopyPicture": "Copy Picture",
93-
9493
"wrapperAddAccountErrorTitlePlural": "{{maximumAccounts}} accounts already active",
9594
"wrapperAddAccountErrorTitleSingular": "Account already active",
9695
"wrapperAddAccountErrorMessagePlural": "You can only be logged in with {{maximumAccounts}} accounts at once. Log out from one to add another.",

electron/locale/fa-IR.json electron/src/locale/fa-IR.json

+8-9
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
"menuVideoCall": "تماس تصویری",
6868
"menuView": "نمایش",
6969
"menuWindow": "پنجره",
70-
"noInternet": "No Internet",
70+
"noInternet": "اینترنت وصل نیست",
7171
"proxyPromptHeadline": "پروکسی به نام کاربری و رمز عبور احتیاج دارد.",
7272
"proxyPromptPassword": "گذرواژه",
7373
"proxyPromptTitle": "احراز هویت پروکسی",
@@ -90,14 +90,13 @@
9090
"wrapperRemoveAccount": "حذف حساب کاربری",
9191
"menuEnableSpellChecking": "فعال کردن غلط گیر املایی",
9292
"menuCopyPicture": "کپی تصویر",
93-
94-
"wrapperAddAccountErrorTitlePlural": "{{maximumAccounts}} accounts already active",
95-
"wrapperAddAccountErrorTitleSingular": "Account already active",
96-
"wrapperAddAccountErrorMessagePlural": "You can only be logged in with {{maximumAccounts}} accounts at once. Log out from one to add another.",
97-
"wrapperAddAccountErrorMessageSingular": "You can only be logged in with one account at once. Log out from this one to add another.",
93+
"wrapperAddAccountErrorTitlePlural": "{{maximumAccounts}} حساب کاربری در حال حاضر فعال است",
94+
"wrapperAddAccountErrorTitleSingular": "حساب کاربری در حال حاضر فعال است.",
95+
"wrapperAddAccountErrorMessagePlural": "شما حداکثر میتوانید با {{maximumAccounts}} وارد شوید. برای افزودن حساب جدید، از یکی از آنها خارج شوید.",
96+
"wrapperAddAccountErrorMessageSingular": "شما فقط میتوانید با یک حساب کاربری وارد شوید. از این حساب کاربری خارج شوید تا بتوانید حساب کاربری جدیدی بیفزایید.",
9897
"promptOK": "تایید",
9998
"promptCancel": "لغو",
100-
"promptWarning": "Warning",
101-
"promptError": "Error",
102-
"urlBlockedPromptText": "A potentially unsafe URL has been blocked. If you still wish to open it, copy the URL and open the appropriate application."
99+
"promptWarning": "هشدار",
100+
"promptError": "خطا",
101+
"urlBlockedPromptText": "یک لینک نا امن مسدود شد. اگر همچنان مایل به باز کردن آن هستید، آن را کپی کرده و در نرم افزار دیگری باز کنید."
103102
}

electron/locale/fi-FI.json electron/src/locale/fi-FI.json

-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@
9090
"wrapperRemoveAccount": "Poista tili",
9191
"menuEnableSpellChecking": "Käytä oikolukua",
9292
"menuCopyPicture": "Copy Picture",
93-
9493
"wrapperAddAccountErrorTitlePlural": "{{maximumAccounts}} tiliä jo käytössä",
9594
"wrapperAddAccountErrorTitleSingular": "Tili on jo aktiivinen",
9695
"wrapperAddAccountErrorMessagePlural": "Voit kirjautua sisään vain {{maximumAccounts}} tililtä kerralla. Kirjaudu ulos tästä lisätäksesi toisen.",

electron/locale/fr-FR.json electron/src/locale/fr-FR.json

-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@
9090
"wrapperRemoveAccount": "Supprimer le compte ",
9191
"menuEnableSpellChecking": "Activer le correcteur orthographique",
9292
"menuCopyPicture": "Copier l'image",
93-
9493
"wrapperAddAccountErrorTitlePlural": "{{maximumAccounts}} comptes déjà actifs",
9594
"wrapperAddAccountErrorTitleSingular": "Compte déjà actif",
9695
"wrapperAddAccountErrorMessagePlural": "Vous pouvez être connecté·e à {{maximumAccounts}} comptes en même temps. Déconnectez-vous de l'un d'entre eux pour en ajouter un autre.",

electron/locale/ga-IE.json electron/src/locale/ga-IE.json

-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@
9090
"wrapperRemoveAccount": "Remove Account",
9191
"menuEnableSpellChecking": "Enable Spell Checking",
9292
"menuCopyPicture": "Copy Picture",
93-
9493
"wrapperAddAccountErrorTitlePlural": "{{maximumAccounts}} accounts already active",
9594
"wrapperAddAccountErrorTitleSingular": "Account already active",
9695
"wrapperAddAccountErrorMessagePlural": "You can only be logged in with {{maximumAccounts}} accounts at once. Log out from one to add another.",

electron/locale/he-IL.json electron/src/locale/he-IL.json

-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@
9090
"wrapperRemoveAccount": "Remove Account",
9191
"menuEnableSpellChecking": "Enable Spell Checking",
9292
"menuCopyPicture": "Copy Picture",
93-
9493
"wrapperAddAccountErrorTitlePlural": "{{maximumAccounts}} accounts already active",
9594
"wrapperAddAccountErrorTitleSingular": "Account already active",
9695
"wrapperAddAccountErrorMessagePlural": "You can only be logged in with {{maximumAccounts}} accounts at once. Log out from one to add another.",

electron/locale/hi-IN.json electron/src/locale/hi-IN.json

-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@
9090
"wrapperRemoveAccount": "Remove Account",
9191
"menuEnableSpellChecking": "Enable Spell Checking",
9292
"menuCopyPicture": "Copy Picture",
93-
9493
"wrapperAddAccountErrorTitlePlural": "{{maximumAccounts}} accounts already active",
9594
"wrapperAddAccountErrorTitleSingular": "Account already active",
9695
"wrapperAddAccountErrorMessagePlural": "You can only be logged in with {{maximumAccounts}} accounts at once. Log out from one to add another.",

electron/locale/hr-HR.json electron/src/locale/hr-HR.json

-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@
9090
"wrapperRemoveAccount": "Ukloni račun",
9191
"menuEnableSpellChecking": "Enable Spell Checking",
9292
"menuCopyPicture": "Copy Picture",
93-
9493
"wrapperAddAccountErrorTitlePlural": "{{maximumAccounts}} accounts already active",
9594
"wrapperAddAccountErrorTitleSingular": "Account already active",
9695
"wrapperAddAccountErrorMessagePlural": "You can only be logged in with {{maximumAccounts}} accounts at once. Log out from one to add another.",

electron/locale/hu-HU.json electron/src/locale/hu-HU.json

-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@
9090
"wrapperRemoveAccount": "Fiók eltávolítása",
9191
"menuEnableSpellChecking": "Enable Spell Checking",
9292
"menuCopyPicture": "Kép másolása",
93-
9493
"wrapperAddAccountErrorTitlePlural": "{{maximumAccounts}} accounts already active",
9594
"wrapperAddAccountErrorTitleSingular": "Account already active",
9695
"wrapperAddAccountErrorMessagePlural": "You can only be logged in with {{maximumAccounts}} accounts at once. Log out from one to add another.",

electron/locale/id-ID.json electron/src/locale/id-ID.json

-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@
9090
"wrapperRemoveAccount": "Menghapus akun",
9191
"menuEnableSpellChecking": "Enable Spell Checking",
9292
"menuCopyPicture": "Copy Picture",
93-
9493
"wrapperAddAccountErrorTitlePlural": "{{maximumAccounts}} accounts already active",
9594
"wrapperAddAccountErrorTitleSingular": "Account already active",
9695
"wrapperAddAccountErrorMessagePlural": "You can only be logged in with {{maximumAccounts}} accounts at once. Log out from one to add another.",

0 commit comments

Comments
 (0)