Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions apps/desktop-tauri/src-tauri/src/commands/locale_cmd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,17 @@ mod locale_tests {
assert_eq!(bundle.entries.len(), locale::LocaleKey::ALL.len());
}

#[test]
fn locale_strings_roundtrip_brazilian_portuguese() {
let bundle = locale_strings_for(Language::PortugueseBrazil);
assert_eq!(bundle.language, "portuguesebrazil");
assert_eq!(
bundle.entries.get("TabGeneral").map(String::as_str),
Some("Geral")
);
assert_eq!(bundle.entries.len(), locale::LocaleKey::ALL.len());
}

#[test]
fn locale_strings_contains_every_variant() {
let bundle = locale_strings_for(Language::English);
Expand All @@ -190,6 +201,7 @@ mod locale_tests {
"japanese",
"korean",
"spanish",
"portuguesebrazil",
"russian",
"turkish"
]
Expand All @@ -203,6 +215,7 @@ mod locale_tests {
"日本語",
"한국어",
"Español",
"Português (Brasil)",
"Русский",
"Türkçe"
]
Expand Down Expand Up @@ -287,6 +300,14 @@ mod locale_tests {
parse_locale_language("español"),
Some(Language::Spanish)
));
assert!(matches!(
parse_locale_language("pt-BR"),
Some(Language::PortugueseBrazil)
));
assert!(matches!(
parse_locale_language("Português (Brasil)"),
Some(Language::PortugueseBrazil)
));
assert!(matches!(
parse_locale_language("tr-TR"),
Some(Language::Turkish)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ function languageLocale(language: Language): string {
japanese: "ja-JP",
korean: "ko-KR",
spanish: "es-MX",
portuguesebrazil: "pt-BR",
russian: "ru-RU",
turkish: "tr-TR",
}[language];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ const FALLBACK_LANGUAGE_OPTIONS: LanguageOption[] = [
{ value: "japanese", display: "日本語" },
{ value: "korean", display: "한국어" },
{ value: "spanish", display: "Español" },
{ value: "portuguesebrazil", display: "Português (Brasil)" },
{ value: "russian", display: "Русский" },
{ value: "turkish", display: "Türkçe" },
];
Expand Down
2 changes: 2 additions & 0 deletions apps/desktop-tauri/src/types/bridge.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ describe("Language type", () => {
const langRu: Language = "russian";
expect(langRu).toBe("russian");
const langTr: Language = "turkish";
const langPtBr: Language = "portuguesebrazil";
expect(langTr).toBe("turkish");
expect(langPtBr).toBe("portuguesebrazil");
});

it("allows 'spanish' in LocaleStrings payload", () => {
Expand Down
1 change: 1 addition & 0 deletions apps/desktop-tauri/src/types/bridge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ export type Language =
| "japanese"
| "korean"
| "spanish"
| "portuguesebrazil"
| "russian"
| "turkish";

Expand Down
2 changes: 2 additions & 0 deletions rust/src/locale.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ fn language_id(lang: Language) -> &'static LanguageIdentifier {
static JA_JP: LazyLock<LanguageIdentifier> = LazyLock::new(|| "ja-JP".parse().unwrap());
static KO_KR: LazyLock<LanguageIdentifier> = LazyLock::new(|| "ko-KR".parse().unwrap());
static ES_MX: LazyLock<LanguageIdentifier> = LazyLock::new(|| "es-MX".parse().unwrap());
static PT_BR: LazyLock<LanguageIdentifier> = LazyLock::new(|| "pt-BR".parse().unwrap());
static RU_RU: LazyLock<LanguageIdentifier> = LazyLock::new(|| "ru-RU".parse().unwrap());
static TR_TR: LazyLock<LanguageIdentifier> = LazyLock::new(|| "tr-TR".parse().unwrap());

Expand All @@ -60,6 +61,7 @@ fn language_id(lang: Language) -> &'static LanguageIdentifier {
Language::Japanese => &JA_JP,
Language::Korean => &KO_KR,
Language::Spanish => &ES_MX,
Language::PortugueseBrazil => &PT_BR,
Language::Russian => &RU_RU,
Language::Turkish => &TR_TR,
}
Expand Down
260 changes: 260 additions & 0 deletions rust/src/locale/pt-BR.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,260 @@
TabGeneral = Geral
TabProviders = Provedores
TabNotifications = Notificações
TabMenuBar = Barra de menus
TabMenu = Menu
TabApiKeys = Chaves de API
TabCookies = Cookies
TabUsageSpend = Uso e gastos
TabAdvanced = Avançado
TabAbout = Sobre
TabShortcuts = Atalhos
InterfaceLanguage = Idioma da interface
StartupSettings = Sistema
StartAtLogin = Iniciar com o Windows
StartMinimized = Iniciar minimizado
StartAtLoginHelper = Iniciar o CodexBar automaticamente ao entrar no sistema
StartMinimizedHelper = Iniciar minimizado na bandeja do sistema
ShowNotificationsHelper = Alertar quando os limites de uso forem atingidos
SoundEnabledHelper = Reproduzir um som quando os limites forem atingidos
HighUsageThresholdHelper = Exibir um aviso neste nível de uso
CriticalUsageThresholdHelper = Exibir um alerta crítico neste nível
ShowNotifications = Mostrar notificações
SoundEnabled = Alertas sonoros
NotificationSoundTheme = Conjunto de sons padrão
NotificationSoundThemeHelper = Usado quando nenhum arquivo WAV personalizado está definido.
NotificationSoundThemeWindows = Sons do sistema Windows
NotificationSoundThemeCodexBar = Sons exclusivos do CodexBar
NotificationSoundChooseFile = Escolher WAV
NotificationSoundClearFile = Limpar
NotificationSoundUsesTheme = Usa o conjunto de sons selecionado
NotificationSoundWaveFile = Áudio WAV
NotificationSoundEventPredictiveWarning = Aviso preditivo de ritmo
NotificationSoundEventPredictiveWarningHelper = A cota pode acabar antes da renovação.
NotificationSoundEventHighUsage = Uso alto
NotificationSoundEventHighUsageHelper = O limite de uso alto foi atingido.
NotificationSoundEventCriticalUsage = Uso crítico
NotificationSoundEventCriticalUsageHelper = O limite de uso crítico foi atingido.
NotificationSoundEventExhausted = Uso esgotado
NotificationSoundEventExhaustedHelper = O uso atingiu 100%.
NotificationSoundEventStatusIssue = Problema de status do provedor
NotificationSoundEventStatusIssueHelper = Um provedor informou uma interrupção ou erro.
NotificationSoundEventSessionDepleted = Sessão esgotada
NotificationSoundEventSessionDepletedHelper = A cota de uma sessão atingiu 100%.
NotificationSoundEventSessionRestored = Sessão restaurada
NotificationSoundEventSessionRestoredHelper = Uma sessão esgotada voltou a ficar disponível.
HighUsageThreshold = Limite de uso alto
HighUsageAlert = Alerta de uso alto
CriticalUsageThreshold = Limite de uso crítico
CriticalUsageAlert = Alerta crítico
PredictivePaceWarnings = Avisos preditivos de ritmo
PredictivePaceWarningsHelper = Alertar quando o uso do Codex ou Claude puder acabar antes da renovação
PredictivePaceWarningTitle = Aviso de ritmo de { "{}" } { "{}" }
PredictivePaceWarningBody = A cota pode acabar em { "{}" }
UsageDisplay = Exibição de uso
ShowUsageAsUsed = Mostrar uso consumido
ShowUsageAsUsedHelper = Exibir o percentual usado em vez do restante
ResetTimeRelative = Horário de renovação relativo
ResetTimeRelativeHelper = Mostrar "2h 30min" em vez de "15:00"
ShowResetWhenExhausted = Mostrar renovação quando esgotado
ShowResetWhenExhaustedHelper = Substituir o percentual esgotado pela contagem regressiva da renovação
ShowPace = Mostrar ritmo
ShowPaceHelper = Mostrar ritmo de uso, orçamentos e previsões nos cartões dos provedores
TrayIcon = Ícone da bandeja
MergeTrayIcons = Unir ícones da bandeja
MergeTrayIconsHelper = Mostrar todos os provedores em um único ícone da bandeja
PerProviderTrayIcons = Ícones por provedor
PerProviderTrayIconsHelper = Mostrar um ícone separado para cada provedor ativado
ProviderEnabled = Ativado
ProviderDisabled = Desativado
ProviderInfo = Informações
ProviderUsage = Uso
PanelUsageDetails = Detalhes do uso
AuthType = Autenticação
DataSource = Fonte de dados
ProviderNotDetected = não detectado
ProviderLastFetchFailed = falha na última consulta
ProviderUsageNotFetchedYet = uso ainda não consultado
ProviderNotFetchedYetTitle = Ainda não consultado
ProviderDisabledNoRecentData = Desativado — sem dados recentes
ProviderSourceAutoShort = automático
ProviderSourceWebShort = web
ProviderSourceCliShort = cli
ProviderSourceOauthShort = oauth
ProviderSourceApiShort = api
ProviderSourceGithubApiShort = api do github
ProviderSourceLocalShort = local
ProviderSourceKiroEnvShort = ambiente kiro
WayfinderGatewayTitle = Gateway Wayfinder
WayfinderGatewayLabel = URL do gateway
WayfinderGatewayHelp = Use HTTP apenas para localhost ou endereços de loopback. HTTPS é permitido para hosts remotos.
WayfinderGatewayStatus = Gateway
WayfinderModels = Modelos
WayfinderRequests = Solicitações
WayfinderTokens = Tokens
WayfinderSaved = Salvo
WayfinderOffline = Gateway offline
WayfinderDryRun = Simulação
WayfinderMissingKeys = Chaves ausentes
TrackingItem = Item monitorado
MainWindowLiveUsageData = Dados de uso em tempo real na janela principal
StartTrackingUsage = Ative para começar a monitorar o uso
ClickTrayIconForMetrics = Clique no ícone da bandeja para ver as métricas ao vivo
BrowserCookieImport = Importação de cookies do navegador
ImportFromBrowser = Importar cookies de { "{}" } do navegador
NoCookiesFoundInBrowser = Nenhum cookie encontrado no { "{}" }. Entre na sua conta primeiro.
SelectBrowser = Selecione o navegador...
ImportCookies = Importar cookies
ImportSuccess = Cookies de { "{}" } importados
ImportFailed = Falha na importação: { "{}" }
SaveFailed = Falha ao salvar: { "{}" }
CookiesAutoImport = Os cookies são importados automaticamente do Chrome, Edge, Brave e Firefox
QuickActions = Ações rápidas
OpenProviderDashboard = Abrir painel do { "{}" }
OllamaNoDashboard = O Ollama é executado localmente e não possui painel
ApiKeysTitle = Chaves de API
ApiKeysDescription = Configure os tokens de acesso dos provedores que exigem autenticação.
AddKey = + Adicionar chave
KeySet = Definida
KeyRequired = Chave obrigatória
Remove = Remover
GetKey = Obter chave →
SavedCookies = Cookies salvos
AddManualCookie = Adicionar cookie manual
CookieHeader = Cabeçalho do cookie
PasteHere = Cole aqui...
DeleteCookie = Excluir
CookieSaved = Cookies de { "{}" } salvos
CookieDeleted = Cookies de { "{}" } excluídos
RefreshSettings = Atualização
Animations = Animações
MenuBar = Barra de menus
Fun = Diversão
GlobalShortcut = Atalho global
Privacy = Privacidade
Updates = Atualizações
UpdateChannel = Canal de atualização
UpdateChannelStable = Estável
UpdateChannelBeta = Beta
Never = Nunca
LastUpdated = Atualizado
NeverUpdated = Nunca atualizado
MinutesAgo = há { "{}" } minutos
HoursAgo = há { "{}" } horas
DaysAgo = há { "{}" } dias
BuiltWithRust = Criado com Rust + egui
OriginalMacOSVersion = Versão original para macOS
Links = Links
BuildInfo = Informações da compilação
EnabledProviders = Provedores ativados
Appearance = Aparência
ThemeSelection = Tema
LightMode = Claro
DarkMode = Escuro
AboutTitle = Sobre o CodexBar
Version = Versão
ActionRefreshAll = Atualizar tudo
ActionSettings = Configurações
ActionClose = ✕
ProviderAccount = Conta
ProviderSession = Sessão
ProviderWeekly = Semanal
ProviderMonthly = 30 dias
ProviderModel = Modelo
ProviderPlan = Plano
ProviderNextReset = Próxima renovação
ProviderNoRecentUsage = Sem uso recente
ProviderNotSignedIn = Não conectado
SummaryTab = Resumo
StateLoadingProviders = Carregando provedores...
StateNoProviderData = Nenhum dado de provedor.
StateNoProviderSelected = Nenhum provedor selecionado.
StateSummaryRefreshPending = Atualizando após a conclusão de todas as consultas
StateError = Erro
StateRetry = Tentar novamente
StateDownload = Baixar
StateRestartAndUpdate = Reiniciar e atualizar
CreditsTitle = Créditos
UpdateRestartAndUpdate = Reiniciar e atualizar
UpdateRetry = Tentar novamente
UpdateDownload = Baixar
UpdateDownloading = Baixando
UpdateReady = Pronto para instalar
UpdateFailed = Falha na atualização
ButtonOpenProviderSettings = Abrir configurações do provedor
MenuSettings = Configurações...
MenuAbout = Sobre o CodexBar
MenuQuit = Sair
StatusJustUpdated = Atualizado agora
StatusUnableToGetUsage = Não foi possível obter o uso
ActionRefresh = Atualizar
ActionSwitchAccount = Trocar de conta...
ActionUsageDashboard = Painel de uso
ActionStatusPage = Página de status
ActionCopyError = Copiar erro
ActionBuyCredits = Comprar créditos...
PaceOnTrack = Dentro do ritmo
PaceBehind = Atrasado
MetricResetsIn = Renova em
SectionUsageBreakdown = Detalhamento do uso
SectionCost = Custo
ResetInProgress = Renovando...
TomorrowAt = Amanhã às { "{}" }
UsedPercent = { "{:.0}" }% usado
RemainingPercent = { "{:.0}" }% restante
RemainingAmount = { "{:.2}" } restante
Tokens1K = 1 mil tokens
TodayCost = Hoje: ${ "{:.2}" }
Last30DaysCost = Últimos 30 dias: ${ "{:.2}" }
StatusLabel = Status: { "{}" }
TrayOpenCodexBar = Abrir painel destacado
TrayPopOutDashboard = Abrir painel destacado
TrayShowWindow = Mostrar janela
TrayShowFloatBar = Mostrar barra flutuante
TrayRefreshAll = Atualizar tudo
TrayProviders = Provedores
TraySettings = Configurações...
TrayCheckForUpdates = Verificar atualizações
TrayQuit = Sair
TrayLoading = CodexBar - Carregando...
TrayNoProviders = CodexBar - Nenhum provedor disponível
TraySessionPercent = Sessão { "{}" }%
TrayWeeklyPercent = Semanal { "{}" }%
TrayStatusError = { " (Erro)" }
TrayStatusStale = { " (Dados desatualizados)" }
TrayStatusIncident = { " (Incidente)" }
TrayStatusPartial = { " (Interrupção parcial)" }
TrayWeeklyExhausted = Cota semanal esgotada
TrayCreditsRemaining = Créditos restantes { "{}" }%
TrayStatusRowLoading = Carregando...
TrayStatusRowError = Erro
TrayCreditsRow = Créditos { "{}" }%
TrayProviderPopOut = Abrir painel destacado
TrayProviderRefresh = Atualizar
TrayProviderSettings = Configurações...
TrayProviderQuit = Sair
State = Estado
Source = Fonte
Updated = Atualizado
UpdatedJustNow = Atualizado agora
UpdatedMinutesAgo = Atualizado há { "{}" } minutos
UpdatedHoursAgo = Atualizado há { "{}" } horas
UpdatedDaysAgo = Atualizado há { "{}" } dias
Status = Status
AllSystemsOperational = Todos os sistemas estão operacionais
Plan = Plano
Account = Conta
ProviderSessionLabel = Sessão
ProviderWeeklyLabel = Semanal
ClaudeScopedWeeklyLabel = Semanal de { "{}" }
ProviderCodeReviewLabel = Revisão de código
ResetsInShort = Renova em
ResetsInDaysHours = Renova em { "{}" }d { "{}" }h
ResetsInHoursMinutes = Renova em { "{}" }h { "{}" }min
ResetsInMinutes = Renova em { "{}" }min
NextExpiresInDaysHours = O próximo expira em { "{}" }d { "{}" }h
NextExpiresInHoursMinutes = O próximo expira em { "{}" }h { "{}" }min
NextExpiresInMinutes = O próximo expira em { "{}" }min
NextExpiresDueNow = Expira agora
InventoryAvailableCount = { "{}" } disponíveis
FloatBarShowCost = Mostrar custo local
Loading