|
|
@ -75,7 +75,7 @@ namespace l10n
|
|
|
|
{
|
|
|
|
{
|
|
|
|
const auto key = it.first.as<std::string>();
|
|
|
|
const auto key = it.first.as<std::string>();
|
|
|
|
const auto value = it.second.as<std::string>();
|
|
|
|
const auto value = it.second.as<std::string>();
|
|
|
|
icu::UnicodeString pattern = icu::UnicodeString::fromUTF8(value);
|
|
|
|
icu::UnicodeString pattern = icu::UnicodeString::fromUTF8(icu::StringPiece(value.data(), value.size()));
|
|
|
|
icu::ErrorCode status;
|
|
|
|
icu::ErrorCode status;
|
|
|
|
UParseError parseError;
|
|
|
|
UParseError parseError;
|
|
|
|
icu::MessageFormat message(pattern, lang, parseError, status);
|
|
|
|
icu::MessageFormat message(pattern, lang, parseError, status);
|
|
|
@ -112,7 +112,7 @@ namespace l10n
|
|
|
|
std::vector<icu::Formattable> argValues;
|
|
|
|
std::vector<icu::Formattable> argValues;
|
|
|
|
for (auto& [k, v] : args)
|
|
|
|
for (auto& [k, v] : args)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
argNames.push_back(icu::UnicodeString::fromUTF8(k));
|
|
|
|
argNames.push_back(icu::UnicodeString::fromUTF8(icu::StringPiece(k.data(), k.size())));
|
|
|
|
argValues.push_back(v);
|
|
|
|
argValues.push_back(v);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return formatMessage(key, argNames, argValues);
|
|
|
|
return formatMessage(key, argNames, argValues);
|
|
|
|