Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions apps/app/src/i18n/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,19 @@ import en from "./locales/en";
import ja from "./locales/ja";
import zh from "./locales/zh";
import vi from "./locales/vi";
import ptBR from "./locales/pt-BR";
import { LANGUAGE_PREF_KEY } from "../app/constants";

/**
* Supported languages
*/
export type Language = "en" | "ja" | "zh" | "vi";
export type Language = "en" | "ja" | "zh" | "vi" | "pt-BR";
export type Locale = Language;

/**
* All supported languages - single source of truth
*/
export const LANGUAGES: Language[] = ["en", "ja", "zh", "vi"];
export const LANGUAGES: Language[] = ["en", "ja", "zh", "vi", "pt-BR"];

/**
* Language options for UI - single source of truth
Expand All @@ -24,6 +25,7 @@ export const LANGUAGE_OPTIONS = [
{ value: "ja" as Language, label: "日本語", nativeName: "日本語" },
{ value: "zh" as Language, label: "简体中文", nativeName: "简体中文" },
{ value: "vi" as Language, label: "Vietnamese", nativeName: "Tiếng Việt" },
{ value: "pt-BR" as Language, label: "Portuguese (BR)", nativeName: "Português (BR)" },
] as const;

/**
Expand All @@ -34,6 +36,7 @@ const TRANSLATIONS: Record<Language, Record<string, string>> = {
ja,
zh,
vi,
"pt-BR": ptBR,
};

/**
Expand Down Expand Up @@ -89,6 +92,7 @@ export const setLocale = (newLocale: Language) => {
*/
export const t = (key: string, localeOverride?: Language): string => {
const loc = localeOverride ?? locale();
1

// Try target language first
if (TRANSLATIONS[loc]?.[key]) {
Expand Down
1 change: 1 addition & 0 deletions apps/app/src/i18n/locales/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ export { default as en } from "./en";
export { default as ja } from "./ja";
export { default as zh } from "./zh";
export { default as vi } from "./vi";
export { default as pt-BR } from "./pt-BR";
861 changes: 861 additions & 0 deletions apps/app/src/i18n/locales/pt-BR.ts

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion apps/server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
},
"dependencies": {
"jsonc-parser": "^3.2.1",
"minimatch": "^10.0.1",
"minimatch": "^10.2.3",
"yaml": "^2.6.1"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion apps/share/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"@paper-design/shaders-react": "0.0.71",
"@vercel/blob": "^0.27.0",
"jsonc-parser": "^3.3.1",
"next": "16.1.6",
"next": "16.1.7",
"react": "19.2.4",
"react-dom": "19.2.4",
"sharp": "^0.34.5",
Expand Down
2 changes: 1 addition & 1 deletion ee/apps/den-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"lint": "next lint"
},
"dependencies": {
"next": "14.2.5",
"next": "15.5.14",
"react": "18.2.0",
"react-dom": "18.2.0"
},
Expand Down
2 changes: 1 addition & 1 deletion ee/apps/landing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"@paper-design/shaders-react": "0.0.71",
"framer-motion": "^12.35.1",
"lucide-react": "^0.577.0",
"next": "14.2.5",
"next": "15.5.14",
"react": "18.2.0",
"react-dom": "18.2.0"
},
Expand Down
Loading