feat(i18n): Add Internationalization Support for UI and LLM Output (#1058)

This commit is contained in:
pomelo
2025-11-21 15:44:37 +08:00
committed by GitHub
parent 640f30655d
commit 48b77541c3
98 changed files with 4740 additions and 636 deletions

View File

@@ -9,6 +9,7 @@ import { Box, Text } from 'ink';
import type { SettingScope } from '../../../config/settings.js';
import { getScopeItems } from '../../../utils/dialogScopeUtils.js';
import { RadioButtonSelect } from './RadioButtonSelect.js';
import { t } from '../../../i18n/index.js';
interface ScopeSelectorProps {
/** Callback function when a scope is selected */
@@ -29,6 +30,7 @@ export function ScopeSelector({
}: ScopeSelectorProps): React.JSX.Element {
const scopeItems = getScopeItems().map((item) => ({
...item,
label: t(item.label),
key: item.value,
}));
@@ -40,7 +42,8 @@ export function ScopeSelector({
return (
<Box flexDirection="column">
<Text bold={isFocused} wrap="truncate">
{isFocused ? '> ' : ' '}Apply To
{isFocused ? '> ' : ' '}
{t('Apply To')}
</Text>
<RadioButtonSelect
items={scopeItems}