1
0
Fork 0

Fix 8f14894024: Badge name list did not use translatable separator. (#13591)

pull/13594/head
Peter Nelson 2025-02-17 17:27:22 +00:00 committed by GitHub
parent 2f66f74035
commit af7054dcb6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -403,6 +403,7 @@ int DrawBadgeNameList(Rect r, std::span<const BadgeID> badges, GrfSpecFeature)
std::set<BadgeClassID> classes;
for (const BadgeID &index : badges) classes.insert(GetBadge(index)->class_index);
std::string_view list_separator = GetListSeparator();
for (const BadgeClassID &class_index : classes) {
const Badge *class_badge = GetClassBadge(class_index);
if (class_badge == nullptr || class_badge->name == STR_NULL) continue;
@ -415,7 +416,7 @@ int DrawBadgeNameList(Rect r, std::span<const BadgeID> badges, GrfSpecFeature)
if (!s.empty()) {
if (badge->flags.Test(BadgeFlag::NameListFirstOnly)) continue;
s += ", ";
s += list_separator;
}
AppendStringInPlace(s, badge->name);
if (badge->flags.Test(BadgeFlag::NameListStop)) break;