From bc6b084c7776e2037e771317a02b3103f641db21 Mon Sep 17 00:00:00 2001 From: diegosouzapw Date: Wed, 25 Feb 2026 15:16:22 -0300 Subject: [PATCH] fix(i18n): remove 24 duplicate JSON keys in en.json + pt-BR.json - Removed duplicate providers/new keys (selectProvider, apiKeyRequired, etc.) that overlapped with pre-existing keys from earlier migration - Removed duplicate backToProviders in both files - Removed duplicate loadingPricing and databaseSize in settings namespace - Updated providers/new/page.tsx to use original key names - Verified 0 duplicates remain via Python namespace scan --- .../dashboard/providers/new/page.tsx | 14 ++++++------ src/i18n/messages/en.json | 22 +------------------ src/i18n/messages/pt-BR.json | 22 +------------------ 3 files changed, 9 insertions(+), 49 deletions(-) diff --git a/src/app/(dashboard)/dashboard/providers/new/page.tsx b/src/app/(dashboard)/dashboard/providers/new/page.tsx index fc61dd990f..8edb03c7b8 100644 --- a/src/app/(dashboard)/dashboard/providers/new/page.tsx +++ b/src/app/(dashboard)/dashboard/providers/new/page.tsx @@ -63,10 +63,10 @@ export default function NewProviderPage() { router.push("/dashboard/providers"); } else { const data = await response.json(); - setErrors({ submit: data.error || t("failedCreateProvider") }); + setErrors({ submit: data.error || t("failedCreate") }); } } catch (error) { - setErrors({ submit: t("errorOccurredRetry") }); + setErrors({ submit: t("errorOccurred") }); } finally { setLoading(false); } @@ -98,7 +98,7 @@ export default function NewProviderPage() { options={providerOptions} value={formData.provider} onChange={(e) => handleChange("provider", e.target.value)} - placeholder={t("selectProviderPlaceholder")} + placeholder={t("selectProvider")} error={errors.provider as string} required /> @@ -156,7 +156,7 @@ export default function NewProviderPage() { value={formData.apiKey} onChange={(e) => handleChange("apiKey", e.target.value)} error={errors.apiKey as string} - hint={t("apiKeyEncrypted")} + hint={t("apiKeySecure")} required /> )} @@ -164,9 +164,9 @@ export default function NewProviderPage() { {/* OAuth2 Button */} {formData.authMethod === "oauth2" && ( -

{t("connectOAuth2")}

+

{t("oauth2Desc")}

)} @@ -184,7 +184,7 @@ export default function NewProviderPage() { handleChange("isActive", checked)} - label={t("activeLabel")} + label={t("active")} description={t("activeDescription")} /> diff --git a/src/i18n/messages/en.json b/src/i18n/messages/en.json index 5af615773b..d433450192 100644 --- a/src/i18n/messages/en.json +++ b/src/i18n/messages/en.json @@ -579,7 +579,6 @@ "connectionFailed": "Connection failed. Check URL and key.", "testKeyLabel": "Test API Key", "testKeyPlaceholder": "sk-... (for validation only)", - "backToProviders": "Back to Providers", "providerNotFound": "Provider not found", "deleteConnectionConfirm": "Delete this connection?", "failedSetAlias": "Failed to set alias", @@ -612,24 +611,7 @@ "disableRateLimitProtection": "Click to disable rate limit protection", "productionKey": "Production Key", "enterNewApiKey": "Enter new API key", - "optional": "Optional", - "selectProvider": "Please select a provider", - "apiKeyRequired": "API Key is required", - "failedCreateProvider": "Failed to create provider", - "errorOccurredRetry": "An error occurred. Please try again.", - "addNewProvider": "Add New Provider", - "configureNewProvider": "Configure a new AI provider to use with your applications.", - "selectProviderPlaceholder": "Select a provider", - "selectedProvider": "Selected provider", - "authMethod": "Authentication Method", - "enterApiKey": "Enter your API key", - "apiKeyEncrypted": "Your API key will be encrypted and stored securely.", - "connectOAuth2": "Connect your account using OAuth2 authentication.", - "connectWithOAuth2": "Connect with OAuth2", - "activeLabel": "Active", - "activeDescription": "Enable this provider for use in your applications", - "cancel": "Cancel", - "createProvider": "Create Provider" + "optional": "Optional" }, "settings": { "title": "Settings", @@ -916,8 +898,6 @@ "model": "Model", "models": "models", "withPricing": "with pricing configured", - "loadingPricing": "Loading pricing data...", - "databaseSize": "Database Size", "policiesCircuitBreakers": "Policies & Circuit Breakers", "activeIssuesDetected": "Active issues detected", "off": "Off", diff --git a/src/i18n/messages/pt-BR.json b/src/i18n/messages/pt-BR.json index 0f8902edc1..898de4222e 100644 --- a/src/i18n/messages/pt-BR.json +++ b/src/i18n/messages/pt-BR.json @@ -579,7 +579,6 @@ "connectionFailed": "Falha na conexão. Verifique URL e chave.", "testKeyLabel": "Chave de API de Teste", "testKeyPlaceholder": "sk-... (apenas para validação)", - "backToProviders": "Voltar para Provedores", "providerNotFound": "Provedor não encontrado", "deleteConnectionConfirm": "Excluir esta conexão?", "failedSetAlias": "Falha ao definir alias", @@ -612,24 +611,7 @@ "disableRateLimitProtection": "Clique para desabilitar proteção de limite de taxa", "productionKey": "Chave de Produção", "enterNewApiKey": "Insira a nova chave API", - "optional": "Opcional", - "selectProvider": "Por favor, selecione um provedor", - "apiKeyRequired": "Chave API é obrigatória", - "failedCreateProvider": "Falha ao criar provedor", - "errorOccurredRetry": "Ocorreu um erro. Tente novamente.", - "addNewProvider": "Adicionar Novo Provedor", - "configureNewProvider": "Configure um novo provedor de IA para usar com suas aplicações.", - "selectProviderPlaceholder": "Selecione um provedor", - "selectedProvider": "Provedor selecionado", - "authMethod": "Método de Autenticação", - "enterApiKey": "Insira sua chave API", - "apiKeyEncrypted": "Sua chave API será criptografada e armazenada com segurança.", - "connectOAuth2": "Conecte sua conta usando autenticação OAuth2.", - "connectWithOAuth2": "Conectar com OAuth2", - "activeLabel": "Ativo", - "activeDescription": "Habilitar este provedor para uso em suas aplicações", - "cancel": "Cancelar", - "createProvider": "Criar Provedor" + "optional": "Opcional" }, "settings": { "title": "Configurações", @@ -916,8 +898,6 @@ "model": "Modelo", "models": "modelos", "withPricing": "com preço configurado", - "loadingPricing": "Carregando dados de preços...", - "databaseSize": "Tamanho do Banco de Dados", "policiesCircuitBreakers": "Políticas e Disjuntores", "activeIssuesDetected": "Problemas ativos detectados", "off": "Desligado",