mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-09-01 09:51:22 +02:00
gui/dboxinfo: localize (partially based on patch from Benny -- thanks!)
Conflicts: src/gui/dboxinfo.cpp
This commit is contained in:
@@ -398,6 +398,12 @@ std::string strftime(const char *format, const struct tm *tm)
|
||||
return std::string(buf);
|
||||
}
|
||||
|
||||
std::string strftime(const char *format, time_t when, bool gm)
|
||||
{
|
||||
struct tm *t = gm ? gmtime(&when) : localtime(&when);
|
||||
return strftime(format, t);
|
||||
}
|
||||
|
||||
time_t toEpoch(std::string &date)
|
||||
{
|
||||
struct tm t;
|
||||
|
@@ -61,6 +61,7 @@ std::string getFileExt(std::string &file);
|
||||
std::string getNowTimeStr(const char* format);
|
||||
std::string trim(std::string &str, const std::string &trimChars = " \n\r\t");
|
||||
std::string strftime(const char *format, const struct tm *tm);
|
||||
std::string strftime(const char *format, time_t when, bool gm = false);
|
||||
time_t toEpoch(std::string &date);
|
||||
std::string& str_replace(const std::string &search, const std::string &replace, std::string &text);
|
||||
std::string& htmlEntityDecode(std::string& text);
|
||||
|
@@ -393,6 +393,20 @@ typedef enum
|
||||
LOCALE_EXTRA_CHADDED,
|
||||
LOCALE_EXTRA_CHALREADYINBQ,
|
||||
LOCALE_EXTRA_DBOXINFO,
|
||||
LOCALE_EXTRA_DBOXINFO_AVAILABLE,
|
||||
LOCALE_EXTRA_DBOXINFO_BOOTTIME,
|
||||
LOCALE_EXTRA_DBOXINFO_FILESYSTEM,
|
||||
LOCALE_EXTRA_DBOXINFO_FRONTEND,
|
||||
LOCALE_EXTRA_DBOXINFO_LOAD,
|
||||
LOCALE_EXTRA_DBOXINFO_MEMORY,
|
||||
LOCALE_EXTRA_DBOXINFO_RAM,
|
||||
LOCALE_EXTRA_DBOXINFO_SIZE,
|
||||
LOCALE_EXTRA_DBOXINFO_SWAP,
|
||||
LOCALE_EXTRA_DBOXINFO_TIME,
|
||||
LOCALE_EXTRA_DBOXINFO_TIMEFORMAT,
|
||||
LOCALE_EXTRA_DBOXINFO_UPTIME,
|
||||
LOCALE_EXTRA_DBOXINFO_USE,
|
||||
LOCALE_EXTRA_DBOXINFO_USED,
|
||||
LOCALE_EXTRA_EAST,
|
||||
LOCALE_EXTRA_FEC_1_2,
|
||||
LOCALE_EXTRA_FEC_2_3,
|
||||
|
@@ -393,6 +393,20 @@ const char * locale_real_names[] =
|
||||
"extra.chadded",
|
||||
"extra.chalreadyinbq",
|
||||
"extra.dboxinfo",
|
||||
"extra.dboxinfo_available",
|
||||
"extra.dboxinfo_boottime",
|
||||
"extra.dboxinfo_filesystem",
|
||||
"extra.dboxinfo_frontend",
|
||||
"extra.dboxinfo_load",
|
||||
"extra.dboxinfo_memory",
|
||||
"extra.dboxinfo_ram",
|
||||
"extra.dboxinfo_size",
|
||||
"extra.dboxinfo_swap",
|
||||
"extra.dboxinfo_time",
|
||||
"extra.dboxinfo_timeformat",
|
||||
"extra.dboxinfo_uptime",
|
||||
"extra.dboxinfo_use",
|
||||
"extra.dboxinfo_used",
|
||||
"extra.east",
|
||||
"extra.fec_1_2",
|
||||
"extra.fec_2_3",
|
||||
|
Reference in New Issue
Block a user