mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-07 15:52:52 +03:00
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
This commit is contained in:
@@ -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" && (
|
||||
<Card.Section className="">
|
||||
<p className="text-sm text-text-muted mb-4">{t("connectOAuth2")}</p>
|
||||
<p className="text-sm text-text-muted mb-4">{t("oauth2Desc")}</p>
|
||||
<Button type="button" variant="secondary" icon="link">
|
||||
{t("connectWithOAuth2")}
|
||||
{t("oauth2Connect")}
|
||||
</Button>
|
||||
</Card.Section>
|
||||
)}
|
||||
@@ -184,7 +184,7 @@ export default function NewProviderPage() {
|
||||
<Toggle
|
||||
checked={formData.isActive}
|
||||
onChange={(checked) => handleChange("isActive", checked)}
|
||||
label={t("activeLabel")}
|
||||
label={t("active")}
|
||||
description={t("activeDescription")}
|
||||
/>
|
||||
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user