else item->access_info = eina_stringshare_add(txt);
}
+EAPI void
+_elm_widget_item_translate(Elm_Widget_Item *item)
+{
+ ELM_WIDGET_ITEM_CHECK_OR_RETURN(item);
+
+#ifdef HAVE_GETTEXT
+ Elm_Translate_String_Data *ts;
+ const Eina_List *l;
+
+ EINA_LIST_FOREACH(item->translate_strings, l, ts)
+ {
+ const char *s = dgettext(ts->domain, ts->string);
+ _elm_widget_item_part_text_set(it, ts->id, s);
+ }
+#endif
+}
+
/* happy debug functions */
#ifdef ELM_DEBUG
static void
EAPI void _elm_widget_item_del_pre_hook_set(Elm_Widget_Item *item, Elm_Widget_Del_Pre_Cb func);
EAPI void _elm_widget_item_domain_translatable_part_text_set(Elm_Widget_Item *item, const char *part, const char *domain, const char *label);
EAPI const char * _elm_widget_item_translatable_part_text_get(const Elm_Widget_Item *item, const char *part);
+EAPI void _elm_widget_item_translate(Elm_Widget_Item *item);
/**
* Function to operate on a given widget's scrollabe children when necessary.
#define elm_widget_item_del_pre_hook_set(item, func) \
_elm_widget_item_del_pre_hook_set((Elm_Widget_Item *)item, (Elm_Widget_Del_Pre_Cb)func)
+/**
+ * Convenience function to query translate hook.
+ * @see _elm_widget_item_translate()
+ */
+#define elm_widget_item_translate(item) \
+ _elm_widget_item_translate((Elm_Widget_Item *)item)
+
#define ELM_WIDGET_ITEM_CHECK_OR_RETURN(item, ...) \
do { \
if (!item) { \