1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-30 09:59:10 +00:00

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

This commit is contained in:
2025-02-17 17:27:22 +00:00
committed by GitHub
parent 2f66f74035
commit af7054dcb6

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;