Skip to content

7.4 billion tokens per month. 34 free LLM providers. 635 free model endpoints. All behind one /v1 endpoint, plus any custom OpenAI-compatible endpoint. Smart routing, automatic failover, encrypted keys. Personal experimentation only.

TypeScript

feat(i18n): close remaining translation gaps (Keys, Analytics, Premium, +)

Tashfeen8adc0f4afbf3
diff --git a/client/src/components/auth-gate.tsx b/client/src/components/auth-gate.tsx
index 66b0ade4..507d36ec 100644
--- a/client/src/components/auth-gate.tsx
+++ b/client/src/components/auth-gate.tsx
@@ -119,7 +119,7 @@ export function AuthGate({ children }: { children: ReactNode }) {
return (
<Centered>
<div className="rounded-lg border border-destructive/40 bg-destructive/10 px-3 py-2.5 text-xs text-destructive">
- Can't reach the server. Make sure the backend is running (<code className="font-mono">npm run dev</code>).
+ {t('auth.serverUnreachableBefore')}<code className="font-mono">npm run dev</code>{t('auth.serverUnreachableAfter')}
</div>
</Centered>
)
diff --git a/client/src/i18n/locales/en.json b/client/src/i18n/locales/en.json
index 0b57fa3e..6dd8ff45 100644
--- a/client/src/i18n/locales/en.json
+++ b/client/src/i18n/locales/en.json
@@ -28,9 +28,10 @@
"creating": "Creating…",
"signingIn": "Signing in…",
"loading": "Loading…",
- "serverUnreachable": "Can't reach the server. Make sure the backend is running (npm run dev).",
"newPasswordAutoComplete": "new-password",
- "currentPasswordAutoComplete": "current-password"
+ "currentPasswordAutoComplete": "current-password",
+ "serverUnreachableBefore": "Can't reach the server. Make sure the backend is running (",
+ "serverUnreachableAfter": ")."
},
"common": {
"save": "Save",
@@ -53,7 +54,14 @@
"error": "Error",
"noData": "No data yet",
"unsavedChanges": "Unsaved changes",
- "saveChanges": "Save changes"
+ "saveChanges": "Save changes",
+ "check": "Check",
+ "remove": "Remove",
+ "unknownError": "Unknown error",
+ "model": "Model",
+ "provider": "Provider",
+ "success": "Success",
+ "failures": "Failures"
},
"models": {
"title": "Models",
@@ -114,9 +122,8 @@
},
"keys": {
"pageTitle": "Keys",
- "pageDescription": "Add and rotate the API keys for each free-tier provider. Stored encrypted with AES-256-GCM.",
+ "pageDescription": "Provider credentials and the unified API key your apps connect with.",
"unifiedKey": "Your unified API key",
- "unifiedKeyDescription": "Use this as your OpenAI api_key; it authenticates requests to this proxy.",
"regenerate": "Regenerate",
"showKey": "Show",
"hideKey": "Hide",
@@ -140,9 +147,8 @@
"saveProxy": "Save",
"savingProxy": "Saving…",
"proxyLoadFailed": "Could not load proxy settings.",
- "proxyEnvHint": "Also configurable via the PROXY_URL environment variable (takes precedence). Leave blank to disable.",
"addCustom": "Add a custom OpenAI-compatible model",
- "addCustomDescription": "Point at any OpenAI-compatible endpoint: llama.cpp, LM Studio, vLLM, a local Ollama, or a remote gateway.",
+ "addCustomDescription": "Point at any OpenAI-compatible endpoint: llama.cpp, LM Studio, vLLM, a local Ollama, or a remote gateway. List one model per line (or comma-separated) to add several at once; they all share the one endpoint. The API key is optional (most local servers don't need one).",
"customBaseUrl": "Base URL",
"customModels": "Models",
"customDisplayName": "Display name",
@@ -157,7 +163,27 @@
"checkAll": "Check all",
"checking": "Checking…",
"editLabel": "Edit label",
- "saveLabel": "Save label"
+ "saveLabel": "Save label",
+ "unifiedKeyDescBefore": "Use this as your OpenAI ",
+ "unifiedKeyDescAfter": "; it authenticates requests to this proxy.",
+ "serverUnreachableBefore": "Can't reach the server on ",
+ "serverUnreachableAfter": ". Make sure the backend is running. npm run dev starts both, and the server logs print under the server prefix.",
+ "addProvider": "Add a provider key",
+ "platform": "Platform",
+ "apiToken": "API token",
+ "noKeyNeededPlaceholder": "No API key needed",
+ "bearerTokenPlaceholder": "Bearer token",
+ "pasteKeyPlaceholder": "paste key here",
+ "keylessHint": "No API key needed: this provider's free tier is anonymous (rate-limited per IP).",
+ "enable": "Enable",
+ "noProviderKeys": "No provider keys yet. Add one above to start routing.",
+ "configuredProviders": "Configured providers",
+ "proxyToggleLabel": "proxy",
+ "keyCountOne": "{count} key",
+ "keyCountOther": "{count} keys",
+ "proxyEnvHintBefore": "Also configurable via the ",
+ "proxyEnvHintAfter": " environment variable (takes precedence). Leave blank to disable. Examples:",
+ "confirmRemove": "Confirm?"
},
"status": {
"healthy": "healthy",
@@ -188,7 +214,27 @@
"pinnedRequests": "Pinned requests",
"pinnedHonored": "Honored",
"fallbackAttempts": "Fallback attempts",
- "savingsHint": "You actually saved ${actual} over the last {range}. That is what the same tokens would have cost on paid APIs, priced per model. The number shown projects your pace from the last {span} of data to a full 30 days."
+ "savingsHint": "You actually saved ${actual} over the last {range}. That is what the same tokens would have cost on paid APIs, priced per model. The number shown projects your pace from the last {span} of data to a full 30 days.",
+ "savingsHintExact": "You actually saved ${actual} over the last {range}. That is what the same tokens would have cost on paid APIs, priced per model. The number shown is your real 30-day total.",
+ "requestsHintPinned": "{pinned} of these requests pinned a specific model by name. {honored} were served by the pinned model; {failed} failed over to a different one. The rest were auto-routed.",
+ "requestsHintAuto": "All requests in this period were auto-routed; no client pinned a specific model by name.",
+ "rangeLabel24h": "24 hours",
+ "rangeLabel7d": "7 days",
+ "rangeLabel30d": "30 days",
+ "spanDays": "{count} days",
+ "spanHours": "{count} hours",
+ "latencyMs": "Latency (ms)",
+ "latency": "Latency",
+ "pinned": "Pinned",
+ "inTokens": "In tokens",
+ "outTokens": "Out tokens",
+ "saved": "Saved",
+ "message": "Message",
+ "time": "Time",
+ "perModelBreakdown": "Per-model breakdown",
+ "errorsByProvider": "Errors by provider",
+ "recentErrors": "Recent errors",
+ "noErrors": "No errors"
},
"playground": {
"title": "Playground",
@@ -218,7 +264,8 @@
"autoDescription": "model: \"auto\" on POST /v1/embeddings routes to the default family. Naming a family (or a provider model id) pins that family; providers inside it are tried in order.",
"unsavedChanges": "Unsaved changes",
"saveChanges": "Save changes",
- "savingChanges": "Saving…"
+ "savingChanges": "Saving…",
+ "tokMax": "{tokens} tok max"
},
"premium": {
"title": "Premium",
@@ -254,7 +301,9 @@
"recoverKey": "Recover it on the website",
"upsellTitle": "Go live for $19 a year",
"upsellDescription": "New free models the moment they exist, instead of on the 1st of the month. One key, every device. Cancel anytime; the router stays free forever.",
- "goPremium": "Go Premium"
+ "goPremium": "Go Premium",
+ "bundled": "bundled",
+ "planGeneric": "Premium"
},
"languages": {
"en": "English",
diff --git a/client/src/i18n/locales/es.json b/client/src/i18n/locales/es.json
index 1c28a3f1..37993117 100644
--- a/client/src/i18n/locales/es.json
+++ b/client/src/i18n/locales/es.json
@@ -28,9 +28,10 @@
"creating": "Creando…",
"signingIn": "Iniciando sesión…",
"loading": "Cargando…",
- "serverUnreachable": "No se puede conectar con el servidor. Asegúrate de que el backend esté en ejecución (npm run dev).",
"newPasswordAutoComplete": "new-password",
- "currentPasswordAutoComplete": "current-password"
+ "currentPasswordAutoComplete": "current-password",
+ "serverUnreachableBefore": "No se puede conectar con el servidor. Asegúrate de que el backend esté en ejecución (",
+ "serverUnreachableAfter": ")."
},
"common": {
"save": "Guardar",
@@ -53,7 +54,14 @@
"error": "Error",
"noData": "Aún no hay datos",
"unsavedChanges": "Cambios sin guardar",
- "saveChanges": "Guardar cambios"
+ "saveChanges": "Guardar cambios",
+ "check": "Comprobar",
+ "remove": "Quitar",
+ "unknownError": "Error desconocido",
+ "model": "Modelo",
+ "provider": "Proveedor",
+ "success": "Aciertos",
+ "failures": "Fallos"
},
"models": {
"title": "Modelos",
@@ -114,9 +122,8 @@
},
"keys": {
"pageTitle": "Claves",
- "pageDescription": "Añade y rota las claves API de cada proveedor del nivel gratuito. Se almacenan cifradas con AES-256-GCM.",
+ "pageDescription": "Las credenciales de los proveedores y la clave API unificada con la que se conectan tus aplicaciones.",
"unifiedKey": "Tu clave API unificada",
- "unifiedKeyDescription": "Úsala como tu api_key de OpenAI; autentica las solicitudes a este proxy.",
"regenerate": "Regenerar",
"showKey": "Mostrar",
"hideKey": "Ocultar",
@@ -140,9 +147,8 @@
"saveProxy": "Guardar",
"savingProxy": "Guardando…",
"proxyLoadFailed": "No se pudieron cargar los ajustes del proxy.",
- "proxyEnvHint": "También configurable mediante la variable de entorno PROXY_URL (tiene prioridad). Déjalo en blanco para desactivar.",
"addCustom": "Añadir un modelo personalizado compatible con OpenAI",
- "addCustomDescription": "Apunta a cualquier endpoint compatible con OpenAI: llama.cpp, LM Studio, vLLM, un Ollama local o una pasarela remota.",
+ "addCustomDescription": "Apunta a cualquier endpoint compatible con OpenAI: llama.cpp, LM Studio, vLLM, un Ollama local o una pasarela remota. Indica un modelo por línea (o separados por comas) para añadir varios a la vez; todos comparten el mismo endpoint. La clave API es opcional (la mayoría de los servidores locales no la necesitan).",
"customBaseUrl": "URL base",
"customModels": "Modelos",
"customDisplayName": "Nombre visible",
@@ -157,7 +163,27 @@
"checkAll": "Comprobar todo",
"checking": "Comprobando…",
"editLabel": "Editar etiqueta",
- "saveLabel": "Guardar etiqueta"
+ "saveLabel": "Guardar etiqueta",
+ "unifiedKeyDescBefore": "Úsala como tu ",
+ "unifiedKeyDescAfter": " de OpenAI; autentica las solicitudes a este proxy.",
+ "serverUnreachableBefore": "No se puede conectar con el servidor en ",
+ "serverUnreachableAfter": ". Asegúrate de que el backend esté en ejecución. npm run dev inicia ambos, y los registros del servidor se imprimen con el prefijo server.",
+ "addProvider": "Añadir una clave de proveedor",
+ "platform": "Plataforma",
+ "apiToken": "Token de API",
+ "noKeyNeededPlaceholder": "No se necesita clave API",
+ "bearerTokenPlaceholder": "Token Bearer",
+ "pasteKeyPlaceholder": "pega la clave aquí",
+ "keylessHint": "No se necesita clave API: el nivel gratuito de este proveedor es anónimo (con límite por IP).",
+ "enable": "Habilitar",
+ "noProviderKeys": "Aún no hay claves de proveedor. Añade una arriba para empezar a enrutar.",
+ "configuredProviders": "Proveedores configurados",
+ "proxyToggleLabel": "proxy",
+ "keyCountOne": "{count} clave",
+ "keyCountOther": "{count} claves",
+ "proxyEnvHintBefore": "También configurable mediante la variable de entorno ",
+ "proxyEnvHintAfter": " (tiene prioridad). Déjalo en blanco para desactivar. Ejemplos:",
+ "confirmRemove": "¿Confirmar?"
},
"status": {
"healthy": "correcto",
@@ -188,7 +214,27 @@
"pinnedRequests": "Solicitudes fijadas",
"pinnedHonored": "Respetadas",
"fallbackAttempts": "Intentos de reserva",
- "savingsHint": "Realmente ahorraste {actual} $ en los últimos {range}. Eso es lo que los mismos tokens habrían costado en APIs de pago, con precio por modelo. La cifra mostrada proyecta tu ritmo de los {span} de datos más recientes a 30 días completos."
+ "savingsHint": "Realmente ahorraste {actual} $ en los últimos {range}. Eso es lo que los mismos tokens habrían costado en APIs de pago, con precio por modelo. La cifra mostrada proyecta tu ritmo de los {span} de datos más recientes a 30 días completos.",
+ "savingsHintExact": "Realmente ahorraste {actual} $ en los últimos {range}. Eso es lo que los mismos tokens habrían costado en APIs de pago, con precio por modelo. La cifra mostrada es tu total real de 30 días.",
+ "requestsHintPinned": "{pinned} de estas solicitudes fijaron un modelo concreto por su nombre. {honored} fueron atendidas por el modelo fijado; {failed} conmutaron a otro. El resto se enrutaron automáticamente.",
+ "requestsHintAuto": "Todas las solicitudes de este periodo se enrutaron automáticamente; ningún cliente fijó un modelo concreto por su nombre.",
+ "rangeLabel24h": "24 horas",
+ "rangeLabel7d": "7 días",
+ "rangeLabel30d": "30 días",
+ "spanDays": "{count} días",
+ "spanHours": "{count} horas",
+ "latencyMs": "Latencia (ms)",
+ "latency": "Latencia",
+ "pinned": "Fijado",
+ "inTokens": "Tokens de entrada",
+ "outTokens": "Tokens de salida",
+ "saved": "Ahorrado",
+ "message": "Mensaje",
+ "time": "Hora",
+ "perModelBreakdown": "Desglose por modelo",
+ "errorsByProvider": "Errores por proveedor",
+ "recentErrors": "Errores recientes",
+ "noErrors": "Sin errores"
},
"playground": {
"title": "Entorno de pruebas",
@@ -218,7 +264,8 @@
"autoDescription": "model: «auto» en POST /v1/embeddings enruta a la familia predeterminada. Nombrar una familia (o un id de modelo de proveedor) fija esa familia; los proveedores dentro de ella se prueban en orden.",
"unsavedChanges": "Cambios sin guardar",
"saveChanges": "Guardar cambios",
- "savingChanges": "Guardando…"
+ "savingChanges": "Guardando…",
+ "tokMax": "{tokens} tok máx."
},
"premium": {
"title": "Premium",
@@ -254,7 +301,9 @@
"recoverKey": "Recupérala en el sitio web",
"upsellTitle": "Pásate al directo por 19 $ al año",
"upsellDescription": "Nuevos modelos gratuitos en cuanto existen, en lugar de esperar al día 1 del mes. Una clave, todos tus dispositivos. Cancela cuando quieras; el enrutador sigue siendo gratis para siempre.",
- "goPremium": "Hazte Premium"
+ "goPremium": "Hazte Premium",
+ "bundled": "incluido",
+ "planGeneric": "Premium"
},
"languages": {
"en": "English",
diff --git a/client/src/i18n/locales/fr.json b/client/src/i18n/locales/fr.json
index d70a0422..9bc5f89a 100644
--- a/client/src/i18n/locales/fr.json
+++ b/client/src/i18n/locales/fr.json
@@ -28,9 +28,10 @@
"creating": "Création…",
"signingIn": "Connexion…",
"loading": "Chargement…",
- "serverUnreachable": "Impossible de joindre le serveur. Vérifiez que le backend est démarré (npm run dev).",
"newPasswordAutoComplete": "new-password",
- "currentPasswordAutoComplete": "current-password"
+ "currentPasswordAutoComplete": "current-password",
+ "serverUnreachableBefore": "Impossible de joindre le serveur. Vérifiez que le backend est démarré (",
+ "serverUnreachableAfter": ")."
},
"common": {
"save": "Enregistrer",
@@ -53,7 +54,14 @@
"error": "Erreur",
"noData": "Aucune donnée pour l'instant",
"unsavedChanges": "Modifications non enregistrées",
- "saveChanges": "Enregistrer les modifications"
+ "saveChanges": "Enregistrer les modifications",
+ "check": "Vérifier",
+ "remove": "Supprimer",
+ "unknownError": "Erreur inconnue",
+ "model": "Modèle",
+ "provider": "Fournisseur",
+ "success": "Réussite",
+ "failures": "Échecs"
},
"models": {
"title": "Modèles",
@@ -114,9 +122,8 @@
},
"keys": {
"pageTitle": "Clés",
- "pageDescription": "Ajoutez et renouvelez les clés API de chaque fournisseur en offre gratuite. Stockées chiffrées avec AES-256-GCM.",
+ "pageDescription": "Les identifiants des fournisseurs et la clé API unifiée à laquelle vos applications se connectent.",
"unifiedKey": "Votre clé API unifiée",
- "unifiedKeyDescription": "Utilisez-la comme api_key OpenAI ; elle authentifie les requêtes vers ce proxy.",
"regenerate": "Régénérer",
"showKey": "Afficher",
"hideKey": "Masquer",
@@ -140,9 +147,8 @@
"saveProxy": "Enregistrer",
"savingProxy": "Enregistrement…",
"proxyLoadFailed": "Impossible de charger les paramètres du proxy.",
- "proxyEnvHint": "Également configurable via la variable d'environnement PROXY_URL (prioritaire). Laissez vide pour désactiver.",
"addCustom": "Ajouter un modèle personnalisé compatible OpenAI",
- "addCustomDescription": "Pointez vers n'importe quel endpoint compatible OpenAI : llama.cpp, LM Studio, vLLM, un Ollama local ou une passerelle distante.",
+ "addCustomDescription": "Pointez vers n'importe quel endpoint compatible OpenAI : llama.cpp, LM Studio, vLLM, un Ollama local ou une passerelle distante. Indiquez un modèle par ligne (ou séparés par des virgules) pour en ajouter plusieurs à la fois ; ils partagent tous le même endpoint. La clé API est facultative (la plupart des serveurs locaux n'en ont pas besoin).",
"customBaseUrl": "URL de base",
"customModels": "Modèles",
"customDisplayName": "Nom affiché",
@@ -157,7 +163,27 @@
"checkAll": "Tout vérifier",
"checking": "Vérification…",
"editLabel": "Modifier le libellé",
- "saveLabel": "Enregistrer le libellé"
+ "saveLabel": "Enregistrer le libellé",
+ "unifiedKeyDescBefore": "Utilisez-la comme votre ",
+ "unifiedKeyDescAfter": " OpenAI ; elle authentifie les requêtes vers ce proxy.",
+ "serverUnreachableBefore": "Impossible de joindre le serveur sur ",
+ "serverUnreachableAfter": ". Vérifiez que le backend est démarré. npm run dev lance les deux, et les journaux du serveur s'affichent sous le préfixe server.",
+ "addProvider": "Ajouter une clé de fournisseur",
+ "platform": "Plateforme",
+ "apiToken": "Jeton API",
+ "noKeyNeededPlaceholder": "Aucune clé API requise",
+ "bearerTokenPlaceholder": "Jeton Bearer",
+ "pasteKeyPlaceholder": "collez la clé ici",
+ "keylessHint": "Aucune clé API requise : l'offre gratuite de ce fournisseur est anonyme (limitée par IP).",
+ "enable": "Activer",
+ "noProviderKeys": "Aucune clé de fournisseur pour l'instant. Ajoutez-en une ci-dessus pour commencer le routage.",
+ "configuredProviders": "Fournisseurs configurés",
+ "proxyToggleLabel": "proxy",
+ "keyCountOne": "{count} clé",
+ "keyCountOther": "{count} clés",
+ "proxyEnvHintBefore": "Également configurable via la variable d'environnement ",
+ "proxyEnvHintAfter": " (prioritaire). Laissez vide pour désactiver. Exemples :",
+ "confirmRemove": "Confirmer ?"
},
"status": {
"healthy": "sain",
@@ -188,7 +214,27 @@
"pinnedRequests": "Requêtes épinglées",
"pinnedHonored": "Honorées",
"fallbackAttempts": "Tentatives de repli",
- "savingsHint": "Vous avez réellement économisé {actual} $ sur les {range} derniers. C'est ce que les mêmes tokens auraient coûté sur des API payantes, tarifés par modèle. Le chiffre affiché projette votre rythme des {span} de données les plus récentes sur 30 jours complets."
+ "savingsHint": "Vous avez réellement économisé {actual} $ sur les {range} derniers. C'est ce que les mêmes tokens auraient coûté sur des API payantes, tarifés par modèle. Le chiffre affiché projette votre rythme des {span} de données les plus récentes sur 30 jours complets.",
+ "savingsHintExact": "Vous avez réellement économisé {actual} $ sur les {range} derniers. C'est ce que les mêmes tokens auraient coûté sur des API payantes, tarifés par modèle. Le chiffre affiché est votre total réel sur 30 jours.",
+ "requestsHintPinned": "{pinned} de ces requêtes ont épinglé un modèle précis par son nom. {honored} ont été traitées par le modèle épinglé ; {failed} ont basculé vers un autre. Les autres ont été routées automatiquement.",
+ "requestsHintAuto": "Toutes les requêtes de cette période ont été routées automatiquement ; aucun client n'a épinglé de modèle précis par son nom.",
+ "rangeLabel24h": "24 heures",
+ "rangeLabel7d": "7 jours",
+ "rangeLabel30d": "30 jours",
+ "spanDays": "{count} jours",
+ "spanHours": "{count} heures",
+ "latencyMs": "Latence (ms)",
+ "latency": "Latence",
+ "pinned": "Épinglé",
+ "inTokens": "Tokens en entrée",
+ "outTokens": "Tokens en sortie",
+ "saved": "Économisé",
+ "message": "Message",
+ "time": "Heure",
+ "perModelBreakdown": "Détail par modèle",
+ "errorsByProvider": "Erreurs par fournisseur",
+ "recentErrors": "Erreurs récentes",
+ "noErrors": "Aucune erreur"
},
"playground": {
"title": "Bac à sable",
@@ -218,7 +264,8 @@
"autoDescription": "model : « auto » sur POST /v1/embeddings achemine vers la famille par défaut. Nommer une famille (ou un id de modèle de fournisseur) épingle cette famille ; les fournisseurs qu'elle contient sont essayés dans l'ordre.",
"unsavedChanges": "Modifications non enregistrées",
"saveChanges": "Enregistrer les modifications",
- "savingChanges": "Enregistrement…"
+ "savingChanges": "Enregistrement…",
+ "tokMax": "{tokens} tok max."
},
"premium": {
"title": "Premium",
@@ -254,7 +301,9 @@
"recoverKey": "Récupérez-la sur le site web",
"upsellTitle": "Passez en direct pour 19 $ par an",
"upsellDescription": "De nouveaux modèles gratuits dès leur sortie, au lieu du 1er du mois. Une seule clé, tous vos appareils. Annulable à tout moment ; le routeur reste gratuit pour toujours.",
- "goPremium": "Passer à Premium"
+ "goPremium": "Passer à Premium",
+ "bundled": "intégré",
+ "planGeneric": "Premium"
},
"languages": {
"en": "English",
diff --git a/client/src/i18n/locales/pt-BR.json b/client/src/i18n/locales/pt-BR.json
index d05fc219..7b92df12 100644
--- a/client/src/i18n/locales/pt-BR.json
+++ b/client/src/i18n/locales/pt-BR.json
@@ -28,9 +28,10 @@
"creating": "Criando…",
"signingIn": "Entrando…",
"loading": "Carregando…",
- "serverUnreachable": "Não foi possível acessar o servidor. Verifique se o backend está em execução (npm run dev).",
"newPasswordAutoComplete": "new-password",
- "currentPasswordAutoComplete": "current-password"
+ "currentPasswordAutoComplete": "current-password",
+ "serverUnreachableBefore": "Não foi possível acessar o servidor. Verifique se o backend está em execução (",
+ "serverUnreachableAfter": ")."
},
"common": {
"save": "Salvar",
@@ -53,7 +54,14 @@
"error": "Erro",
"noData": "Ainda não há dados",
"unsavedChanges": "Alterações não salvas",
- "saveChanges": "Salvar alterações"
+ "saveChanges": "Salvar alterações",
+ "check": "Verificar",
+ "remove": "Remover",
+ "unknownError": "Erro desconhecido",
+ "model": "Modelo",
+ "provider": "Provedor",
+ "success": "Sucessos",
+ "failures": "Falhas"
},
"models": {
"title": "Modelos",
@@ -114,9 +122,8 @@
},
"keys": {
"pageTitle": "Chaves",
- "pageDescription": "Adicione e renove as chaves de API de cada provedor do nível gratuito. Armazenadas com criptografia AES-256-GCM.",
+ "pageDescription": "As credenciais dos provedores e a chave de API unificada à qual seus aplicativos se conectam.",
"unifiedKey": "Sua chave de API unificada",
- "unifiedKeyDescription": "Use-a como sua api_key da OpenAI; ela autentica as solicitações a este proxy.",
"regenerate": "Regenerar",
"showKey": "Mostrar",
"hideKey": "Ocultar",
@@ -140,9 +147,8 @@
"saveProxy": "Salvar",
"savingProxy": "Salvando…",
"proxyLoadFailed": "Não foi possível carregar as configurações do proxy.",
- "proxyEnvHint": "Também configurável pela variável de ambiente PROXY_URL (tem precedência). Deixe em branco para desativar.",
"addCustom": "Adicionar um modelo personalizado compatível com OpenAI",
- "addCustomDescription": "Aponte para qualquer endpoint compatível com OpenAI: llama.cpp, LM Studio, vLLM, um Ollama local ou um gateway remoto.",
+ "addCustomDescription": "Aponte para qualquer endpoint compatível com OpenAI: llama.cpp, LM Studio, vLLM, um Ollama local ou um gateway remoto. Liste um modelo por linha (ou separados por vírgula) para adicionar vários de uma vez; todos compartilham o mesmo endpoint. A chave de API é opcional (a maioria dos servidores locais não precisa).",
"customBaseUrl": "URL base",
"customModels": "Modelos",
"customDisplayName": "Nome de exibição",
@@ -157,7 +163,27 @@
"checkAll": "Verificar tudo",
"checking": "Verificando…",
"editLabel": "Editar rótulo",
- "saveLabel": "Salvar rótulo"
+ "saveLabel": "Salvar rótulo",
+ "unifiedKeyDescBefore": "Use-a como sua ",
+ "unifiedKeyDescAfter": " da OpenAI; ela autentica as solicitações a este proxy.",
+ "serverUnreachableBefore": "Não foi possível acessar o servidor em ",
+ "serverUnreachableAfter": ". Verifique se o backend está em execução. npm run dev inicia os dois, e os logs do servidor são impressos sob o prefixo server.",
+ "addProvider": "Adicionar uma chave de provedor",
+ "platform": "Plataforma",
+ "apiToken": "Token de API",
+ "noKeyNeededPlaceholder": "Nenhuma chave de API necessária",
+ "bearerTokenPlaceholder": "Token Bearer",
+ "pasteKeyPlaceholder": "cole a chave aqui",
+ "keylessHint": "Nenhuma chave de API necessária: o nível gratuito deste provedor é anônimo (com limite por IP).",
+ "enable": "Habilitar",
+ "noProviderKeys": "Ainda não há chaves de provedor. Adicione uma acima para começar o roteamento.",
+ "configuredProviders": "Provedores configurados",
+ "proxyToggleLabel": "proxy",
+ "keyCountOne": "{count} chave",
+ "keyCountOther": "{count} chaves",
+ "proxyEnvHintBefore": "Também configurável pela variável de ambiente ",
+ "proxyEnvHintAfter": " (tem precedência). Deixe em branco para desativar. Exemplos:",
+ "confirmRemove": "Confirmar?"
},
"status": {
"healthy": "saudável",
@@ -188,7 +214,27 @@
"pinnedRequests": "Solicitações fixadas",
"pinnedHonored": "Respeitadas",
"fallbackAttempts": "Tentativas de fallback",
- "savingsHint": "Você economizou de fato {actual} $ nos últimos {range}. É quanto os mesmos tokens teriam custado em APIs pagas, com preço por modelo. O número exibido projeta seu ritmo dos {span} de dados mais recentes para 30 dias completos."
+ "savingsHint": "Você economizou de fato {actual} $ nos últimos {range}. É quanto os mesmos tokens teriam custado em APIs pagas, com preço por modelo. O número exibido projeta seu ritmo dos {span} de dados mais recentes para 30 dias completos.",
+ "savingsHintExact": "Você economizou de fato {actual} $ nos últimos {range}. É quanto os mesmos tokens teriam custado em APIs pagas, com preço por modelo. O número exibido é o seu total real de 30 dias.",
+ "requestsHintPinned": "{pinned} destas solicitações fixaram um modelo específico pelo nome. {honored} foram atendidas pelo modelo fixado; {failed} fizeram fallback para outro. As demais foram roteadas automaticamente.",
+ "requestsHintAuto": "Todas as solicitações deste período foram roteadas automaticamente; nenhum cliente fixou um modelo específico pelo nome.",
+ "rangeLabel24h": "24 horas",
+ "rangeLabel7d": "7 dias",
+ "rangeLabel30d": "30 dias",
+ "spanDays": "{count} dias",
+ "spanHours": "{count} horas",
+ "latencyMs": "Latência (ms)",
+ "latency": "Latência",
+ "pinned": "Fixado",
+ "inTokens": "Tokens de entrada",
+ "outTokens": "Tokens de saída",
+ "saved": "Economizado",
+ "message": "Mensagem",
+ "time": "Hora",
+ "perModelBreakdown": "Detalhamento por modelo",
+ "errorsByProvider": "Erros por provedor",
+ "recentErrors": "Erros recentes",
+ "noErrors": "Sem erros"
},
"playground": {
"title": "Playground",
@@ -218,7 +264,8 @@
"autoDescription": "model: \"auto\" em POST /v1/embeddings roteia para a família padrão. Nomear uma família (ou um id de modelo de provedor) fixa essa família; os provedores dentro dela são tentados em ordem.",
"unsavedChanges": "Alterações não salvas",
"saveChanges": "Salvar alterações",
- "savingChanges": "Salvando…"
+ "savingChanges": "Salvando…",
+ "tokMax": "{tokens} tok máx."
},
"premium": {
"title": "Premium",
@@ -254,7 +301,9 @@
"recoverKey": "Recupere-a no site",
"upsellTitle": "Vá para o ao vivo por US$ 19 por ano",
"upsellDescription": "Novos modelos gratuitos no momento em que existem, em vez de no dia 1º do mês. Uma chave, todos os dispositivos. Cancele quando quiser; o roteador continua gratuito para sempre.",
- "goPremium": "Assinar o Premium"
+ "goPremium": "Assinar o Premium",
+ "bundled": "incluído",
+ "planGeneric": "Premium"
},
"languages": {
"en": "English",
diff --git a/client/src/i18n/locales/zh-CN.json b/client/src/i18n/locales/zh-CN.json
index 14794d60..0f786f69 100644
--- a/client/src/i18n/locales/zh-CN.json
+++ b/client/src/i18n/locales/zh-CN.json
@@ -28,9 +28,10 @@
"creating": "创建中…",
"signingIn": "登录中…",
"loading": "加载中…",
- "serverUnreachable": "无法连接到服务器。请确认后端正在运行(npm run dev)。",
"newPasswordAutoComplete": "new-password",
- "currentPasswordAutoComplete": "current-password"
+ "currentPasswordAutoComplete": "current-password",
+ "serverUnreachableBefore": "无法连接到服务器。请确认后端正在运行(",
+ "serverUnreachableAfter": ")。"
},
"common": {
"save": "保存",
@@ -53,7 +54,14 @@
"error": "错误",
"noData": "暂无数据",
"unsavedChanges": "未保存的更改",
- "saveChanges": "保存更改"
+ "saveChanges": "保存更改",
+ "check": "检查",
+ "remove": "移除",
+ "unknownError": "未知错误",
+ "model": "模型",
+ "provider": "提供方",
+ "success": "成功",
+ "failures": "失败"
},
"models": {
"title": "模型",
@@ -114,9 +122,8 @@
},
"keys": {
"pageTitle": "密钥",
- "pageDescription": "添加并轮换各个免费层提供商的 API 密钥。使用 AES-256-GCM 加密存储。",
+ "pageDescription": "各提供方的凭据,以及你的应用用来连接的统一 API 密钥。",
"unifiedKey": "您的统一 API 密钥",
- "unifiedKeyDescription": "将其用作 OpenAI 的 api_key 即可向本代理发起请求。",
"regenerate": "重新生成",
"showKey": "显示",
"hideKey": "隐藏",
@@ -140,9 +147,8 @@
"saveProxy": "保存",
"savingProxy": "保存中…",
"proxyLoadFailed": "无法加载代理设置。",
- "proxyEnvHint": "也可通过 PROXY_URL 环境变量配置(优先级更高)。留空表示禁用。",
"addCustom": "添加自定义 OpenAI 兼容模型",
- "addCustomDescription": "指向任何 OpenAI 兼容端点:llama.cpp、LM Studio、vLLM、本地 Ollama 或远程网关。",
+ "addCustomDescription": "指向任意兼容 OpenAI 的端点:llama.cpp、LM Studio、vLLM、本地 Ollama 或远程网关。每行填写一个模型(或用逗号分隔)即可一次添加多个;它们共用同一个端点。API 密钥是可选的(大多数本地服务器不需要)。",
"customBaseUrl": "Base URL",
"customModels": "模型",
"customDisplayName": "显示名称",
@@ -157,7 +163,27 @@
"checkAll": "全部检查",
"checking": "检查中…",
"editLabel": "编辑标签",
- "saveLabel": "保存标签"
+ "saveLabel": "保存标签",
+ "unifiedKeyDescBefore": "将其用作你的 OpenAI ",
+ "unifiedKeyDescAfter": ";它用于对发往本代理的请求进行身份验证。",
+ "serverUnreachableBefore": "无法连接到位于 ",
+ "serverUnreachableAfter": " 的服务器。请确认后端正在运行。npm run dev 会同时启动两者,服务器日志会以 server 前缀打印。",
+ "addProvider": "添加提供方密钥",
+ "platform": "平台",
+ "apiToken": "API 令牌",
+ "noKeyNeededPlaceholder": "无需 API 密钥",
+ "bearerTokenPlaceholder": "Bearer 令牌",
+ "pasteKeyPlaceholder": "在此粘贴密钥",
+ "keylessHint": "无需 API 密钥:该提供方的免费层是匿名的(按 IP 限流)。",
+ "enable": "启用",
+ "noProviderKeys": "尚无提供方密钥。在上方添加一个即可开始路由。",
+ "configuredProviders": "已配置的提供方",
+ "proxyToggleLabel": "代理",
+ "keyCountOne": "{count} 个密钥",
+ "keyCountOther": "{count} 个密钥",
+ "proxyEnvHintBefore": "也可通过 ",
+ "proxyEnvHintAfter": " 环境变量配置(优先生效)。留空则禁用。示例:",
+ "confirmRemove": "确认?"
},
"status": {
"healthy": "健康",
@@ -188,7 +214,27 @@
"pinnedRequests": "固定请求",
"pinnedHonored": "已生效",
"fallbackAttempts": "回退尝试",
- "savingsHint": "您在过去 {range} 实际节省了 ${actual},相当于按模型定价时这些令牌在付费 API 上的花费。显示的数字基于过去 {span} 的数据按比例推算到完整 30 天。"
+ "savingsHint": "您在过去 {range} 实际节省了 ${actual},相当于按模型定价时这些令牌在付费 API 上的花费。显示的数字基于过去 {span} 的数据按比例推算到完整 30 天。",
+ "savingsHintExact": "在过去 {range},你实际节省了 ${actual}。这是相同的 token 在按模型计费的付费 API 上的花费。所显示的数字就是你真实的 30 天总额。",
+ "requestsHintPinned": "其中有 {pinned} 个请求按名称固定了特定模型。{honored} 个由所固定的模型处理;{failed} 个回退到了其他模型。其余为自动路由。",
+ "requestsHintAuto": "此期间的所有请求均为自动路由;没有客户端按名称固定特定模型。",
+ "rangeLabel24h": "24 小时",
+ "rangeLabel7d": "7 天",
+ "rangeLabel30d": "30 天",
+ "spanDays": "{count} 天",
+ "spanHours": "{count} 小时",
+ "latencyMs": "延迟(毫秒)",
+ "latency": "延迟",
+ "pinned": "已固定",
+ "inTokens": "输入 token",
+ "outTokens": "输出 token",
+ "saved": "已节省",
+ "message": "消息",
+ "time": "时间",
+ "perModelBreakdown": "按模型细分",
+ "errorsByProvider": "按提供方统计错误",
+ "recentErrors": "最近的错误",
+ "noErrors": "无错误"
},
"playground": {
"title": "试玩台",
@@ -218,7 +264,8 @@
"autoDescription": "在 POST /v1/embeddings 中使用 model: \"auto\" 会路由到默认系列。指定系列名(或提供商模型 ID)会固定该系列,并按顺序尝试其中的提供商。",
"unsavedChanges": "有未保存的修改",
"saveChanges": "保存修改",
- "savingChanges": "保存中…"
+ "savingChanges": "保存中…",
+ "tokMax": "最多 {tokens} tok"
},
"premium": {
"title": "高级版",
@@ -254,7 +301,9 @@
"recoverKey": "在官网找回",
"upsellTitle": "升级为每年 19 美元的实时版",
"upsellDescription": "新免费模型一上线就可用,不必等到每月 1 日。一个密钥,所有设备。随时取消,路由器永远免费。",
- "goPremium": "升级到高级版"
+ "goPremium": "升级到高级版",
+ "bundled": "内置",
+ "planGeneric": "Premium"
},
"languages": {
"en": "English",
diff --git a/client/src/pages/AnalyticsPage.tsx b/client/src/pages/AnalyticsPage.tsx
index 6f2992fb..cc1b4271 100644
--- a/client/src/pages/AnalyticsPage.tsx
+++ b/client/src/pages/AnalyticsPage.tsx
@@ -105,19 +105,19 @@ export default function AnalyticsPage() {
})()
const extrapolated = spanDays < 29.5
const savings30d = extrapolated ? baseSavings * (30 / spanDays) : baseSavings
- const rangeLabel = range === '24h' ? '24 hours' : range === '7d' ? '7 days' : '30 days'
- const spanLabel = spanDays >= 2 ? `${Math.round(spanDays)} days` : `${Math.max(1, Math.round(spanDays * 24))} hours`
+ const rangeLabel = range === '24h' ? t('analytics.rangeLabel24h') : range === '7d' ? t('analytics.rangeLabel7d') : t('analytics.rangeLabel30d')
+ const spanLabel = spanDays >= 2 ? t('analytics.spanDays', { count: Math.round(spanDays) }) : t('analytics.spanHours', { count: Math.max(1, Math.round(spanDays * 24)) })
const savingsHint = extrapolated
? t('analytics.savingsHint', { actual: actualSavings.toFixed(2), range: rangeLabel, span: spanLabel })
- : `You actually saved $${actualSavings.toFixed(2)} over the last ${rangeLabel}. That is what the same tokens would have cost on paid APIs, priced per model. The number shown is your real 30-day total.`
+ : t('analytics.savingsHintExact', { actual: actualSavings.toFixed(2), range: rangeLabel })
// Pinned = the client named a specific model instead of auto-routing.
// Honored = that model actually served it (the rest failed over).
const pinned = summary?.pinnedRequests ?? 0
const pinHonored = summary?.pinHonoredRequests ?? 0
const requestsHint = pinned > 0
- ? `${pinned} of these requests pinned a specific model by name. ${pinHonored} were served by the pinned model; ${pinned - pinHonored} failed over to a different one. The rest were auto-routed.`
- : 'All requests in this period were auto-routed; no client pinned a specific model by name.'
+ ? t('analytics.requestsHintPinned', { pinned, honored: pinHonored, failed: pinned - pinHonored })
+ : t('analytics.requestsHintAuto')
return (
<div>
@@ -182,7 +182,7 @@ export default function AnalyticsPage() {
<XAxis dataKey="platform" tick={axisStyle} tickLine={false} axisLine={{ stroke: gridStyle }} />
<YAxis unit="ms" tick={axisStyle} tickLine={false} axisLine={false} />
<Tooltip contentStyle={{ backgroundColor: 'var(--popover)', border: '1px solid var(--border)', borderRadius: 8, fontSize: 12 }} />
- <Bar dataKey="avgLatencyMs" name="Latency (ms)" fill="var(--muted-foreground)" radius={[3, 3, 0, 0]} />
+ <Bar dataKey="avgLatencyMs" name={t('analytics.latencyMs')} fill="var(--muted-foreground)" radius={[3, 3, 0, 0]} />
</BarChart>
</ResponsiveContainer>
)}
@@ -200,8 +200,8 @@ export default function AnalyticsPage() {
<YAxis tick={axisStyle} tickLine={false} axisLine={false} />
<Tooltip contentStyle={{ backgroundColor: 'var(--popover)', border: '1px solid var(--border)', borderRadius: 8, fontSize: 12 }} />
<Legend wrapperStyle={{ fontSize: 12 }} iconType="line" />
- <Line type="monotone" dataKey="successCount" name="Success" stroke={primaryFill} strokeWidth={1.5} dot={false} />
- <Line type="monotone" dataKey="failureCount" name="Failures" stroke="var(--destructive)" strokeWidth={1.5} dot={false} />
+ <Line type="monotone" dataKey="successCount" name={t('common.success')} stroke={primaryFill} strokeWidth={1.5} dot={false} />
+ <Line type="monotone" dataKey="failureCount" name={t('common.failures')} stroke="var(--destructive)" strokeWidth={1.5} dot={false} />
</LineChart>
</ResponsiveContainer>
)}
@@ -209,7 +209,7 @@ export default function AnalyticsPage() {
</div>
<div className="lg:col-span-2">
- <Panel title="Per-model breakdown">
+ <Panel title={t('analytics.perModelBreakdown')}>
{byModel.length === 0 ? (
<p className="text-sm text-muted-foreground text-center py-8">{t('common.noData')}</p>
) : (
@@ -217,15 +217,15 @@ export default function AnalyticsPage() {
<Table>
<TableHeader>
<TableRow>
- <TableHead className="pl-4">Model</TableHead>
- <TableHead>Provider</TableHead>
- <TableHead className="text-right">Requests</TableHead>
- <TableHead className="text-right">Pinned</TableHead>
- <TableHead className="text-right">Success</TableHead>
- <TableHead className="text-right">Latency</TableHead>
- <TableHead className="text-right">In tokens</TableHead>
- <TableHead className="text-right">Out tokens</TableHead>
- <TableHead className="text-right pr-4">Saved</TableHead>
+ <TableHead className="pl-4">{t('common.model')}</TableHead>
+ <TableHead>{t('common.provider')}</TableHead>
+ <TableHead className="text-right">{t('analytics.requests')}</TableHead>
+ <TableHead className="text-right">{t('analytics.pinned')}</TableHead>
+ <TableHead className="text-right">{t('common.success')}</TableHead>
+ <TableHead className="text-right">{t('analytics.latency')}</TableHead>
+ <TableHead className="text-right">{t('analytics.inTokens')}</TableHead>
+ <TableHead className="text-right">{t('analytics.outTokens')}</TableHead>
+ <TableHead className="text-right pr-4">{t('analytics.saved')}</TableHead>
</TableRow>
</TableHeader>
<TableBody>
@@ -249,9 +249,9 @@ export default function AnalyticsPage() {
</Panel>
</div>
- <Panel title="Errors by provider">
+ <Panel title={t('analytics.errorsByProvider')}>
{!errorDist?.byPlatform?.length ? (
- <p className="text-sm text-muted-foreground text-center py-8">No errors</p>
+ <p className="text-sm text-muted-foreground text-center py-8">{t('analytics.noErrors')}</p>
) : (
<ResponsiveContainer width="100%" height={240}>
<BarChart data={errorDist.byPlatform} margin={{ top: 6, right: 6, left: -12, bottom: 0 }}>
@@ -265,17 +265,17 @@ export default function AnalyticsPage() {
)}
</Panel>
- <Panel title="Recent errors">
+ <Panel title={t('analytics.recentErrors')}>
{errors.length === 0 ? (
- <p className="text-sm text-muted-foreground text-center py-8">No errors</p>
+ <p className="text-sm text-muted-foreground text-center py-8">{t('analytics.noErrors')}</p>
) : (
<div className="max-h-[240px] overflow-y-auto -mx-4">
<Table>
<TableHeader>
<TableRow>
- <TableHead className="pl-4">Provider</TableHead>
- <TableHead>Message</TableHead>
- <TableHead className="text-right pr-4">Time</TableHead>
+ <TableHead className="pl-4">{t('common.provider')}</TableHead>
+ <TableHead>{t('analytics.message')}</TableHead>
+ <TableHead className="text-right pr-4">{t('analytics.time')}</TableHead>
</TableRow>
</TableHeader>
<TableBody>
diff --git a/client/src/pages/EmbeddingsPage.tsx b/client/src/pages/EmbeddingsPage.tsx
index 2100f312..3234d715 100644
--- a/client/src/pages/EmbeddingsPage.tsx
+++ b/client/src/pages/EmbeddingsPage.tsx
@@ -120,9 +120,7 @@ export default function EmbeddingsPage() {
<div className="space-y-6">
<p className="text-xs text-muted-foreground">
- <code className="rounded-md bg-muted px-1.5 py-0.5 font-mono">model: "auto"</code> on{' '}
- <code className="rounded-md bg-muted px-1.5 py-0.5 font-mono">POST /v1/embeddings</code> routes to the
- default family. Naming a family (or a provider model id) pins that family; providers inside it are tried in order.
+ {t('embeddings.autoDescription')}
</p>
{isLoading ? (
@@ -141,7 +139,7 @@ export default function EmbeddingsPage() {
</span>
{f.maxInputTokens && (
<span className="text-[11px] text-muted-foreground/70 tabular-nums">
- {formatTokens(f.maxInputTokens)} tok max
+ {t('embeddings.tokMax', { tokens: formatTokens(f.maxInputTokens) })}
</span>
)}
{f.family === defaultFamily ? (
diff --git a/client/src/pages/KeysPage.tsx b/client/src/pages/KeysPage.tsx
index 13f4a67a..5fc337f1 100644
--- a/client/src/pages/KeysPage.tsx
+++ b/client/src/pages/KeysPage.tsx
@@ -129,7 +129,7 @@ function UnifiedKeySection() {
<div>
<h2 className="text-sm font-medium">{t('keys.unifiedKey')}</h2>
<p className="text-xs text-muted-foreground mt-0.5">
- Use this as your OpenAI <code className="font-mono">api_key</code>; it authenticates requests to this proxy.
+ {t('keys.unifiedKeyDescBefore')}<code className="font-mono">api_key</code>{t('keys.unifiedKeyDescAfter')}
</p>
</div>
<Button
@@ -144,9 +144,7 @@ function UnifiedKeySection() {
{isError ? (
<div className="rounded-lg border border-destructive/40 bg-destructive/10 px-3 py-2.5 text-xs text-destructive">
- Can't reach the server on <code className="font-mono">{baseUrl.replace('/v1', '')}</code>. Make sure the
- backend is running. <code className="font-mono">npm run dev</code> starts both, and the server logs print
- under the <code className="font-mono">server</code> prefix.
+ {t('keys.serverUnreachableBefore')}<code className="font-mono">{baseUrl.replace('/v1', '')}</code>{t('keys.serverUnreachableAfter')}
</div>
) : (
<div className="flex items-center gap-2">
@@ -260,8 +258,7 @@ function ProxySettingsSection() {
<div className="mt-3 text-[11px] text-muted-foreground">
<p>
- Also configurable via the <code className="font-mono">PROXY_URL</code> environment variable
- (takes precedence). Leave blank to disable. Examples:
+ {t('keys.proxyEnvHintBefore')}<code className="font-mono">PROXY_URL</code>{t('keys.proxyEnvHintAfter')}
</p>
<ul className="list-disc list-inside mt-1 space-y-0.5">
<li><code className="font-mono">socks5://127.0.0.1:1080</code></li>
@@ -324,9 +321,7 @@ function CustomProviderSection() {
<section>
<h2 className="text-sm font-medium mb-1">{t('keys.addCustom')}</h2>
<p className="text-xs text-muted-foreground mb-3">
- Point at any OpenAI-compatible endpoint: llama.cpp, LM Studio, vLLM, a local Ollama, or a remote
- gateway. List one model per line (or comma-separated) to add several at once; they all share the
- one endpoint. The API key is optional (most local servers don't need one).
+ {t('keys.addCustomDescription')}
</p>
<form onSubmit={submit} className="flex flex-wrap items-end gap-3 rounded-3xl border p-4 bg-card">
<div className="space-y-1.5 flex-1 min-w-[240px]">
@@ -531,7 +526,7 @@ export default function KeysPage() {
<div>
<PageHeader
title={t('keys.pageTitle')}
- description="Provider credentials and the unified API key your apps connect with."
+ description={t('keys.pageDescription')}
actions={
keys.length > 0 && (
<Button variant="outline" size="sm" onClick={() => checkAll.mutate()} disabled={checkAll.isPending}>
@@ -547,13 +542,13 @@ export default function KeysPage() {
<ProxySettingsSection />
<section>
- <h2 className="text-sm font-medium mb-3">Add a provider key</h2>
+ <h2 className="text-sm font-medium mb-3">{t('keys.addProvider')}</h2>
<form onSubmit={handleSubmit} className="flex flex-wrap gap-3 rounded-3xl border p-4 bg-card">
<div className="space-y-1.5">
- <Label className="text-xs">Platform</Label>
+ <Label className="text-xs">{t('keys.platform')}</Label>
<Select value={platform} onValueChange={(v) => setPlatform(v as Platform)}>
<SelectTrigger className="w-[220px]">
- <SelectValue placeholder="Select provider" />
+ <SelectValue placeholder={t('keys.selectPlatform')} />
</SelectTrigger>
<SelectContent>
{PLATFORMS.map(p => (
@@ -578,18 +573,18 @@ export default function KeysPage() {
</div>
)}
<div className="space-y-1.5 flex-1 min-w-[240px]">
- <Label className="text-xs">{needsAccountId ? 'API token' : t('keys.customApiKey')}</Label>
+ <Label className="text-xs">{needsAccountId ? t('keys.apiToken') : t('keys.customApiKey')}</Label>
<Input
type="password"
value={isKeyless ? '' : apiKey}
onChange={e => setApiKey(e.target.value)}
- placeholder={isKeyless ? 'No API key needed' : (needsAccountId ? 'Bearer token' : 'paste key here')}
+ placeholder={isKeyless ? t('keys.noKeyNeededPlaceholder') : (needsAccountId ? t('keys.bearerTokenPlaceholder') : t('keys.pasteKeyPlaceholder'))}
className="font-mono text-xs"
disabled={isKeyless}
/>
{isKeyless && (
<p className="text-[11px] text-muted-foreground">
- No API key needed: this provider's free tier is anonymous (rate-limited per IP).
+ {t('keys.keylessHint')}
</p>
)}
</div>
@@ -603,7 +598,7 @@ export default function KeysPage() {
className="w-[160px]"
/>
<Button type="submit" size="sm" disabled={!platform || (!isKeyless && !apiKey) || (needsAccountId && !accountId) || addKey.isPending}>
- {addKey.isPending ? t('keys.adding') : isKeyless ? 'Enable' : t('keys.addKey')}
+ {addKey.isPending ? t('keys.adding') : isKeyless ? t('keys.enable') : t('keys.addKey')}
</Button>
</div>
</div>
@@ -616,13 +611,13 @@ export default function KeysPage() {
<CustomProviderSection />
<section>
- <h2 className="text-sm font-medium mb-3">Configured providers</h2>
+ <h2 className="text-sm font-medium mb-3">{t('keys.configuredProviders')}</h2>
{isLoading ? (
<p className="text-sm text-muted-foreground">{t('common.loading')}</p>
) : keys.length === 0 ? (
<div className="rounded-3xl border border-dashed p-8 text-center">
<p className="text-sm text-muted-foreground">
- No provider keys yet. Add one above to start routing.
+ {t('keys.noProviderKeys')}
</p>
</div>
) : (
@@ -641,7 +636,7 @@ export default function KeysPage() {
<h3 className="text-sm font-medium">{group.label}</h3>
{proxyEnabled && (
<div className="inline-flex items-center gap-1.5 ml-1">
- <span className="text-[10px] text-muted-foreground">proxy</span>
+ <span className="text-[10px] text-muted-foreground">{t('keys.proxyToggleLabel')}</span>
<Switch
checked={!bypassPlatforms.includes(group.value)}
onCheckedChange={() => toggleBypass.mutate(group.value)}
@@ -652,7 +647,7 @@ export default function KeysPage() {
<GetKeyLink url={group.url} />
</div>
<span className="text-xs text-muted-foreground tabular-nums">
- {group.keys.length} key{group.keys.length === 1 ? '' : 's'}
+ {t(group.keys.length === 1 ? 'keys.keyCountOne' : 'keys.keyCountOther', { count: group.keys.length })}
</span>
</div>
<div className="rounded-2xl border divide-y bg-card overflow-hidden">
@@ -696,7 +691,7 @@ export default function KeysPage() {
</Button>
)}
<Button variant="ghost" size="xs" onClick={() => checkKey.mutate(k.id)} disabled={checkKey.isPending}>
- Check
+ {t('common.check')}
</Button>
<Button
variant="ghost"
@@ -713,7 +708,7 @@ export default function KeysPage() {
}}
disabled={deleteKey.isPending}
>
- {confirmDeleteId === k.id ? 'Confirm?' : 'Remove'}
+ {confirmDeleteId === k.id ? t('keys.confirmRemove') : t('common.remove')}
</Button>
</div>
)
diff --git a/client/src/pages/PlaygroundPage.tsx b/client/src/pages/PlaygroundPage.tsx
index e591ce91..e659f048 100644
--- a/client/src/pages/PlaygroundPage.tsx
+++ b/client/src/pages/PlaygroundPage.tsx
@@ -93,7 +93,7 @@ export default function PlaygroundPage() {
const err = await res.json().catch(() => ({ error: { message: `HTTP ${res.status}` } }))
setMessages([...newMessages, {
role: 'assistant',
- content: `${t('playground.errorPrefix')} ${err.error?.message ?? 'Unknown error'}`,
+ content: `${t('playground.errorPrefix')} ${err.error?.message ?? t('common.unknownError')}`,
}])
return
}
diff --git a/client/src/pages/PremiumPage.tsx b/client/src/pages/PremiumPage.tsx
index 3325063b..c7f2fb55 100644
--- a/client/src/pages/PremiumPage.tsx
+++ b/client/src/pages/PremiumPage.tsx
@@ -35,8 +35,8 @@ interface PremiumStatus {
siteUrl: string
}
-function fmtWhen(ms: number | null): string {
- if (!ms) return 'never'
+function fmtWhen(ms: number | null): string | null {
+ if (!ms) return null
return new Date(ms).toLocaleString()
}
@@ -123,10 +123,10 @@ export default function PremiumPage() {
<span className={`inline-block size-2 rounded-full ${live ? 'bg-emerald-500' : 'bg-muted-foreground/40'}`} />
<span className="text-sm font-medium">{live ? t('premium.liveFeed') : t('premium.monthlySnapshot')}</span>
<Badge variant="outline" className="font-mono text-[11px]">
- {catalog.appliedVersion ?? 'bundled'}
+ {catalog.appliedVersion ?? t('premium.bundled')}
</Badge>
</div>
- <span className="text-xs text-muted-foreground">{t('premium.lastChecked', { when: fmtWhen(catalog.lastSyncMs) })}</span>
+ <span className="text-xs text-muted-foreground">{t('premium.lastChecked', { when: fmtWhen(catalog.lastSyncMs) ?? t('common.never') })}</span>
</div>
<p className="text-xs text-muted-foreground mt-3">
{live
@@ -152,7 +152,7 @@ export default function PremiumPage() {
? t('premium.planAnnual')
: license?.plan === 'lifetime'
? t('premium.planLifetime')
- : 'Premium'}
+ : t('premium.planGeneric')}
</Badge>
) : (
<Badge variant="outline" className="text-destructive border-destructive/40">