Fix Language::GetName using the system-wide language settings instead of the current application one. Make ReadOnlyBootPrompt localize the list instantly when you select a language in it.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36295 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -8,6 +8,9 @@
|
|||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
|
#include <Catalog.h>
|
||||||
|
#include <Locale.h>
|
||||||
|
#include <LocaleRoster.h>
|
||||||
#include <Path.h>
|
#include <Path.h>
|
||||||
#include <String.h>
|
#include <String.h>
|
||||||
#include <FindDirectory.h>
|
#include <FindDirectory.h>
|
||||||
@@ -133,10 +136,16 @@ BLanguage::GetString(uint32 id) const
|
|||||||
status_t
|
status_t
|
||||||
BLanguage::GetName(BString* name)
|
BLanguage::GetName(BString* name)
|
||||||
{
|
{
|
||||||
// TODO: This will return the language not in the current be_app_catalog,
|
BMessage preferredLanguage;
|
||||||
// but in the current system wide language! Don't know the exact reason.
|
be_locale_roster->GetPreferredLanguages(&preferredLanguage);
|
||||||
|
BString appLanguage;
|
||||||
|
|
||||||
|
preferredLanguage.FindString("language", 0, &appLanguage);
|
||||||
|
|
||||||
|
printf("lang : %s\n",appLanguage.String());
|
||||||
|
|
||||||
UnicodeString s;
|
UnicodeString s;
|
||||||
fICULocale->getDisplayName(s);
|
fICULocale->getDisplayName(Locale(appLanguage), s);
|
||||||
BStringByteSink converter(name);
|
BStringByteSink converter(name);
|
||||||
s.toUTF8(converter);
|
s.toUTF8(converter);
|
||||||
return B_OK;
|
return B_OK;
|
||||||
|
|||||||
@@ -182,10 +182,8 @@ RosterData::RosterData()
|
|||||||
BAutolock lock(fLock);
|
BAutolock lock(fLock);
|
||||||
assert(lock.IsLocked());
|
assert(lock.IsLocked());
|
||||||
|
|
||||||
// TODO: make a decision about log-facility and -options
|
|
||||||
openlog_team("liblocale.so", LOG_PID, LOG_USER);
|
openlog_team("liblocale.so", LOG_PID, LOG_USER);
|
||||||
#ifndef DEBUG
|
#ifndef DEBUG
|
||||||
// TODO: find out why the following bugger isn't working!
|
|
||||||
setlogmask_team(LOG_UPTO(LOG_WARNING));
|
setlogmask_team(LOG_UPTO(LOG_WARNING));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -650,9 +648,9 @@ BLocaleRoster::LoadCatalog(const char *signature, const char *language,
|
|||||||
// other languages.
|
// other languages.
|
||||||
// The current implementation uses the filename in order to
|
// The current implementation uses the filename in order to
|
||||||
// detect dependencies (parenthood) between languages (it
|
// detect dependencies (parenthood) between languages (it
|
||||||
// traverses from "english-british-oxford" to "english-british"
|
// traverses from "english_british_oxford" to "english_british"
|
||||||
// to "english"):
|
// to "english"):
|
||||||
// TODO :use ICU facilities instead, so we can handle more
|
// TODO: use ICU facilities instead, so we can handle more
|
||||||
// complex things such as fr_FR@euro, or whatever, encodings
|
// complex things such as fr_FR@euro, or whatever, encodings
|
||||||
// and so on.
|
// and so on.
|
||||||
int32 pos;
|
int32 pos;
|
||||||
|
|||||||
Reference in New Issue
Block a user