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
2 changes: 1 addition & 1 deletion app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ android {
localeFilters.addAll(
listOf(
"en", "ar", "de", "es", "fr", "in",
"it", "ko", "nb", "ru", "tr", "zh-rCN", "vi"
"it", "ko", "nb", "pt-rBR", "ru", "tr", "zh-rCN", "vi"
)
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ enum class AppLanguage(val tag: String, @StringRes val labelRes: Int) {
RUSSIAN("ru", R.string.setcat_language_russian),
TURKISH("tr", R.string.setcat_language_turkish),
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

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


companion object {
val supportedLanguageTags: Set<String> = entries.map { it.tag }.toSet()
Expand Down
Loading