Fix MutableLocaleRoster::LoadCatalog logic
* It should always try loading parent language. Change-Id: I3af14beef70a41242d09b11f09abf749ac92e588 Reviewed-on: https://review.haiku-os.org/c/haiku/+/3802 Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
This commit is contained in:
parent
645c3796d7
commit
8534484314
@ -289,17 +289,17 @@ MutableLocaleRoster::LoadCatalog(const char* signature,
|
||||
for (int32 l = 0; languages.FindString("language", l, &lang) == B_OK; ++l) {
|
||||
catalog = new (std::nothrow) BPrivate::DefaultCatalog(NULL, signature,
|
||||
lang);
|
||||
if (catalog == NULL)
|
||||
continue;
|
||||
|
||||
if (catalog->InitCheck() != B_OK
|
||||
|| catalog->ReadFromStandardLocations() != B_OK) {
|
||||
delete catalog;
|
||||
continue;
|
||||
if (catalog != NULL) {
|
||||
if (catalog->InitCheck() != B_OK
|
||||
|| catalog->ReadFromStandardLocations() != B_OK) {
|
||||
delete catalog;
|
||||
catalog = NULL;
|
||||
} else {
|
||||
defaultCatalogInfo->fLoadedCatalogs.AddItem(catalog);
|
||||
}
|
||||
}
|
||||
|
||||
defaultCatalogInfo->fLoadedCatalogs.AddItem(catalog);
|
||||
|
||||
// Chain-load catalogs for languages that depend on
|
||||
// other languages.
|
||||
// The current implementation uses the filename in order to
|
||||
|
Loading…
Reference in New Issue
Block a user