Skip to content

armgit / avibe

Public Imported from GitHub
0

Make your computer a home for your AI partner. Avibe is the local-first Agent OS: Vibey, its built-in AI partner, works out of the box, and Claude Code, Codex & OpenCode run unchanged beside it — reach them from your browser, phone, or any chat app.

chore(i18n): align language labels across UI

cyhhao9df775dc5dd0
diff --git a/ui/src/components/LanguageSwitcher.tsx b/ui/src/components/LanguageSwitcher.tsx
index b85b153e3..4f9d9d736 100644
--- a/ui/src/components/LanguageSwitcher.tsx
+++ b/ui/src/components/LanguageSwitcher.tsx
@@ -3,13 +3,8 @@ import { useTranslation } from 'react-i18next';
import { Languages } from 'lucide-react';
import { useApi } from '../context/ApiContext';
-const languages = [
- { code: 'en', label: 'English' },
- { code: 'zh', label: '中文' },
-];
-
export const LanguageSwitcher: React.FC = () => {
- const { i18n } = useTranslation();
+ const { i18n, t } = useTranslation();
const { getConfig, saveConfig } = useApi();
const [config, setConfig] = useState<any>(null);
@@ -30,6 +25,12 @@ export const LanguageSwitcher: React.FC = () => {
loadConfig();
}, []);
+ const languageCodes = Object.keys(i18n.options.resources ?? {});
+ const availableLanguages = languageCodes.length ? languageCodes : ['en'];
+ const languages = availableLanguages.map((code) => ({
+ code,
+ label: t(`language.${code}`, { defaultValue: code }),
+ }));
const currentLang = languages.find((l) => l.code === i18n.language) || languages[0];
const handleChange = async (e: React.ChangeEvent<HTMLSelectElement>) => {
diff --git a/vibe/i18n/en.json b/vibe/i18n/en.json
index f648eb91a..ccb5815fe 100644
--- a/vibe/i18n/en.json
+++ b/vibe/i18n/en.json
@@ -94,7 +94,7 @@
"optionRequireMention": "Require @mention",
"optionDontRequireMention": "Don't require @mention",
"language": "Language / \u8bed\u8a00",
- "languageHint": "Changes the language for bot messages in Slack."
+ "languageHint": "Changes the language for bot messages in Slack and the Web UI."
},
"cwd": {
"title": "Change Working Directory",
diff --git a/vibe/i18n/zh.json b/vibe/i18n/zh.json
index 1f447859b..6d87d2be9 100644
--- a/vibe/i18n/zh.json
+++ b/vibe/i18n/zh.json
@@ -94,7 +94,7 @@
"optionRequireMention": "需要 @提及",
"optionDontRequireMention": "不需要 @提及",
"language": "语言 / Language",
- "languageHint": "更改 Slack 中机器人消息的语言。"
+ "languageHint": "更改 Slack 与 Web UI 中机器人消息的语言。"
},
"cwd": {
"title": "更改工作目录",