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

@@ -8,6 +8,7 @@ import type React from 'react';
import { Box, Text } from 'ink';
import { theme } from '../semantic-colors.js';
import { type Config } from '@qwen-code/qwen-code-core';
import { t } from '../../i18n/index.js';
interface TipsProps {
config: Config;
@@ -17,12 +18,12 @@ export const Tips: React.FC<TipsProps> = ({ config }) => {
const geminiMdFileCount = config.getGeminiMdFileCount();
return (
<Box flexDirection="column">
<Text color={theme.text.primary}>Tips for getting started:</Text>
<Text color={theme.text.primary}>{t('Tips for getting started:')}</Text>
<Text color={theme.text.primary}>
1. Ask questions, edit files, or run commands.
{t('1. Ask questions, edit files, or run commands.')}
</Text>
<Text color={theme.text.primary}>
2. Be specific for the best results.
{t('2. Be specific for the best results.')}
</Text>
{geminiMdFileCount === 0 && (
<Text color={theme.text.primary}>
@@ -30,7 +31,7 @@ export const Tips: React.FC<TipsProps> = ({ config }) => {
<Text bold color={theme.text.accent}>
QWEN.md
</Text>{' '}
files to customize your interactions with Qwen Code.
{t('files to customize your interactions with Qwen Code.')}
</Text>
)}
<Text color={theme.text.primary}>
@@ -38,7 +39,7 @@ export const Tips: React.FC<TipsProps> = ({ config }) => {
<Text bold color={theme.text.accent}>
/help
</Text>{' '}
for more information.
{t('for more information.')}
</Text>
</Box>
);