mirror of
https://github.com/lvgl/lvgl.git
synced 2025-01-21 06:53:01 +08:00
lv_i18n: update void returns to char
This commit is contained in:
parent
eb33596d02
commit
a6821a6cb8
@ -97,7 +97,7 @@ int lv_i18n_set_local(const char * lang_code)
|
||||
* @param msg_id message ID
|
||||
* @return the translation of `msg_id` on the set local
|
||||
*/
|
||||
const void * lv_i18n_get_text(const char * msg_id)
|
||||
const char * lv_i18n_get_text(const char * msg_id)
|
||||
{
|
||||
if(local_lang == NULL) {
|
||||
LV_LOG_WARN("lv_i18n_get_text: No language selected");
|
||||
@ -154,7 +154,7 @@ const void * lv_i18n_get_text(const char * msg_id)
|
||||
* @param num an integer to select the correct plural form
|
||||
* @return the translation of `msg_id` on the set local
|
||||
*/
|
||||
const void * lv_i18n_get_text_plural(const char * msg_id, int32_t num)
|
||||
const char * lv_i18n_get_text_plural(const char * msg_id, int32_t num)
|
||||
{
|
||||
if(local_lang == NULL) {
|
||||
LV_LOG_WARN("lv_i18n_get_text_plural: No language selected");
|
||||
@ -228,7 +228,7 @@ const void * lv_i18n_get_text_plural(const char * msg_id, int32_t num)
|
||||
* Get the name of the currently used localization.
|
||||
* @return name of the currently used localization. E.g. "en_GB"
|
||||
*/
|
||||
const void * lv_i18n_get_current_local(void)
|
||||
const char * lv_i18n_get_current_local(void)
|
||||
{
|
||||
if(local_lang) return local_lang->name;
|
||||
else return NULL;
|
||||
|
@ -79,7 +79,7 @@ int lv_i18n_set_local(const char * lang_code);
|
||||
* @param msg_id message ID
|
||||
* @return the translation of `msg_id` on the set local
|
||||
*/
|
||||
const void * lv_i18n_get_text(const char * msg_id);
|
||||
const char * lv_i18n_get_text(const char * msg_id);
|
||||
|
||||
/**
|
||||
* Get the translation from a message ID and apply the language's plural rule to get correct form
|
||||
@ -87,13 +87,13 @@ const void * lv_i18n_get_text(const char * msg_id);
|
||||
* @param num an integer to select the correct plural form
|
||||
* @return the translation of `msg_id` on the set local
|
||||
*/
|
||||
const void * lv_i18n_get_text_plural(const char * msg_id, int32_t num);
|
||||
const char * lv_i18n_get_text_plural(const char * msg_id, int32_t num);
|
||||
|
||||
/**
|
||||
* Get the name of the currently used localization.
|
||||
* @return name of the currently used localization. E.g. "en_GB"
|
||||
*/
|
||||
const void * lv_i18n_get_current_local(void);
|
||||
const char * lv_i18n_get_current_local(void);
|
||||
|
||||
/**********************
|
||||
* MACROS
|
||||
|
Loading…
x
Reference in New Issue
Block a user