summaryrefslogtreecommitdiffstats
path: root/drivers/unix/net_socket_unix.cpp
diff options
context:
space:
mode:
authorDan Nicholson <dbn@endlessos.org>2024-11-01 13:49:51 -0600
committerDan Nicholson <dbn@endlessos.org>2024-11-12 06:06:50 -0700
commit2dd409fd70fcd2d61138419fb4db763486bb3a80 (patch)
tree17b426bd86440a3363d6086d2980301a82c1173b /drivers/unix/net_socket_unix.cpp
parent1bffd6c73b44b85e5889f54e14b2193940cf5bb1 (diff)
downloadredot-engine-2dd409fd70fcd2d61138419fb4db763486bb3a80.tar.gz
Improve locale comparison
Since 9456454109, country specific locales are always preferred over country-less locales even when the OS locale country doesn't match. For example, running the Godot editor with locale es_ES will result in the es_AR locale being chosen even though the es locale would be better. The change happened because the score of the es_AR locale and the es locale are the same when comparing to es_ES. Change this by parsing locale strings into a Locale structure and decreasing the score when script, country or variant are set in both but not matched. For the es_ES case, this causes the es_AR score to be decreased since the countries don't match. On the other hand, the es locale is not decreased since it doesn't specify a country.
Diffstat (limited to 'drivers/unix/net_socket_unix.cpp')
0 files changed, 0 insertions, 0 deletions