Fix language picker showing unsupported languages and add missing Dutch support #563
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
Users reported that Hungarian language appeared in the app's language settings, but selecting it had no effect - the app interface remained in English. This issue affected any user whose device default locale was set to a language without translation files in the app.
Root Cause
The
supportedLocaleslist inLocaleUtils.ktincorrectly includeddefaultLocale, which caused the device's system language to always appear as an option in the language picker, regardless of whether translation files existed:This created a confusing user experience where languages without translations appeared selectable but didn't work.
Solution
This PR makes two minimal fixes:
defaultLocalefromsupportedLocales- Only languages with actual translation files now appear in the language pickervalues-nl/but weren't registered in the supported locales listChanges
LocaleUtils.kt: AddedDUTCHlocale constant and removeddefaultLocalefrom supported setLocaleUtilsTest.kt: Updated test expectations to include Dutch and remove default locale dependencyResult
✅ Hungarian (and other unsupported languages) no longer appear in language settings
✅ Dutch is now properly available as a language option
✅ All 17 supported languages match available translation directories
Supported Languages
The app now properly supports these languages with complete translations:
Bulgarian, Dutch (NEW), Greek, Chinese (Simplified & Traditional), English, French, German, Italian, Japanese, Polish, Portuguese (Brazil & Portugal), Spanish, Russian, Turkish, and Ukrainian.
Note for Users Wanting Hungarian
Hungarian translations can be contributed through the Weblate translation platform. Once translations are added, Hungarian support can be enabled with a similar code change.
Fixes #[issue_number]
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
dl.google.com/usr/lib/jvm/temurin-17-jdk-amd64/bin/java --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-opens=java.base/java.nio.charset=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED --add-opens=java.xml/javax.xml.namespace=ALL-UNNAMED -XX:+HeapDumpOnOutOfMemoryError -XX:+UseParallelGC -Xmx4096m -Dfile.encoding=UTF-8 -Duser.country -Duser.language=en -Duser.variant -cp /home/REDACTED/.gradle/wrapper/dists/gradle-8.14.2-bin/2pb3mgt1p815evrl3weanttgr/gradle-8.14.2/lib/gradle-daemon-main-8.14.2.jar -javaagent:/home/REDACTED/.gradle/wrapper/dists/gradle-8.14.2-bin/2pb3mgt1p815evrl3weanttgr/gradle-8.14.2/lib/agents/gradle-instrumentation-agent-8.14.2.jar org.gradle.launcher.daemon.bootstrap.GradleDaemon 8.14.2(dns block)hosted.weblate.orgcurl -s REDACTED(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
Fixes #559
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.