mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-22 14:15:38 +00:00
Added translations for the name and fullname systemdata properties for the text element
This commit is contained in:
parent
6672aee6c5
commit
9a18a5c816
|
@ -797,28 +797,59 @@ void SystemView::populate()
|
|||
if (mGrid != nullptr)
|
||||
mGrid->calculateLayout();
|
||||
|
||||
#if defined(GETTEXT_DUMMY_ENTRIES)
|
||||
_p("theme", "all");
|
||||
_p("theme", "all games");
|
||||
_p("theme", "recent");
|
||||
_p("theme", "last played");
|
||||
_p("theme", "favorites");
|
||||
_p("theme", "collections");
|
||||
#endif
|
||||
|
||||
for (auto& elements : mSystemElements) {
|
||||
for (auto& text : elements.textComponents) {
|
||||
if (text->getThemeSystemdata() != "") {
|
||||
if (text->getThemeSystemdata() == "name")
|
||||
text->setValue(elements.name);
|
||||
else if (text->getThemeSystemdata() == "fullname")
|
||||
text->setValue(elements.fullName);
|
||||
const bool translate {elements.system->isCollection() &&
|
||||
!elements.system->isCustomCollection()};
|
||||
if (text->getThemeSystemdata() == "name") {
|
||||
if (translate)
|
||||
text->setValue(_p("theme", elements.name.c_str()));
|
||||
else
|
||||
text->setValue(elements.name);
|
||||
}
|
||||
else if (text->getThemeSystemdata() == "fullname") {
|
||||
if (translate)
|
||||
text->setValue(_p("theme", elements.fullName.c_str()));
|
||||
else
|
||||
text->setValue(elements.fullName);
|
||||
}
|
||||
else {
|
||||
text->setValue(text->getThemeSystemdata());
|
||||
}
|
||||
}
|
||||
}
|
||||
for (auto& containerText : elements.containerTextComponents) {
|
||||
if (containerText->getThemeSystemdata() != "") {
|
||||
if (containerText->getThemeSystemdata() == "name")
|
||||
containerText->setValue(elements.name);
|
||||
else if (containerText->getThemeSystemdata() == "fullname")
|
||||
containerText->setValue(elements.fullName);
|
||||
const bool translate {elements.system->isCollection() &&
|
||||
!elements.system->isCustomCollection()};
|
||||
if (containerText->getThemeSystemdata() == "name") {
|
||||
if (translate)
|
||||
containerText->setValue(_p("theme", elements.name.c_str()));
|
||||
else
|
||||
containerText->setValue(elements.name);
|
||||
}
|
||||
else if (containerText->getThemeSystemdata() == "fullname") {
|
||||
if (translate)
|
||||
containerText->setValue(_p("theme", elements.fullName.c_str()));
|
||||
else
|
||||
containerText->setValue(elements.fullName);
|
||||
}
|
||||
else {
|
||||
containerText->setValue(containerText->getThemeSystemdata());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mFadeTransitions = (static_cast<ViewTransitionAnimation>(Settings::getInstance()->getInt(
|
||||
"TransitionsSystemToSystem")) == ViewTransitionAnimation::FADE);
|
||||
|
|
Loading…
Reference in a new issue