Add function ApplySafeSubstitution for translation strings with parameters

This commit is contained in:
Henrik Rydgård committed 2023-07-16 16:26:49 +02:00
1 parent 755269c90d
commit 8a59ed0062
10 files changed
+64 -23

No files matched your search

+1 -1
View File
@@ -433,7 +433,7 @@ std::string GameButton::DescribeText() const {
return "...";
auto u = GetI18NCategory(I18NCat::UI_ELEMENTS);
return ReplaceAll(u->T("%1 button"), "%1", ginfo->GetTitle());
return ApplySafeSubstitutions(u->T("%1 button"), ginfo->GetTitle());
}
class DirButton : public UI::Button {