Skip to content

Commit

Permalink
Add Czech language 🇨🇿
Browse files Browse the repository at this point in the history
  • Loading branch information
adipascu committed Jan 16, 2024
1 parent 7658815 commit 6f09999
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
11 changes: 11 additions & 0 deletions src/translation/cs.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import type { Temporal } from "temporal-polyfill";

export const AGE = "Stáří";
export const SOURCE_CODE = "zdrojový kód";
export const COPY_LABEL = "Kliknutím zkopírujete věk do schránky";
export const BIRTH_DAY_FORMAT = (birthDay: Temporal.PlainDate) =>
`Narozeniny: ${birthDay.toLocaleString()}`;
export const AGE_COPIED = "Věk zkopírován do schránky!";
export const AGE_COPY_FAILED = "Věk se nepodařilo zkopírovat do schránky!";
export const ENTER_BIRTHDAY = "Zadejte své narozeniny";
export const MOTIVATE = "Motivovat";
5 changes: 4 additions & 1 deletion src/translation/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import assertUnreachable from "../assertUnreachable";

const SUPPORTED_LANGUAGES = ["en", "ru", "uk"] as const;
const SUPPORTED_LANGUAGES = ["en", "ru", "uk", "cs"] as const;
const DEFAULT_LANGUAGE = "en";

const PREFERRED_LANGUAGES = window.navigator.languages.map((lang) =>
Expand Down Expand Up @@ -33,6 +33,9 @@ switch (path) {
case "./uk":
data = await import("./uk");
break;
case "./cs":
data = await import("./cs");
break;
default:
assertUnreachable(path);
}
Expand Down

0 comments on commit 6f09999

Please sign in to comment.