From dc8ddc53251da182dbcbfac6fbd352d57756b816 Mon Sep 17 00:00:00 2001 From: micha-bbg Date: Wed, 24 Oct 2012 23:20:41 +0200 Subject: [PATCH] * Software Update with apply the settings (Part4) - Use locale for message boxes --- data/locale/deutsch.locale | 3 +++ data/locale/english.locale | 3 +++ src/gui/ext_update.cpp | 6 +++--- src/system/locals.h | 3 +++ src/system/locals_intern.h | 3 +++ 5 files changed, 15 insertions(+), 3 deletions(-) diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index b3af1d8b4..9b0dba6b9 100644 --- a/data/locale/deutsch.locale +++ b/data/locale/deutsch.locale @@ -484,6 +484,9 @@ flashupdate.settings Update-Einstellungen flashupdate.squashfs.noversion Bei Updates werden Versionsüberprüfungen derzeit nur über Web-Updates unterstützt.\nWollen Sie das ausgewählte Image wirklich installieren? flashupdate.titlereadflash Flash auslesen flashupdate.titlewriteflash Flash schreiben +flashupdate.update_with_settings_processed Image wird bearbeitet... +flashupdate.update_with_settings_skipped Ordner [%s] kann nicht gesichert werden. Eintrag wird übersprungen. +flashupdate.update_with_settings_successfully Settingsübernahme erfolgreich.\nDas Image kann jetzt geflasht werden. flashupdate.updatemode Updatemodus flashupdate.updatemode_internet Internet flashupdate.updatemode_manual von lokalem Update-Verzeichnis diff --git a/data/locale/english.locale b/data/locale/english.locale index 61f7f7371..5642348c2 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -484,6 +484,9 @@ flashupdate.settings Update settings flashupdate.squashfs.noversion SquashFS version checks are currently only supported when updating over the web.\nAre you sure that you wish to install this image? flashupdate.titlereadflash Reading Flash flashupdate.titlewriteflash Writing Flash +flashupdate.update_with_settings_processed Image is being processed... +flashupdate.update_with_settings_skipped Folder [%s] can not be saved. Entry is skipped. +flashupdate.update_with_settings_successfully Setting takeover successfully.\nThe image can now be flashed. flashupdate.updatemode Updatemode flashupdate.updatemode_internet internet flashupdate.updatemode_manual from local update directory diff --git a/src/gui/ext_update.cpp b/src/gui/ext_update.cpp index 49260824e..8971fe642 100644 --- a/src/gui/ext_update.cpp +++ b/src/gui/ext_update.cpp @@ -141,7 +141,7 @@ bool CExtUpdate::writemtdExt(const std::string & filename) WRITE_UPDATE_LOG("ERROR: %s", err); return false; } - ShowMsgUTF(LOCALE_MESSAGEBOX_INFO, "Settingsübernahme erfolgreich.\nDas Image kann jetzt geflasht werden.", CMessageBox::mbrOk, CMessageBox::mbOk, NEUTRINO_ICON_INFO); + ShowMsgUTF(LOCALE_MESSAGEBOX_INFO, g_Locale->getText(LOCALE_FLASHUPDATE_UPDATE_WITH_SETTINGS_SUCCESSFULLY), CMessageBox::mbrOk, CMessageBox::mbOk, NEUTRINO_ICON_INFO); WRITE_UPDATE_LOG("\n"); WRITE_UPDATE_LOG("##### Settings taken. #####\n"); CFlashExpert::getInstance()->writemtd(filename, mtdNumber); @@ -152,7 +152,7 @@ bool CExtUpdate::writemtdExt(const std::string & filename) bool CExtUpdate::writemtdExt() { if(!hintBox) - hintBox = new CHintBox(LOCALE_MESSAGEBOX_INFO, "Image wird bearbeitet..."); + hintBox = new CHintBox(LOCALE_MESSAGEBOX_INFO, g_Locale->getText(LOCALE_FLASHUPDATE_UPDATE_WITH_SETTINGS_PROCESSED)); hintBox->paint(); mtdRamError = ""; std::string osrelease = ""; @@ -468,7 +468,7 @@ bool CExtUpdate::readBackupList(const std::string & dstPath) // special folders else if ((line == "/") || (line == "/*") || (line == "/*.*") || (line.find("/dev") == 0) || (line.find("/proc") == 0) || (line.find("/sys") == 0) || (line.find("/mnt") == 0) || (line.find("/tmp") == 0)) { - snprintf(buf, sizeof(buf), "Ordner [%s] kann nicht übertragen werden. Eintrag wird übersprungen.", line.c_str()); + snprintf(buf, sizeof(buf), g_Locale->getText(LOCALE_FLASHUPDATE_UPDATE_WITH_SETTINGS_SKIPPED), line.c_str()); WRITE_UPDATE_LOG("%s%s", buf, "\n"); ShowMsgUTF(LOCALE_MESSAGEBOX_INFO, buf, CMessageBox::mbrOk, CMessageBox::mbOk, NEUTRINO_ICON_INFO); continue; diff --git a/src/system/locals.h b/src/system/locals.h index 29b828e6e..0a6b67178 100644 --- a/src/system/locals.h +++ b/src/system/locals.h @@ -511,6 +511,9 @@ typedef enum LOCALE_FLASHUPDATE_SQUASHFS_NOVERSION, LOCALE_FLASHUPDATE_TITLEREADFLASH, LOCALE_FLASHUPDATE_TITLEWRITEFLASH, + LOCALE_FLASHUPDATE_UPDATE_WITH_SETTINGS_PROCESSED, + LOCALE_FLASHUPDATE_UPDATE_WITH_SETTINGS_SKIPPED, + LOCALE_FLASHUPDATE_UPDATE_WITH_SETTINGS_SUCCESSFULLY, LOCALE_FLASHUPDATE_UPDATEMODE, LOCALE_FLASHUPDATE_UPDATEMODE_INTERNET, LOCALE_FLASHUPDATE_UPDATEMODE_MANUAL, diff --git a/src/system/locals_intern.h b/src/system/locals_intern.h index 8cf65aa5a..fc38e3589 100644 --- a/src/system/locals_intern.h +++ b/src/system/locals_intern.h @@ -511,6 +511,9 @@ const char * locale_real_names[] = "flashupdate.squashfs.noversion", "flashupdate.titlereadflash", "flashupdate.titlewriteflash", + "flashupdate.update_with_settings_processed", + "flashupdate.update_with_settings_skipped", + "flashupdate.update_with_settings_successfully", "flashupdate.updatemode", "flashupdate.updatemode_internet", "flashupdate.updatemode_manual",