Allow translations (static or dynamic)
This commit is contained in:
+7
-2
@@ -23,8 +23,13 @@
|
|||||||
#include "theme.h"
|
#include "theme.h"
|
||||||
#include "message_dialog.h"
|
#include "message_dialog.h"
|
||||||
|
|
||||||
extern const char STR_SDCARD[];
|
#if !defined(STR_SDCARD)
|
||||||
extern const char STR_NO_FILES_ON_SD[];
|
#define STR_SDCARD "SD"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !defined(STR_NO_FILES_ON_SD)
|
||||||
|
#define STR_NO_FILES_ON_SD "No files on SD Card!"
|
||||||
|
#endif
|
||||||
|
|
||||||
FileChoice::FileChoice(FormGroup * parent, const rect_t & rect, std::string folder, const char * extension, int maxlen, std::function<std::string()> getValue, std::function<void(std::string)> setValue):
|
FileChoice::FileChoice(FormGroup * parent, const rect_t & rect, std::string folder, const char * extension, int maxlen, std::function<std::string()> getValue, std::function<void(std::string)> setValue):
|
||||||
ChoiceBase(parent, rect, CHOICE_TYPE_FOLDER),
|
ChoiceBase(parent, rect, CHOICE_TYPE_FOLDER),
|
||||||
|
|||||||
+1
-3
@@ -23,7 +23,6 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
#include "ff.h"
|
#include "ff.h"
|
||||||
// #include "libopenui_defines.h"
|
|
||||||
|
|
||||||
constexpr uint8_t LEN_FILE_EXTENSION_MAX = 5; // longest used, including the dot, excluding null term.
|
constexpr uint8_t LEN_FILE_EXTENSION_MAX = 5; // longest used, including the dot, excluding null term.
|
||||||
|
|
||||||
@@ -32,8 +31,7 @@ bool isExtensionMatching(const char * extension, const char * pattern, char * ma
|
|||||||
FRESULT sdReadDir(DIR * dir, FILINFO * fno, bool & firstTime);
|
FRESULT sdReadDir(DIR * dir, FILINFO * fno, bool & firstTime);
|
||||||
|
|
||||||
// comparison, not case sensitive.
|
// comparison, not case sensitive.
|
||||||
inline bool compare_nocase(const std::string &first, const std::string &second)
|
inline bool compare_nocase(const std::string & first, const std::string & second)
|
||||||
{
|
{
|
||||||
return strcasecmp(first.c_str(), second.c_str()) < 0;
|
return strcasecmp(first.c_str(), second.c_str()) < 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user