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:
@@ -739,6 +739,7 @@ public:
|
||||
SetDParam(0, this->selected->filesize);
|
||||
tr.top = DrawStringMultiLine(tr, STR_CONTENT_DETAIL_FILESIZE);
|
||||
|
||||
std::string_view list_separator = GetListSeparator();
|
||||
if (!this->selected->dependencies.empty()) {
|
||||
/* List dependencies */
|
||||
std::string buf;
|
||||
@@ -749,7 +750,7 @@ public:
|
||||
const ContentInfo *ci = *iter;
|
||||
if (ci->id != cid) continue;
|
||||
|
||||
if (!buf.empty()) buf += ", ";
|
||||
if (!buf.empty()) buf += list_separator;
|
||||
buf += (*iter)->name;
|
||||
break;
|
||||
}
|
||||
@@ -762,7 +763,7 @@ public:
|
||||
/* List all tags */
|
||||
std::string buf;
|
||||
for (auto &tag : this->selected->tags) {
|
||||
if (!buf.empty()) buf += ", ";
|
||||
if (!buf.empty()) buf += list_separator;
|
||||
buf += tag;
|
||||
}
|
||||
SetDParamStr(0, buf);
|
||||
@@ -778,7 +779,7 @@ public:
|
||||
for (const ContentInfo *ci : tree) {
|
||||
if (ci == this->selected || ci->state != ContentInfo::SELECTED) continue;
|
||||
|
||||
if (!buf.empty()) buf += ", ";
|
||||
if (!buf.empty()) buf += list_separator;
|
||||
buf += ci->name;
|
||||
}
|
||||
if (!buf.empty()) {
|
||||
|
||||
Reference in New Issue
Block a user