mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-05-02 05:31:02 +00:00
feat(i18n): Add Internationalization Support for UI and LLM Output (#1058)
This commit is contained in:
parent
640f30655d
commit
48b77541c3
98 changed files with 4740 additions and 636 deletions
|
|
@ -12,10 +12,13 @@ import type {
|
|||
} from './types.js';
|
||||
import { CommandKind } from './types.js';
|
||||
import { getAvailableModelsForAuthType } from '../models/availableModels.js';
|
||||
import { t } from '../../i18n/index.js';
|
||||
|
||||
export const modelCommand: SlashCommand = {
|
||||
name: 'model',
|
||||
description: 'Switch the model for this session',
|
||||
get description() {
|
||||
return t('Switch the model for this session');
|
||||
},
|
||||
kind: CommandKind.BUILT_IN,
|
||||
action: async (
|
||||
context: CommandContext,
|
||||
|
|
@ -36,7 +39,7 @@ export const modelCommand: SlashCommand = {
|
|||
return {
|
||||
type: 'message',
|
||||
messageType: 'error',
|
||||
content: 'Content generator configuration not available.',
|
||||
content: t('Content generator configuration not available.'),
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -45,7 +48,7 @@ export const modelCommand: SlashCommand = {
|
|||
return {
|
||||
type: 'message',
|
||||
messageType: 'error',
|
||||
content: 'Authentication type not available.',
|
||||
content: t('Authentication type not available.'),
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -55,7 +58,12 @@ export const modelCommand: SlashCommand = {
|
|||
return {
|
||||
type: 'message',
|
||||
messageType: 'error',
|
||||
content: `No models available for the current authentication type (${authType}).`,
|
||||
content: t(
|
||||
'No models available for the current authentication type ({{authType}}).',
|
||||
{
|
||||
authType,
|
||||
},
|
||||
),
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue