1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-23 12:14:11 +01:00

Change: Show only selected badge in badge filter dropdown buttons. (#14855)

This avoids complicating languages and translations trying to compose a string from multiple parts.

Also makes these dropdown buttons more consistent with other dropdown buttons.
This commit is contained in:
Peter Nelson
2026-01-09 23:03:33 +00:00
committed by GitHub
parent 0794287b30
commit 4131a36e5a
2 changed files with 1 additions and 2 deletions

View File

@@ -5978,4 +5978,3 @@ STR_BADGE_CONFIG_FILTERS :{WHITE}Badge Fi
STR_BADGE_CONFIG_PREVIEW :Preview Image
STR_BADGE_CONFIG_NAME :Name
STR_BADGE_FILTER_ANY_LABEL :Any {STRING}
STR_BADGE_FILTER_IS_LABEL :{STRING} is {STRING}

View File

@@ -505,7 +505,7 @@ std::string NWidgetBadgeFilter::GetStringParameter(const BadgeFilterChoices &cho
return ::GetString(STR_BADGE_FILTER_ANY_LABEL, GetClassBadge(this->badge_class)->name);
}
return ::GetString(STR_BADGE_FILTER_IS_LABEL, GetClassBadge(it->first)->name, GetBadge(it->second)->name);
return ::GetString(GetBadge(it->second)->name);
}
/**