diff options
author | Jean-Philippe Andre <jp.andre@samsung.com> | 2017-09-22 15:13:16 +0900 |
---|---|---|
committer | Jean-Philippe Andre <jp.andre@samsung.com> | 2017-09-26 17:58:07 +0900 |
commit | 839c4ed395f4aa20c3d8089bad828f2ebdc95a4b (patch) | |
tree | e34298f4924fab9755e198b9f87ce2f5ca81f638 /src/lib/elementary/elm_widget.h | |
parent | 2b7f9b6dfd372af81fd691ac0a0a87b53f8cce34 (diff) |
elm: Introduce interface Efl.Ui.Translatable
This will be used to replace the part translation API in Elm.Widget. It
should work for both parts and non-parts (ie. the main text of a button,
for instance).
For now I'm taking the following approach:
- All efl_text_set/get strings are untranslatable, i.e. get() returns
the visible string, set replaces and can not be translated.
- translatable_text_set/get needs to be used to enable automatic
translation, which in turns calls efl_text_set to modify the visible
string. Thus, translatable applications will have to use
efl_ui_translatable_text_set a lot more than efl_text_set, unless
they translate strings application-side.
Note that some other frameworks take a simpler approach equivalent to
calling efl_text_set() with an already translated text. This prevents
runtime language changes of the application, unless the application
handles them specifically.
Diffstat (limited to 'src/lib/elementary/elm_widget.h')
-rw-r--r-- | src/lib/elementary/elm_widget.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/elementary/elm_widget.h b/src/lib/elementary/elm_widget.h index 799ec11305..a57630fd28 100644 --- a/src/lib/elementary/elm_widget.h +++ b/src/lib/elementary/elm_widget.h | |||
@@ -635,7 +635,7 @@ EAPI Eina_Bool elm_widget_api_check(int ver); | |||
635 | EAPI Eina_Bool elm_widget_access(Evas_Object *obj, Eina_Bool is_access); | 635 | EAPI Eina_Bool elm_widget_access(Evas_Object *obj, Eina_Bool is_access); |
636 | EAPI Efl_Ui_Theme_Apply elm_widget_theme(Evas_Object *obj); | 636 | EAPI Efl_Ui_Theme_Apply elm_widget_theme(Evas_Object *obj); |
637 | EAPI void elm_widget_theme_specific(Evas_Object *obj, Elm_Theme *th, Eina_Bool force); | 637 | EAPI void elm_widget_theme_specific(Evas_Object *obj, Elm_Theme *th, Eina_Bool force); |
638 | EAPI void elm_widget_translate(Evas_Object *obj); | 638 | EAPI void efl_ui_translatable_translation_update(Evas_Object *obj); |
639 | EAPI void elm_widget_on_show_region_hook_set(Evas_Object *obj, void *data, Efl_Ui_Scrollable_On_Show_Region func, Eina_Free_Cb data_free); | 639 | EAPI void elm_widget_on_show_region_hook_set(Evas_Object *obj, void *data, Efl_Ui_Scrollable_On_Show_Region func, Eina_Free_Cb data_free); |
640 | EAPI Eina_Bool elm_widget_sub_object_parent_add(Evas_Object *sobj); | 640 | EAPI Eina_Bool elm_widget_sub_object_parent_add(Evas_Object *sobj); |
641 | EAPI Eina_Bool elm_widget_sub_object_add(Evas_Object *obj, Evas_Object *sobj); | 641 | EAPI Eina_Bool elm_widget_sub_object_add(Evas_Object *obj, Evas_Object *sobj); |