Skip to content

Commit

Permalink
Add new locales (#2240)
Browse files Browse the repository at this point in the history
- By default, all locales are enabled to make it easy for local deployments to test new locales
- Adds DE, FR, PT locales to make way for translation in Weblate
  • Loading branch information
ikreymer authored Dec 14, 2024
1 parent b650762 commit 74ae3b0
Show file tree
Hide file tree
Showing 11 changed files with 15,912 additions and 291 deletions.
6 changes: 4 additions & 2 deletions chart/values.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# Global Settings
# =========================================

# locales available to choose from in the front end
locales_enabled: "en,es"
# locales available to choose from in the UI
# if not set, all locales available by default
# ex: enable only 'en' and 'es' locales
# locales_enabled: "en,es"


# Crawler Settings
Expand Down
2 changes: 1 addition & 1 deletion frontend/lit-localize.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://raw.githubusercontent.com/lit/lit/main/packages/localize-tools/config.schema.json",
"sourceLocale": "en",
"targetLocales": ["es"],
"targetLocales": ["de", "fr", "es", "pt"],
"tsConfig": "tsconfig.json",
"output": {
"mode": "runtime",
Expand Down
6 changes: 6 additions & 0 deletions frontend/src/__generated__/locale-codes.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1,350 changes: 1,350 additions & 0 deletions frontend/src/__generated__/locales/de.ts

Large diffs are not rendered by default.

587 changes: 300 additions & 287 deletions frontend/src/__generated__/locales/es.ts

Large diffs are not rendered by default.

1,350 changes: 1,350 additions & 0 deletions frontend/src/__generated__/locales/fr.ts

Large diffs are not rendered by default.

1,350 changes: 1,350 additions & 0 deletions frontend/src/__generated__/locales/pt.ts

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion frontend/src/utils/localize.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ describe("Localize", () => {
it("returns the correct languages", () => {
stub(window.navigator, "languages").get(() => ["en-US", "ar", "ko"]);
const localize = new Localize();
expect(localize.languages).to.eql(["en", "es"]);
expect(localize.languages).to.eql(["de", "en", "es", "fr", "pt"]);
});
});

Expand Down
Loading

0 comments on commit 74ae3b0

Please sign in to comment.