Repository navigation
Add Brazilian Portuguese translation - #232
AdaLovelace2077 wants to merge 7 commits into
Conversation
Add Brazilian Portuguese translation
[Medium impact] The change reaches the app's language choices and translated interface. The PR is not ready to merge because the app cannot compile and the language tests need updates.
|
| <string name="musicbrainz_match_score">Confiabilidade da correspondência: %1$d%%</string> | ||
| <string name="musicbrainz_applied">Identificadores do MusicBrainz salvos. O ano que faltava e os nomes genéricos foram preenchidos.</string> | ||
|
|
||
| </resources> |
There was a problem hiding this comment.
This translates only values/strings.xml, leaving the separate files for setup, settings, navigation, and other screens untranslated. Once Portuguese is enabled, basic text such as “Settings”, “Appearance”, and the setup introduction will still appear in English. Add Portuguese versions of the main screen and settings strings, starting with strings_settings.xml and strings_screens.xml.
Prompt To Fix With AI
This is a comment left during a code review.
Path: app/src/main/res/values-pt-rBR/strings.xml
Line: 291
Comment:
**Main screens stay in English**
This translates only `values/strings.xml`, leaving the separate files for setup, settings, navigation, and other screens untranslated. Once Portuguese is enabled, basic text such as “Settings”, “Appearance”, and the setup introduction will still appear in English. Add Portuguese versions of the main screen and settings strings, starting with `strings_settings.xml` and `strings_screens.xml`.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
| ZH_RCN("zh-CN", R.string.language_zh_rCN), | ||
| VIETNAMESE("vi", R.string.setcat_language_vietnamese); | ||
| VIETNAMESE("vi", R.string.setcat_language_vietnamese), | ||
| PORTUGUESE_BR("pt-BR", R.string.setcat_language_portuguese_br); |
There was a problem hiding this comment.
Missing label breaks compilation
PORTUGUESE_BR references R.string.setcat_language_portuguese_br, but no resource defines that name. The generated R.string has no matching field, so Kotlin compilation fails. Add the label to values/strings_settings.xml so it is available in every language.
Prompt To Fix With AI
This is a comment left during a code review.
Path: app/src/main/java/com/lostf1sh/pixelplayeross/data/preferences/AppLanguage.kt
Line: 22
Comment:
**Missing label breaks compilation**
`PORTUGUESE_BR` references `R.string.setcat_language_portuguese_br`, but no resource defines that name. The generated `R.string` has no matching field, so Kotlin compilation fails. Add the label to `values/strings_settings.xml` so it is available in every language.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.
| ZH_RCN("zh-CN", R.string.language_zh_rCN), | ||
| VIETNAMESE("vi", R.string.setcat_language_vietnamese); | ||
| VIETNAMESE("vi", R.string.setcat_language_vietnamese), | ||
| PORTUGUESE_BR("pt-BR", R.string.setcat_language_portuguese_br); |
There was a problem hiding this comment.
Adding PORTUGUESE_BR breaks two existing checks in AppLanguageTest:
- One still expects
normalize("pt-BR")to return the system language. - The language-options test uses a
labelsmap without Portuguese, so its mock throws when asked for the new label.
Update both checks alongside the enum. Otherwise the unit tests still fail after the missing resource is added.
Prompt To Fix With AI
This is a comment left during a code review.
Path: app/src/main/java/com/lostf1sh/pixelplayeross/data/preferences/AppLanguage.kt
Line: 22
Comment:
**Language tests now fail**
Adding `PORTUGUESE_BR` breaks two existing checks in `AppLanguageTest`:
- One still expects `normalize("pt-BR")` to return the system language.
- The language-options test uses a `labels` map without Portuguese, so its mock throws when asked for the new label.
Update both checks alongside the enum. Otherwise the unit tests still fail after the missing resource is added.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.
Hello!
I've added Brazilian Portuguese (pt-BR) support to PixelPlayerOSS.
I tried to keep the translations natural and easy to understand for Brazilian users while preserving resource names, placeholders, and technical identifiers.
This is my first contribution to the project, so I'd appreciate your feedback and any suggestions for improvements.