Skip to content

Commit

Permalink
feat(l10n): Added Galician locale (PR #1673 follows PR #1671)
Browse files Browse the repository at this point in the history
Co-authored-by: Hadrien Gardeur <hadrien.gardeur@gmail.com>
  • Loading branch information
danielweck and HadrienGardeur authored Apr 12, 2022
1 parent 74c6844 commit cdd617f
Show file tree
Hide file tree
Showing 3 changed files with 399 additions and 2 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@
"cli:help": "electron . --help",
"cli": "cross-env DEBUG=r2:*,readium-desktop:* electron .",
"i18n-sort": "node ./scripts/locales-sort.js",
"i18n-scan": "node ./scripts/translate-scan.js \"src/resources/locales/temp.json\" && sync-i18n --files 'src/resources/locales/*.json' --primary temp --languages en de es fr ja ka lt nl pt-br pt-pt it zh-cn ru fi sv --space 4 --finalnewline --newkeysempty && rimraf \"src/resources/locales/temp.json\"",
"i18n-check": "sync-i18n --files 'src/resources/locales/*.json' --primary en --languages de es fr ja ka lt nl pt-br pt-pt it zh-cn ru fi sv --space 4 --finalnewline --newkeysempty",
"i18n-scan": "node ./scripts/translate-scan.js \"src/resources/locales/temp.json\" && sync-i18n --files 'src/resources/locales/*.json' --primary temp --languages en de es fr ja ka lt nl pt-br pt-pt it zh-cn ru fi sv ga --space 4 --finalnewline --newkeysempty && rimraf \"src/resources/locales/temp.json\"",
"i18n-check": "sync-i18n --files 'src/resources/locales/*.json' --primary en --languages de es fr ja ka lt nl pt-br pt-pt it zh-cn ru fi sv ga --space 4 --finalnewline --newkeysempty",
"i18n-typed": "node ./scripts/locale-wrap.js \"src/resources/locales/en.json\" \"en.json\" && typed_i18n -i \"en.json\" -o src/typings -l typescript && rimraf \"en.json\"",
"style-typed": "tcm \"src/renderer/assets/styles\"",
"ts-unused-exports_": "tcm --namedExports \"src/renderer/assets/styles\" && ts-unused-exports ./tsconfig.json $(find ./src/renderer/assets/styles -name '*.d.ts') || npm run style-typed",
Expand Down
4 changes: 4 additions & 0 deletions src/common/services/translator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import ruCatalog from "readium-desktop/resources/locales/ru.json";
import zhCnCatalog from "readium-desktop/resources/locales/zh-cn.json";
import koCatalog from "readium-desktop/resources/locales/ko.json";
import svCatalog from "readium-desktop/resources/locales/sv.json";
import gaCatalog from "readium-desktop/resources/locales/ga.json";

import { TFunction } from "readium-desktop/typings/en.translation";

Expand Down Expand Up @@ -99,6 +100,9 @@ i18nextInstance.init({
"sv": {
translation: svCatalog,
},
"ga": {
translation: gaCatalog,
},
},
// lng: undefined,
fallbackLng: "en",
Expand Down
Loading

0 comments on commit cdd617f

Please sign in to comment.