diff --git a/src/company_gui.cpp b/src/company_gui.cpp index 6d103dcb3c..f91f4f4d6a 100644 --- a/src/company_gui.cpp +++ b/src/company_gui.cpp @@ -589,7 +589,7 @@ static const LiveryClass _livery_class[LS_END] = { template class DropDownListColourItem : public DropDownIcon> { public: - DropDownListColourItem(int colour, bool masked) : DropDownIcon>(TSprite, GENERAL_SPRITE_COLOUR(colour % COLOUR_END), colour < COLOUR_END ? (STR_COLOUR_DARK_BLUE + colour) : STR_COLOUR_DEFAULT, colour, masked) + DropDownListColourItem(int colour, bool masked) : DropDownIcon>(TSprite, GENERAL_SPRITE_COLOUR(colour % COLOUR_END), GetString(colour < COLOUR_END ? (STR_COLOUR_DARK_BLUE + colour) : STR_COLOUR_DEFAULT), colour, masked) { } }; diff --git a/src/date_gui.cpp b/src/date_gui.cpp index dd2ad52de3..ca8f16af32 100644 --- a/src/date_gui.cpp +++ b/src/date_gui.cpp @@ -90,8 +90,7 @@ struct SetDateWindow : Window { case WID_SD_YEAR: for (TimerGameEconomy::Year i = this->min_year; i <= this->max_year; i++) { - SetDParam(0, i); - list.push_back(MakeDropDownListStringItem(STR_JUST_INT, i.base())); + list.push_back(MakeDropDownListStringItem(GetString(STR_JUST_INT, i), i.base())); } selected = this->date.year.base(); break; diff --git a/src/dropdown.cpp b/src/dropdown.cpp index 3ffac40288..64eb8e724c 100644 --- a/src/dropdown.cpp +++ b/src/dropdown.cpp @@ -29,27 +29,27 @@ std::unique_ptr MakeDropDownListDividerItem() std::unique_ptr MakeDropDownListStringItem(StringID str, int value, bool masked, bool shaded) { - return std::make_unique(str, value, masked, shaded); + return MakeDropDownListStringItem(GetString(str), value, masked, shaded); } -std::unique_ptr MakeDropDownListStringItem(const std::string &str, int value, bool masked, bool shaded) +std::unique_ptr MakeDropDownListStringItem(std::string &&str, int value, bool masked, bool shaded) { - return std::make_unique(str, value, masked, shaded); + return std::make_unique(std::move(str), value, masked, shaded); } std::unique_ptr MakeDropDownListIconItem(SpriteID sprite, PaletteID palette, StringID str, int value, bool masked, bool shaded) { - return std::make_unique(sprite, palette, str, value, masked, shaded); + return std::make_unique(sprite, palette, GetString(str), value, masked, shaded); } std::unique_ptr MakeDropDownListIconItem(const Dimension &dim, SpriteID sprite, PaletteID palette, StringID str, int value, bool masked, bool shaded) { - return std::make_unique(dim, sprite, palette, str, value, masked, shaded); + return std::make_unique(dim, sprite, palette, GetString(str), value, masked, shaded); } std::unique_ptr MakeDropDownListCheckedItem(bool checked, StringID str, int value, bool masked, bool shaded, uint indent) { - return std::make_unique(indent, checked, str, value, masked, shaded); + return std::make_unique(indent, checked, GetString(str), value, masked, shaded); } static constexpr NWidgetPart _nested_dropdown_menu_widgets[] = { diff --git a/src/dropdown_common_type.h b/src/dropdown_common_type.h index 508de7eb29..a1d5a184e3 100644 --- a/src/dropdown_common_type.h +++ b/src/dropdown_common_type.h @@ -55,16 +55,9 @@ class DropDownString : public TBase { Dimension dim; ///< Dimensions of string. public: template - explicit DropDownString(StringID string, Args&&... args) : TBase(std::forward(args)...) + explicit DropDownString(std::string &&string, Args&&... args) : TBase(std::forward(args)...) { - this->SetString(GetString(string)); - } - - template - explicit DropDownString(const std::string &string, Args&&... args) : TBase(std::forward(args)...) - { - SetDParamStr(0, string); - this->SetString(GetString(STR_JUST_RAW_STRING)); + this->SetString(std::move(string)); } void SetString(std::string &&string) diff --git a/src/dropdown_func.h b/src/dropdown_func.h index 7e520c21ce..69bf6e035b 100644 --- a/src/dropdown_func.h +++ b/src/dropdown_func.h @@ -18,7 +18,7 @@ void ShowDropDownMenu(Window *w, std::span strings, int selected /* Helper functions for commonly used drop down list items. */ std::unique_ptr MakeDropDownListDividerItem(); std::unique_ptr MakeDropDownListStringItem(StringID str, int value, bool masked = false, bool shaded = false); -std::unique_ptr MakeDropDownListStringItem(const std::string &str, int value, bool masked = false, bool shaded = false); +std::unique_ptr MakeDropDownListStringItem(std::string &&str, int value, bool masked = false, bool shaded = false); std::unique_ptr MakeDropDownListIconItem(SpriteID sprite, PaletteID palette, StringID str, int value, bool masked = false, bool shaded = false); std::unique_ptr MakeDropDownListIconItem(const Dimension &dim, SpriteID sprite, PaletteID palette, StringID str, int value, bool masked = false, bool shaded = false); std::unique_ptr MakeDropDownListCheckedItem(bool checked, StringID str, int value, bool masked = false, bool shaded = false, uint indent = 0); diff --git a/src/game/game_gui.cpp b/src/game/game_gui.cpp index 86a74a4aee..3af917abda 100644 --- a/src/game/game_gui.cpp +++ b/src/game/game_gui.cpp @@ -313,7 +313,7 @@ struct GSConfigWindow : public Window { DropDownList list; for (int i = config_item.min_value; i <= config_item.max_value; i++) { - list.push_back(MakeDropDownListStringItem(config_item.labels.find(i)->second, i)); + list.push_back(MakeDropDownListStringItem(GetString(STR_JUST_RAW_STRING, config_item.labels.find(i)->second), i)); } ShowDropDownListAt(this, std::move(list), old_val, WID_GSC_SETTING_DROPDOWN, wi_rect, COLOUR_ORANGE); diff --git a/src/genworld_gui.cpp b/src/genworld_gui.cpp index 6142ef396f..c3d603243d 100644 --- a/src/genworld_gui.cpp +++ b/src/genworld_gui.cpp @@ -338,8 +338,7 @@ static DropDownList BuildMapsizeDropDown() DropDownList list; for (uint i = MIN_MAP_SIZE_BITS; i <= MAX_MAP_SIZE_BITS; i++) { - SetDParam(0, 1LL << i); - list.push_back(MakeDropDownListStringItem(STR_JUST_INT, i)); + list.push_back(MakeDropDownListStringItem(GetString(STR_JUST_INT, 1ULL << i), i)); } return list; diff --git a/src/newgrf_badge.cpp b/src/newgrf_badge.cpp index 6c22f96a8c..7f77c1e84c 100644 --- a/src/newgrf_badge.cpp +++ b/src/newgrf_badge.cpp @@ -543,12 +543,12 @@ private: using DropDownListBadgeItem = DropDownBadges; using DropDownListBadgeIconItem = DropDownBadges; -std::unique_ptr MakeDropDownListBadgeItem(const std::shared_ptr &badge_classes, std::span badges, GrfSpecFeature feature, std::optional introduction_date, StringID str, int value, bool masked, bool shaded) +std::unique_ptr MakeDropDownListBadgeItem(const std::shared_ptr &badge_classes, std::span badges, GrfSpecFeature feature, std::optional introduction_date, std::string &&str, int value, bool masked, bool shaded) { - return std::make_unique(badge_classes, badges, feature, introduction_date, str, value, masked, shaded); + return std::make_unique(badge_classes, badges, feature, introduction_date, std::move(str), value, masked, shaded); } -std::unique_ptr MakeDropDownListBadgeIconItem(const std::shared_ptr &badge_classes, std::span badges, GrfSpecFeature feature, std::optional introduction_date, const Dimension &dim, SpriteID sprite, PaletteID palette, StringID str, int value, bool masked, bool shaded) +std::unique_ptr MakeDropDownListBadgeIconItem(const std::shared_ptr &badge_classes, std::span badges, GrfSpecFeature feature, std::optional introduction_date, const Dimension &dim, SpriteID sprite, PaletteID palette, std::string &&str, int value, bool masked, bool shaded) { - return std::make_unique(badge_classes, badges, feature, introduction_date, dim, sprite, palette, str, value, masked, shaded); + return std::make_unique(badge_classes, badges, feature, introduction_date, dim, sprite, palette, std::move(str), value, masked, shaded); } diff --git a/src/newgrf_badge.h b/src/newgrf_badge.h index 51ecac81a3..e76baa71d5 100644 --- a/src/newgrf_badge.h +++ b/src/newgrf_badge.h @@ -83,7 +83,7 @@ private: std::vector badges{}; }; -std::unique_ptr MakeDropDownListBadgeItem(const std::shared_ptr &gui_classes, std::span badges, GrfSpecFeature feature, std::optional introduction_date, StringID str, int value, bool masked = false, bool shaded = false); -std::unique_ptr MakeDropDownListBadgeIconItem(const std::shared_ptr &gui_classes, std::span badges, GrfSpecFeature feature, std::optional introduction_date, const Dimension &dim, SpriteID sprite, PaletteID palette, StringID str, int value, bool masked = false, bool shaded = false); +std::unique_ptr MakeDropDownListBadgeItem(const std::shared_ptr &gui_classes, std::span badges, GrfSpecFeature feature, std::optional introduction_date, std::string &&str, int value, bool masked = false, bool shaded = false); +std::unique_ptr MakeDropDownListBadgeIconItem(const std::shared_ptr &gui_classes, std::span badges, GrfSpecFeature feature, std::optional introduction_date, const Dimension &dim, SpriteID sprite, PaletteID palette, std::string &&str, int value, bool masked = false, bool shaded = false); #endif /* NEWGRF_BADGE_H */ diff --git a/src/newgrf_gui.cpp b/src/newgrf_gui.cpp index 12ce5a7a7d..fc95ee69d3 100644 --- a/src/newgrf_gui.cpp +++ b/src/newgrf_gui.cpp @@ -388,7 +388,7 @@ struct NewGRFParametersWindow : public Window { DropDownList list; for (const auto &[value, name] : par_info.value_names) { - list.push_back(MakeDropDownListStringItem(GetGRFStringFromGRFText(name), value)); + list.push_back(MakeDropDownListStringItem(GetString(STR_JUST_RAW_STRING, GetGRFStringFromGRFText(name)), value)); } ShowDropDownListAt(this, std::move(list), old_val, WID_NP_SETTING_DROPDOWN, wi_rect, COLOUR_ORANGE); @@ -942,7 +942,7 @@ struct NewGRFWindow : public Window, NewGRFScanCallback { list.push_back(MakeDropDownListStringItem(STR_NONE, -1)); for (uint i = 0; i < this->grf_presets.size(); i++) { - list.push_back(MakeDropDownListStringItem(this->grf_presets[i], i)); + list.push_back(MakeDropDownListStringItem(std::string{this->grf_presets[i]}, i)); } this->CloseChildWindows(WC_QUERY_STRING); // Remove the parameter query window diff --git a/src/rail_gui.cpp b/src/rail_gui.cpp index 560783077e..5c3346ab81 100644 --- a/src/rail_gui.cpp +++ b/src/rail_gui.cpp @@ -2066,13 +2066,13 @@ DropDownList GetRailTypeDropDownList(bool for_replacement, bool all_option) const RailTypeInfo *rti = GetRailTypeInfo(rt); - SetDParam(0, rti->strings.menu_text); - SetDParam(1, rti->max_speed); if (for_replacement) { - list.push_back(MakeDropDownListBadgeItem(badge_class_list, rti->badges, GSF_RAILTYPES, rti->introduction_date, rti->strings.replace_text, rt, !HasBit(avail_railtypes, rt))); + list.push_back(MakeDropDownListBadgeItem(badge_class_list, rti->badges, GSF_RAILTYPES, rti->introduction_date, GetString(rti->strings.replace_text), rt, !HasBit(avail_railtypes, rt))); } else { - StringID str = rti->max_speed > 0 ? STR_TOOLBAR_RAILTYPE_VELOCITY : STR_JUST_STRING; - list.push_back(MakeDropDownListBadgeIconItem(badge_class_list, rti->badges, GSF_RAILTYPES, rti->introduction_date, d, rti->gui_sprites.build_x_rail, PAL_NONE, str, rt, !HasBit(avail_railtypes, rt))); + std::string str = rti->max_speed > 0 + ? GetString(STR_TOOLBAR_RAILTYPE_VELOCITY, rti->strings.menu_text, rti->max_speed) + : GetString(rti->strings.menu_text); + list.push_back(MakeDropDownListBadgeIconItem(badge_class_list, rti->badges, GSF_RAILTYPES, rti->introduction_date, d, rti->gui_sprites.build_x_rail, PAL_NONE, std::move(str), rt, !HasBit(avail_railtypes, rt))); } } diff --git a/src/road_gui.cpp b/src/road_gui.cpp index a53fa48b70..98456f563a 100644 --- a/src/road_gui.cpp +++ b/src/road_gui.cpp @@ -1795,13 +1795,13 @@ DropDownList GetRoadTypeDropDownList(RoadTramTypes rtts, bool for_replacement, b const RoadTypeInfo *rti = GetRoadTypeInfo(rt); - SetDParam(0, rti->strings.menu_text); - SetDParam(1, rti->max_speed / 2); if (for_replacement) { - list.push_back(MakeDropDownListBadgeItem(badge_class_list, rti->badges, GSF_ROADTYPES, rti->introduction_date, rti->strings.replace_text, rt, !HasBit(avail_roadtypes, rt))); + list.push_back(MakeDropDownListBadgeItem(badge_class_list, rti->badges, GSF_ROADTYPES, rti->introduction_date, GetString(rti->strings.replace_text), rt, !HasBit(avail_roadtypes, rt))); } else { - StringID str = rti->max_speed > 0 ? STR_TOOLBAR_RAILTYPE_VELOCITY : STR_JUST_STRING; - list.push_back(MakeDropDownListBadgeIconItem(badge_class_list, rti->badges, GSF_ROADTYPES, rti->introduction_date, d, rti->gui_sprites.build_x_road, PAL_NONE, str, rt, !HasBit(avail_roadtypes, rt))); + std::string str = rti->max_speed > 0 + ? GetString(STR_TOOLBAR_RAILTYPE_VELOCITY, rti->strings.menu_text, rti->max_speed / 2) + : GetString(rti->strings.menu_text); + list.push_back(MakeDropDownListBadgeIconItem(badge_class_list, rti->badges, GSF_ROADTYPES, rti->introduction_date, d, rti->gui_sprites.build_x_road, PAL_NONE, std::move(str), rt, !HasBit(avail_roadtypes, rt))); } } @@ -1841,10 +1841,10 @@ DropDownList GetScenRoadTypeDropDownList(RoadTramTypes rtts) const RoadTypeInfo *rti = GetRoadTypeInfo(rt); - SetDParam(0, rti->strings.menu_text); - SetDParam(1, rti->max_speed / 2); - StringID str = rti->max_speed > 0 ? STR_TOOLBAR_RAILTYPE_VELOCITY : STR_JUST_STRING; - list.push_back(MakeDropDownListBadgeIconItem(badge_class_list, rti->badges, GSF_ROADTYPES, rti->introduction_date, d, rti->gui_sprites.build_x_road, PAL_NONE, str, rt, !HasBit(avail_roadtypes, rt))); + std::string str = rti->max_speed > 0 + ? GetString(STR_TOOLBAR_RAILTYPE_VELOCITY, rti->strings.menu_text, rti->max_speed / 2) + : GetString(rti->strings.menu_text); + list.push_back(MakeDropDownListBadgeIconItem(badge_class_list, rti->badges, GSF_ROADTYPES, rti->introduction_date, d, rti->gui_sprites.build_x_road, PAL_NONE, std::move(str), rt, !HasBit(avail_roadtypes, rt))); } if (list.empty()) { diff --git a/src/script/script_gui.cpp b/src/script/script_gui.cpp index 4dfe62ee1b..30c97695e5 100644 --- a/src/script/script_gui.cpp +++ b/src/script/script_gui.cpp @@ -461,7 +461,7 @@ struct ScriptSettingsWindow : public Window { DropDownList list; for (int i = config_item.min_value; i <= config_item.max_value; i++) { - list.push_back(MakeDropDownListStringItem(config_item.labels.find(i)->second, i)); + list.push_back(MakeDropDownListStringItem(GetString(STR_JUST_RAW_STRING, config_item.labels.find(i)->second), i)); } ShowDropDownListAt(this, std::move(list), old_val, WID_SCRS_SETTING_DROPDOWN, wi_rect, COLOUR_ORANGE); diff --git a/src/settings_gui.cpp b/src/settings_gui.cpp index cb54c2d080..4a0f7ac583 100644 --- a/src/settings_gui.cpp +++ b/src/settings_gui.cpp @@ -400,9 +400,7 @@ struct GameOptionsWindow : Window { if (currency.code.empty()) { list.push_back(MakeDropDownListStringItem(currency.name, i, HasBit(disabled, i))); } else { - SetDParam(0, currency.name); - SetDParamStr(1, currency.code); - list.push_back(MakeDropDownListStringItem(STR_GAME_OPTIONS_CURRENCY_CODE, i, HasBit(disabled, i))); + list.push_back(MakeDropDownListStringItem(GetString(STR_GAME_OPTIONS_CURRENCY_CODE, currency.name, currency.code), i, HasBit(disabled, i))); } } std::sort(list.begin(), list.end(), DropDownListStringItem::NatSortFunc); @@ -433,19 +431,24 @@ struct GameOptionsWindow : Window { bool hide_language = IsReleasedVersion() && !_languages[i].IsReasonablyFinished(); if (hide_language) continue; bool hide_percentage = IsReleasedVersion() || _languages[i].missing < _settings_client.gui.missing_strings_threshold; + char *name; if (&_languages[i] == _current_language) { *selected_index = i; - SetDParamStr(0, _languages[i].own_name); + name = _languages[i].own_name; } else { /* Especially with sprite-fonts, not all localized * names can be rendered. So instead, we use the * international names for anything but the current * selected language. This avoids showing a few ???? * entries in the dropdown list. */ - SetDParamStr(0, _languages[i].name); + name = _languages[i].name; + } + if (hide_percentage) { + list.push_back(MakeDropDownListStringItem(name, i)); + } else { + int percentage = (LANGUAGE_TOTAL_STRINGS - _languages[i].missing) * 100 / LANGUAGE_TOTAL_STRINGS; + list.push_back(MakeDropDownListStringItem(GetString(STR_GAME_OPTIONS_LANGUAGE_PERCENTAGE, name, percentage), i)); } - SetDParam(1, (LANGUAGE_TOTAL_STRINGS - _languages[i].missing) * 100 / LANGUAGE_TOTAL_STRINGS); - list.push_back(MakeDropDownListStringItem(hide_percentage ? STR_JUST_RAW_STRING : STR_GAME_OPTIONS_LANGUAGE_PERCENTAGE, i)); } std::sort(list.begin(), list.end(), DropDownListStringItem::NatSortFunc); break; @@ -456,9 +459,7 @@ struct GameOptionsWindow : Window { *selected_index = GetCurrentResolutionIndex(); for (uint i = 0; i < _resolutions.size(); i++) { - SetDParam(0, _resolutions[i].width); - SetDParam(1, _resolutions[i].height); - list.push_back(MakeDropDownListStringItem(STR_GAME_OPTIONS_RESOLUTION_ITEM, i)); + list.push_back(MakeDropDownListStringItem(GetString(STR_GAME_OPTIONS_RESOLUTION_ITEM, _resolutions[i].width, _resolutions[i].height), i)); } break; @@ -466,8 +467,7 @@ struct GameOptionsWindow : Window { for (auto it = _refresh_rates.begin(); it != _refresh_rates.end(); it++) { auto i = std::distance(_refresh_rates.begin(), it); if (*it == _settings_client.gui.refresh_rate) *selected_index = i; - SetDParam(0, *it); - list.push_back(MakeDropDownListStringItem(STR_GAME_OPTIONS_REFRESH_RATE_ITEM, i)); + list.push_back(MakeDropDownListStringItem(GetString(STR_GAME_OPTIONS_REFRESH_RATE_ITEM, *it), i)); } break; diff --git a/src/station_gui.cpp b/src/station_gui.cpp index 7069acfbc2..7ee1b60398 100644 --- a/src/station_gui.cpp +++ b/src/station_gui.cpp @@ -588,7 +588,7 @@ public: if (count == 0 && !expanded) { any_hidden = true; } else { - list.push_back(std::make_unique>(fmt::format("{}", count), 0, this->filter.include_no_rating, STR_STATION_LIST_CARGO_FILTER_NO_RATING, CargoFilterCriteria::CF_NO_RATING, false, count == 0)); + list.push_back(std::make_unique>(fmt::format("{}", count), 0, this->filter.include_no_rating, GetString(STR_STATION_LIST_CARGO_FILTER_NO_RATING), CargoFilterCriteria::CF_NO_RATING, false, count == 0)); } Dimension d = GetLargestCargoIconSize(); @@ -597,7 +597,7 @@ public: if (count == 0 && !expanded) { any_hidden = true; } else { - list.push_back(std::make_unique(HasBit(this->filter.cargoes, cs->Index()), fmt::format("{}", count), d, cs->GetCargoIcon(), PAL_NONE, cs->name, cs->Index(), false, count == 0)); + list.push_back(std::make_unique(HasBit(this->filter.cargoes, cs->Index()), fmt::format("{}", count), d, cs->GetCargoIcon(), PAL_NONE, GetString(cs->name), cs->Index(), false, count == 0)); } } diff --git a/src/story_gui.cpp b/src/story_gui.cpp index 4f7a252898..015b4067ed 100644 --- a/src/story_gui.cpp +++ b/src/story_gui.cpp @@ -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++; } diff --git a/src/textfile_gui.cpp b/src/textfile_gui.cpp index 6a9d70ffa8..c7a389129a 100644 --- a/src/textfile_gui.cpp +++ b/src/textfile_gui.cpp @@ -534,8 +534,7 @@ void TextfileWindow::AfterLoadMarkdown() case WID_TF_JUMPLIST: { DropDownList list; for (size_t line : this->jumplist) { - SetDParamStr(0, this->lines[line].text); - list.push_back(MakeDropDownListStringItem(STR_TEXTFILE_JUMPLIST_ITEM, (int)line)); + list.push_back(MakeDropDownListStringItem(GetString(STR_TEXTFILE_JUMPLIST_ITEM, this->lines[line].text), (int)line)); } ShowDropDownList(this, std::move(list), -1, widget); break; diff --git a/src/toolbar_gui.cpp b/src/toolbar_gui.cpp index a6b4d60d95..69ed37dba7 100644 --- a/src/toolbar_gui.cpp +++ b/src/toolbar_gui.cpp @@ -98,9 +98,8 @@ static CallBackFunction _last_started_action = CBF_NONE; ///< Last started user */ class DropDownListCompanyItem : public DropDownIcon, true>> { public: - DropDownListCompanyItem(CompanyID company, bool shaded) : DropDownIcon, true>>(SPR_COMPANY_ICON, COMPANY_SPRITE_COLOUR(company), NetworkCanJoinCompany(company) ? SPR_EMPTY : SPR_LOCK, PAL_NONE, STR_NULL, company.base(), false, shaded) + DropDownListCompanyItem(CompanyID company, bool shaded) : DropDownIcon, true>>(SPR_COMPANY_ICON, COMPANY_SPRITE_COLOUR(company), NetworkCanJoinCompany(company) ? SPR_EMPTY : SPR_LOCK, PAL_NONE, GetString(STR_COMPANY_NAME_COMPANY_NUM, company, company), company.base(), false, shaded) { - this->SetString(GetString(STR_COMPANY_NAME_COMPANY_NUM, company, company)); } }; @@ -659,7 +658,7 @@ static void AddDropDownLeagueTableOptions(DropDownList &list) { if (LeagueTable::GetNumItems() > 0) { for (LeagueTable *lt : LeagueTable::Iterate()) { - list.push_back(MakeDropDownListStringItem(lt->title, lt->index.base())); + list.push_back(MakeDropDownListStringItem(GetString(STR_JUST_RAW_STRING, lt->title), lt->index.base())); } } else { list.push_back(MakeDropDownListStringItem(STR_GRAPH_MENU_COMPANY_LEAGUE_TABLE, LTMN_PERFORMANCE_LEAGUE));