mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-29 16:31:05 +02:00
flashtool: add posibilty to get localized and non-localized type
Origin commit data
------------------
Commit: 40b84d1077
Author: vanhofen <vanhofen@gmx.de>
Date: 2018-01-06 (Sat, 06 Jan 2018)
Origin message was:
------------------
- flashtool: add posibilty to get localized and non-localized type
This commit is contained in:
@@ -764,8 +764,8 @@ flashupdate.titlereadflash Flash auslesen
|
||||
flashupdate.titlewriteflash Flash schreiben
|
||||
flashupdate.type_addon Erweiterung
|
||||
flashupdate.type_beta Beta
|
||||
flashupdate.type_internal Intern
|
||||
flashupdate.type_locale Sprachdatei
|
||||
flashupdate.type_nightly Nightly
|
||||
flashupdate.type_release Release
|
||||
flashupdate.type_settings Einstellungen
|
||||
flashupdate.type_text Text
|
||||
|
@@ -764,8 +764,8 @@ flashupdate.titlereadflash Reading Flash
|
||||
flashupdate.titlewriteflash Writing Flash
|
||||
flashupdate.type_addon Addon
|
||||
flashupdate.type_beta Beta
|
||||
flashupdate.type_internal Internal
|
||||
flashupdate.type_locale Locale
|
||||
flashupdate.type_nightly Nightly
|
||||
flashupdate.type_release Release
|
||||
flashupdate.type_settings Settings
|
||||
flashupdate.type_text Text
|
||||
|
@@ -237,7 +237,7 @@ bool CFlashUpdate::selectHttpImage(void)
|
||||
g_Locale->getText(LOCALE_FLASHUPDATE_CURRENTVERSIONTIME), curInfo.getTime());
|
||||
#endif
|
||||
//NI
|
||||
snprintf(current, 200, "%s %s %s %s", curInfo.getReleaseCycle(), curInfo.getType(), curInfo.getDate(), curInfo.getTime());
|
||||
snprintf(current, 200, "%s %s %s %s", curInfo.getReleaseCycle(), curInfo.getType(true), curInfo.getDate(), curInfo.getTime());
|
||||
|
||||
CMenuWidget SelectionWidget(LOCALE_FLASHUPDATE_SELECTIMAGE, NEUTRINO_ICON_UPDATE, listWidth, MN_WIDGET_ID_IMAGESELECTOR);
|
||||
|
||||
@@ -298,7 +298,7 @@ bool CFlashUpdate::selectHttpImage(void)
|
||||
fileTypes[i] = versionInfo.snapshot;
|
||||
std::string description = versionInfo.getReleaseCycle();
|
||||
description += ' ';
|
||||
description += versionInfo.getType();
|
||||
description += versionInfo.getType(true);
|
||||
description += ' ';
|
||||
description += versionInfo.getDate();
|
||||
description += ' ';
|
||||
@@ -410,7 +410,7 @@ bool CFlashUpdate::checkVersion4Update()
|
||||
msg_body = LOCALE_FLASHUPDATE_MSGBOX;
|
||||
#ifdef SQUASHFS
|
||||
versionInfo = new CFlashVersionInfo(newVersion);//Memory leak: versionInfo
|
||||
sprintf(msg, g_Locale->getText(msg_body), versionInfo->getDate(), versionInfo->getTime(), versionInfo->getReleaseCycle(), versionInfo->getType());
|
||||
sprintf(msg, g_Locale->getText(msg_body), versionInfo->getDate(), versionInfo->getTime(), versionInfo->getReleaseCycle(), versionInfo->getType(true));
|
||||
|
||||
if (fileType <= '2')
|
||||
{
|
||||
|
@@ -547,28 +547,28 @@ const char *CFlashVersionInfo::getReleaseCycle(void) const
|
||||
return releaseCycle;
|
||||
}
|
||||
|
||||
const char *CFlashVersionInfo::getType(void) const
|
||||
const char *CFlashVersionInfo::getType(bool localized) const
|
||||
{
|
||||
switch (snapshot)
|
||||
{
|
||||
case '0':
|
||||
return g_Locale->getText(LOCALE_FLASHUPDATE_TYPE_RELEASE);
|
||||
return (localized ? g_Locale->getText(LOCALE_FLASHUPDATE_TYPE_RELEASE) : "Release");
|
||||
case '1':
|
||||
return g_Locale->getText(LOCALE_FLASHUPDATE_TYPE_BETA);
|
||||
return (localized ? g_Locale->getText(LOCALE_FLASHUPDATE_TYPE_BETA) : "Beta");
|
||||
case '2':
|
||||
return g_Locale->getText(LOCALE_FLASHUPDATE_TYPE_INTERNAL);
|
||||
return (localized ? g_Locale->getText(LOCALE_FLASHUPDATE_TYPE_NIGHTLY) : "Nightly");
|
||||
case 'L':
|
||||
return g_Locale->getText(LOCALE_FLASHUPDATE_TYPE_LOCALE);
|
||||
return (localized ? g_Locale->getText(LOCALE_FLASHUPDATE_TYPE_LOCALE) : "Locale");
|
||||
case 'S':
|
||||
return g_Locale->getText(LOCALE_FLASHUPDATE_TYPE_SETTINGS);
|
||||
return (localized ? g_Locale->getText(LOCALE_FLASHUPDATE_TYPE_SETTINGS) : "Settings");
|
||||
case 'A':
|
||||
return g_Locale->getText(LOCALE_FLASHUPDATE_TYPE_ADDON);
|
||||
return (localized ? g_Locale->getText(LOCALE_FLASHUPDATE_TYPE_ADDON) : "Addon");
|
||||
case 'U':
|
||||
return g_Locale->getText(LOCALE_FLASHUPDATE_TYPE_UPDATE);
|
||||
return (localized ? g_Locale->getText(LOCALE_FLASHUPDATE_TYPE_UPDATE) : "Update");
|
||||
case 'T':
|
||||
return g_Locale->getText(LOCALE_FLASHUPDATE_TYPE_TEXT);
|
||||
return (localized ? g_Locale->getText(LOCALE_FLASHUPDATE_TYPE_TEXT) : "Text");
|
||||
default:
|
||||
return g_Locale->getText(LOCALE_FLASHUPDATE_TYPE_UNKNOWN);
|
||||
return (localized ? g_Locale->getText(LOCALE_FLASHUPDATE_TYPE_UNKNOWN) : "Unknown");
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -92,7 +92,7 @@ class CFlashVersionInfo
|
||||
const char *getDate(void) const;
|
||||
const char *getTime(void) const;
|
||||
const char *getReleaseCycle(void) const;
|
||||
const char *getType(void) const;
|
||||
const char *getType(bool localized = false) const;
|
||||
int getVersion(void) const;
|
||||
time_t getDateTime(void) const { return datetime; };
|
||||
};
|
||||
|
@@ -790,8 +790,8 @@ typedef enum
|
||||
LOCALE_FLASHUPDATE_TITLEWRITEFLASH,
|
||||
LOCALE_FLASHUPDATE_TYPE_ADDON,
|
||||
LOCALE_FLASHUPDATE_TYPE_BETA,
|
||||
LOCALE_FLASHUPDATE_TYPE_INTERNAL,
|
||||
LOCALE_FLASHUPDATE_TYPE_LOCALE,
|
||||
LOCALE_FLASHUPDATE_TYPE_NIGHTLY,
|
||||
LOCALE_FLASHUPDATE_TYPE_RELEASE,
|
||||
LOCALE_FLASHUPDATE_TYPE_SETTINGS,
|
||||
LOCALE_FLASHUPDATE_TYPE_TEXT,
|
||||
|
@@ -790,8 +790,8 @@ const char * locale_real_names[] =
|
||||
"flashupdate.titlewriteflash",
|
||||
"flashupdate.type_addon",
|
||||
"flashupdate.type_beta",
|
||||
"flashupdate.type_internal",
|
||||
"flashupdate.type_locale",
|
||||
"flashupdate.type_nightly",
|
||||
"flashupdate.type_release",
|
||||
"flashupdate.type_settings",
|
||||
"flashupdate.type_text",
|
||||
|
Reference in New Issue
Block a user