Skip to content

Add Brazilian Portuguese translation - #232

Open
AdaLovelace2077 wants to merge 7 commits into
PixelPlayerHQ:mainfrom
AdaLovelace2077:main
Open

AdaLovelace2077 wants to merge 7 commits into
PixelPlayerHQ:mainfrom
AdaLovelace2077:main

Conversation

@AdaLovelace2077

Copy link
Copy Markdown

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.

@greptile-apps

greptile-apps Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 3/5

[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.

Fix All in Claude CodeFindings

  1. P1 Missing label breaks compilation ▶
  2. P1 Language tests now fail ▶
  3. P2 Main screens stay in English ▶
Fix with agent prompt
### Issue 1
app/src/main/java/com/lostf1sh/pixelplayeross/data/preferences/AppLanguage.kt:22
`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.

### Issue 2
app/src/main/java/com/lostf1sh/pixelplayeross/data/preferences/AppLanguage.kt:22
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.

### Issue 3
app/src/main/res/values-pt-rBR/strings.xml:undefined-291
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`.

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!

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Summary

Adds Brazilian Portuguese strings and registers pt-BR in the build and both language pickers.

  • People can choose Brazilian Portuguese for the PixelPlayerOSS interface.

Reviews (4) · Last reviewed commit: "Add Portuguese (Brazil) language support" · Reviewed by Greptile

<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>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 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.

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!

Fix in Claude Code Fix in Codex

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);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 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.

Fix in Claude Code Fix in Codex

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);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 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.

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.

Fix in Claude Code Fix in Codex

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant