fix
This commit is contained in:
@@ -294,7 +294,7 @@ String Localization::GetPluralString(const String& id, int32 n, const String& fa
|
|||||||
return fallback;
|
return fallback;
|
||||||
CHECK_RETURN(n >= 1, fallback);
|
CHECK_RETURN(n >= 1, fallback);
|
||||||
n--;
|
n--;
|
||||||
const String* result = nullptr;
|
String result;
|
||||||
for (auto& e : Instance.LocalizedStringTables)
|
for (auto& e : Instance.LocalizedStringTables)
|
||||||
{
|
{
|
||||||
const auto table = e.Get();
|
const auto table = e.Get();
|
||||||
@@ -310,7 +310,7 @@ String Localization::GetPluralString(const String& id, int32 n, const String& fa
|
|||||||
result = table->GetPluralString(id, n);
|
result = table->GetPluralString(id, n);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!result)
|
if (result.IsEmpty())
|
||||||
result = &fallback;
|
result = fallback;
|
||||||
return String::Format(result->GetText(), n);
|
return String::Format(result.GetText(), n);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user