Skip to content

Commit

Permalink
add Bulgarian language localization (original PR #1914)
Browse files Browse the repository at this point in the history
Co-authored-by: Daniel Weck <[email protected]>
  • Loading branch information
openm1nd and danielweck authored Mar 1, 2023
1 parent 3cf9f5a commit 452c973
Show file tree
Hide file tree
Showing 3 changed files with 446 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 zh-tw ru fi sv ca gl eu el --space \" \" --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 zh-tw ru fi sv ca gl eu el --space \" \" --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 zh-tw ru fi sv ca gl eu el bg --space \" \" --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 zh-tw ru fi sv ca gl eu el bg --space \" \" --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
5 changes: 5 additions & 0 deletions src/common/services/translator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import caCatalog from "readium-desktop/resources/locales/ca.json";
import glCatalog from "readium-desktop/resources/locales/gl.json";
import euCatalog from "readium-desktop/resources/locales/eu.json";
import elCatalog from "readium-desktop/resources/locales/el.json";
import bgCatalog from "readium-desktop/resources/locales/bg.json";

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

Expand Down Expand Up @@ -119,6 +120,9 @@ i18nextInstance.init({
"el": {
translation: elCatalog,
},
"bg": {
translation: bgCatalog,
},
},
// lng: undefined,
fallbackLng: "en",
Expand Down Expand Up @@ -170,6 +174,7 @@ export const AvailableLanguages = {
"gl": "Galician",
"eu": "Basque (Euskadi)",
"el": "ελληνικός",
"bg": "Bulgarian",
};

interface LocalizedContent {
Expand Down
Loading

0 comments on commit 452c973

Please sign in to comment.