CFlashUpdate: use locales for install and error messages

This commit is contained in:
2014-12-28 20:42:16 +01:00
parent 936735a77f
commit 362018ed76

View File

@@ -445,12 +445,15 @@ printf("[update] mode is %d\n", softupdate_mode);
if (file_selected->getType() == CFile::FILE_PKG_PACKAGE){
COPKGManager opkg;
if (opkg.hasOpkgSupport()){
int msgres = ShowMsg(LOCALE_MESSAGEBOX_INFO, "Start installation?", CMessageBox::mbrYes, CMessageBox::mbYes | CMessageBox::mbNo, NEUTRINO_ICON_UPDATE, 700); // UTF-8
int msgres = ShowMsg(LOCALE_MESSAGEBOX_INFO, LOCALE_OPKG_WARNING_3RDPARTY_PACKAGES, CMessageBox::mbrNo, CMessageBox::mbYes | CMessageBox::mbNo, NEUTRINO_ICON_UPDATE, 700); // UTF-8
if (msgres == CMessageBox::mbrYes){
if (!opkg.installPackage(UpdatesBrowser.getSelectedFile()->Name))
DisplayErrorMessage("Installation failed!");
DisplayErrorMessage(g_Locale->getText(LOCALE_OPKG_FAILURE_INSTALL));
}
}
else
DisplayInfoMessage(g_Locale->getText(LOCALE_MESSAGEBOX_FEATURE_NOT_SUPPORTED));
//!always leave here!
return false;
}
//set internal filetype