Portuguese Brazil addition strings.xml#159
Conversation
Adding the pt-BR strings values
Review Summary by QodoAdd Brazilian Portuguese translations to strings.xml
WalkthroughsDescription• Translate all English strings to Brazilian Portuguese • Update 24 string resource values with pt-BR translations • Maintain app functionality with localized UI text Diagramflowchart LR
EN["English strings.xml"] -- "translate to pt-BR" --> PTBR["Portuguese Brazil strings.xml"]
File Changes1. app/src/main/res/values/strings.xml
|
Code Review by Qodo
1. English locale strings broken
|
| <string name="tile_label">Circular para Pesquisar</string> | ||
| <string name="xposed_description">Ative o Circular para Pesquisar em qualquer dispositivo Android 9–16</string> | ||
| <string name="title_activity_settings">Configurações</string> | ||
| <string name="trigger_failed">Falha ao ativar!</string> | ||
| <string name="app_settings">Configurações do App</string> | ||
| <string name="default_trigger_delay">Atraso padrão de ativação</string> | ||
| <string name="tile_trigger_delay">Atraso do Atalho de ativação</string> | ||
| <string name="vibrate">Vibrar</string> | ||
| <string name="async_trigger">Ativação Otimizada</string> | ||
| <string name="module_settings">Configurações do Módulo</string> | ||
| <string name="access_xposed_service_failed">Falha ao acessar o serviço Xposed</string> | ||
| <string name="system_trigger_service">Serviço de ativação do sistema</string> | ||
| <string name="trigger_by_long_press_home_button">Ativar pressionando o botão de início</string> | ||
| <string name="trigger_by_long_press_gesture_handle">Ativar pressionando a barra de gestos</string> | ||
| <string name="device_spoof_for_google">Simular dispositivo para o Google</string> | ||
| <string name="manufacturer">Fabricante</string> | ||
| <string name="brand">Marca</string> | ||
| <string name="model">Modelo</string> | ||
| <string name="device">Dispositivo</string> | ||
| <string name="about">Sobre</string> | ||
| <string name="language">Idioma</string> | ||
| <string name="follow_system">Seguir o sistema</string> |
There was a problem hiding this comment.
1. English locale strings broken 🐞 Bug ≡ Correctness
The PR overwrites the base resources in values/strings.xml with pt-BR text, so any locale that falls back to default resources (including English) will render Portuguese UI. Because the app explicitly supports selecting Locale.ENGLISH and applies it via Configuration.setLocale, choosing “English” in Settings will still resolve to these Portuguese base strings.
Agent Prompt
## Issue description
`app/src/main/res/values/strings.xml` (base/default strings) was changed to Portuguese (pt-BR). Base resources are the fallback for many locales and for the app’s English option, so this makes “English” (and other fallbacks) show Portuguese.
## Issue Context
The app exposes a language picker and maps `Language.English` to `Locale.ENGLISH`, then applies it via `Configuration.setLocale(...)` + `createConfigurationContext(...)`. With Portuguese in the base strings file, the English locale will render Portuguese text.
## Fix Focus Areas
- Restore English strings in the base file:
- app/src/main/res/values/strings.xml[4-25]
- Add a new locale-specific resource file containing the Portuguese translations (pt-BR):
- app/src/main/res/values-pt-rBR/strings.xml[new file]
## Implementation notes
- Keep `values/strings.xml` as the canonical/default (typically English) set.
- Put the Portuguese translations into `values-pt-rBR/strings.xml`.
- (Optional) If you want Portuguese selectable in the in-app language menu, add a `PortugueseBrazil` entry to `Language` with a dedicated `R.string.portuguese_brazil` label and a `Locale("pt", "BR")` mapping.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
|
As mentioned by AI, translations should be added by creating a separate language directory. Please refer to a similar PR for example: https://github.com/parallelcc/MiCTS/pull/54/changes Alternatively, you can contribute via Crowdin: https://crowdin.com/project/micts |
Adding the pt-BR strings values