Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Oct 13, 2025

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 supportedLocales list in LocaleUtils.kt incorrectly included defaultLocale, which caused the device's system language to always appear as an option in the language picker, regardless of whether translation files existed:

val supportedLocales: List<Locale> =
    setOf(
        BULGARIAN,
        GREEK,
        ...
        defaultLocale,  // ❌ Problem: adds unsupported languages to picker
    ).toList()

This created a confusing user experience where languages without translations appeared selectable but didn't work.

Solution

This PR makes two minimal fixes:

  1. Removed defaultLocale from supportedLocales - Only languages with actual translation files now appear in the language picker
  2. Added Dutch (nl) support - Dutch translation files existed in values-nl/ but weren't registered in the supported locales list

Changes

  • LocaleUtils.kt: Added DUTCH locale constant and removed defaultLocale from supported set
  • LocaleUtilsTest.kt: Updated test expectations to include Dutch and remove default locale dependency

Result

✅ 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
    • Triggering command: /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:&#43;HeapDumpOnOutOfMemoryError -XX:&#43;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.org
    • Triggering command: curl -s REDACTED (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>Hungarian language</issue_title>
<issue_description>Hi,

The settings include the Hungarian language.
Even though I select Hungarian, the application interface remains in English.
Why is that?

Regards</issue_description>

Comments on the Issue (you are @copilot in this section)

@VREMSoftwareDevelopment [Supported languages](https://github.com/VREMSoftwareDevelopment/WiFiAnalyzer#translation)

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.

Co-authored-by: VREMSoftwareDevelopment <6217364+VREMSoftwareDevelopment@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix language setting for Hungarian in application interface Fix language picker showing unsupported languages and add missing Dutch support Oct 13, 2025
@codecov
Copy link

codecov bot commented Oct 13, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.50%. Comparing base (2c1dba8) to head (4ccbc59).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##               main     #563   +/-   ##
=========================================
  Coverage     97.50%   97.50%           
  Complexity      975      975           
=========================================
  Files           121      121           
  Lines          2806     2807    +1     
  Branches        210      210           
=========================================
+ Hits           2736     2737    +1     
  Misses           28       28           
  Partials         42       42           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

SPANISH,
RUSSIAN,
TURKISH,
UKRAINIAN,

Choose a reason for hiding this comment

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

How do you expect user of application to switch back to the phone language locale, if it is not part of available application locales?

@VREMSoftwareDevelopment VREMSoftwareDevelopment deleted the copilot/fix-hungarian-language-setting branch October 13, 2025 15:53
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.

Hungarian language

2 participants