elm: Introduce interface Efl.Ui.Translatable
authorJean-Philippe Andre <jp.andre@samsung.com>
Fri, 22 Sep 2017 06:13:16 +0000 (15:13 +0900)
committerJean-Philippe Andre <jp.andre@samsung.com>
Tue, 26 Sep 2017 08:58:07 +0000 (17:58 +0900)
commit839c4ed395f4aa20c3d8089bad828f2ebdc95a4b
treee34298f4924fab9755e198b9f87ce2f5ca81f638
parent2b7f9b6dfd372af81fd691ac0a0a87b53f8cce34
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.
33 files changed:
src/Makefile_Elementary.am
src/lib/elementary/Elementary.h
src/lib/elementary/efl_ui_clock.c
src/lib/elementary/efl_ui_clock.eo
src/lib/elementary/efl_ui_translatable.eo [new file with mode: 0644]
src/lib/elementary/efl_ui_win.c
src/lib/elementary/elc_combobox.c
src/lib/elementary/elc_ctxpopup.c
src/lib/elementary/elc_hoversel.c
src/lib/elementary/elc_multibuttonentry.c
src/lib/elementary/elc_naviframe.c
src/lib/elementary/elc_popup.c
src/lib/elementary/elm_combobox.eo
src/lib/elementary/elm_ctxpopup.eo
src/lib/elementary/elm_dayselector.c
src/lib/elementary/elm_dayselector.eo
src/lib/elementary/elm_diskselector.c
src/lib/elementary/elm_diskselector.eo
src/lib/elementary/elm_hoversel.eo
src/lib/elementary/elm_list.c
src/lib/elementary/elm_list.eo
src/lib/elementary/elm_menu.c
src/lib/elementary/elm_menu.eo
src/lib/elementary/elm_multibuttonentry.eo
src/lib/elementary/elm_naviframe.eo
src/lib/elementary/elm_popup.eo
src/lib/elementary/elm_segment_control.c
src/lib/elementary/elm_segment_control.eo
src/lib/elementary/elm_toolbar.c
src/lib/elementary/elm_toolbar.eo
src/lib/elementary/elm_widget.c
src/lib/elementary/elm_widget.eo
src/lib/elementary/elm_widget.h