From f869936430f6687d136311edb65ab4bd72bd302a Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Thu, 28 Jan 2021 20:47:07 +0100 Subject: [PATCH] Added support for multiple languages when scraping using ScreenScraper. --- CHANGELOG.md | 1 + USERGUIDE.md | 4 +++- es-app/src/guis/GuiScraperMenu.cpp | 22 ++++++++++++++++++++-- 3 files changed, 24 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bdd9aa7d9..bbfad0d9a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -37,6 +37,7 @@ Many bugs have been fixed, and numerous features that were only partially implem * Seamless (almost) launch of games without showing the desktop when starting and returning from RetroArch and other emulators * Updated scraper to support additional media files, detailed configuration of what to scrape, semi-automatic mode etc. * Added user account support when scraping using ScreenScraper +* Added support for scraping game genres and game descriptions in multiple languages when using ScreenScraper * Files or folders can now be flagged for exclusion when scraping with the multi-scraper, and for folders it can be set to apply recursively * Overhaul of the game collection functionality including many bug fixes and optimizations * Added ability to delete custom collections from the GUI menu diff --git a/USERGUIDE.md b/USERGUIDE.md index 49ddbe111..262b43ef5 100644 --- a/USERGUIDE.md +++ b/USERGUIDE.md @@ -533,6 +533,8 @@ Here is an overview of what's supported by ES-DE and these scrapers: The category **Other game metadata** includes Description, Release date, Developer, Publisher, Genre and Players. +The **Multi-language** support includes translated game genre names and game descriptions for a number of languages. + There are two approaches to scraping, either for a single game from the metadata editor, or for many games and systems using the multi-scraper. ![alt text](images/current/es-de_scraper_running.png "ES-DE Scraper Running") @@ -704,7 +706,7 @@ The region to scrape for. This affects game names, game media and release dates. **Preferred language** _(ScreenScraper only)_ -Currently only English and World are supported, not really significant at the moment. +Multiple languages are supported, and this affects game genre names and game descriptions. As the option name implies this is the preferred language only, as not all games on ScreenScraper have had their metadata translated to all supported languages. If the preferred language is not available for a game, ES-DE will fall back to scraping the English metadata. **Overwrite files and data** diff --git a/es-app/src/guis/GuiScraperMenu.cpp b/es-app/src/guis/GuiScraperMenu.cpp index ca38e2658..339c7689c 100644 --- a/es-app/src/guis/GuiScraperMenu.cpp +++ b/es-app/src/guis/GuiScraperMenu.cpp @@ -337,8 +337,26 @@ void GuiScraperMenu::openOtherSettings() auto scraper_language = std::make_shared> (mWindow, getHelpStyle(), "PREFERRED LANGUAGE", false); std::string selectedScraperLanguage = Settings::getInstance()->getString("ScraperLanguage"); - scraper_language->add("English", "en", selectedScraperLanguage == "en"); - scraper_language->add("World", "wor", selectedScraperLanguage == "wor"); + scraper_language->add("English", "en", selectedScraperLanguage == "en"); + scraper_language->add("Español", "es", selectedScraperLanguage == "es"); + scraper_language->add("Português", "pt", selectedScraperLanguage == "pt"); + scraper_language->add("Français", "fr", selectedScraperLanguage == "fr"); + scraper_language->add("Deutsch", "de", selectedScraperLanguage == "de"); + scraper_language->add("Italiano", "it", selectedScraperLanguage == "it"); + scraper_language->add("Nederlands", "nl", selectedScraperLanguage == "nl"); + scraper_language->add("日本語", "ja", selectedScraperLanguage == "ja"); + scraper_language->add("简体中文", "zh", selectedScraperLanguage == "zh"); + scraper_language->add("한국어", "ko", selectedScraperLanguage == "ko"); + scraper_language->add("Русский", "ru", selectedScraperLanguage == "ru"); + scraper_language->add("Dansk", "da", selectedScraperLanguage == "da"); + scraper_language->add("Suomi", "fi", selectedScraperLanguage == "fi"); + scraper_language->add("Svenska", "sv", selectedScraperLanguage == "sv"); + scraper_language->add("Magyar", "hu", selectedScraperLanguage == "hu"); + scraper_language->add("Norsk", "no", selectedScraperLanguage == "no"); + scraper_language->add("Polski", "pl", selectedScraperLanguage == "pl"); + scraper_language->add("Čeština", "cz", selectedScraperLanguage == "cz"); + scraper_language->add("Slovenčina", "sk", selectedScraperLanguage == "sk"); + scraper_language->add("Türkçe", "tr", selectedScraperLanguage == "tr"); // If there are no objects returned, then there must be a manually modified entry in the // configuration file. Simply set the language to English in this case. if (scraper_language->getSelectedObjects().size() == 0)