mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-19 09:33:53 +00:00
feat(i18n): Add Internationalization Support for UI and LLM Output (#1058)
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
import type { MessageActionReturn, SlashCommand } from './types.js';
|
||||
import { CommandKind } from './types.js';
|
||||
import { terminalSetup } from '../utils/terminalSetup.js';
|
||||
import { t } from '../../i18n/index.js';
|
||||
|
||||
/**
|
||||
* Command to configure terminal keybindings for multiline input support.
|
||||
@@ -16,8 +17,11 @@ import { terminalSetup } from '../utils/terminalSetup.js';
|
||||
*/
|
||||
export const terminalSetupCommand: SlashCommand = {
|
||||
name: 'terminal-setup',
|
||||
description:
|
||||
'Configure terminal keybindings for multiline input (VS Code, Cursor, Windsurf, Trae)',
|
||||
get description() {
|
||||
return t(
|
||||
'Configure terminal keybindings for multiline input (VS Code, Cursor, Windsurf, Trae)',
|
||||
);
|
||||
},
|
||||
kind: CommandKind.BUILT_IN,
|
||||
|
||||
action: async (): Promise<MessageActionReturn> => {
|
||||
@@ -27,7 +31,8 @@ export const terminalSetupCommand: SlashCommand = {
|
||||
let content = result.message;
|
||||
if (result.requiresRestart) {
|
||||
content +=
|
||||
'\n\nPlease restart your terminal for the changes to take effect.';
|
||||
'\n\n' +
|
||||
t('Please restart your terminal for the changes to take effect.');
|
||||
}
|
||||
|
||||
return {
|
||||
@@ -38,7 +43,9 @@ export const terminalSetupCommand: SlashCommand = {
|
||||
} catch (error) {
|
||||
return {
|
||||
type: 'message',
|
||||
content: `Failed to configure terminal: ${error}`,
|
||||
content: t('Failed to configure terminal: {{error}}', {
|
||||
error: String(error),
|
||||
}),
|
||||
messageType: 'error',
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user