[apps/i18n] Remove Language::Default

We never translate a i18n message to something else than the currrent
language selected
This commit is contained in:
Léa Saviot
2020-04-06 11:41:26 +02:00
committed by EmilieNumworks
parent c58456a058
commit 19b5653851
6 changed files with 10 additions and 17 deletions

View File

@@ -18,8 +18,7 @@ LanguageController::LanguageController(Responder * parentResponder, KDCoordinate
void LanguageController::resetSelection() {
m_selectableTableView.deselectTable();
int index = (int)GlobalPreferences::sharedGlobalPreferences()->language()-1;
selectCellAtLocation(0, index);
selectCellAtLocation(0, (int)(GlobalPreferences::sharedGlobalPreferences()->language()));
}
const char * LanguageController::title() {
@@ -41,7 +40,7 @@ void LanguageController::viewWillAppear() {
bool LanguageController::handleEvent(Ion::Events::Event event) {
if (event == Ion::Events::OK || event == Ion::Events::EXE) {
GlobalPreferences::sharedGlobalPreferences()->setLanguage((I18n::Language)(selectedRow()+1));
GlobalPreferences::sharedGlobalPreferences()->setLanguage((I18n::Language)selectedRow());
/* We need to reload the whole title bar in order to translate both the
* "Settings" title and the degree preference. */
AppsContainer::sharedAppsContainer()->reloadTitleBarView();