mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-22 06:05:38 +00:00
Expanded the strings for region and language in GuiScraperMenu.
This commit is contained in:
parent
2c200c576b
commit
8c71bce8f8
|
@ -308,20 +308,15 @@ void GuiScraperMenu::openOtherSettings()
|
||||||
// Scraper region.
|
// Scraper region.
|
||||||
auto scraper_region = std::make_shared<OptionListComponent<std::string>>
|
auto scraper_region = std::make_shared<OptionListComponent<std::string>>
|
||||||
(mWindow, getHelpStyle(), "REGION", false);
|
(mWindow, getHelpStyle(), "REGION", false);
|
||||||
std::vector<std::string> transitions_rg;
|
std::string selectedScraperRegion = Settings::getInstance()->getString("ScraperRegion");
|
||||||
transitions_rg.push_back("eu");
|
scraper_region->add("Europe", "eu", selectedScraperRegion == "eu");
|
||||||
transitions_rg.push_back("jp");
|
scraper_region->add("Japan", "jp", selectedScraperRegion == "jp");
|
||||||
transitions_rg.push_back("us");
|
scraper_region->add("USA", "us", selectedScraperRegion == "us");
|
||||||
transitions_rg.push_back("ss");
|
scraper_region->add("World", "wor", selectedScraperRegion == "wor");
|
||||||
transitions_rg.push_back("wor");
|
// If there are no objects returned, then there must be a manually modified entry in the
|
||||||
if (Settings::getInstance()->getString("ScraperRegion") != "") {
|
// configuration file. Simply set the region to Europe in this case.
|
||||||
if (std::find(transitions_rg.begin(), transitions_rg.end(),
|
if (scraper_region->getSelectedObjects().size() == 0)
|
||||||
Settings::getInstance()->getString("ScraperRegion")) == transitions_rg.end()) {
|
scraper_region->selectEntry(0);
|
||||||
transitions_rg.push_back(Settings::getInstance()->getString("ScraperRegion"));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
for (auto it = transitions_rg.cbegin(); it != transitions_rg.cend(); it++)
|
|
||||||
scraper_region->add(*it, *it, Settings::getInstance()->getString("ScraperRegion") == *it);
|
|
||||||
s->addWithLabel("REGION", scraper_region);
|
s->addWithLabel("REGION", scraper_region);
|
||||||
s->addSaveFunc([scraper_region, s] {
|
s->addSaveFunc([scraper_region, s] {
|
||||||
if (scraper_region->getSelected() != Settings::getInstance()->getString("ScraperRegion")) {
|
if (scraper_region->getSelected() != Settings::getInstance()->getString("ScraperRegion")) {
|
||||||
|
@ -340,20 +335,15 @@ void GuiScraperMenu::openOtherSettings()
|
||||||
|
|
||||||
// Scraper language.
|
// Scraper language.
|
||||||
auto scraper_language = std::make_shared<OptionListComponent<std::string>>
|
auto scraper_language = std::make_shared<OptionListComponent<std::string>>
|
||||||
(mWindow, getHelpStyle(), "LANGUAGE", false);
|
(mWindow, getHelpStyle(), "PREFERRED LANGUAGE", false);
|
||||||
std::vector<std::string> transitions_lg;
|
std::string selectedScraperLanguage = Settings::getInstance()->getString("ScraperLanguage");
|
||||||
transitions_lg.push_back("en");
|
scraper_language->add("English", "en", selectedScraperLanguage == "en");
|
||||||
transitions_lg.push_back("wor");
|
scraper_language->add("World", "wor", selectedScraperLanguage == "wor");
|
||||||
if (Settings::getInstance()->getString("ScraperLanguage") != "") {
|
// If there are no objects returned, then there must be a manually modified entry in the
|
||||||
if (std::find(transitions_lg.begin(), transitions_lg.end(),
|
// configuration file. Simply set the language to English in this case.
|
||||||
Settings::getInstance()->getString("ScraperLanguage")) == transitions_lg.end()) {
|
if (scraper_language->getSelectedObjects().size() == 0)
|
||||||
transitions_lg.push_back(Settings::getInstance()->getString("ScraperLanguage"));
|
scraper_language->selectEntry(0);
|
||||||
}
|
s->addWithLabel("PREFERRED LANGUAGE", scraper_language);
|
||||||
}
|
|
||||||
for (auto it = transitions_lg.cbegin(); it != transitions_lg.cend(); it++)
|
|
||||||
scraper_language->add(*it, *it,
|
|
||||||
Settings::getInstance()->getString("ScraperLanguage") == *it);
|
|
||||||
s->addWithLabel("LANGUAGE", scraper_language);
|
|
||||||
s->addSaveFunc([scraper_language, s] {
|
s->addSaveFunc([scraper_language, s] {
|
||||||
if (scraper_language->getSelected() !=
|
if (scraper_language->getSelected() !=
|
||||||
Settings::getInstance()->getString("ScraperLanguage")) {
|
Settings::getInstance()->getString("ScraperLanguage")) {
|
||||||
|
|
|
@ -316,8 +316,7 @@ void ScreenScraperRequest::processGame(const pugi::xml_document& xmldoc,
|
||||||
// Name fallback: US, WOR(LD). (Xpath: Data/jeu[0]/noms/nom[*]).
|
// Name fallback: US, WOR(LD). (Xpath: Data/jeu[0]/noms/nom[*]).
|
||||||
result.mdl.set("name", find_child_by_attribute_list(game.child("noms"),
|
result.mdl.set("name", find_child_by_attribute_list(game.child("noms"),
|
||||||
"nom", "region", { region, "wor", "us" , "ss", "eu", "jp" }).text().get());
|
"nom", "region", { region, "wor", "us" , "ss", "eu", "jp" }).text().get());
|
||||||
LOG(LogDebug) << "ScreenScraperRequest::processGame(): Name: " <<
|
LOG(LogDebug) << "ScreenScraperRequest::processGame(): Name: " << result.mdl.get("name");
|
||||||
result.mdl.get("name");
|
|
||||||
|
|
||||||
// Validate rating.
|
// Validate rating.
|
||||||
// Process the rating even if the setting to scrape ratings has been disabled.
|
// Process the rating even if the setting to scrape ratings has been disabled.
|
||||||
|
|
Loading…
Reference in a new issue