mirror of
https://github.com/OpenMW/openmw.git
synced 2026-01-31 17:18:27 +00:00
Properly report gmst.yaml loading again
This commit is contained in:
parent
3ac8eb0787
commit
aa544de3b4
2 changed files with 8 additions and 1 deletions
|
|
@ -263,7 +263,10 @@ namespace L10n
|
|||
YAML::Node data = YAML::Load(input);
|
||||
std::string localeName = lang.getName();
|
||||
if (localeName == "gmst")
|
||||
{
|
||||
loadGmstYaml(data, mGmsts);
|
||||
mGmstsLoaded = true;
|
||||
}
|
||||
else
|
||||
loadLocaleYaml(data, lang, mBundles[localeName]);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -55,7 +55,10 @@ namespace L10n
|
|||
void load(std::istream& input, const icu::Locale& lang);
|
||||
bool isLoaded(const icu::Locale& loc) const
|
||||
{
|
||||
return mBundles.find(std::string_view(loc.getName())) != mBundles.end();
|
||||
std::string_view localeName = loc.getName();
|
||||
if (localeName == "gmst")
|
||||
return mGmstsLoaded;
|
||||
return mBundles.find(localeName) != mBundles.end();
|
||||
}
|
||||
const icu::Locale& getFallbackLocale() const { return mFallbackLocale; }
|
||||
void setGmstLoader(GmstLoader fn) { mGmstLoader = std::move(fn); }
|
||||
|
|
@ -66,6 +69,7 @@ namespace L10n
|
|||
// icu::Locale isn't hashable (or comparable), so we use the string form instead, which is canonicalized
|
||||
mutable StringMap<StringMap<icu::MessageFormat>> mBundles;
|
||||
mutable StringMap<GmstMessageFormat> mGmsts;
|
||||
bool mGmstsLoaded{ false };
|
||||
mutable std::shared_mutex mMutex;
|
||||
const icu::Locale mFallbackLocale;
|
||||
std::vector<std::string> mPreferredLocaleStrings;
|
||||
|
|
|
|||
Loading…
Reference in a new issue