On Apr 15, 2010, at 8:08 PM, Eike Rathke wrote:
> On Wednesday, 2010-04-14 22:07:46 +0200, Stephan Bergmann wrote:
>> First, MsLangId::getSystemLanguage
>> (i18npool/inc/i18npool/mslangid.hxx) calls
>> getPlatformSystemLanguageImpl (i18npool/source/isolang/inunx.cxx).
>> That, for MACOSX, uses osl_getProcessLocale to obtain a locale (with
>> rLang="en" and rCountry="DE" in my case, as it internally favors
>> CFPreferencesCopyAppValue("AppleLocale") over inspecting the LANG/LC_*
>> environment variables),
> 
> That originates back from MacOS!X. Should it inspect LANG/LC_* first
> also for MacOSX and fall back to osl_getProcessLocale() only if not set?

No idea whether one should be considered better than the other.

>> - SvtSysLocaleOptions_Impl::MakeRealLocale
>> (unotools/source/config/syslocaleoptions.cxx) obtaining a LanguageType
>> enum value to create a Locale from it looks wrong, as the LanguageType
>> enum obviously cannot encode all the relevant information.
> 
> We need to obtain a valid LanguageType ID as that usually is the only
> thing the core knows about and is used in attribution, items and so on.
> Don't be mislead by the name LanguageType, in fact those are IDs
> encoding both, language and country. We should fall back to a fully
> resolvable and back and forth convertible locale though for the two,
> system locale and system UI locale. That basically means to obtain the
> final values through the MsLangId::convertLocaleToLanguageWithFallback()
> method.
> 
> When and where to do this though must be carefully considered. Probably
> both, the i18npool getPlatformSystemLanguageImpl() and
> SvtSysLocaleOptions_Impl::MakeRealLocale() have to do it, the latter for
> the case where language is not empty.
> 
> Care to write me an issue for this?

<http://qa.openoffice.org/issues/show_bug.cgi?id=110924>

>> - However, is _XAccessibleContext.java correct in requiring
>> a non-empty Country member?
> 
> No idea. What does it use the locale for, and why isn't it satisfied
> with a language only? Note also that there are some locales that will
> never have a country assigned, for example Esperanto and Interlingua.

I assume the test code was just over-ambitious, and used 
<http://qa.openoffice.org/issues/show_bug.cgi?id=110925> to make it no longer 
check for a non-empty Country member.

-Stephan

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to