feat: implement Pi Switch i18n UI and agent config switch

This commit is contained in:
KimiSwitch Dev committed 2026-07-08 08:53:26 +08:00
1 parent 7d69aac08f
commit af991a7bda
86 files changed
+4214 -235

No files matched your search

+111
View File
@@ -0,0 +1,111 @@
import type { TranslationKey } from "./zh";
export const enTranslations: Record<TranslationKey, string> = {
// App / global
appTitle: "Pi Switch",
loading: "Loading...",
loadTimeout: "Loading is taking a while. Try restarting the app if it stays stuck.",
loadFailed: "Failed to load:",
retry: "Retry",
saveConfig: "Save Config",
reloadConfig: "Reload Config",
openConfigDir: "Open Config Dir",
unsavedConfirm: "You have unsaved changes. Are you sure you want to reload?",
providerNotFound: "Provider not found",
backToList: "Back to list",
syncToOmp: "Sync to OMP",
syncedToOmp: "Synced to OMP: ",
ompOverwriteConfirm: "OMP already has provider \"{existing}\". Replace with \"{name}\"?",
deleteProviderConfirm: "Delete provider {name}?",
// Provider list
providers: "Providers",
addProvider: "Add Provider",
noProviders: "No providers yet",
addFirstProvider: "Add first provider",
noUrl: "No URL",
modelCount: "{count} models",
ompActive: "OMP Active",
defaultModel: "Default: {name}",
edit: "Edit",
delete: "Delete",
// Provider edit
editProvider: "Edit Provider",
back: "Back",
basicInfo: "Basic Info",
modelMapping: "Model Mapping",
configJson: "Config JSON",
providerName: "Provider Name",
note: "Note",
notePlaceholder: "e.g. company account",
officialUrl: "Official URL",
managedProvider: "Managed provider (no credentials needed)",
apiSettings: "API Settings",
apiFormat: "API Format",
authField: "Auth Field",
apiKey: "API Key",
show: "Show",
hide: "Hide",
requestUrl: "Request URL",
fullUrl: "Full URL",
baseUrlHint: "Enter a {type} API-compatible endpoint without a trailing slash.",
envPairs: "Env pairs",
addEnv: "+ Add",
modelMappingDesc: "Display name only affects the /model menu; 1M declares context capability for Kimi Code.",
oneClickSetup: "One-click setup",
fetchModels: "Fetch models",
fetchingModels: "Fetching...",
discoveredModels: "Discovered {count} models",
addSelected: "Add selected",
modelRole: "Model role",
displayName: "Display name",
actualModel: "Actual model",
contextSize: "Context size",
supports1M: "Supports 1M",
default: "Default",
operation: "Operation",
isDefault: "Default",
setDefault: "Set default",
deleteModelConfirm: "Delete model {alias}?",
noModelMappings: "No model mappings",
addModelMapping: "+ Add model mapping",
readOnlyPreview: "Editable JSON",
apply: "Apply",
invalidJson: "Invalid JSON: {message}",
// Agent / target
target: "Target",
targetKimi: "Kimi Code",
targetOmp: "OMP",
targetQwen: "Qwen Code",
agent: "Agent",
agentKimiCode: "Kimi Code",
agentPi: "Pi",
activate: "Activate",
activated: "Activated",
disabled: "Disabled",
unsavedChanges: "Unsaved changes",
qwenActivateNotImplemented: "Qwen Code activation will be implemented in a follow-up.",
importConfig: "Import current config",
importConfigConfirm: "Importing will overwrite unsaved changes. Continue?",
importConfigFailed: "Import failed: {message}",
capabilities: "Capabilities",
// Languages
language: "Language",
zh: "中文",
en: "English",
// Validation errors
emptyProviderName: "Provider name is empty",
duplicateProviderName: "Duplicate provider name: {0}",
missingCredentials: "Provider '{0}' is missing credentials (api_key or env key)",
ambiguousCredentials: "Provider '{0}' has both direct and env credentials; only one source is allowed",
missingVertexProject: "Vertex provider '{0}' is missing GOOGLE_CLOUD_PROJECT or GOOGLE_CLOUD_LOCATION",
emptyModelAlias: "Model alias is empty",
duplicateModelAlias: "Duplicate model alias: {0}",
unknownModelProvider: "Model '{0}' references unknown provider '{1}'",
emptyModelId: "Model '{0}' has an empty model ID",
invalidMaxContextSize: "Model '{0}' has an invalid max_context_size",
};