mirror of
https://github.com/octoleo/syncthing.git
synced 2025-02-09 07:18:27 +00:00
gui: Fix incorrect UI language auto detection (fixes #9668) Currently, the code only checks whether the detected language partially matches one of the available languages. This means that if the detected language is "fi" but among the available languages there is only "fil" and no "fi", then it will match "fi" with "fil", even though the two are completely different languages. With this change, the matching is only done when there is a hyphen in the language code, e.g. "en" will match with "en-US". Signed-off-by: Tomasz Wilczyński <twilczynski@naver.com>