Add Thai language support for various application components
- Introduced Thai translations for dashboard, knowledge, login, models, scripts, settings, skills, task, and common UI elements. - Updated provider placeholders to include Thai language options. - Modified locale resolution to support Thai language. - Adjusted settings store to handle legacy language migration from Japanese to Thai. - Enhanced runtime types to include Thai as a supported language.
This commit is contained in:
@@ -60,7 +60,7 @@ export interface ProviderTypeInfo {
|
||||
icon: string;
|
||||
placeholder: string;
|
||||
placeholderZh?: string;
|
||||
placeholderJa?: string;
|
||||
placeholderTh?: string;
|
||||
model?: string;
|
||||
requiresApiKey: boolean;
|
||||
defaultBaseUrl?: string;
|
||||
@@ -171,14 +171,14 @@ export const PROVIDER_TYPE_INFO: ProviderTypeInfo[] = [
|
||||
{ id: 'minimax-portal', name: 'MiniMax (Global)', icon: '☁️', placeholder: 'sk-...', model: 'MiniMax', requiresApiKey: false, isOAuth: true, supportsApiKey: true, defaultBaseUrl: 'https://api.minimax.io/v1', apiProtocol: 'openai-completions', defaultModelId: 'MiniMax-M2.7', showModelId: true, showModelIdInDevModeOnly: true, modelIdPlaceholder: 'MiniMax-M2.7', apiKeyUrl: 'https://platform.minimax.io' },
|
||||
{ id: 'modelstudio', name: 'Model Studio', icon: '☁️', placeholder: 'sk-...', model: 'Qwen', requiresApiKey: true, defaultBaseUrl: 'https://coding.dashscope.aliyuncs.com/v1', showBaseUrl: true, defaultModelId: 'qwen3.5-plus', showModelId: true, showModelIdInDevModeOnly: true, modelIdPlaceholder: 'qwen3.5-plus', apiKeyUrl: 'https://bailian.console.aliyun.com/', hidden: true },
|
||||
{ id: 'ark', name: 'ByteDance Ark', icon: 'A', placeholder: 'your-ark-api-key', model: 'Doubao', requiresApiKey: true, defaultBaseUrl: 'https://ark.cn-beijing.volces.com/api/v3', showBaseUrl: true, showModelId: true, modelIdPlaceholder: 'ep-20260228000000-xxxxx', docsUrl: 'https://www.volcengine.com/', codePlanPresetBaseUrl: 'https://ark.cn-beijing.volces.com/api/coding/v3', codePlanPresetModelId: 'ark-code-latest', codePlanDocsUrl: 'https://www.volcengine.com/docs/82379/1928261?lang=zh' },
|
||||
{ id: 'ollama', name: 'Ollama', icon: '🦙', placeholder: 'Not required', placeholderZh: '无需填写', placeholderJa: '不要', requiresApiKey: false, defaultBaseUrl: 'http://localhost:11434/v1', showBaseUrl: true, showModelId: true, modelIdPlaceholder: 'qwen3:latest' },
|
||||
{ id: 'ollama', name: 'Ollama', icon: '🦙', placeholder: 'Not required', placeholderZh: '无需填写', placeholderTh: 'ไม่ต้องกรอก', requiresApiKey: false, defaultBaseUrl: 'http://localhost:11434/v1', showBaseUrl: true, showModelId: true, modelIdPlaceholder: 'qwen3:latest' },
|
||||
{
|
||||
id: 'custom',
|
||||
name: 'Custom',
|
||||
icon: '⚙️',
|
||||
placeholder: 'API key...',
|
||||
placeholderZh: 'API Key...',
|
||||
placeholderJa: 'API キー...',
|
||||
placeholderTh: 'API Key...',
|
||||
requiresApiKey: true,
|
||||
showBaseUrl: true,
|
||||
showModelId: true,
|
||||
@@ -216,7 +216,7 @@ export function getProviderDocsUrl(
|
||||
}
|
||||
|
||||
export function getProviderPlaceholder(
|
||||
provider: Pick<ProviderTypeInfo, 'placeholder' | 'placeholderZh' | 'placeholderJa'> | undefined,
|
||||
provider: Pick<ProviderTypeInfo, 'placeholder' | 'placeholderZh' | 'placeholderTh'> | undefined,
|
||||
language: string | LanguageCode,
|
||||
): string | undefined {
|
||||
if (!provider?.placeholder) {
|
||||
@@ -225,8 +225,8 @@ export function getProviderPlaceholder(
|
||||
if (language.startsWith('zh') && provider.placeholderZh) {
|
||||
return provider.placeholderZh;
|
||||
}
|
||||
if (language.startsWith('ja') && provider.placeholderJa) {
|
||||
return provider.placeholderJa;
|
||||
if (language.startsWith('th') && provider.placeholderTh) {
|
||||
return provider.placeholderTh;
|
||||
}
|
||||
return provider.placeholder;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user