Skip to content

Commit

Permalink
i18n
Browse files Browse the repository at this point in the history
  • Loading branch information
panaC committed Dec 2, 2020
1 parent e92a5f8 commit 11f6eb4
Show file tree
Hide file tree
Showing 12 changed files with 82 additions and 3 deletions.
9 changes: 8 additions & 1 deletion src/main/redux/sagas/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,13 @@ function parseRequestFromCustomProtocol(req: Electron.Request)
}

// tslint:disable-next-line: max-line-length
const htmlLoginTemplate = (urlToSubmit: string = "", loginLabel = "login", passLabel = "password", logoUrl?: string, title?: string) => `
const htmlLoginTemplate = (
urlToSubmit: string = "",
loginLabel = "login",
passLabel = "password",
logoUrl?: string,
title: string = diMainGet("translator").translate("opds.auth.login"),
) => `
<html lang="en">
<head>
Expand Down Expand Up @@ -799,6 +805,7 @@ const htmlLoginTemplate = (urlToSubmit: string = "", loginLabel = "login", passL
<p><input type="text" name="login" value="" placeholder="${loginLabel}"></p>
<p><input type="password" name="password" value="" placeholder="${passLabel}"></p>
<p class="submit"><input type="submit" name="commit" value="Login"></p>
<h5>${diMainGet("translator").translate("opds.auth.cancel")}</h5>
</form>
</div>
</body>
Expand Down
7 changes: 7 additions & 0 deletions src/resources/locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@
"noPublicationHelpL4": "Unterstützte Erweiterungen:",
"numberOfPages": "Seitenzahl",
"opds": {
"auth": {
"cancel": "",
"login": ""
},
"info": {
"availableSince": "Verfügbar seit",
"availableState": {
Expand Down Expand Up @@ -345,6 +349,9 @@
}
},
"settings": {
"auth": {
"wipeData": ""
},
"keyboard": {
"advancedMenu": "Menü",
"cancel": "Stornieren",
Expand Down
6 changes: 5 additions & 1 deletion src/resources/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@
"noPublicationHelpL4": "Supported extensions:",
"numberOfPages": "Number of pages",
"opds": {
"auth": {
"cancel": "Press the Escape key to cancel the authentication",
"login": "Login"
},
"info": {
"availableSince": "Since",
"availableState": {
Expand Down Expand Up @@ -346,7 +350,7 @@
},
"settings": {
"auth": {
"wipeData": "Wipe navigation data"
"wipeData": "Wipe navigation data"
},
"keyboard": {
"advancedMenu": "Menu",
Expand Down
7 changes: 7 additions & 0 deletions src/resources/locales/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@
"noPublicationHelpL4": "Extensiones admitidas:",
"numberOfPages": "Número de páginas",
"opds": {
"auth": {
"cancel": "",
"login": ""
},
"info": {
"availableSince": "Desde",
"availableState": {
Expand Down Expand Up @@ -345,6 +349,9 @@
}
},
"settings": {
"auth": {
"wipeData": ""
},
"keyboard": {
"advancedMenu": "Menú",
"cancel": "Cancelar",
Expand Down
7 changes: 7 additions & 0 deletions src/resources/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@
"noPublicationHelpL4": "Extensions prises en charge :",
"numberOfPages": "Nombre de pages",
"opds": {
"auth": {
"cancel": "Appuyer sur la touche Echap pour quitter l'authentification",
"login": "Connection"
},
"info": {
"availableSince": "Depuis le",
"availableState": {
Expand Down Expand Up @@ -345,6 +349,9 @@
}
},
"settings": {
"auth": {
"wipeData": "Effacer les cookies"
},
"keyboard": {
"advancedMenu": "Menu",
"cancel": "Annuler",
Expand Down
7 changes: 7 additions & 0 deletions src/resources/locales/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@
"noPublicationHelpL4": "Estensioni supportate:",
"numberOfPages": "Numero di pagine",
"opds": {
"auth": {
"cancel": "",
"login": ""
},
"info": {
"availableSince": "Da",
"availableState": {
Expand Down Expand Up @@ -345,6 +349,9 @@
}
},
"settings": {
"auth": {
"wipeData": ""
},
"keyboard": {
"advancedMenu": "Menu",
"cancel": "Annulla",
Expand Down
7 changes: 7 additions & 0 deletions src/resources/locales/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@
"noPublicationHelpL4": "サポートされる拡張機能:",
"numberOfPages": "ページ数",
"opds": {
"auth": {
"cancel": "",
"login": ""
},
"info": {
"availableSince": "始まり",
"availableState": {
Expand Down Expand Up @@ -345,6 +349,9 @@
}
},
"settings": {
"auth": {
"wipeData": ""
},
"keyboard": {
"advancedMenu": "メニュー",
"cancel": "キャンセル",
Expand Down
7 changes: 7 additions & 0 deletions src/resources/locales/lt.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@
"noPublicationHelpL4": "Palaikomi plėtiniai:",
"numberOfPages": "Puslapių skaičius",
"opds": {
"auth": {
"cancel": "",
"login": ""
},
"info": {
"availableSince": "Prieinama nuo",
"availableState": {
Expand Down Expand Up @@ -345,6 +349,9 @@
}
},
"settings": {
"auth": {
"wipeData": ""
},
"keyboard": {
"advancedMenu": "Meniu",
"cancel": "Nutraukti",
Expand Down
7 changes: 7 additions & 0 deletions src/resources/locales/nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@
"noPublicationHelpL4": "Ondersteunde uitbreidingen:",
"numberOfPages": "Aantal pagina's",
"opds": {
"auth": {
"cancel": "",
"login": ""
},
"info": {
"availableSince": "Sinds",
"availableState": {
Expand Down Expand Up @@ -345,6 +349,9 @@
}
},
"settings": {
"auth": {
"wipeData": ""
},
"keyboard": {
"advancedMenu": "Menu",
"cancel": "Annuleer",
Expand Down
7 changes: 7 additions & 0 deletions src/resources/locales/pt-br.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@
"noPublicationHelpL4": "Extensões suportadas:",
"numberOfPages": "Número de páginas",
"opds": {
"auth": {
"cancel": "",
"login": ""
},
"info": {
"availableSince": "Desde",
"availableState": {
Expand Down Expand Up @@ -345,6 +349,9 @@
}
},
"settings": {
"auth": {
"wipeData": ""
},
"keyboard": {
"advancedMenu": "Menu",
"cancel": "Cancelar",
Expand Down
7 changes: 7 additions & 0 deletions src/resources/locales/pt-pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@
"noPublicationHelpL4": "Extensões suportadas:",
"numberOfPages": "Número de páginas",
"opds": {
"auth": {
"cancel": "",
"login": ""
},
"info": {
"availableSince": "Desde",
"availableState": {
Expand Down Expand Up @@ -345,6 +349,9 @@
}
},
"settings": {
"auth": {
"wipeData": ""
},
"keyboard": {
"advancedMenu": "Menu",
"cancel": "Cancelar",
Expand Down
7 changes: 6 additions & 1 deletion src/typings/en.translation.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,7 @@ declare namespace typed_i18n {
readonly "urlPlaceholder": string
},
readonly "addMenu": string,
readonly "auth": { readonly "login": string, readonly "cancel": string },
readonly "back": string,
readonly "breadcrumbRoot": string,
readonly "empty": string,
Expand Down Expand Up @@ -403,7 +404,11 @@ declare namespace typed_i18n {
(_: "opds.addForm.title", __?: {}): string;
(_: "opds.addForm.url", __?: {}): string;
(_: "opds.addForm.urlPlaceholder", __?: {}): string;
(_: "opds.addMenu", __?: {}): string; (_: "opds.back", __?: {}): string;
(_: "opds.addMenu", __?: {}): string;
(_: "opds.auth", __?: {}): { readonly "login": string, readonly "cancel": string };
(_: "opds.auth.login", __?: {}): string;
(_: "opds.auth.cancel", __?: {}): string;
(_: "opds.back", __?: {}): string;
(_: "opds.breadcrumbRoot", __?: {}): string;
(_: "opds.empty", __?: {}): string; (_: "opds.firstPage", __?: {}): string;
(_: "opds.lastPage", __?: {}): string;
Expand Down

0 comments on commit 11f6eb4

Please sign in to comment.