Skip to content
Open
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
3 changes: 2 additions & 1 deletion messages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -2358,7 +2358,8 @@
"Spanish": "Spanish",
"Portuguese": "Portuguese",
"Russian": "Russian",
"Arabic": "Arabic"
"Arabic": "Arabic",
"Vietnamese": "Vietnamese"
},
"customLanguagePlaceholder": "Custom language..."
},
Expand Down
3 changes: 2 additions & 1 deletion messages/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -2436,7 +2436,8 @@
"Spanish": "スペイン語",
"Portuguese": "ポルトガル語",
"Russian": "ロシア語",
"Arabic": "アラビア語"
"Arabic": "アラビア語",
"Vietnamese": "ベトナム語"
},
"customLanguagePlaceholder": "カスタム言語..."
},
Expand Down
3 changes: 2 additions & 1 deletion messages/pt-BR.json
Original file line number Diff line number Diff line change
Expand Up @@ -2475,7 +2475,8 @@
"Spanish": "Espanhol",
"Portuguese": "Português",
"Russian": "Russo",
"Arabic": "Árabe"
"Arabic": "Árabe",
"Vietnamese": "Vietnamita"
},
"customLanguagePlaceholder": "Idioma personalizado..."
},
Expand Down
2,491 changes: 2,491 additions & 0 deletions messages/vi.json

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion messages/zh-TW.json
Original file line number Diff line number Diff line change
Expand Up @@ -2304,7 +2304,8 @@
"Spanish": "西班牙語",
"Portuguese": "葡萄牙語",
"Russian": "俄語",
"Arabic": "阿拉伯語"
"Arabic": "阿拉伯語",
"Vietnamese": "越南語"
},
"customLanguagePlaceholder": "自定義語言..."
},
Expand Down
3 changes: 2 additions & 1 deletion messages/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -2232,7 +2232,8 @@
"Spanish": "西班牙语",
"Portuguese": "葡萄牙语",
"Russian": "俄语",
"Arabic": "阿拉伯语"
"Arabic": "阿拉伯语",
"Vietnamese": "越南语"
},
"customLanguagePlaceholder": "自定义语言..."
},
Expand Down
4 changes: 4 additions & 0 deletions src/app/core/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { initAllDatabases } from "@/db"
import dayjs from "dayjs"
import zh from "dayjs/locale/zh-cn";
import en from "dayjs/locale/en";
import vi from "dayjs/locale/vi";
import { useI18n } from "@/hooks/useI18n"
import useVectorStore from "@/stores/vector"
import useImageStore from "@/stores/imageHosting"
Expand Down Expand Up @@ -89,6 +90,9 @@ export default function RootLayout({
case 'en':
dayjs.locale(en);
break;
case 'vi':
dayjs.locale(vi);
break;
default:
break;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export function TranslateControl({ chat, onTranslatedContent }: TranslateControl
"Deutsch",
"Español",
"Русский",
"Tiếng Việt"
]

// 处理翻译
Expand Down
2 changes: 2 additions & 0 deletions src/app/core/main/editor/markdown/bubble-menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ const POPULAR_LANGUAGES = [
{ name: 'Português', code: 'Portuguese', i18nKey: 'languages.Portuguese' },
{ name: 'Русский', code: 'Russian', i18nKey: 'languages.Russian' },
{ name: 'العربية', code: 'Arabic', i18nKey: 'languages.Arabic' },
{ name: 'Tiếng Việt', code: 'Vietnamese', i18nKey: 'languages.Vietnamese' },

]

interface BubbleMenuProps {
Expand Down
7 changes: 7 additions & 0 deletions src/app/core/setting/general/interface-settings/language.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ export function LanguageSettings() {
return "Português"
case "ja":
return "日本語"
case "vi":
return "Tiếng Việt"
default:
return "中文"
}
Expand Down Expand Up @@ -75,6 +77,11 @@ export function LanguageSettings() {
<span>Português</span>
</div>
</SelectItem>
<SelectItem value="vi">
<div className="flex items-center gap-2">
<span>Tiếng Việt</span>
</div>
</SelectItem>
</SelectContent>
</Select>
</ItemActions>
Expand Down
4 changes: 4 additions & 0 deletions src/app/mobile/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { initAllDatabases } from "@/db"
import dayjs from "dayjs"
import zh from "dayjs/locale/zh-cn";
import en from "dayjs/locale/en";
import vi from "dayjs/locale/vi";
import { useI18n } from "@/hooks/useI18n"
import useVectorStore from "@/stores/vector"
import { AppFootbar } from "@/components/app-footbar"
Expand Down Expand Up @@ -57,6 +58,9 @@ export default function RootLayout({
case 'en':
dayjs.locale(en);
break;
case 'vi':
dayjs.locale(vi);
break;
default:
break;
}
Expand Down
2 changes: 2 additions & 0 deletions src/components/sync-confirm-dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import 'dayjs/locale/zh-cn'
import 'dayjs/locale/en'
import 'dayjs/locale/ja'
import 'dayjs/locale/pt-br'
import 'dayjs/locale/vi'
import { useI18n } from '@/hooks/useI18n'
import { useSyncConfirmStore } from '@/stores/sync-confirm'
import { useIsMobile } from '@/hooks/use-mobile'
Expand Down Expand Up @@ -88,6 +89,7 @@ export function SyncConfirmDialog() {
case 'zh': return 'zh-cn'
case 'ja': return 'ja'
case 'pt-BR': return 'pt-br'
case 'vi': return 'vi'
default: return 'en'
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/i18n/request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {getRequestConfig} from 'next-intl/server';
import {notFound} from 'next/navigation';

// 支持的语言列表
export const locales = ['en', 'zh', 'ja', 'pt-BR', 'zh-TW'];
export const locales = ['en', 'zh', 'ja', 'pt-BR', 'zh-TW', 'vi'];
export const defaultLocale = 'zh';

export default getRequestConfig(async ({locale}) => {
Expand Down