1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-28 07:03:00 +08:00

lv_i18n: update void returns to char

This commit is contained in:
Gabor Kiss-Vamosi 2019-02-25 15:21:41 +01:00
parent eb33596d02
commit a6821a6cb8
2 changed files with 6 additions and 6 deletions

View File

@ -97,7 +97,7 @@ int lv_i18n_set_local(const char * lang_code)
* @param msg_id message ID * @param msg_id message ID
* @return the translation of `msg_id` on the set local * @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) { if(local_lang == NULL) {
LV_LOG_WARN("lv_i18n_get_text: No language selected"); 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 * @param num an integer to select the correct plural form
* @return the translation of `msg_id` on the set local * @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) { if(local_lang == NULL) {
LV_LOG_WARN("lv_i18n_get_text_plural: No language selected"); 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. * Get the name of the currently used localization.
* @return name of the currently used localization. E.g. "en_GB" * @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; if(local_lang) return local_lang->name;
else return NULL; else return NULL;

View File

@ -79,7 +79,7 @@ int lv_i18n_set_local(const char * lang_code);
* @param msg_id message ID * @param msg_id message ID
* @return the translation of `msg_id` on the set local * @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 * 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 * @param num an integer to select the correct plural form
* @return the translation of `msg_id` on the set local * @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. * Get the name of the currently used localization.
* @return name of the currently used localization. E.g. "en_GB" * @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 * MACROS