summaryrefslogtreecommitdiff
path: root/src/lib/elementary
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2017-09-25 15:33:31 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-09-26 17:58:07 +0900
commite9dfcb44ffe370f6507d563f45676609bd93a41a (patch)
tree2f16541b4afde5d4a623bcdbe54a75fa4345b240 /src/lib/elementary
parent839c4ed395f4aa20c3d8089bad828f2ebdc95a4b (diff)
widget: Implement translation API in layout
This moves the API entry points from Widget to Layout parts. I don't think the other widgets support translation, but that is easy to fix. The actual code implementation remains in elm_widget.c. Legacy-only widgets are covered by Part_Legacy, while all EO widgets that have text inherit from Layout (except Win but I don't think the window title was translatable in legacy). This removes 2/3 remaining part APIs from Widget. Ref T5363
Diffstat (limited to 'src/lib/elementary')
-rw-r--r--src/lib/elementary/efl_ui_clock.c1
-rw-r--r--src/lib/elementary/efl_ui_layout.c29
-rw-r--r--src/lib/elementary/efl_ui_layout_part_legacy.eo4
-rw-r--r--src/lib/elementary/efl_ui_layout_part_text.eo4
-rw-r--r--src/lib/elementary/efl_ui_win.c1
-rw-r--r--src/lib/elementary/elc_combobox.c1
-rw-r--r--src/lib/elementary/elc_ctxpopup.c2
-rw-r--r--src/lib/elementary/elc_hoversel.c3
-rw-r--r--src/lib/elementary/elc_multibuttonentry.c1
-rw-r--r--src/lib/elementary/elc_naviframe.c1
-rw-r--r--src/lib/elementary/elc_popup.c1
-rw-r--r--src/lib/elementary/elm_dayselector.c1
-rw-r--r--src/lib/elementary/elm_diskselector.c1
-rw-r--r--src/lib/elementary/elm_list.c1
-rw-r--r--src/lib/elementary/elm_main.c10
-rw-r--r--src/lib/elementary/elm_menu.c3
-rw-r--r--src/lib/elementary/elm_segment_control.c1
-rw-r--r--src/lib/elementary/elm_toolbar.c1
-rw-r--r--src/lib/elementary/elm_widget.c54
-rw-r--r--src/lib/elementary/elm_widget.eo17
-rw-r--r--src/lib/elementary/elm_widget.h5
21 files changed, 81 insertions, 61 deletions
diff --git a/src/lib/elementary/efl_ui_clock.c b/src/lib/elementary/efl_ui_clock.c
index 5de015f2e5..6ab8fd99e0 100644
--- a/src/lib/elementary/efl_ui_clock.c
+++ b/src/lib/elementary/efl_ui_clock.c
@@ -3,6 +3,7 @@
3#endif 3#endif
4 4
5#define ELM_INTERFACE_ATSPI_ACCESSIBLE_PROTECTED 5#define ELM_INTERFACE_ATSPI_ACCESSIBLE_PROTECTED
6#define EFL_UI_TRANSLATABLE_PROTECTED
6 7
7#include <Elementary.h> 8#include <Elementary.h>
8#include "elm_priv.h" 9#include "elm_priv.h"
diff --git a/src/lib/elementary/efl_ui_layout.c b/src/lib/elementary/efl_ui_layout.c
index d31c39db64..6ba041d75d 100644
--- a/src/lib/elementary/efl_ui_layout.c
+++ b/src/lib/elementary/efl_ui_layout.c
@@ -2565,6 +2565,20 @@ ELM_PART_OVERRIDE_CONTENT_UNSET_FULL(efl_ui_layout_part_content, efl_ui_layout,
2565ELM_PART_OVERRIDE_TEXT_GET_FULL(efl_ui_layout_part_text, efl_ui_layout, EFL_UI_LAYOUT, Efl_Ui_Layout_Data) 2565ELM_PART_OVERRIDE_TEXT_GET_FULL(efl_ui_layout_part_text, efl_ui_layout, EFL_UI_LAYOUT, Efl_Ui_Layout_Data)
2566ELM_PART_OVERRIDE_TEXT_SET_FULL(efl_ui_layout_part_text, efl_ui_layout, EFL_UI_LAYOUT, Efl_Ui_Layout_Data) 2566ELM_PART_OVERRIDE_TEXT_SET_FULL(efl_ui_layout_part_text, efl_ui_layout, EFL_UI_LAYOUT, Efl_Ui_Layout_Data)
2567 2567
2568EOLIAN static const char *
2569_efl_ui_layout_part_text_efl_ui_translatable_translatable_text_get(Eo *obj, void *_pd EINA_UNUSED, const char **domain)
2570{
2571 Elm_Part_Data *pd = efl_data_scope_get(obj, EFL_UI_WIDGET_PART_CLASS);
2572 return elm_widget_part_translatable_text_get(pd->obj, pd->part, domain);
2573}
2574
2575EOLIAN static void
2576_efl_ui_layout_part_text_efl_ui_translatable_translatable_text_set(Eo *obj, void *_pd EINA_UNUSED, const char *label, const char *domain)
2577{
2578 Elm_Part_Data *pd = efl_data_scope_get(obj, EFL_UI_WIDGET_PART_CLASS);
2579 elm_widget_part_translatable_text_set(pd->obj, pd->part, label, domain);
2580}
2581
2568/* Efl.Ui.Layout.Part_Legacy */ 2582/* Efl.Ui.Layout.Part_Legacy */
2569ELM_PART_OVERRIDE_CONTENT_GET_FULL(efl_ui_layout_part_legacy, efl_ui_layout, EFL_UI_LAYOUT, Efl_Ui_Layout_Data) 2583ELM_PART_OVERRIDE_CONTENT_GET_FULL(efl_ui_layout_part_legacy, efl_ui_layout, EFL_UI_LAYOUT, Efl_Ui_Layout_Data)
2570ELM_PART_OVERRIDE_CONTENT_SET_FULL(efl_ui_layout_part_legacy, efl_ui_layout, EFL_UI_LAYOUT, Efl_Ui_Layout_Data) 2584ELM_PART_OVERRIDE_CONTENT_SET_FULL(efl_ui_layout_part_legacy, efl_ui_layout, EFL_UI_LAYOUT, Efl_Ui_Layout_Data)
@@ -2572,6 +2586,21 @@ ELM_PART_OVERRIDE_CONTENT_UNSET_FULL(efl_ui_layout_part_legacy, efl_ui_layout, E
2572ELM_PART_OVERRIDE_TEXT_GET_FULL(efl_ui_layout_part_legacy, efl_ui_layout, EFL_UI_LAYOUT, Efl_Ui_Layout_Data) 2586ELM_PART_OVERRIDE_TEXT_GET_FULL(efl_ui_layout_part_legacy, efl_ui_layout, EFL_UI_LAYOUT, Efl_Ui_Layout_Data)
2573ELM_PART_OVERRIDE_TEXT_SET_FULL(efl_ui_layout_part_legacy, efl_ui_layout, EFL_UI_LAYOUT, Efl_Ui_Layout_Data) 2587ELM_PART_OVERRIDE_TEXT_SET_FULL(efl_ui_layout_part_legacy, efl_ui_layout, EFL_UI_LAYOUT, Efl_Ui_Layout_Data)
2574 2588
2589EOLIAN static const char *
2590_efl_ui_layout_part_legacy_efl_ui_translatable_translatable_text_get(Eo *obj, void *_pd EINA_UNUSED, const char **domain)
2591{
2592 Elm_Part_Data *pd = efl_data_scope_get(obj, EFL_UI_WIDGET_PART_CLASS);
2593 return elm_widget_part_translatable_text_get(pd->obj, pd->part, domain);
2594}
2595
2596EOLIAN static void
2597_efl_ui_layout_part_legacy_efl_ui_translatable_translatable_text_set(Eo *obj, void *_pd EINA_UNUSED, const char *label, const char *domain)
2598{
2599 Elm_Part_Data *pd = efl_data_scope_get(obj, EFL_UI_WIDGET_PART_CLASS);
2600 elm_widget_part_translatable_text_set(pd->obj, pd->part, label, domain);
2601}
2602
2603/* Efl.Ui.Layout.Part_Xxx includes */
2575#include "efl_ui_layout_part.eo.c" 2604#include "efl_ui_layout_part.eo.c"
2576#include "efl_ui_layout_part_content.eo.c" 2605#include "efl_ui_layout_part_content.eo.c"
2577#include "efl_ui_layout_part_text.eo.c" 2606#include "efl_ui_layout_part_text.eo.c"
diff --git a/src/lib/elementary/efl_ui_layout_part_legacy.eo b/src/lib/elementary/efl_ui_layout_part_legacy.eo
index 8904b90222..3d4d335521 100644
--- a/src/lib/elementary/efl_ui_layout_part_legacy.eo
+++ b/src/lib/elementary/efl_ui_layout_part_legacy.eo
@@ -1,4 +1,5 @@
1class Efl.Ui.Layout.Part_Legacy (Efl.Ui.Layout.Part, Efl.Container, Efl.Text) 1class Efl.Ui.Layout.Part_Legacy (Efl.Ui.Layout.Part, Efl.Container, Efl.Text,
2 Efl.Ui.Translatable)
2{ 3{
3 [[Elementary layout internal part class]] 4 [[Elementary layout internal part class]]
4 data: null; 5 data: null;
@@ -6,5 +7,6 @@ class Efl.Ui.Layout.Part_Legacy (Efl.Ui.Layout.Part, Efl.Container, Efl.Text)
6 Efl.Container.content { get; set; } 7 Efl.Container.content { get; set; }
7 Efl.Container.content_unset; 8 Efl.Container.content_unset;
8 Efl.Text.text { set; get; } 9 Efl.Text.text { set; get; }
10 Efl.Ui.Translatable.translatable_text { get; set; }
9 } 11 }
10} 12}
diff --git a/src/lib/elementary/efl_ui_layout_part_text.eo b/src/lib/elementary/efl_ui_layout_part_text.eo
index ce53d49f00..b117a5fbae 100644
--- a/src/lib/elementary/efl_ui_layout_part_text.eo
+++ b/src/lib/elementary/efl_ui_layout_part_text.eo
@@ -1,8 +1,10 @@
1class Efl.Ui.Layout.Part_Text (Efl.Ui.Layout.Part, Efl.Text) 1class Efl.Ui.Layout.Part_Text (Efl.Ui.Layout.Part, Efl.Text,
2 Efl.Ui.Translatable)
2{ 3{
3 [[Elementary layout internal part class]] 4 [[Elementary layout internal part class]]
4 data: null; 5 data: null;
5 implements { 6 implements {
6 Efl.Text.text { set; get; } 7 Efl.Text.text { set; get; }
8 Efl.Ui.Translatable.translatable_text { get; set; }
7 } 9 }
8} 10}
diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index 1a94b70c2e..06607a6ed6 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -9,6 +9,7 @@
9#define EFL_GFX_SIZE_HINT_PROTECTED 9#define EFL_GFX_SIZE_HINT_PROTECTED
10#define EFL_CANVAS_OBJECT_BETA 10#define EFL_CANVAS_OBJECT_BETA
11#define EFL_CANVAS_OBJECT_PROTECTED 11#define EFL_CANVAS_OBJECT_PROTECTED
12#define EFL_UI_TRANSLATABLE_PROTECTED
12#define EFL_UI_WIN_INLINED_PROTECTED 13#define EFL_UI_WIN_INLINED_PROTECTED
13#define EFL_UI_WIN_BETA 14#define EFL_UI_WIN_BETA
14 15
diff --git a/src/lib/elementary/elc_combobox.c b/src/lib/elementary/elc_combobox.c
index b172153e7c..e11feb208d 100644
--- a/src/lib/elementary/elc_combobox.c
+++ b/src/lib/elementary/elc_combobox.c
@@ -5,6 +5,7 @@
5#define ELM_INTERFACE_ATSPI_ACCESSIBLE_PROTECTED 5#define ELM_INTERFACE_ATSPI_ACCESSIBLE_PROTECTED
6#define ELM_INTERFACE_ATSPI_WIDGET_ACTION_PROTECTED 6#define ELM_INTERFACE_ATSPI_WIDGET_ACTION_PROTECTED
7#define ELM_WIDGET_PROTECTED 7#define ELM_WIDGET_PROTECTED
8#define EFL_UI_TRANSLATABLE_PROTECTED
8 9
9#include <Elementary.h> 10#include <Elementary.h>
10#include "elm_priv.h" 11#include "elm_priv.h"
diff --git a/src/lib/elementary/elc_ctxpopup.c b/src/lib/elementary/elc_ctxpopup.c
index d53cb203e8..166ef966c4 100644
--- a/src/lib/elementary/elc_ctxpopup.c
+++ b/src/lib/elementary/elc_ctxpopup.c
@@ -4,9 +4,9 @@
4 4
5#define ELM_INTERFACE_ATSPI_ACCESSIBLE_PROTECTED 5#define ELM_INTERFACE_ATSPI_ACCESSIBLE_PROTECTED
6#define ELM_INTERFACE_ATSPI_WIDGET_ACTION_PROTECTED 6#define ELM_INTERFACE_ATSPI_WIDGET_ACTION_PROTECTED
7
8#define ELM_WIDGET_PROTECTED 7#define ELM_WIDGET_PROTECTED
9#define ELM_WIDGET_ITEM_PROTECTED 8#define ELM_WIDGET_ITEM_PROTECTED
9#define EFL_UI_TRANSLATABLE_PROTECTED
10 10
11#include <Elementary.h> 11#include <Elementary.h>
12 12
diff --git a/src/lib/elementary/elc_hoversel.c b/src/lib/elementary/elc_hoversel.c
index d4973b103c..3f0f12611f 100644
--- a/src/lib/elementary/elc_hoversel.c
+++ b/src/lib/elementary/elc_hoversel.c
@@ -4,9 +4,10 @@
4 4
5#define ELM_INTERFACE_ATSPI_ACCESSIBLE_PROTECTED 5#define ELM_INTERFACE_ATSPI_ACCESSIBLE_PROTECTED
6#define ELM_INTERFACE_ATSPI_WIDGET_ACTION_PROTECTED 6#define ELM_INTERFACE_ATSPI_WIDGET_ACTION_PROTECTED
7
8#define ELM_WIDGET_PROTECTED 7#define ELM_WIDGET_PROTECTED
9#define ELM_WIDGET_ITEM_PROTECTED 8#define ELM_WIDGET_ITEM_PROTECTED
9#define EFL_UI_TRANSLATABLE_PROTECTED
10
10#include <Elementary.h> 11#include <Elementary.h>
11#include "elm_priv.h" 12#include "elm_priv.h"
12#include "elm_hoversel.eo.h" 13#include "elm_hoversel.eo.h"
diff --git a/src/lib/elementary/elc_multibuttonentry.c b/src/lib/elementary/elc_multibuttonentry.c
index 90538e4bcb..3740e09061 100644
--- a/src/lib/elementary/elc_multibuttonentry.c
+++ b/src/lib/elementary/elc_multibuttonentry.c
@@ -5,6 +5,7 @@
5#define ELM_INTERFACE_ATSPI_ACCESSIBLE_PROTECTED 5#define ELM_INTERFACE_ATSPI_ACCESSIBLE_PROTECTED
6#define ELM_WIDGET_ITEM_PROTECTED 6#define ELM_WIDGET_ITEM_PROTECTED
7#define ELM_INTERFACE_ATSPI_WIDGET_ACTION_PROTECTED 7#define ELM_INTERFACE_ATSPI_WIDGET_ACTION_PROTECTED
8#define EFL_UI_TRANSLATABLE_PROTECTED
8 9
9#include <Elementary.h> 10#include <Elementary.h>
10#include "elm_priv.h" 11#include "elm_priv.h"
diff --git a/src/lib/elementary/elc_naviframe.c b/src/lib/elementary/elc_naviframe.c
index 6975a701b4..c6a3e56c13 100644
--- a/src/lib/elementary/elc_naviframe.c
+++ b/src/lib/elementary/elc_naviframe.c
@@ -6,6 +6,7 @@
6#define ELM_INTERFACE_ATSPI_WIDGET_ACTION_PROTECTED 6#define ELM_INTERFACE_ATSPI_WIDGET_ACTION_PROTECTED
7#define ELM_WIDGET_ITEM_PROTECTED 7#define ELM_WIDGET_ITEM_PROTECTED
8#define ELM_WIDGET_PROTECTED 8#define ELM_WIDGET_PROTECTED
9#define EFL_UI_TRANSLATABLE_PROTECTED
9 10
10#include <Elementary.h> 11#include <Elementary.h>
11#include "elm_priv.h" 12#include "elm_priv.h"
diff --git a/src/lib/elementary/elc_popup.c b/src/lib/elementary/elc_popup.c
index 7f0e45ef82..63130ca7ad 100644
--- a/src/lib/elementary/elc_popup.c
+++ b/src/lib/elementary/elc_popup.c
@@ -6,6 +6,7 @@
6#define ELM_INTERFACE_ATSPI_WIDGET_ACTION_PROTECTED 6#define ELM_INTERFACE_ATSPI_WIDGET_ACTION_PROTECTED
7#define ELM_WIDGET_PROTECTED 7#define ELM_WIDGET_PROTECTED
8#define ELM_WIDGET_ITEM_PROTECTED 8#define ELM_WIDGET_ITEM_PROTECTED
9#define EFL_UI_TRANSLATABLE_PROTECTED
9 10
10#include <Elementary.h> 11#include <Elementary.h>
11#include "elm_priv.h" 12#include "elm_priv.h"
diff --git a/src/lib/elementary/elm_dayselector.c b/src/lib/elementary/elm_dayselector.c
index 7274b84985..88de718a65 100644
--- a/src/lib/elementary/elm_dayselector.c
+++ b/src/lib/elementary/elm_dayselector.c
@@ -3,6 +3,7 @@
3#endif 3#endif
4 4
5#define ELM_INTERFACE_ATSPI_ACCESSIBLE_PROTECTED 5#define ELM_INTERFACE_ATSPI_ACCESSIBLE_PROTECTED
6#define EFL_UI_TRANSLATABLE_PROTECTED
6 7
7#include <Elementary.h> 8#include <Elementary.h>
8#include "elm_priv.h" 9#include "elm_priv.h"
diff --git a/src/lib/elementary/elm_diskselector.c b/src/lib/elementary/elm_diskselector.c
index eea10e492b..cc72466fab 100644
--- a/src/lib/elementary/elm_diskselector.c
+++ b/src/lib/elementary/elm_diskselector.c
@@ -5,6 +5,7 @@
5#define ELM_INTERFACE_ATSPI_ACCESSIBLE_PROTECTED 5#define ELM_INTERFACE_ATSPI_ACCESSIBLE_PROTECTED
6#define ELM_INTERFACE_ATSPI_WIDGET_ACTION_PROTECTED 6#define ELM_INTERFACE_ATSPI_WIDGET_ACTION_PROTECTED
7#define ELM_WIDGET_ITEM_PROTECTED 7#define ELM_WIDGET_ITEM_PROTECTED
8#define EFL_UI_TRANSLATABLE_PROTECTED
8 9
9#include <Elementary.h> 10#include <Elementary.h>
10#include "elm_priv.h" 11#include "elm_priv.h"
diff --git a/src/lib/elementary/elm_list.c b/src/lib/elementary/elm_list.c
index e0f2f92f34..26d88065dc 100644
--- a/src/lib/elementary/elm_list.c
+++ b/src/lib/elementary/elm_list.c
@@ -6,6 +6,7 @@
6#define ELM_INTERFACE_ATSPI_WIDGET_ACTION_PROTECTED 6#define ELM_INTERFACE_ATSPI_WIDGET_ACTION_PROTECTED
7#define EFL_ACCESS_SELECTION_PROTECTED 7#define EFL_ACCESS_SELECTION_PROTECTED
8#define ELM_WIDGET_ITEM_PROTECTED 8#define ELM_WIDGET_ITEM_PROTECTED
9#define EFL_UI_TRANSLATABLE_PROTECTED
9 10
10#include <Elementary.h> 11#include <Elementary.h>
11 12
diff --git a/src/lib/elementary/elm_main.c b/src/lib/elementary/elm_main.c
index 4d65e56052..f433d57030 100644
--- a/src/lib/elementary/elm_main.c
+++ b/src/lib/elementary/elm_main.c
@@ -1484,14 +1484,20 @@ EAPI void
1484elm_object_domain_translatable_part_text_set(Evas_Object *obj, const char *part, const char *domain, const char *text) 1484elm_object_domain_translatable_part_text_set(Evas_Object *obj, const char *part, const char *domain, const char *text)
1485{ 1485{
1486 EINA_SAFETY_ON_NULL_RETURN(obj); 1486 EINA_SAFETY_ON_NULL_RETURN(obj);
1487 elm_widget_domain_translatable_part_text_set(obj, part, domain, text); 1487 if (!part)
1488 efl_ui_translatable_text_set(obj, text, domain);
1489 else
1490 efl_ui_translatable_text_set(efl_part(obj, part), text, domain);
1488} 1491}
1489 1492
1490EAPI const char * 1493EAPI const char *
1491elm_object_translatable_part_text_get(const Evas_Object *obj, const char *part) 1494elm_object_translatable_part_text_get(const Evas_Object *obj, const char *part)
1492{ 1495{
1493 EINA_SAFETY_ON_NULL_RETURN_VAL(obj, NULL); 1496 EINA_SAFETY_ON_NULL_RETURN_VAL(obj, NULL);
1494 return elm_widget_translatable_part_text_get(obj, part); 1497 if (!part)
1498 return efl_ui_translatable_text_get(obj, NULL);
1499 else
1500 return efl_ui_translatable_text_get(efl_part(obj, part), NULL);
1495} 1501}
1496 1502
1497EAPI void 1503EAPI void
diff --git a/src/lib/elementary/elm_menu.c b/src/lib/elementary/elm_menu.c
index 29d8caaa13..5348ea707f 100644
--- a/src/lib/elementary/elm_menu.c
+++ b/src/lib/elementary/elm_menu.c
@@ -5,8 +5,9 @@
5#define ELM_WIDGET_PROTECTED 5#define ELM_WIDGET_PROTECTED
6#define ELM_INTERFACE_ATSPI_ACCESSIBLE_PROTECTED 6#define ELM_INTERFACE_ATSPI_ACCESSIBLE_PROTECTED
7#define EFL_ACCESS_SELECTION_PROTECTED 7#define EFL_ACCESS_SELECTION_PROTECTED
8
9#define ELM_WIDGET_ITEM_PROTECTED 8#define ELM_WIDGET_ITEM_PROTECTED
9#define EFL_UI_TRANSLATABLE_PROTECTED
10
10#include <Elementary.h> 11#include <Elementary.h>
11 12
12#include "elm_priv.h" 13#include "elm_priv.h"
diff --git a/src/lib/elementary/elm_segment_control.c b/src/lib/elementary/elm_segment_control.c
index 8ea9689ee7..11a1753b8c 100644
--- a/src/lib/elementary/elm_segment_control.c
+++ b/src/lib/elementary/elm_segment_control.c
@@ -4,6 +4,7 @@
4 4
5#define ELM_INTERFACE_ATSPI_ACCESSIBLE_PROTECTED 5#define ELM_INTERFACE_ATSPI_ACCESSIBLE_PROTECTED
6#define ELM_WIDGET_ITEM_PROTECTED 6#define ELM_WIDGET_ITEM_PROTECTED
7#define EFL_UI_TRANSLATABLE_PROTECTED
7 8
8#include <Elementary.h> 9#include <Elementary.h>
9 10
diff --git a/src/lib/elementary/elm_toolbar.c b/src/lib/elementary/elm_toolbar.c
index 37955b7738..4e96ac6a07 100644
--- a/src/lib/elementary/elm_toolbar.c
+++ b/src/lib/elementary/elm_toolbar.c
@@ -6,6 +6,7 @@
6#define EFL_ACCESS_SELECTION_PROTECTED 6#define EFL_ACCESS_SELECTION_PROTECTED
7#define ELM_INTERFACE_ATSPI_WIDGET_ACTION_PROTECTED 7#define ELM_INTERFACE_ATSPI_WIDGET_ACTION_PROTECTED
8#define ELM_WIDGET_ITEM_PROTECTED 8#define ELM_WIDGET_ITEM_PROTECTED
9#define EFL_UI_TRANSLATABLE_PROTECTED
9 10
10#include <Elementary.h> 11#include <Elementary.h>
11 12
diff --git a/src/lib/elementary/elm_widget.c b/src/lib/elementary/elm_widget.c
index fca0787b42..3efab18acf 100644
--- a/src/lib/elementary/elm_widget.c
+++ b/src/lib/elementary/elm_widget.c
@@ -8,6 +8,7 @@
8#define ELM_WIDGET_ITEM_PROTECTED 8#define ELM_WIDGET_ITEM_PROTECTED
9#define EFL_CANVAS_OBJECT_BETA 9#define EFL_CANVAS_OBJECT_BETA
10#define EFL_INPUT_EVENT_PROTECTED 10#define EFL_INPUT_EVENT_PROTECTED
11#define EFL_UI_TRANSLATABLE_PROTECTED
11 12
12#include <Elementary.h> 13#include <Elementary.h>
13 14
@@ -3787,11 +3788,15 @@ _part_text_translatable_set(Eina_Inlist **translate_strings, const char *part, E
3787 return ts; 3788 return ts;
3788} 3789}
3789 3790
3790EOLIAN static void 3791/* internal */
3791_elm_widget_domain_translatable_part_text_set(Eo *obj, Elm_Widget_Smart_Data *sd, const char *part, const char *domain, const char *label) 3792void
3793elm_widget_part_translatable_text_set(Eo *obj, const char *part, const char *label, const char *domain)
3792{ 3794{
3793
3794 Elm_Translate_String_Data *ts; 3795 Elm_Translate_String_Data *ts;
3796 Elm_Widget_Smart_Data *sd;
3797
3798 sd = efl_data_scope_safe_get(obj, MY_CLASS);
3799 if (!sd) return;
3795 3800
3796 if (!label) 3801 if (!label)
3797 { 3802 {
@@ -3817,16 +3822,6 @@ _elm_widget_domain_translatable_part_text_set(Eo *obj, Elm_Widget_Smart_Data *sd
3817 sd->on_translate = EINA_FALSE; 3822 sd->on_translate = EINA_FALSE;
3818} 3823}
3819 3824
3820EOLIAN static const char*
3821_elm_widget_translatable_part_text_get(const Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *sd, const char *part)
3822{
3823 Elm_Translate_String_Data *ts;
3824
3825 ts = _translate_string_data_get(sd->translate_strings, part);
3826 if (ts) return ts->string;
3827 else return NULL;
3828}
3829
3830EOLIAN static void 3825EOLIAN static void
3831_elm_widget_domain_part_text_translatable_set(Eo *obj, Elm_Widget_Smart_Data *sd, const char *part, const char *domain, Eina_Bool translatable) 3826_elm_widget_domain_part_text_translatable_set(Eo *obj, Elm_Widget_Smart_Data *sd, const char *part, const char *domain, Eina_Bool translatable)
3832{ 3827{
@@ -3853,32 +3848,23 @@ _elm_widget_domain_part_text_translatable_set(Eo *obj, Elm_Widget_Smart_Data *sd
3853 sd->on_translate = EINA_FALSE; 3848 sd->on_translate = EINA_FALSE;
3854} 3849}
3855 3850
3856static const char* 3851/* internal */
3857_part_text_translate(Eina_Inlist *translate_strings, 3852const char *
3858 const char *part, 3853elm_widget_part_translatable_text_get(const Eo *obj, const char *part, const char **domain)
3859 const char *text)
3860{ 3854{
3855 Elm_Widget_Smart_Data *sd;
3861 Elm_Translate_String_Data *ts; 3856 Elm_Translate_String_Data *ts;
3862 ts = _translate_string_data_get(translate_strings, part);
3863 if (!ts) return text;
3864 3857
3865 if (!ts->string) ts->string = eina_stringshare_add(text); 3858 if (domain) *domain = NULL;
3866 else eina_stringshare_replace(&ts->string, text);
3867#ifdef HAVE_GETTEXT
3868 if (text && text[0])
3869 text = dgettext(ts->domain, text);
3870#endif
3871 return text;
3872}
3873 3859
3874EAPI const char* 3860 sd = efl_data_scope_safe_get(obj, MY_CLASS);
3875elm_widget_part_text_translate(Eo *obj, const char *part, const char *text) 3861 if (!sd) return NULL;
3876{ 3862
3877 Elm_Widget_Smart_Data *sd = efl_data_scope_safe_get(obj, MY_CLASS); 3863 ts = _translate_string_data_get(sd->translate_strings, part);
3864 if (!ts) return NULL;
3878 3865
3879 if (!sd) return text; 3866 if (domain) *domain = ts->domain;
3880 if (!sd->translate_strings || sd->on_translate) return text; 3867 return ts->string;
3881 return _part_text_translate(sd->translate_strings, part, text);
3882} 3868}
3883 3869
3884EOLIAN static void 3870EOLIAN static void
diff --git a/src/lib/elementary/elm_widget.eo b/src/lib/elementary/elm_widget.eo
index 123c8baecc..679b7beff0 100644
--- a/src/lib/elementary/elm_widget.eo
+++ b/src/lib/elementary/elm_widget.eo
@@ -296,23 +296,6 @@ abstract Elm.Widget (Efl.Canvas.Group, Elm.Interface.Atspi_Accessible,
296 translatable: bool; [[$true if translatable, $false otherwise]] 296 translatable: bool; [[$true if translatable, $false otherwise]]
297 } 297 }
298 } 298 }
299 translatable_part_text_get @const {
300 [[Get translatable part text]]
301 return: string; [[Part text]]
302 params {
303 @in part: string; [[Part name]]
304 }
305 }
306 @property domain_translatable_part_text {
307 [[Domain translatable text part property]]
308 set {
309 }
310 values {
311 part: string; [[Part name]]
312 domain: string; [[Domain name]]
313 label: string; [[Label]]
314 }
315 }
316 299
317 /* Internal hooks. */ 300 /* Internal hooks. */
318 widget_sub_object_add @protected { 301 widget_sub_object_add @protected {
diff --git a/src/lib/elementary/elm_widget.h b/src/lib/elementary/elm_widget.h
index a57630fd28..dd99b0273b 100644
--- a/src/lib/elementary/elm_widget.h
+++ b/src/lib/elementary/elm_widget.h
@@ -635,7 +635,6 @@ EAPI Eina_Bool elm_widget_api_check(int ver);
635EAPI Eina_Bool elm_widget_access(Evas_Object *obj, Eina_Bool is_access); 635EAPI Eina_Bool elm_widget_access(Evas_Object *obj, Eina_Bool is_access);
636EAPI Efl_Ui_Theme_Apply elm_widget_theme(Evas_Object *obj); 636EAPI Efl_Ui_Theme_Apply elm_widget_theme(Evas_Object *obj);
637EAPI void elm_widget_theme_specific(Evas_Object *obj, Elm_Theme *th, Eina_Bool force); 637EAPI void elm_widget_theme_specific(Evas_Object *obj, Elm_Theme *th, Eina_Bool force);
638EAPI void efl_ui_translatable_translation_update(Evas_Object *obj);
639EAPI 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); 638EAPI 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);
640EAPI Eina_Bool elm_widget_sub_object_parent_add(Evas_Object *sobj); 639EAPI Eina_Bool elm_widget_sub_object_parent_add(Evas_Object *sobj);
641EAPI Eina_Bool elm_widget_sub_object_add(Evas_Object *obj, Evas_Object *sobj); 640EAPI Eina_Bool elm_widget_sub_object_add(Evas_Object *obj, Evas_Object *sobj);
@@ -728,10 +727,8 @@ EAPI void elm_widget_focus_mouse_up_handle(Evas_Object *obj);
728EAPI void elm_widget_activate(Evas_Object *obj, Elm_Activate act); 727EAPI void elm_widget_activate(Evas_Object *obj, Elm_Activate act);
729EAPI void elm_widget_part_text_set(Evas_Object *obj, const char *part, const char *label); 728EAPI void elm_widget_part_text_set(Evas_Object *obj, const char *part, const char *label);
730EAPI const char *elm_widget_part_text_get(const Evas_Object *obj, const char *part); 729EAPI const char *elm_widget_part_text_get(const Evas_Object *obj, const char *part);
731EAPI void elm_widget_domain_translatable_part_text_set(Evas_Object *obj, const char *part, const char *domain, const char *text);
732EAPI const char *elm_widget_translatable_part_text_get(const Evas_Object *obj, const char *part); 730EAPI const char *elm_widget_translatable_part_text_get(const Evas_Object *obj, const char *part);
733EAPI void elm_widget_domain_part_text_translatable_set(Evas_Object *obj, const char *part, const char *domain, Eina_Bool translatable); 731EAPI void elm_widget_domain_part_text_translatable_set(Evas_Object *obj, const char *part, const char *domain, Eina_Bool translatable);
734EAPI const char * elm_widget_part_text_translate(Evas_Object *obj, const char *part, const char *text);
735EAPI void elm_widget_content_part_set(Evas_Object *obj, const char *part, Evas_Object *content); 732EAPI void elm_widget_content_part_set(Evas_Object *obj, const char *part, Evas_Object *content);
736EAPI Evas_Object *elm_widget_content_part_get(const Evas_Object *obj, const char *part); 733EAPI Evas_Object *elm_widget_content_part_get(const Evas_Object *obj, const char *part);
737EAPI Evas_Object *elm_widget_content_part_unset(Evas_Object *obj, const char *part); 734EAPI Evas_Object *elm_widget_content_part_unset(Evas_Object *obj, const char *part);
@@ -743,6 +740,8 @@ EAPI Eina_Rect elm_widget_focus_highlight_geometry_get(const Evas_Object
743void _elm_widget_item_highlight_in_theme(Evas_Object *obj, Elm_Object_Item *it); 740void _elm_widget_item_highlight_in_theme(Evas_Object *obj, Elm_Object_Item *it);
744EAPI void elm_widget_focus_region_show_mode_set(Evas_Object *obj, Elm_Focus_Region_Show_Mode mode); 741EAPI void elm_widget_focus_region_show_mode_set(Evas_Object *obj, Elm_Focus_Region_Show_Mode mode);
745EAPI Elm_Focus_Region_Show_Mode elm_widget_focus_region_show_mode_get(const Evas_Object *obj); 742EAPI Elm_Focus_Region_Show_Mode elm_widget_focus_region_show_mode_get(const Evas_Object *obj);
743const char *elm_widget_part_translatable_text_get(const Eo *obj, const char *part, const char **domain);
744void elm_widget_part_translatable_text_set(Eo *obj, const char *part, const char *label, const char *domain);
746 745
747/* debug function. don't use it unless you are tracking parenting issues */ 746/* debug function. don't use it unless you are tracking parenting issues */
748EAPI void elm_widget_tree_dump(const Evas_Object *top); 747EAPI void elm_widget_tree_dump(const Evas_Object *top);