diff --git a/lv_core/lv_i18n.c b/lv_core/lv_i18n.c index 8d7cf1b66..1a75869de 100644 --- a/lv_core/lv_i18n.c +++ b/lv_core/lv_i18n.c @@ -23,7 +23,7 @@ /********************** * STATIC PROTOTYPES **********************/ -static const void * lv_i18n_get_text_core(lv_i18n_trans_t * trans, const char * msg_id); +static const void * lv_i18n_get_text_core(const lv_i18n_trans_t * trans, const char * msg_id); /********************** * STATIC VARIABLES @@ -238,7 +238,7 @@ const void * lv_i18n_get_current_local(void) * STATIC FUNCTIONS **********************/ -static const void * lv_i18n_get_text_core(lv_i18n_trans_t * trans, const char * msg_id) +static const void * lv_i18n_get_text_core(const lv_i18n_trans_t * trans, const char * msg_id) { uint16_t i; for(i = 0; trans[i].msg_id != NULL; i++) { diff --git a/lv_core/lv_i18n.h b/lv_core/lv_i18n.h index 043a49349..894213bc0 100644 --- a/lv_core/lv_i18n.h +++ b/lv_core/lv_i18n.h @@ -49,12 +49,12 @@ typedef struct { typedef struct { const char * name; /*E.g. "en_GB"*/ - lv_i18n_trans_t * simple; /*Translations of simple texts where no plurals are used*/ - lv_i18n_trans_t * plurals[_LV_I18N_PLURAL_TYPE_NUM]; /*Translations of the plural forms*/ + const lv_i18n_trans_t * simple; /*Translations of simple texts where no plurals are used*/ + const lv_i18n_trans_t * plurals[_LV_I18N_PLURAL_TYPE_NUM]; /*Translations of the plural forms*/ uint8_t (*plural_rule)(int32_t num); /*Function pointer to get the correct plural form for a number*/ }lv_i18n_lang_t; -typedef lv_i18n_lang_t * lv_i18n_lang_pack_t; +typedef const lv_i18n_lang_t * lv_i18n_lang_pack_t; /********************** * GLOBAL PROTOTYPES