Commit c416a7f2 authored by Edward Welbourne's avatar Edward Welbourne
Browse files

QLocale: only use LANGUAGE if it contradicts LC_ALL/LC_MESSAGES/LANG


If LANGUAGE specified only the language, without any script or
country, and matched the value we'd got from other environment
variables, we were throwing away their knowledge of script and
country, leading to falling back on the default script and country for
that language, which might be at odds with what other environment
variables had told us.

Changed to only use LANGUAGE if it contradicts (or extends) what we
would otherwise have used.  Clarified some comments in the process.

[ChangeLog][QLocale][Unix] When using LANGUAGE would lose information
about script or country, without changing language, use the locale
implied by LC_ALL, LC_MESSAGES or LANG.

Prompted-by: default avatarSafa AlFulaij <safa1996alfulaij@gmail.com>
Change-Id: Ie433e57ae6b995abafd05c931136cc9796494895
Reviewed-by: default avatarOswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: default avatarThiago Macieira <thiago.macieira@intel.com>
parent 7aaa7deb
Showing with 31 additions and 3 deletions
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment