Fix #8193 - wrong LC_* vars if there's no country code.
This commit is contained in:
parent
82a674605b
commit
8ef01bd74e
@ -43,8 +43,12 @@ print_formatting_conventions()
|
|||||||
{
|
{
|
||||||
BFormattingConventions conventions;
|
BFormattingConventions conventions;
|
||||||
BLocale::Default()->GetFormattingConventions(&conventions);
|
BLocale::Default()->GetFormattingConventions(&conventions);
|
||||||
printf("%s_%s.UTF-8\n", conventions.LanguageCode(),
|
if (conventions.CountryCode() != NULL) {
|
||||||
conventions.CountryCode());
|
printf("%s_%s.UTF-8\n", conventions.LanguageCode(),
|
||||||
|
conventions.CountryCode());
|
||||||
|
} else {
|
||||||
|
printf("%s.UTF-8\n", conventions.LanguageCode());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -53,12 +57,15 @@ print_time_conventions()
|
|||||||
{
|
{
|
||||||
BFormattingConventions conventions;
|
BFormattingConventions conventions;
|
||||||
BLocale::Default()->GetFormattingConventions(&conventions);
|
BLocale::Default()->GetFormattingConventions(&conventions);
|
||||||
if (conventions.UseStringsFromPreferredLanguage()) {
|
if (conventions.CountryCode() != NULL) {
|
||||||
printf("%s_%s.UTF-8@strings=messages\n", conventions.LanguageCode(),
|
printf("%s_%s.UTF-8%s\n", conventions.LanguageCode(),
|
||||||
conventions.CountryCode());
|
conventions.CountryCode(),
|
||||||
|
conventions.UseStringsFromPreferredLanguage()
|
||||||
|
? "@strings=messages" : "");
|
||||||
} else {
|
} else {
|
||||||
printf("%s_%s.UTF-8\n", conventions.LanguageCode(),
|
printf("%s.UTF-8%s\n", conventions.LanguageCode(),
|
||||||
conventions.CountryCode());
|
conventions.UseStringsFromPreferredLanguage()
|
||||||
|
? "@strings=messages" : "");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user