mirror of
https://github.com/lvgl/lvgl.git
synced 2026-05-28 13:36:27 +08:00
feat(translation): const-correct arrays of strings (#9147)
This commit is contained in:
@@ -3,9 +3,10 @@
|
||||
|
||||
static void add_static(void)
|
||||
{
|
||||
static const char * languages[] = {"en", "de", "es", NULL};
|
||||
static const char * tags[] = {"tiger", "lion", "rabbit", "elephant", NULL};
|
||||
static const char * translations[] = {
|
||||
/* Arrays are defined `const` to place them in program space instead of RAM. */
|
||||
static const char * const languages[] = {"en", "de", "es", NULL};
|
||||
static const char * const tags[] = {"tiger", "lion", "rabbit", "elephant", NULL};
|
||||
static const char * const translations[] = {
|
||||
"The Tiger", "Der Tiger", "El Tigre",
|
||||
"The Lion", "Der Löwe", "El León",
|
||||
"The Rabbit", "Das Kaninchen", "El Conejo",
|
||||
|
||||
@@ -2,12 +2,13 @@
|
||||
|
||||
#if LV_USE_TRANSLATION && LV_USE_DROPDOWN && LV_USE_LABEL && LV_BUILD_EXAMPLES
|
||||
|
||||
static const char * tags[] = {"tiger", "lion", "rabbit", "elephant", NULL};
|
||||
static const char * languages[] = {"English", "Deutsch", "Español", NULL};
|
||||
/* Arrays are defined `const` to place them in program space instead of RAM. */
|
||||
static const char * const tags[] = {"tiger", "lion", "rabbit", "elephant", NULL};
|
||||
static const char * const languages[] = {"English", "Deutsch", "Español", NULL};
|
||||
|
||||
static void add_static_translations(void)
|
||||
{
|
||||
static const char * translations[] = {
|
||||
static const char * const translations[] = {
|
||||
"The Tiger", "Der Tiger", "El Tigre",
|
||||
"The Lion", "Der Löwe", "El León",
|
||||
"The Rabbit", "Das Kaninchen", "El Conejo",
|
||||
|
||||
@@ -2,12 +2,13 @@
|
||||
|
||||
#if LV_USE_TRANSLATION && LV_USE_DROPDOWN && LV_USE_LABEL && LV_BUILD_EXAMPLES
|
||||
|
||||
static const char * tags[] = {"tiger", "lion", "rabbit", "elephant", NULL};
|
||||
static const char * languages[] = {"English", "Deutsch", "Español", NULL};
|
||||
/* Arrays are defined `const` to place them in program space instead of RAM. */
|
||||
static const char * const tags[] = {"tiger", "lion", "rabbit", "elephant", NULL};
|
||||
static const char * const languages[] = {"English", "Deutsch", "Español", NULL};
|
||||
|
||||
static void add_static_translations(void)
|
||||
{
|
||||
static const char * translations[] = {
|
||||
static const char * const translations[] = {
|
||||
"The Tiger", "Der Tiger", "El Tigre",
|
||||
"The Lion", "Der Löwe", "El León",
|
||||
"The Rabbit", "Das Kaninchen", "El Conejo",
|
||||
|
||||
Reference in New Issue
Block a user