Codechange: Use only raw strings in drop down lists. (#13667)

Strings with parameters are now pre-formatted, avoiding global parameters.

Helper functions still allow StringID.
This commit is contained in:
Peter Nelson
2025-02-27 21:11:16 +00:00
committed by GitHub
parent fd8c33d051
commit e2c1b9f03e
18 changed files with 55 additions and 67 deletions
+2 -3
View File
@@ -250,11 +250,10 @@ protected:
for (const StoryPage *p : this->story_pages) {
bool current_page = p->index == this->selected_page_id;
if (!p->title.empty()) {
list.push_back(MakeDropDownListStringItem(p->title, p->index.base(), current_page));
list.push_back(MakeDropDownListStringItem(GetString(STR_JUST_RAW_STRING, p->title), p->index.base(), current_page));
} else {
/* No custom title => use a generic page title with page number. */
SetDParam(0, page_num);
list.push_back(MakeDropDownListStringItem(STR_STORY_BOOK_GENERIC_PAGE_ITEM, p->index.base(), current_page));
list.push_back(MakeDropDownListStringItem(GetString(STR_STORY_BOOK_GENERIC_PAGE_ITEM, page_num), p->index.base(), current_page));
}
page_num++;
}