Add: Translatable list separator. (#13149)

Some languages should use a separator other than ", " to separate list items, so it is now a translatable string.
This commit is contained in:
Peter Nelson
2024-12-06 12:32:36 +00:00
committed by GitHub
parent ef76f0e758
commit cba329d9e2
7 changed files with 26 additions and 6 deletions

View File

@@ -51,12 +51,13 @@ void DrawRoadVehDetails(const Vehicle *v, const Rect &r)
}
std::string capacity = GetString(STR_VEHICLE_DETAILS_TRAIN_ARTICULATED_RV_CAPACITY);
std::string_view list_separator = GetListSeparator();
bool first = true;
for (const CargoSpec *cs : _sorted_cargo_specs) {
CargoID cid = cs->Index();
if (max_cargo[cid] > 0) {
if (!first) capacity += ", ";
if (!first) capacity += list_separator;
SetDParam(0, cid);
SetDParam(1, max_cargo[cid]);