feat(i18n): add i18next foundation with English + zh-CN locales

Installs i18next + react-i18next + language detector and wires up a
language selector in the General settings page. Extracts strings from
the highest-visibility surfaces: all settings tabs, model management,
sidebar nav, main editor, and the floating generate box. Remaining
strings (profile forms, history, stories/effects/voices/audio tabs)
can land in follow-up PRs.

Closes #411.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
This commit is contained in:
James Pine
2026-04-20 02:43:50 -07:00
co-authored by Claude Opus 4.7
parent 5aa1677a25
commit a205086733
18 changed files with 1091 additions and 299 deletions
+329
View File
@@ -0,0 +1,329 @@
{
"common": {
"cancel": "Cancel",
"save": "Save",
"delete": "Delete",
"edit": "Edit",
"close": "Close",
"confirm": "Confirm",
"loading": "Loading…",
"error": "Error",
"unknown": "Unknown",
"unknownError": "Unknown error"
},
"nav": {
"generate": "Generate",
"stories": "Stories",
"voices": "Voices",
"effects": "Effects",
"audio": "Audio",
"models": "Models",
"settings": "Settings",
"updateBadge": "Update"
},
"generation": {
"placeholder": {
"storyWithEffects": "Generate speech for \"{{name}}\"… (type / for effects)",
"story": "Generate speech for \"{{name}}\"…",
"profile": "Generate speech using {{name}}…",
"effectsHint": "Type / for effects like [laugh], [sigh]…",
"selectVoice": "Select a voice profile above…"
},
"button": {
"generate": "Generate speech",
"generating": "Generating…",
"selectFirst": "Select a voice profile first"
},
"instruct": {
"show": "Show delivery instructions",
"hide": "Hide delivery instructions",
"tooltip": "Delivery instructions (tone, emotion, pace)",
"placeholder": "Delivery instructions — e.g. Speak slowly with warmth, Authoritative and clear…"
},
"voiceSelector": {
"placeholder": "Select a voice…"
},
"effects": {
"none": "No effects",
"profileDefault": "Profile default"
}
},
"main": {
"importVoice": "Import Voice",
"createVoice": "Create Voice",
"import": {
"invalidTitle": "Invalid file type",
"invalidDescription": "Please select a valid .voicebox.zip file",
"successTitle": "Profile imported",
"successDescription": "Voice profile imported successfully",
"failedTitle": "Failed to import profile",
"dialogTitle": "Import Profile",
"dialogDescription": "Import the profile from \"{{name}}\". This will create a new profile with all samples.",
"importing": "Importing…",
"action": "Import"
}
},
"settings": {
"tabs": {
"general": "General",
"generation": "Generation",
"gpu": "GPU",
"logs": "Logs",
"changelog": "Changelog",
"about": "About"
},
"language": {
"label": "Language",
"description": "Choose the display language for Voicebox."
},
"general": {
"docs": { "title": "Read the Docs" },
"discord": { "title": "Join the Discord", "subtitle": "Get help & share voices" },
"serverUrl": {
"title": "Server URL",
"description": "The address of your voicebox backend server.",
"invalidUrl": "Please enter a valid URL",
"updatedTitle": "Server URL updated",
"updatedDescription": "Connected to {{url}}"
},
"keepServerRunning": {
"title": "Keep server running when app closes",
"description": "The server will continue running in the background after closing the app.",
"failedTitle": "Failed to update setting",
"failedDescription": "Could not sync setting to backend.",
"updatedTitle": "Setting updated",
"runningDescription": "Server will continue running when app closes",
"stoppedDescription": "Server will stop when app closes"
},
"networkAccess": {
"title": "Allow network access",
"description": "Makes the server accessible from other devices on your network. Restart the app after changing.",
"enabled": "Network access enabled. Restart the app to apply.",
"disabled": "Network access disabled. Restart the app to apply."
},
"connection": {
"connecting": "Connecting",
"offline": "Offline",
"online": "Online"
},
"updates": {
"title": "App Updates",
"devSuffix": " (dev)",
"devMode": {
"title": "Development mode",
"description": "Auto-updates are disabled in development mode."
},
"check": {
"title": "Check for updates",
"available": "Version {{version}} available",
"checking": "Checking…",
"upToDate": "You're up to date",
"button": "Check"
},
"error": "Update error",
"download": {
"title": "Update to {{version}}",
"description": "Download and install the latest version.",
"button": "Download"
},
"downloading": "Downloading update…",
"ready": {
"title": "Update ready to install",
"description": "Version {{version}} has been downloaded. Restart to complete.",
"button": "Restart Now"
}
},
"api": {
"title": "API Access",
"description": "Integrate Voicebox into your workflow via the REST API at <code>{{url}}</code>",
"viewReference": "View the full API reference",
"endpoints": {
"generate": "Generate speech",
"health": "Server status",
"profiles": "List voices",
"history": "Past generations"
}
}
},
"generation": {
"title": "Generation",
"description": "Controls for long text generation. These settings apply to all engines.",
"chunkLimit": {
"title": "Auto-chunking limit",
"description": "Long text is split into chunks at sentence boundaries. Lower values can improve quality for long outputs.",
"value": "{{count}} chars"
},
"crossfade": {
"title": "Chunk crossfade",
"description": "Blends audio between chunks to smooth transitions. Set to 0 for a hard cut.",
"cut": "Cut",
"ms": "{{ms}}ms"
},
"normalize": {
"title": "Normalize audio",
"description": "Adjusts output volume to a consistent level across generations."
},
"autoplay": {
"title": "Autoplay on generate",
"description": "Automatically play audio when a generation completes."
},
"folder": {
"title": "Generations folder",
"description": "Where generated audio files are stored on disk.",
"open": "Open"
}
},
"gpu": {
"cpuOnly": "CPU Only",
"vramUsed": "{{mb}} MB VRAM",
"noAcceleration": "No GPU acceleration detected",
"active": "Active",
"cuda": {
"title": "CUDA Backend",
"description": "NVIDIA GPU acceleration via a downloadable CUDA backend.",
"downloading": "Downloading CUDA backend…",
"downloadingShort": "Downloading…",
"updating": "Updating…"
},
"restart": {
"ready": "Server restarted successfully",
"waiting": "Restarting server…",
"stopping": "Stopping server…"
},
"download": {
"title": "Download CUDA backend",
"description": "~2.4 GB download. Requires an NVIDIA GPU with CUDA support.",
"button": "Download"
},
"switchToCuda": {
"title": "Switch to CUDA backend",
"description": "CUDA backend is downloaded and ready. Restart to enable.",
"button": "Restart"
},
"switchToCpu": {
"title": "Switch to CPU backend",
"description": "Disable GPU acceleration. You can re-download CUDA later.",
"button": "Switch"
},
"remove": {
"title": "Remove CUDA backend",
"description": "Delete the downloaded CUDA binary to free disk space.",
"button": "Remove"
},
"errors": {
"downloadFailed": "Download failed",
"downloadStart": "Failed to start download",
"restartFailed": "Restart failed",
"switchCpu": "Failed to switch to CPU",
"deleteCuda": "Failed to delete CUDA backend"
},
"footer": "Voicebox automatically detects and uses the best available GPU on your system. On Apple Silicon Macs, the MLX backend runs natively on the Neural Engine and GPU via Metal Performance Shaders (MPS), with no additional setup required. On Windows and Linux with NVIDIA GPUs, you can download an optional CUDA backend for hardware-accelerated inference. AMD ROCm, Intel XPU, and DirectML are also supported where available through PyTorch. When no GPU is detected, Voicebox falls back to CPU — all engines still work, just slower."
},
"logs": {
"title": "Server Logs",
"lineCount_one": "{{count}} line",
"lineCount_other": "{{count}} lines",
"scrollToBottom": "Scroll to bottom",
"clear": "Clear",
"empty": "No log output yet.",
"devHint": "Server logs are only captured when the app manages the server process (production builds)."
},
"changelog": {
"devBadge": "dev",
"showLess": "Show less",
"showMore": "Show more"
},
"about": {
"tagline": "The open-source voice synthesis studio. Clone voices, generate speech, apply effects, and build voice-powered apps — all running locally on your machine.",
"createdBy": "Created by",
"buyCoffee": "Buy me a coffee",
"license": "Licensed under <link>MIT</link>"
}
},
"models": {
"title": "Models",
"subtitle": "Download and manage AI models for voice generation and transcription",
"defaultName": "Model",
"unknownSize": "Unknown size",
"sections": {
"voiceGeneration": "Voice Generation",
"transcription": "Transcription"
},
"status": {
"loaded": "Loaded"
},
"storage": {
"location": "Storage location",
"open": "Open",
"change": "Change",
"migrating": "Migrating…",
"reset": "Reset",
"pickerTitle": "Choose model storage folder"
},
"progress": {
"connecting": "Connecting…",
"connectingHf": "Connecting to HuggingFace…"
},
"problems": {
"title": "Problems",
"clearAll": "Clear All",
"noDetails": "No error details available. Try downloading again.",
"startedAt": "started at {{time}}"
},
"detail": {
"loadingInfo": "Loading model info…",
"byAuthor": "by {{author}}",
"downloads": "Downloads",
"likes": "Likes",
"license": "License",
"languagesCount": "{{count}} languages supported",
"languagesList": "Languages: {{list}}",
"onDisk": "{{size}} on disk"
},
"actions": {
"download": "Download",
"retry": "Retry Download",
"unload": "Unload",
"unloading": "Unloading…",
"unloadFirst": "Unload model before deleting",
"deleteModel": "Delete Model"
},
"deleteDialog": {
"title": "Delete Model",
"body": "Are you sure you want to delete <strong>{{name}}</strong>?",
"sizeNote": "This will free up {{size}} of disk space. The model will need to be re-downloaded if you want to use it again.",
"deleting": "Deleting…"
},
"migrateDialog": {
"title": "Move models to new location?",
"description": "The server will shut down while models are being moved to the new folder. It will restart automatically once the migration is complete.",
"action": "Move Models",
"preparing": "Preparing…",
"restartingServer": "Restarting server…"
},
"migrate": {
"title": "Moving models",
"offline": "The server is offline while models are being moved."
},
"toast": {
"downloadFailed": "Download failed",
"cancelFailed": "Cancel failed",
"cancelFailedDescription": "Could not cancel the download task.",
"deleted": "Model deleted",
"deletedDescription": "{{name}} has been deleted successfully.",
"deleteFailed": "Delete failed",
"unloaded": "Model unloaded",
"unloadedDescription": "{{name}} has been unloaded from memory.",
"unloadFailed": "Unload failed",
"openFolderFailed": "Failed to open model folder",
"pickerFailed": "Failed to open folder picker",
"resetToDefault": "Reset to default location. Restarting server…",
"noModelsToMigrate": "No models to migrate",
"noModelsToMigrateDescription": "Download at least one model before changing the storage location.",
"migrated": "Models moved successfully",
"migrationFailed": "Migration failed",
"migrationFailedGeneric": "Failed to migrate models",
"migrationConnectionLost": "Lost connection during migration"
}
}
}