1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-27 03:35:27 +00:00

Merge branch 'ptmikheev-master-patch-72894' into 'master'

Fix #6731

Closes #6731

See merge request OpenMW/openmw!1832
This commit is contained in:
psi29a 2022-05-08 08:33:43 +00:00
commit c0ffb289ab

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);