1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-02-28 15:09:43 +00:00
This commit is contained in:
Petr Mikheev 2022-05-06 19:57:41 +00:00
parent a9767f1ffc
commit 86d6ab593e

View file

@ -151,7 +151,8 @@ namespace l10n
defaultLocale = mPreferredLocales[0];
}
UParseError parseError;
icu::MessageFormat defaultMessage(icu::UnicodeString::fromUTF8(key), defaultLocale, parseError, success);
icu::MessageFormat defaultMessage(icu::UnicodeString::fromUTF8(icu::StringPiece(key.data(), key.size())),
defaultLocale, parseError, success);
if (!checkSuccess(success, std::string("Failed to create message ") + key.data(), parseError))
// If we can't parse the key as a pattern, just return the key
return std::string(key);