mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-01-30 20:15:38 +00:00
Added localization support to parts of the application
This commit is contained in:
parent
7f4f06eedc
commit
f088658004
|
@ -30,6 +30,7 @@
|
|||
#include "UIModeController.h"
|
||||
#include "Window.h"
|
||||
#include "utils/FileSystemUtil.h"
|
||||
#include "utils/LocalizationUtil.h"
|
||||
#include "utils/StringUtil.h"
|
||||
#include "utils/TimeUtil.h"
|
||||
#include "views/GamelistView.h"
|
||||
|
@ -46,11 +47,11 @@ CollectionSystemsManager::CollectionSystemsManager() noexcept
|
|||
{
|
||||
// clang-format off
|
||||
CollectionSystemDecl systemDecls[] {
|
||||
// Type Name Long name Theme folder isCustom
|
||||
{AUTO_ALL_GAMES, "all", "all games", "auto-allgames", false},
|
||||
{AUTO_LAST_PLAYED, "recent", "last played", "auto-lastplayed", false},
|
||||
{AUTO_FAVORITES, "favorites", "favorites", "auto-favorites", false},
|
||||
{CUSTOM_COLLECTION, myCollectionsName, "collections", "custom-collections", true }
|
||||
// Type Name Long name Theme folder isCustom
|
||||
{AUTO_ALL_GAMES, "all", _("ALL GAMES"), "auto-allgames", false},
|
||||
{AUTO_LAST_PLAYED, "recent", _("LAST PLAYED"), "auto-lastplayed", false},
|
||||
{AUTO_FAVORITES, "favorites", _("FAVORITES"), "auto-favorites", false},
|
||||
{CUSTOM_COLLECTION, myCollectionsName, _("COLLECTIONS"), "custom-collections", true }
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
#include "Log.h"
|
||||
#include "Settings.h"
|
||||
#include "UIModeController.h"
|
||||
#include "utils/LocalizationUtil.h"
|
||||
#include "utils/StringUtil.h"
|
||||
#include "views/ViewController.h"
|
||||
|
||||
|
@ -40,23 +41,29 @@ FileFilterIndex::FileFilterIndex()
|
|||
// clang-format off
|
||||
FilterDataDecl filterDecls[] = {
|
||||
//type //allKeys //filteredBy //filteredKeys //primaryKey //hasSecondaryKey //secondaryKey //menuLabel
|
||||
{RATINGS_FILTER, &mRatingsIndexAllKeys, &mFilterByRatings, &mRatingsIndexFilteredKeys, "rating", false, "", "RATING"},
|
||||
{DEVELOPER_FILTER, &mDeveloperIndexAllKeys, &mFilterByDeveloper, &mDeveloperIndexFilteredKeys, "developer", false, "", "DEVELOPER"},
|
||||
{PUBLISHER_FILTER, &mPublisherIndexAllKeys, &mFilterByPublisher, &mPublisherIndexFilteredKeys, "publisher", false, "", "PUBLISHER"},
|
||||
{GENRE_FILTER, &mGenreIndexAllKeys, &mFilterByGenre, &mGenreIndexFilteredKeys, "genre", true, "genre", "GENRE"},
|
||||
{PLAYER_FILTER, &mPlayersIndexAllKeys, &mFilterByPlayers, &mPlayersIndexFilteredKeys, "players", false, "", "PLAYERS"},
|
||||
{FAVORITES_FILTER, &mFavoritesIndexAllKeys, &mFilterByFavorites, &mFavoritesIndexFilteredKeys, "favorite", false, "", "FAVORITE"},
|
||||
{COMPLETED_FILTER, &mCompletedIndexAllKeys, &mFilterByCompleted, &mCompletedIndexFilteredKeys, "completed", false, "", "COMPLETED"},
|
||||
{KIDGAME_FILTER, &mKidGameIndexAllKeys, &mFilterByKidGame, &mKidGameIndexFilteredKeys, "kidgame", false, "", "KIDGAME"},
|
||||
{HIDDEN_FILTER, &mHiddenIndexAllKeys, &mFilterByHidden, &mHiddenIndexFilteredKeys, "hidden", false, "", "HIDDEN"},
|
||||
{BROKEN_FILTER, &mBrokenIndexAllKeys, &mFilterByBroken, &mBrokenIndexFilteredKeys, "broken", false, "", "BROKEN"},
|
||||
{CONTROLLER_FILTER, &mControllerIndexAllKeys, &mFilterByController, &mControllerIndexFilteredKeys, "controller", false, "", "CONTROLLER"},
|
||||
{ALTEMULATOR_FILTER, &mAltemulatorIndexAllKeys, &mFilterByAltemulator, &mAltemulatorIndexFilteredKeys, "altemulator", false, "", "ALTERNATIVE EMULATOR"}
|
||||
{RATINGS_FILTER, &mRatingsIndexAllKeys, &mFilterByRatings, &mRatingsIndexFilteredKeys, "rating", false, "", _("RATING")},
|
||||
{DEVELOPER_FILTER, &mDeveloperIndexAllKeys, &mFilterByDeveloper, &mDeveloperIndexFilteredKeys, "developer", false, "", _("DEVELOPER")},
|
||||
{PUBLISHER_FILTER, &mPublisherIndexAllKeys, &mFilterByPublisher, &mPublisherIndexFilteredKeys, "publisher", false, "", _("PUBLISHER")},
|
||||
{GENRE_FILTER, &mGenreIndexAllKeys, &mFilterByGenre, &mGenreIndexFilteredKeys, "genre", true, "genre", _("GENRE")},
|
||||
{PLAYER_FILTER, &mPlayersIndexAllKeys, &mFilterByPlayers, &mPlayersIndexFilteredKeys, "players", false, "", _("PLAYERS")},
|
||||
{FAVORITES_FILTER, &mFavoritesIndexAllKeys, &mFilterByFavorites, &mFavoritesIndexFilteredKeys, "favorite", false, "", _("FAVORITE")},
|
||||
{COMPLETED_FILTER, &mCompletedIndexAllKeys, &mFilterByCompleted, &mCompletedIndexFilteredKeys, "completed", false, "", _("COMPLETED")},
|
||||
{KIDGAME_FILTER, &mKidGameIndexAllKeys, &mFilterByKidGame, &mKidGameIndexFilteredKeys, "kidgame", false, "", _("KIDGAME")},
|
||||
{HIDDEN_FILTER, &mHiddenIndexAllKeys, &mFilterByHidden, &mHiddenIndexFilteredKeys, "hidden", false, "", _("HIDDEN")},
|
||||
{BROKEN_FILTER, &mBrokenIndexAllKeys, &mFilterByBroken, &mBrokenIndexFilteredKeys, "broken", false, "", _("BROKEN")},
|
||||
{CONTROLLER_FILTER, &mControllerIndexAllKeys, &mFilterByController, &mControllerIndexFilteredKeys, "controller", false, "", _("CONTROLLER")},
|
||||
{ALTEMULATOR_FILTER, &mAltemulatorIndexAllKeys, &mFilterByAltemulator, &mAltemulatorIndexFilteredKeys, "altemulator", false, "", _("ALTERNATIVE EMULATOR")}
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
filterDataDecl = std::vector<FilterDataDecl>(
|
||||
filterDecls, filterDecls + sizeof(filterDecls) / sizeof(filterDecls[0]));
|
||||
|
||||
#if defined(GETTEXT_DUMMY_ENTRIES)
|
||||
// This is just to get gettext msgid entries added to the PO message catalog files.
|
||||
_("FALSE");
|
||||
_("TRUE");
|
||||
#endif
|
||||
}
|
||||
|
||||
FileFilterIndex::~FileFilterIndex()
|
||||
|
@ -148,10 +155,10 @@ std::string FileFilterIndex::getIndexableKey(FileData* game,
|
|||
ratingNumber = 0;
|
||||
|
||||
if (ratingNumber == 5)
|
||||
key = "5 STARS";
|
||||
key = "5";
|
||||
else
|
||||
key = std::to_string(ratingNumber) + " - " +
|
||||
std::to_string(ratingNumber) + ".5 STARS";
|
||||
std::to_string(ratingNumber) + ".5";
|
||||
}
|
||||
catch (int e) {
|
||||
LOG(LogError) << "Error parsing Rating (invalid value, exception nr.): "
|
||||
|
@ -239,10 +246,10 @@ std::string FileFilterIndex::getIndexableKey(FileData* game,
|
|||
if ((type == GENRE_FILTER || type == PLAYER_FILTER || type == DEVELOPER_FILTER ||
|
||||
type == PUBLISHER_FILTER) &&
|
||||
Utils::String::toUpper(key) == UNKNOWN_LABEL)
|
||||
key = ViewController::CROSSEDCIRCLE_CHAR + " UNKNOWN";
|
||||
key = ViewController::CROSSEDCIRCLE_CHAR + " " + _("UNKNOWN");
|
||||
else if ((type == CONTROLLER_FILTER || type == ALTEMULATOR_FILTER) && key.empty())
|
||||
key = ViewController::CROSSEDCIRCLE_CHAR + " NONE SELECTED";
|
||||
else if (key.empty() || (type == RATINGS_FILTER && key == "0 STARS"))
|
||||
key = ViewController::CROSSEDCIRCLE_CHAR + " " + _("NONE SELECTED");
|
||||
else if (key.empty() || (type == RATINGS_FILTER && key == "0"))
|
||||
key = UNKNOWN_LABEL;
|
||||
|
||||
return key;
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
#include "UIModeController.h"
|
||||
#include "resources/ResourceManager.h"
|
||||
#include "utils/FileSystemUtil.h"
|
||||
#include "utils/LocalizationUtil.h"
|
||||
#include "utils/StringUtil.h"
|
||||
#include "views/GamelistView.h"
|
||||
#include "views/ViewController.h"
|
||||
|
@ -260,7 +261,8 @@ SystemData::SystemData(const std::string& name,
|
|||
}
|
||||
|
||||
// This placeholder can be used later in the gamelist view.
|
||||
mPlaceholder = new FileData(PLACEHOLDER, "<No Entries Found>", getSystemEnvData(), this);
|
||||
mPlaceholder =
|
||||
new FileData(PLACEHOLDER, "<" + _("No Entries Found") + ">", getSystemEnvData(), this);
|
||||
|
||||
setIsGameSystemStatus();
|
||||
loadTheme(ThemeTriggers::TriggerType::NONE);
|
||||
|
|
|
@ -65,7 +65,7 @@ GuiAlternativeEmulators::GuiAlternativeEmulators()
|
|||
bool invalidEntry {false};
|
||||
|
||||
if (label.empty()) {
|
||||
label = ViewController::EXCLAMATION_CHAR + " INVALID ENTRY";
|
||||
label = ViewController::EXCLAMATION_CHAR + " " + _("INVALID ENTRY");
|
||||
invalidEntry = true;
|
||||
}
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
#include "guis/GuiSettings.h"
|
||||
#include "guis/GuiTextEditKeyboardPopup.h"
|
||||
#include "guis/GuiTextEditPopup.h"
|
||||
#include "utils/LocalizationUtil.h"
|
||||
#include "utils/StringUtil.h"
|
||||
#include "views/ViewController.h"
|
||||
|
||||
|
@ -46,7 +47,7 @@ GuiCollectionSystemsOptions::GuiCollectionSystemsOptions(std::string title)
|
|||
|
||||
// Automatic collections.
|
||||
mCollectionSystemsAuto = std::make_shared<OptionListComponent<std::string>>(
|
||||
getHelpStyle(), "SELECT COLLECTIONS", true);
|
||||
getHelpStyle(), _("SELECT COLLECTIONS"), true);
|
||||
std::map<std::string, CollectionSystemData, StringComparator> autoSystems {
|
||||
CollectionSystemsManager::getInstance()->getAutoCollectionSystems()};
|
||||
// Add automatic systems.
|
||||
|
@ -55,7 +56,7 @@ GuiCollectionSystemsOptions::GuiCollectionSystemsOptions(std::string title)
|
|||
it != autoSystems.cend(); ++it)
|
||||
mCollectionSystemsAuto->add(it->second.decl.fullName, it->second.decl.name,
|
||||
it->second.isEnabled);
|
||||
addWithLabel("AUTOMATIC GAME COLLECTIONS", mCollectionSystemsAuto);
|
||||
addWithLabel(_("AUTOMATIC GAME COLLECTIONS"), mCollectionSystemsAuto);
|
||||
addSaveFunc([this, autoSystems] {
|
||||
std::string autoSystemsSelected {Utils::String::vectorToDelimitedString(
|
||||
mCollectionSystemsAuto->getSelectedObjects(), ",", true)};
|
||||
|
@ -96,7 +97,7 @@ GuiCollectionSystemsOptions::GuiCollectionSystemsOptions(std::string title)
|
|||
|
||||
// Custom collections.
|
||||
mCollectionSystemsCustom = std::make_shared<OptionListComponent<std::string>>(
|
||||
getHelpStyle(), "SELECT COLLECTIONS", true);
|
||||
getHelpStyle(), _("SELECT COLLECTIONS"), true);
|
||||
std::map<std::string, CollectionSystemData, StringComparator> customSystems {
|
||||
CollectionSystemsManager::getInstance()->getCustomCollectionSystems()};
|
||||
// Add custom systems.
|
||||
|
@ -106,7 +107,7 @@ GuiCollectionSystemsOptions::GuiCollectionSystemsOptions(std::string title)
|
|||
mCollectionSystemsCustom->add(it->second.decl.fullName, it->second.decl.name,
|
||||
it->second.isEnabled);
|
||||
|
||||
addWithLabel("CUSTOM GAME COLLECTIONS", mCollectionSystemsCustom);
|
||||
addWithLabel(_("CUSTOM GAME COLLECTIONS"), mCollectionSystemsCustom);
|
||||
addSaveFunc([this, customSystems] {
|
||||
if (!mDeletedCustomCollection) {
|
||||
std::string customSystemsSelected {Utils::String::vectorToDelimitedString(
|
||||
|
@ -166,7 +167,7 @@ GuiCollectionSystemsOptions::GuiCollectionSystemsOptions(std::string title)
|
|||
if (unusedFolders.size() > 0) {
|
||||
ComponentListRow row;
|
||||
auto themeCollection =
|
||||
std::make_shared<TextComponent>("CREATE NEW CUSTOM COLLECTION FROM THEME",
|
||||
std::make_shared<TextComponent>(_("CREATE NEW CUSTOM COLLECTION FROM THEME"),
|
||||
Font::get(FONT_SIZE_MEDIUM), mMenuColorPrimary);
|
||||
auto bracketThemeCollection = std::make_shared<ImageComponent>();
|
||||
bracketThemeCollection->setResize(
|
||||
|
@ -176,10 +177,10 @@ GuiCollectionSystemsOptions::GuiCollectionSystemsOptions(std::string title)
|
|||
row.addElement(themeCollection, true);
|
||||
row.addElement(bracketThemeCollection, false);
|
||||
row.makeAcceptInputHandler([this, unusedFolders] {
|
||||
auto ss = new GuiSettings("SELECT THEME FOLDER");
|
||||
auto ss = new GuiSettings(_("SELECT THEME FOLDER"));
|
||||
std::shared_ptr<OptionListComponent<std::string>> folderThemes {
|
||||
std::make_shared<OptionListComponent<std::string>>(getHelpStyle(),
|
||||
"SELECT THEME FOLDER", true)};
|
||||
_("SELECT THEME FOLDER"), true)};
|
||||
// Add custom systems.
|
||||
for (auto it = unusedFolders.cbegin(); it != unusedFolders.cend(); ++it) {
|
||||
ComponentListRow row;
|
||||
|
@ -201,7 +202,7 @@ GuiCollectionSystemsOptions::GuiCollectionSystemsOptions(std::string title)
|
|||
// Create new custom collection.
|
||||
ComponentListRow row;
|
||||
auto newCollection = std::make_shared<TextComponent>(
|
||||
"CREATE NEW CUSTOM COLLECTION", Font::get(FONT_SIZE_MEDIUM), mMenuColorPrimary);
|
||||
_("CREATE NEW CUSTOM COLLECTION"), Font::get(FONT_SIZE_MEDIUM), mMenuColorPrimary);
|
||||
auto bracketNewCollection = std::make_shared<ImageComponent>();
|
||||
bracketNewCollection->setResize(
|
||||
glm::vec2 {0.0f, Font::get(FONT_SIZE_MEDIUM)->getLetterHeight()});
|
||||
|
@ -224,15 +225,15 @@ GuiCollectionSystemsOptions::GuiCollectionSystemsOptions(std::string title)
|
|||
const float verticalPosition {
|
||||
mRenderer->getIsVerticalOrientation() ? getMenu().getPosition().y : 0.0f};
|
||||
mWindow->pushGui(new GuiTextEditKeyboardPopup(
|
||||
getHelpStyle(), verticalPosition, "New Collection Name", "", createCollectionCall,
|
||||
false, "CREATE", "CREATE COLLECTION?"));
|
||||
getHelpStyle(), verticalPosition, _("NEW COLLECTION NAME"), "",
|
||||
createCollectionCall, false, _("CREATE"), _("CREATE COLLECTION?")));
|
||||
});
|
||||
}
|
||||
else {
|
||||
row.makeAcceptInputHandler([this, createCollectionCall] {
|
||||
mWindow->pushGui(new GuiTextEditPopup(getHelpStyle(), "New Collection Name", "",
|
||||
createCollectionCall, false, "CREATE",
|
||||
"CREATE COLLECTION?"));
|
||||
mWindow->pushGui(new GuiTextEditPopup(getHelpStyle(), _("NEW COLLECTION NAME"), "",
|
||||
createCollectionCall, false, _("CREATE"),
|
||||
_("CREATE COLLECTION?")));
|
||||
});
|
||||
}
|
||||
addRow(row);
|
||||
|
@ -240,7 +241,7 @@ GuiCollectionSystemsOptions::GuiCollectionSystemsOptions(std::string title)
|
|||
// Delete custom collection.
|
||||
row.elements.clear();
|
||||
auto deleteCollection = std::make_shared<TextComponent>(
|
||||
"DELETE CUSTOM COLLECTION", Font::get(FONT_SIZE_MEDIUM), mMenuColorPrimary);
|
||||
_("DELETE CUSTOM COLLECTION"), Font::get(FONT_SIZE_MEDIUM), mMenuColorPrimary);
|
||||
auto bracketDeleteCollection = std::make_shared<ImageComponent>();
|
||||
bracketDeleteCollection->setResize(
|
||||
glm::vec2 {0.0f, Font::get(FONT_SIZE_MEDIUM)->getLetterHeight()});
|
||||
|
@ -249,7 +250,7 @@ GuiCollectionSystemsOptions::GuiCollectionSystemsOptions(std::string title)
|
|||
row.addElement(deleteCollection, true);
|
||||
row.addElement(bracketDeleteCollection, false);
|
||||
row.makeAcceptInputHandler([this, customSystems] {
|
||||
auto ss = new GuiSettings("COLLECTION TO DELETE");
|
||||
auto ss = new GuiSettings(_("COLLECTION TO DELETE"));
|
||||
std::shared_ptr<OptionListComponent<std::string>> customCollections {
|
||||
std::make_shared<OptionListComponent<std::string>>(getHelpStyle(), "", true)};
|
||||
for (std::map<std::string, CollectionSystemData, StringComparator>::const_iterator it =
|
||||
|
@ -317,17 +318,18 @@ GuiCollectionSystemsOptions::GuiCollectionSystemsOptions(std::string title)
|
|||
|
||||
// Custom collections grouping.
|
||||
auto collectionCustomGrouping = std::make_shared<OptionListComponent<std::string>>(
|
||||
getHelpStyle(), "GROUP CUSTOM COLLECTIONS", false);
|
||||
getHelpStyle(), _("GROUP CUSTOM COLLECTIONS"), false);
|
||||
const std::string& selectedCustomGrouping {
|
||||
Settings::getInstance()->getString("CollectionCustomGrouping")};
|
||||
collectionCustomGrouping->add("IF UNTHEMED", "unthemed", selectedCustomGrouping == "unthemed");
|
||||
collectionCustomGrouping->add("ALWAYS", "always", selectedCustomGrouping == "always");
|
||||
collectionCustomGrouping->add("NEVER", "never", selectedCustomGrouping == "never");
|
||||
collectionCustomGrouping->add(_("IF UNTHEMED"), "unthemed",
|
||||
selectedCustomGrouping == "unthemed");
|
||||
collectionCustomGrouping->add(_("ALWAYS"), "always", selectedCustomGrouping == "always");
|
||||
collectionCustomGrouping->add(_("NEVER"), "never", selectedCustomGrouping == "never");
|
||||
// If there are no objects returned, then there must be a manually modified entry in the
|
||||
// configuration file. Simply set custom collections grouping to "unthemed" in this case.
|
||||
if (collectionCustomGrouping->getSelectedObjects().size() == 0)
|
||||
collectionCustomGrouping->selectEntry(0);
|
||||
addWithLabel("GROUP CUSTOM COLLECTIONS", collectionCustomGrouping);
|
||||
addWithLabel(_("GROUP CUSTOM COLLECTIONS"), collectionCustomGrouping);
|
||||
addSaveFunc([this, collectionCustomGrouping] {
|
||||
if (collectionCustomGrouping->getSelected() !=
|
||||
Settings::getInstance()->getString("CollectionCustomGrouping")) {
|
||||
|
@ -348,7 +350,7 @@ GuiCollectionSystemsOptions::GuiCollectionSystemsOptions(std::string title)
|
|||
// Sort favorites on top for custom collections.
|
||||
auto fav_first_custom = std::make_shared<SwitchComponent>();
|
||||
fav_first_custom->setState(Settings::getInstance()->getBool("FavFirstCustom"));
|
||||
addWithLabel("SORT FAVORITES ON TOP FOR CUSTOM COLLECTIONS", fav_first_custom);
|
||||
addWithLabel(_("SORT FAVORITES ON TOP FOR CUSTOM COLLECTIONS"), fav_first_custom);
|
||||
addSaveFunc([this, fav_first_custom] {
|
||||
if (fav_first_custom->getState() != Settings::getInstance()->getBool("FavFirstCustom")) {
|
||||
Settings::getInstance()->setBool("FavFirstCustom", fav_first_custom->getState());
|
||||
|
@ -363,7 +365,7 @@ GuiCollectionSystemsOptions::GuiCollectionSystemsOptions(std::string title)
|
|||
// Display star markings for custom collections.
|
||||
auto fav_star_custom = std::make_shared<SwitchComponent>();
|
||||
fav_star_custom->setState(Settings::getInstance()->getBool("FavStarCustom"));
|
||||
addWithLabel("DISPLAY STAR MARKINGS FOR CUSTOM COLLECTIONS", fav_star_custom);
|
||||
addWithLabel(_("DISPLAY STAR MARKINGS FOR CUSTOM COLLECTIONS"), fav_star_custom);
|
||||
addSaveFunc([this, fav_star_custom] {
|
||||
if (fav_star_custom->getState() != Settings::getInstance()->getBool("FavStarCustom")) {
|
||||
Settings::getInstance()->setBool("FavStarCustom", fav_star_custom->getState());
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
GuiGamelistFilter::GuiGamelistFilter(SystemData* system,
|
||||
std::function<void(bool)> filterChangedCallback)
|
||||
: mMenu {"FILTER GAMELIST"}
|
||||
: mMenu {_("FILTER GAMELIST")}
|
||||
, mSystem {system}
|
||||
, mFiltersChangedCallback {filterChangedCallback}
|
||||
, mFiltersChanged {false}
|
||||
|
@ -40,8 +40,8 @@ void GuiGamelistFilter::initializeMenu()
|
|||
|
||||
// Show filtered menu.
|
||||
row.elements.clear();
|
||||
row.addElement(std::make_shared<TextComponent>("RESET ALL FILTERS", Font::get(FONT_SIZE_MEDIUM),
|
||||
mMenuColorPrimary),
|
||||
row.addElement(std::make_shared<TextComponent>(_("RESET ALL FILTERS"),
|
||||
Font::get(FONT_SIZE_MEDIUM), mMenuColorPrimary),
|
||||
true);
|
||||
row.makeAcceptInputHandler(std::bind(&GuiGamelistFilter::resetAllFilters, this));
|
||||
mMenu.addRow(row);
|
||||
|
@ -49,7 +49,7 @@ void GuiGamelistFilter::initializeMenu()
|
|||
|
||||
addFiltersToMenu();
|
||||
|
||||
mMenu.addButton("BACK", "back", std::bind(&GuiGamelistFilter::applyFilters, this));
|
||||
mMenu.addButton(_("BACK"), _("back"), std::bind(&GuiGamelistFilter::applyFilters, this));
|
||||
|
||||
mMenu.setPosition((Renderer::getScreenWidth() - mMenu.getSize().x) / 2.0f,
|
||||
Renderer::getScreenHeight() * 0.13f);
|
||||
|
@ -88,7 +88,7 @@ void GuiGamelistFilter::addFiltersToMenu()
|
|||
ComponentListRow row;
|
||||
|
||||
auto lbl = std::make_shared<TextComponent>(
|
||||
Utils::String::toUpper(ViewController::KEYBOARD_CHAR + " GAME NAME"),
|
||||
Utils::String::toUpper(ViewController::KEYBOARD_CHAR + " " + _("GAME NAME")),
|
||||
Font::get(FONT_SIZE_MEDIUM), mMenuColorPrimary);
|
||||
|
||||
mTextFilterField = std::make_shared<TextComponent>("", Font::get(FONT_SIZE_MEDIUM),
|
||||
|
@ -123,15 +123,15 @@ void GuiGamelistFilter::addFiltersToMenu()
|
|||
const float verticalPosition {
|
||||
Renderer::getIsVerticalOrientation() ? mMenu.getPosition().y : 0.0f};
|
||||
mWindow->pushGui(new GuiTextEditKeyboardPopup(
|
||||
getHelpStyle(), verticalPosition, "GAME NAME", mTextFilterField->getValue(),
|
||||
updateVal, false, "OK", "APPLY CHANGES?"));
|
||||
getHelpStyle(), verticalPosition, _("GAME NAME"), mTextFilterField->getValue(),
|
||||
updateVal, false, _("OK"), _("APPLY CHANGES?")));
|
||||
});
|
||||
}
|
||||
else {
|
||||
row.makeAcceptInputHandler([this, updateVal] {
|
||||
mWindow->pushGui(new GuiTextEditPopup(getHelpStyle(), "GAME NAME",
|
||||
mWindow->pushGui(new GuiTextEditPopup(getHelpStyle(), _("GAME NAME"),
|
||||
mTextFilterField->getValue(), updateVal, false,
|
||||
"OK", "APPLY CHANGES?"));
|
||||
_("OK"), _("APPLY CHANGES?")));
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -181,7 +181,7 @@ void GuiGamelistFilter::addFiltersToMenu()
|
|||
if (allKeys->size() == 1 || allKeys->empty()) {
|
||||
optionList->setEnabled(false);
|
||||
optionList->setOpacity(DISABLED_OPACITY);
|
||||
optionList->setOverrideMultiText("NOTHING TO FILTER");
|
||||
optionList->setOverrideMultiText(_("NOTHING TO FILTER"));
|
||||
}
|
||||
|
||||
if (type == CONTROLLER_FILTER) {
|
||||
|
@ -195,9 +195,17 @@ void GuiGamelistFilter::addFiltersToMenu()
|
|||
}
|
||||
}
|
||||
else {
|
||||
for (auto it : *allKeys)
|
||||
optionList->add(it.first, it.first,
|
||||
mFilterIndex->isKeyBeingFilteredBy(it.first, type));
|
||||
if (type == FAVORITES_FILTER || type == COMPLETED_FILTER || type == KIDGAME_FILTER ||
|
||||
type == HIDDEN_FILTER || type == BROKEN_FILTER) {
|
||||
for (auto it : *allKeys)
|
||||
optionList->add(_(it.first.c_str()), it.first,
|
||||
mFilterIndex->isKeyBeingFilteredBy(it.first, type));
|
||||
}
|
||||
else {
|
||||
for (auto it : *allKeys)
|
||||
optionList->add(it.first, it.first,
|
||||
mFilterIndex->isKeyBeingFilteredBy(it.first, type));
|
||||
}
|
||||
}
|
||||
|
||||
if (allKeys->size() == 0)
|
||||
|
|
|
@ -239,7 +239,7 @@ GuiGamelistOptions::GuiGamelistOptions(SystemData* system)
|
|||
|
||||
if (file->getType() == FOLDER && file->metadata.get("folderlink") != "") {
|
||||
row.elements.clear();
|
||||
row.addElement(std::make_shared<TextComponent>("ENTER FOLDER (OVERRIDE FOLDER LINK)",
|
||||
row.addElement(std::make_shared<TextComponent>(_("ENTER FOLDER (OVERRIDE FOLDER LINK)"),
|
||||
Font::get(FONT_SIZE_MEDIUM),
|
||||
mMenuColorPrimary),
|
||||
true);
|
||||
|
|
|
@ -12,23 +12,24 @@
|
|||
#include "Settings.h"
|
||||
#include "components/OptionListComponent.h"
|
||||
#include "components/SwitchComponent.h"
|
||||
#include "utils/LocalizationUtil.h"
|
||||
|
||||
GuiMediaViewerOptions::GuiMediaViewerOptions(const std::string& title)
|
||||
: GuiSettings {title}
|
||||
{
|
||||
|
||||
// Help prompts.
|
||||
auto mediaViewerHelpPrompts =
|
||||
std::make_shared<OptionListComponent<std::string>>(getHelpStyle(), "HELP PROMPTS", false);
|
||||
auto mediaViewerHelpPrompts = std::make_shared<OptionListComponent<std::string>>(
|
||||
getHelpStyle(), _("HELP PROMPTS"), false);
|
||||
std::string selectedHelpPrompts {Settings::getInstance()->getString("MediaViewerHelpPrompts")};
|
||||
mediaViewerHelpPrompts->add("TOP", "top", selectedHelpPrompts == "top");
|
||||
mediaViewerHelpPrompts->add("BOTTOM", "bottom", selectedHelpPrompts == "bottom");
|
||||
mediaViewerHelpPrompts->add("DISABLED", "disabled", selectedHelpPrompts == "disabled");
|
||||
mediaViewerHelpPrompts->add(_("TOP"), "top", selectedHelpPrompts == "top");
|
||||
mediaViewerHelpPrompts->add(_("BOTTOM"), "bottom", selectedHelpPrompts == "bottom");
|
||||
mediaViewerHelpPrompts->add(_("DISABLED"), "disabled", selectedHelpPrompts == "disabled");
|
||||
// If there are no objects returned, then there must be a manually modified entry in the
|
||||
// configuration file. Simply set the help prompts to "top" in this case.
|
||||
if (mediaViewerHelpPrompts->getSelectedObjects().size() == 0)
|
||||
mediaViewerHelpPrompts->selectEntry(0);
|
||||
addWithLabel("HELP PROMPTS", mediaViewerHelpPrompts);
|
||||
addWithLabel(_("HELP PROMPTS"), mediaViewerHelpPrompts);
|
||||
addSaveFunc([mediaViewerHelpPrompts, this] {
|
||||
if (mediaViewerHelpPrompts->getSelected() !=
|
||||
Settings::getInstance()->getString("MediaViewerHelpPrompts")) {
|
||||
|
@ -41,7 +42,7 @@ GuiMediaViewerOptions::GuiMediaViewerOptions(const std::string& title)
|
|||
// Display media types.
|
||||
auto mediaViewerShowTypes = std::make_shared<SwitchComponent>();
|
||||
mediaViewerShowTypes->setState(Settings::getInstance()->getBool("MediaViewerShowTypes"));
|
||||
addWithLabel("DISPLAY MEDIA TYPES", mediaViewerShowTypes);
|
||||
addWithLabel(_("DISPLAY MEDIA TYPES"), mediaViewerShowTypes);
|
||||
addSaveFunc([mediaViewerShowTypes, this] {
|
||||
if (mediaViewerShowTypes->getState() !=
|
||||
Settings::getInstance()->getBool("MediaViewerShowTypes")) {
|
||||
|
@ -54,7 +55,7 @@ GuiMediaViewerOptions::GuiMediaViewerOptions(const std::string& title)
|
|||
// Keep videos running when viewing images.
|
||||
auto keepVideoRunning = std::make_shared<SwitchComponent>();
|
||||
keepVideoRunning->setState(Settings::getInstance()->getBool("MediaViewerKeepVideoRunning"));
|
||||
addWithLabel("KEEP VIDEOS RUNNING WHEN VIEWING IMAGES", keepVideoRunning);
|
||||
addWithLabel(_("KEEP VIDEOS RUNNING WHEN VIEWING IMAGES"), keepVideoRunning);
|
||||
addSaveFunc([keepVideoRunning, this] {
|
||||
if (keepVideoRunning->getState() !=
|
||||
Settings::getInstance()->getBool("MediaViewerKeepVideoRunning")) {
|
||||
|
@ -67,7 +68,7 @@ GuiMediaViewerOptions::GuiMediaViewerOptions(const std::string& title)
|
|||
// Stretch videos to screen resolution.
|
||||
auto stretchVideos = std::make_shared<SwitchComponent>();
|
||||
stretchVideos->setState(Settings::getInstance()->getBool("MediaViewerStretchVideos"));
|
||||
addWithLabel("STRETCH VIDEOS TO SCREEN RESOLUTION", stretchVideos);
|
||||
addWithLabel(_("STRETCH VIDEOS TO SCREEN RESOLUTION"), stretchVideos);
|
||||
addSaveFunc([stretchVideos, this] {
|
||||
if (stretchVideos->getState() !=
|
||||
Settings::getInstance()->getBool("MediaViewerStretchVideos")) {
|
||||
|
@ -79,7 +80,7 @@ GuiMediaViewerOptions::GuiMediaViewerOptions(const std::string& title)
|
|||
// Render scanlines for videos using a shader.
|
||||
auto videoScanlines = std::make_shared<SwitchComponent>();
|
||||
videoScanlines->setState(Settings::getInstance()->getBool("MediaViewerVideoScanlines"));
|
||||
addWithLabel("RENDER SCANLINES FOR VIDEOS", videoScanlines);
|
||||
addWithLabel(_("RENDER SCANLINES FOR VIDEOS"), videoScanlines);
|
||||
addSaveFunc([videoScanlines, this] {
|
||||
if (videoScanlines->getState() !=
|
||||
Settings::getInstance()->getBool("MediaViewerVideoScanlines")) {
|
||||
|
@ -92,7 +93,7 @@ GuiMediaViewerOptions::GuiMediaViewerOptions(const std::string& title)
|
|||
// Render blur for videos using a shader.
|
||||
auto videoBlur = std::make_shared<SwitchComponent>();
|
||||
videoBlur->setState(Settings::getInstance()->getBool("MediaViewerVideoBlur"));
|
||||
addWithLabel("RENDER BLUR FOR VIDEOS", videoBlur);
|
||||
addWithLabel(_("RENDER BLUR FOR VIDEOS"), videoBlur);
|
||||
addSaveFunc([videoBlur, this] {
|
||||
if (videoBlur->getState() != Settings::getInstance()->getBool("MediaViewerVideoBlur")) {
|
||||
Settings::getInstance()->setBool("MediaViewerVideoBlur", videoBlur->getState());
|
||||
|
@ -104,7 +105,7 @@ GuiMediaViewerOptions::GuiMediaViewerOptions(const std::string& title)
|
|||
auto screenshotScanlines = std::make_shared<SwitchComponent>();
|
||||
screenshotScanlines->setState(
|
||||
Settings::getInstance()->getBool("MediaViewerScreenshotScanlines"));
|
||||
addWithLabel("RENDER SCANLINES FOR SCREENSHOTS AND TITLES", screenshotScanlines);
|
||||
addWithLabel(_("RENDER SCANLINES FOR SCREENSHOTS AND TITLES"), screenshotScanlines);
|
||||
addSaveFunc([screenshotScanlines, this] {
|
||||
if (screenshotScanlines->getState() !=
|
||||
Settings::getInstance()->getBool("MediaViewerScreenshotScanlines")) {
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
#include "guis/GuiMsgBox.h"
|
||||
#include "guis/GuiTextEditKeyboardPopup.h"
|
||||
#include "guis/GuiTextEditPopup.h"
|
||||
#include "utils/LocalizationUtil.h"
|
||||
|
||||
GuiScreensaverOptions::GuiScreensaverOptions(const std::string& title)
|
||||
: GuiSettings {title}
|
||||
|
@ -25,7 +26,7 @@ GuiScreensaverOptions::GuiScreensaverOptions(const std::string& title)
|
|||
auto screensaverTimer = std::make_shared<SliderComponent>(0.0f, 30.0f, 1.0f, "m");
|
||||
screensaverTimer->setValue(
|
||||
static_cast<float>(Settings::getInstance()->getInt("ScreensaverTimer") / (1000 * 60)));
|
||||
addWithLabel("START SCREENSAVER AFTER (MINUTES)", screensaverTimer);
|
||||
addWithLabel(_("START SCREENSAVER AFTER (MINUTES)"), screensaverTimer);
|
||||
addSaveFunc([screensaverTimer, this] {
|
||||
if (static_cast<int>(std::round(screensaverTimer->getValue()) * (1000 * 60)) !=
|
||||
Settings::getInstance()->getInt("ScreensaverTimer")) {
|
||||
|
@ -38,17 +39,17 @@ GuiScreensaverOptions::GuiScreensaverOptions(const std::string& title)
|
|||
|
||||
// Screensaver type.
|
||||
auto screensaverType = std::make_shared<OptionListComponent<std::string>>(
|
||||
getHelpStyle(), "SCREENSAVER TYPE", false);
|
||||
getHelpStyle(), _("SCREENSAVER TYPE"), false);
|
||||
std::string selectedScreensaver {Settings::getInstance()->getString("ScreensaverType")};
|
||||
screensaverType->add("DIM", "dim", selectedScreensaver == "dim");
|
||||
screensaverType->add("BLACK", "black", selectedScreensaver == "black");
|
||||
screensaverType->add("SLIDESHOW", "slideshow", selectedScreensaver == "slideshow");
|
||||
screensaverType->add("VIDEO", "video", selectedScreensaver == "video");
|
||||
screensaverType->add(_("DIM"), "dim", selectedScreensaver == "dim");
|
||||
screensaverType->add(_("BLACK"), "black", selectedScreensaver == "black");
|
||||
screensaverType->add(_("SLIDESHOW"), "slideshow", selectedScreensaver == "slideshow");
|
||||
screensaverType->add(_("VIDEO"), "video", selectedScreensaver == "video");
|
||||
// If there are no objects returned, then there must be a manually modified entry in the
|
||||
// configuration file. Simply set the screensaver type to "dim" in this case.
|
||||
if (screensaverType->getSelectedObjects().size() == 0)
|
||||
screensaverType->selectEntry(0);
|
||||
addWithLabel("SCREENSAVER TYPE", screensaverType);
|
||||
addWithLabel(_("SCREENSAVER TYPE"), screensaverType);
|
||||
addSaveFunc([screensaverType, this] {
|
||||
if (screensaverType->getSelected() !=
|
||||
Settings::getInstance()->getString("ScreensaverType")) {
|
||||
|
@ -60,7 +61,7 @@ GuiScreensaverOptions::GuiScreensaverOptions(const std::string& title)
|
|||
// Whether to enable screensaver controls.
|
||||
auto screensaverControls = std::make_shared<SwitchComponent>();
|
||||
screensaverControls->setState(Settings::getInstance()->getBool("ScreensaverControls"));
|
||||
addWithLabel("ENABLE SCREENSAVER CONTROLS", screensaverControls);
|
||||
addWithLabel(_("ENABLE SCREENSAVER CONTROLS"), screensaverControls);
|
||||
addSaveFunc([screensaverControls, this] {
|
||||
if (screensaverControls->getState() !=
|
||||
Settings::getInstance()->getBool("ScreensaverControls")) {
|
||||
|
@ -73,7 +74,7 @@ GuiScreensaverOptions::GuiScreensaverOptions(const std::string& title)
|
|||
// Show filtered menu.
|
||||
ComponentListRow row;
|
||||
row.elements.clear();
|
||||
row.addElement(std::make_shared<TextComponent>("SLIDESHOW SCREENSAVER SETTINGS",
|
||||
row.addElement(std::make_shared<TextComponent>(_("SLIDESHOW SCREENSAVER SETTINGS"),
|
||||
Font::get(FONT_SIZE_MEDIUM), mMenuColorPrimary),
|
||||
true);
|
||||
row.addElement(getMenu().makeArrow(), false);
|
||||
|
@ -82,7 +83,7 @@ GuiScreensaverOptions::GuiScreensaverOptions(const std::string& title)
|
|||
addRow(row);
|
||||
|
||||
row.elements.clear();
|
||||
row.addElement(std::make_shared<TextComponent>("VIDEO SCREENSAVER SETTINGS",
|
||||
row.addElement(std::make_shared<TextComponent>(_("VIDEO SCREENSAVER SETTINGS"),
|
||||
Font::get(FONT_SIZE_MEDIUM), mMenuColorPrimary),
|
||||
true);
|
||||
row.addElement(getMenu().makeArrow(), false);
|
||||
|
@ -95,13 +96,13 @@ GuiScreensaverOptions::GuiScreensaverOptions(const std::string& title)
|
|||
|
||||
void GuiScreensaverOptions::openSlideshowScreensaverOptions()
|
||||
{
|
||||
auto s = new GuiSettings("SLIDESHOW SCREENSAVER");
|
||||
auto s = new GuiSettings(_("SLIDESHOW SCREENSAVER"));
|
||||
|
||||
// Timer for swapping images (in seconds).
|
||||
auto screensaverSwapImageTimeout = std::make_shared<SliderComponent>(2.0f, 120.0f, 2.0f, "s");
|
||||
screensaverSwapImageTimeout->setValue(static_cast<float>(
|
||||
Settings::getInstance()->getInt("ScreensaverSwapImageTimeout") / (1000)));
|
||||
s->addWithLabel("SWAP IMAGES AFTER (SECONDS)", screensaverSwapImageTimeout);
|
||||
s->addWithLabel(_("SWAP IMAGES AFTER (SECONDS)"), screensaverSwapImageTimeout);
|
||||
s->addSaveFunc([screensaverSwapImageTimeout, s] {
|
||||
if (screensaverSwapImageTimeout->getValue() !=
|
||||
static_cast<float>(Settings::getInstance()->getInt("ScreensaverSwapImageTimeout") /
|
||||
|
@ -117,7 +118,7 @@ void GuiScreensaverOptions::openSlideshowScreensaverOptions()
|
|||
auto screensaverSlideshowOnlyFavorites = std::make_shared<SwitchComponent>();
|
||||
screensaverSlideshowOnlyFavorites->setState(
|
||||
Settings::getInstance()->getBool("ScreensaverSlideshowOnlyFavorites"));
|
||||
s->addWithLabel("ONLY INCLUDE FAVORITE GAMES", screensaverSlideshowOnlyFavorites);
|
||||
s->addWithLabel(_("ONLY INCLUDE FAVORITE GAMES"), screensaverSlideshowOnlyFavorites);
|
||||
s->addSaveFunc([screensaverSlideshowOnlyFavorites, s] {
|
||||
if (screensaverSlideshowOnlyFavorites->getState() !=
|
||||
Settings::getInstance()->getBool("ScreensaverSlideshowOnlyFavorites")) {
|
||||
|
@ -131,7 +132,7 @@ void GuiScreensaverOptions::openSlideshowScreensaverOptions()
|
|||
auto screensaverStretchImages = std::make_shared<SwitchComponent>();
|
||||
screensaverStretchImages->setState(
|
||||
Settings::getInstance()->getBool("ScreensaverStretchImages"));
|
||||
s->addWithLabel("STRETCH IMAGES TO SCREEN RESOLUTION", screensaverStretchImages);
|
||||
s->addWithLabel(_("STRETCH IMAGES TO SCREEN RESOLUTION"), screensaverStretchImages);
|
||||
s->addSaveFunc([screensaverStretchImages, s] {
|
||||
if (screensaverStretchImages->getState() !=
|
||||
Settings::getInstance()->getBool("ScreensaverStretchImages")) {
|
||||
|
@ -145,7 +146,7 @@ void GuiScreensaverOptions::openSlideshowScreensaverOptions()
|
|||
auto screensaverSlideshowGameInfo = std::make_shared<SwitchComponent>();
|
||||
screensaverSlideshowGameInfo->setState(
|
||||
Settings::getInstance()->getBool("ScreensaverSlideshowGameInfo"));
|
||||
s->addWithLabel("DISPLAY GAME INFO OVERLAY", screensaverSlideshowGameInfo);
|
||||
s->addWithLabel(_("DISPLAY GAME INFO OVERLAY"), screensaverSlideshowGameInfo);
|
||||
s->addSaveFunc([screensaverSlideshowGameInfo, s] {
|
||||
if (screensaverSlideshowGameInfo->getState() !=
|
||||
Settings::getInstance()->getBool("ScreensaverSlideshowGameInfo")) {
|
||||
|
@ -159,7 +160,7 @@ void GuiScreensaverOptions::openSlideshowScreensaverOptions()
|
|||
auto screensaverSlideshowScanlines = std::make_shared<SwitchComponent>();
|
||||
screensaverSlideshowScanlines->setState(
|
||||
Settings::getInstance()->getBool("ScreensaverSlideshowScanlines"));
|
||||
s->addWithLabel("RENDER SCANLINES", screensaverSlideshowScanlines);
|
||||
s->addWithLabel(_("RENDER SCANLINES"), screensaverSlideshowScanlines);
|
||||
s->addSaveFunc([screensaverSlideshowScanlines, s] {
|
||||
if (screensaverSlideshowScanlines->getState() !=
|
||||
Settings::getInstance()->getBool("ScreensaverSlideshowScanlines")) {
|
||||
|
@ -173,7 +174,7 @@ void GuiScreensaverOptions::openSlideshowScreensaverOptions()
|
|||
auto screensaverSlideshowCustomImages = std::make_shared<SwitchComponent>();
|
||||
screensaverSlideshowCustomImages->setState(
|
||||
Settings::getInstance()->getBool("ScreensaverSlideshowCustomImages"));
|
||||
s->addWithLabel("USE CUSTOM IMAGES", screensaverSlideshowCustomImages);
|
||||
s->addWithLabel(_("USE CUSTOM IMAGES"), screensaverSlideshowCustomImages);
|
||||
s->addSaveFunc([screensaverSlideshowCustomImages, s] {
|
||||
if (screensaverSlideshowCustomImages->getState() !=
|
||||
Settings::getInstance()->getBool("ScreensaverSlideshowCustomImages")) {
|
||||
|
@ -187,7 +188,7 @@ void GuiScreensaverOptions::openSlideshowScreensaverOptions()
|
|||
auto screensaverSlideshowRecurse = std::make_shared<SwitchComponent>();
|
||||
screensaverSlideshowRecurse->setState(
|
||||
Settings::getInstance()->getBool("ScreensaverSlideshowRecurse"));
|
||||
s->addWithLabel("CUSTOM IMAGE DIRECTORY RECURSIVE SEARCH", screensaverSlideshowRecurse);
|
||||
s->addWithLabel(_("CUSTOM IMAGE DIRECTORY RECURSIVE SEARCH"), screensaverSlideshowRecurse);
|
||||
s->addSaveFunc([screensaverSlideshowRecurse, s] {
|
||||
if (screensaverSlideshowRecurse->getState() !=
|
||||
Settings::getInstance()->getBool("ScreensaverSlideshowRecurse")) {
|
||||
|
@ -200,7 +201,7 @@ void GuiScreensaverOptions::openSlideshowScreensaverOptions()
|
|||
// Custom image directory.
|
||||
ComponentListRow rowCustomImageDir;
|
||||
auto ScreensaverSlideshowCustomDir = std::make_shared<TextComponent>(
|
||||
"CUSTOM IMAGE DIRECTORY", Font::get(FONT_SIZE_MEDIUM), mMenuColorPrimary);
|
||||
_("CUSTOM IMAGE DIRECTORY"), Font::get(FONT_SIZE_MEDIUM), mMenuColorPrimary);
|
||||
auto bracketCustomImageDir = std::make_shared<ImageComponent>();
|
||||
bracketCustomImageDir->setResize(
|
||||
glm::vec2 {0.0f, Font::get(FONT_SIZE_MEDIUM)->getLetterHeight()});
|
||||
|
@ -208,8 +209,8 @@ void GuiScreensaverOptions::openSlideshowScreensaverOptions()
|
|||
bracketCustomImageDir->setColorShift(mMenuColorPrimary);
|
||||
rowCustomImageDir.addElement(ScreensaverSlideshowCustomDir, true);
|
||||
rowCustomImageDir.addElement(bracketCustomImageDir, false);
|
||||
const std::string titleCustomImageDir {"CUSTOM IMAGE DIRECTORY"};
|
||||
const std::string defaultImageDirStaticText {"Default directory:"};
|
||||
const std::string titleCustomImageDir {_("CUSTOM IMAGE DIRECTORY")};
|
||||
const std::string defaultImageDirStaticText {_("Default directory:")};
|
||||
const std::string defaultImageDirText {Utils::FileSystem::getAppDataDirectory() +
|
||||
"/screensavers/custom_slideshow"};
|
||||
const std::string initValueMediaDir {
|
||||
|
@ -225,15 +226,15 @@ void GuiScreensaverOptions::openSlideshowScreensaverOptions()
|
|||
mWindow->pushGui(new GuiTextEditKeyboardPopup(
|
||||
getHelpStyle(), s->getMenu().getPosition().y, titleCustomImageDir,
|
||||
Settings::getInstance()->getString("ScreensaverSlideshowCustomDir"),
|
||||
updateValMediaDir, false, "SAVE", "SAVE CHANGES?", defaultImageDirStaticText,
|
||||
defaultImageDirText, "load default directory"));
|
||||
updateValMediaDir, false, _("SAVE"), _("SAVE CHANGES?"), defaultImageDirStaticText,
|
||||
defaultImageDirText, _("load default directory")));
|
||||
}
|
||||
else {
|
||||
mWindow->pushGui(new GuiTextEditPopup(
|
||||
getHelpStyle(), titleCustomImageDir,
|
||||
Settings::getInstance()->getString("ScreensaverSlideshowCustomDir"),
|
||||
updateValMediaDir, false, "SAVE", "SAVE CHANGES?", defaultImageDirStaticText,
|
||||
defaultImageDirText, "load default directory"));
|
||||
updateValMediaDir, false, _("SAVE"), _("SAVE CHANGES?"), defaultImageDirStaticText,
|
||||
defaultImageDirText, _("load default directory")));
|
||||
}
|
||||
});
|
||||
s->addRow(rowCustomImageDir);
|
||||
|
@ -244,13 +245,13 @@ void GuiScreensaverOptions::openSlideshowScreensaverOptions()
|
|||
|
||||
void GuiScreensaverOptions::openVideoScreensaverOptions()
|
||||
{
|
||||
auto s = new GuiSettings("VIDEO SCREENSAVER");
|
||||
auto s = new GuiSettings(_("VIDEO SCREENSAVER"));
|
||||
|
||||
// Timer for swapping videos (in seconds).
|
||||
auto screensaverSwapVideoTimeout = std::make_shared<SliderComponent>(0.0f, 120.0f, 2.0f, "s");
|
||||
screensaverSwapVideoTimeout->setValue(static_cast<float>(
|
||||
Settings::getInstance()->getInt("ScreensaverSwapVideoTimeout") / (1000)));
|
||||
s->addWithLabel("SWAP VIDEOS AFTER (SECONDS)", screensaverSwapVideoTimeout);
|
||||
s->addWithLabel(_("SWAP VIDEOS AFTER (SECONDS)"), screensaverSwapVideoTimeout);
|
||||
s->addSaveFunc([screensaverSwapVideoTimeout, s] {
|
||||
if (screensaverSwapVideoTimeout->getValue() !=
|
||||
static_cast<float>(Settings::getInstance()->getInt("ScreensaverSwapVideoTimeout") /
|
||||
|
@ -266,7 +267,7 @@ void GuiScreensaverOptions::openVideoScreensaverOptions()
|
|||
auto screensaverVideoOnlyFavorites = std::make_shared<SwitchComponent>();
|
||||
screensaverVideoOnlyFavorites->setState(
|
||||
Settings::getInstance()->getBool("ScreensaverVideoOnlyFavorites"));
|
||||
s->addWithLabel("ONLY INCLUDE FAVORITE GAMES", screensaverVideoOnlyFavorites);
|
||||
s->addWithLabel(_("ONLY INCLUDE FAVORITE GAMES"), screensaverVideoOnlyFavorites);
|
||||
s->addSaveFunc([screensaverVideoOnlyFavorites, s] {
|
||||
if (screensaverVideoOnlyFavorites->getState() !=
|
||||
Settings::getInstance()->getBool("ScreensaverVideoOnlyFavorites")) {
|
||||
|
@ -280,7 +281,7 @@ void GuiScreensaverOptions::openVideoScreensaverOptions()
|
|||
auto screensaverStretchVideos = std::make_shared<SwitchComponent>();
|
||||
screensaverStretchVideos->setState(
|
||||
Settings::getInstance()->getBool("ScreensaverStretchVideos"));
|
||||
s->addWithLabel("STRETCH VIDEOS TO SCREEN RESOLUTION", screensaverStretchVideos);
|
||||
s->addWithLabel(_("STRETCH VIDEOS TO SCREEN RESOLUTION"), screensaverStretchVideos);
|
||||
s->addSaveFunc([screensaverStretchVideos, s] {
|
||||
if (screensaverStretchVideos->getState() !=
|
||||
Settings::getInstance()->getBool("ScreensaverStretchVideos")) {
|
||||
|
@ -294,7 +295,7 @@ void GuiScreensaverOptions::openVideoScreensaverOptions()
|
|||
auto screensaverVideoGameInfo = std::make_shared<SwitchComponent>();
|
||||
screensaverVideoGameInfo->setState(
|
||||
Settings::getInstance()->getBool("ScreensaverVideoGameInfo"));
|
||||
s->addWithLabel("DISPLAY GAME INFO OVERLAY", screensaverVideoGameInfo);
|
||||
s->addWithLabel(_("DISPLAY GAME INFO OVERLAY"), screensaverVideoGameInfo);
|
||||
s->addSaveFunc([screensaverVideoGameInfo, s] {
|
||||
if (screensaverVideoGameInfo->getState() !=
|
||||
Settings::getInstance()->getBool("ScreensaverVideoGameInfo")) {
|
||||
|
@ -308,7 +309,7 @@ void GuiScreensaverOptions::openVideoScreensaverOptions()
|
|||
auto screensaverVideoScanlines = std::make_shared<SwitchComponent>();
|
||||
screensaverVideoScanlines->setState(
|
||||
Settings::getInstance()->getBool("ScreensaverVideoScanlines"));
|
||||
s->addWithLabel("RENDER SCANLINES", screensaverVideoScanlines);
|
||||
s->addWithLabel(_("RENDER SCANLINES"), screensaverVideoScanlines);
|
||||
s->addSaveFunc([screensaverVideoScanlines, s] {
|
||||
if (screensaverVideoScanlines->getState() !=
|
||||
Settings::getInstance()->getBool("ScreensaverVideoScanlines")) {
|
||||
|
@ -321,7 +322,7 @@ void GuiScreensaverOptions::openVideoScreensaverOptions()
|
|||
// Render blur using a shader.
|
||||
auto screensaverVideoBlur = std::make_shared<SwitchComponent>();
|
||||
screensaverVideoBlur->setState(Settings::getInstance()->getBool("ScreensaverVideoBlur"));
|
||||
s->addWithLabel("RENDER BLUR", screensaverVideoBlur);
|
||||
s->addWithLabel(_("RENDER BLUR"), screensaverVideoBlur);
|
||||
s->addSaveFunc([screensaverVideoBlur, s] {
|
||||
if (screensaverVideoBlur->getState() !=
|
||||
Settings::getInstance()->getBool("ScreensaverVideoBlur")) {
|
||||
|
|
|
@ -215,10 +215,10 @@ std::vector<HelpPrompt> SystemView::getHelpPrompts()
|
|||
prompts.push_back(HelpPrompt("a", _("select")));
|
||||
|
||||
if (Settings::getInstance()->getString("RandomEntryButton") == "gamessystems")
|
||||
prompts.push_back(HelpPrompt("thumbstickclick", "random"));
|
||||
prompts.push_back(HelpPrompt("thumbstickclick", _("random")));
|
||||
|
||||
if (Settings::getInstance()->getBool("ScreensaverControls"))
|
||||
prompts.push_back(HelpPrompt("x", "screensaver"));
|
||||
prompts.push_back(HelpPrompt("x", _("screensaver")));
|
||||
|
||||
return prompts;
|
||||
}
|
||||
|
|
|
@ -366,13 +366,16 @@ void ViewController::invalidAlternativeEmulatorDialog()
|
|||
{
|
||||
cancelViewTransitions();
|
||||
mWindow->pushGui(new GuiMsgBox(getHelpStyle(),
|
||||
"AT LEAST ONE OF YOUR SYSTEMS HAS AN\n"
|
||||
"INVALID ALTERNATIVE EMULATOR CONFIGURED\n"
|
||||
"WITH NO MATCHING ENTRY IN THE SYSTEMS\n"
|
||||
"CONFIGURATION FILE, PLEASE REVIEW YOUR\n"
|
||||
"SETUP USING THE 'ALTERNATIVE EMULATORS'\n"
|
||||
"INTERFACE IN THE 'OTHER SETTINGS' MENU",
|
||||
"OK", nullptr, "", nullptr, "", nullptr, nullptr, true, true));
|
||||
_("AT LEAST ONE OF YOUR SYSTEMS HAS AN "
|
||||
"INVALID ALTERNATIVE EMULATOR CONFIGURED "
|
||||
"WITH NO MATCHING ENTRY IN THE SYSTEMS "
|
||||
"CONFIGURATION FILE, PLEASE REVIEW YOUR "
|
||||
"SETUP USING THE 'ALTERNATIVE EMULATORS' "
|
||||
"INTERFACE IN THE 'OTHER SETTINGS' MENU"),
|
||||
_("OK"), nullptr, "", nullptr, "", nullptr, nullptr, true, true,
|
||||
(mRenderer->getIsVerticalOrientation() ?
|
||||
0.70f :
|
||||
0.45f * (1.778f / mRenderer->getScreenAspectRatio()))));
|
||||
}
|
||||
|
||||
void ViewController::updateAvailableDialog()
|
||||
|
@ -1533,7 +1536,7 @@ std::vector<HelpPrompt> ViewController::getHelpPrompts()
|
|||
prompts = mCurrentView->getHelpPrompts();
|
||||
if (!(UIModeController::getInstance()->isUIModeKid() &&
|
||||
!Settings::getInstance()->getBool("EnableMenuKidMode")))
|
||||
prompts.push_back(HelpPrompt("start", "menu"));
|
||||
prompts.push_back(HelpPrompt("start", _("menu")));
|
||||
return prompts;
|
||||
}
|
||||
|
||||
|
|
|
@ -114,8 +114,8 @@ GuiTextEditKeyboardPopup::GuiTextEditKeyboardPopup(
|
|||
addChild(&mBackground);
|
||||
addChild(&mGrid);
|
||||
|
||||
mTitle = std::make_shared<TextComponent>(
|
||||
Utils::String::toUpper(title), Font::get(FONT_SIZE_LARGE), mMenuColorTitle, ALIGN_CENTER);
|
||||
mTitle = std::make_shared<TextComponent>(title, Font::get(FONT_SIZE_LARGE), mMenuColorTitle,
|
||||
ALIGN_CENTER);
|
||||
|
||||
std::vector<std::vector<std::string>> kbLayout;
|
||||
|
||||
|
|
|
@ -45,8 +45,8 @@ GuiTextEditPopup::GuiTextEditPopup(const HelpStyle& helpstyle,
|
|||
addChild(&mBackground);
|
||||
addChild(&mGrid);
|
||||
|
||||
mTitle = std::make_shared<TextComponent>(
|
||||
Utils::String::toUpper(title), Font::get(FONT_SIZE_MEDIUM), mMenuColorTitle, ALIGN_CENTER);
|
||||
mTitle = std::make_shared<TextComponent>(title, Font::get(FONT_SIZE_MEDIUM), mMenuColorTitle,
|
||||
ALIGN_CENTER);
|
||||
|
||||
if (mComplexMode) {
|
||||
mInfoString = std::make_shared<TextComponent>(infoString, Font::get(FONT_SIZE_SMALL),
|
||||
|
@ -66,7 +66,7 @@ GuiTextEditPopup::GuiTextEditPopup(const HelpStyle& helpstyle,
|
|||
}));
|
||||
if (mComplexMode) {
|
||||
buttons.push_back(
|
||||
std::make_shared<ButtonComponent>("load", loadBtnHelpText, [this, defaultValue] {
|
||||
std::make_shared<ButtonComponent>(_("LOAD"), loadBtnHelpText, [this, defaultValue] {
|
||||
mText->setValue(defaultValue);
|
||||
mText->setCursor(0);
|
||||
mText->setCursor(defaultValue.size());
|
||||
|
|
Loading…
Reference in a new issue