forked from enlightenment/efl
From: WooHyun Jung <wh0705.jung@samsung.com>
Subject: [E-devel] [Patch] for Gettext /I18N Mr. Govi in SISO made a patch for following description. Detail Description: 1. If EFL/Elementary Application has i18n String with its own PO file, then Elementary will end up looking for internal Strings at application PO files. Passing PACKAGE name in the Elementary String Look up macro eliminates this issue and looks for internal String from Elm.po files. 2. Macro E_(str) is used, to differentiate the elementary Strings from commonly used #define _(str) in the applications. ( Just E ed :) ) SVN revision: 58085
This commit is contained in:
parent
ab35bb5667
commit
fc6a5a24b9
|
@ -8,7 +8,7 @@ subdir = po
|
|||
top_builddir = ..
|
||||
|
||||
# These options get passed to xgettext.
|
||||
XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ --from-code=UTF-8 --foreign-user
|
||||
XGETTEXT_OPTIONS = --keyword=E_ --from-code=UTF-8 --foreign-user
|
||||
|
||||
# This is the copyright holder that gets inserted into the header of the
|
||||
# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding
|
||||
|
|
|
@ -595,7 +595,7 @@ elm_fileselector_add(Evas_Object *parent)
|
|||
bt = elm_button_add(parent);
|
||||
elm_widget_mirrored_automatic_set(bt, EINA_FALSE);
|
||||
elm_button_icon_set(bt, ic);
|
||||
elm_button_label_set(bt, _("Up"));
|
||||
elm_button_label_set(bt, E_("Up"));
|
||||
evas_object_size_hint_align_set(bt, 0.0, 0.0);
|
||||
|
||||
evas_object_smart_callback_add(bt, "clicked", _up, obj);
|
||||
|
@ -610,7 +610,7 @@ elm_fileselector_add(Evas_Object *parent)
|
|||
bt = elm_button_add(parent);
|
||||
elm_widget_mirrored_automatic_set(bt, EINA_FALSE);
|
||||
elm_button_icon_set(bt, ic);
|
||||
elm_button_label_set(bt, _("Home"));
|
||||
elm_button_label_set(bt, E_("Home"));
|
||||
evas_object_size_hint_align_set(bt, 0.0, 0.0);
|
||||
|
||||
evas_object_smart_callback_add(bt, "clicked", _home, obj);
|
||||
|
@ -791,7 +791,7 @@ elm_fileselector_buttons_ok_cancel_set(Evas_Object *obj,
|
|||
// cancel btn
|
||||
bt = elm_button_add(obj);
|
||||
elm_widget_mirrored_automatic_set(bt, EINA_FALSE);
|
||||
elm_button_label_set(bt, _("Cancel"));
|
||||
elm_button_label_set(bt, E_("Cancel"));
|
||||
|
||||
evas_object_smart_callback_add(bt, "clicked", _canc, obj);
|
||||
|
||||
|
@ -801,7 +801,7 @@ elm_fileselector_buttons_ok_cancel_set(Evas_Object *obj,
|
|||
// ok btn
|
||||
bt = elm_button_add(obj);
|
||||
elm_widget_mirrored_automatic_set(bt, EINA_FALSE);
|
||||
elm_button_label_set(bt, _("OK"));
|
||||
elm_button_label_set(bt, E_("OK"));
|
||||
|
||||
evas_object_smart_callback_add(bt, "clicked", _ok, obj);
|
||||
|
||||
|
|
|
@ -1535,7 +1535,7 @@ _env_get(void)
|
|||
setlocale(LC_ALL, "");
|
||||
bindtextdomain("elementary", LOCALE_DIR);
|
||||
textdomain("elementary");
|
||||
_elm_config->is_mirrored = !strcmp(_("default:LTR"), "default:RTL");
|
||||
_elm_config->is_mirrored = !strcmp(E_("default:LTR"), "default:RTL");
|
||||
|
||||
s = getenv("ELM_TOOLTIP_DELAY");
|
||||
if (s)
|
||||
|
|
|
@ -876,12 +876,12 @@ _long_press(void *data)
|
|||
if (!wd->selmode)
|
||||
{
|
||||
if (!wd->password)
|
||||
elm_hoversel_item_add(wd->hoversel, _("Select"), NULL, ELM_ICON_NONE,
|
||||
elm_hoversel_item_add(wd->hoversel, E_("Select"), NULL, ELM_ICON_NONE,
|
||||
_select, data);
|
||||
if (1) // need way to detect if someone has a selection
|
||||
{
|
||||
if (wd->editable)
|
||||
elm_hoversel_item_add(wd->hoversel, _("Paste"), NULL, ELM_ICON_NONE,
|
||||
elm_hoversel_item_add(wd->hoversel, E_("Paste"), NULL, ELM_ICON_NONE,
|
||||
_paste, data);
|
||||
}
|
||||
}
|
||||
|
@ -891,13 +891,13 @@ _long_press(void *data)
|
|||
{
|
||||
if (wd->have_selection)
|
||||
{
|
||||
elm_hoversel_item_add(wd->hoversel, _("Copy"), NULL, ELM_ICON_NONE,
|
||||
elm_hoversel_item_add(wd->hoversel, E_("Copy"), NULL, ELM_ICON_NONE,
|
||||
_copy, data);
|
||||
if (wd->editable)
|
||||
elm_hoversel_item_add(wd->hoversel, _("Cut"), NULL, ELM_ICON_NONE,
|
||||
elm_hoversel_item_add(wd->hoversel, E_("Cut"), NULL, ELM_ICON_NONE,
|
||||
_cut, data);
|
||||
}
|
||||
elm_hoversel_item_add(wd->hoversel, _("Cancel"), NULL, ELM_ICON_NONE,
|
||||
elm_hoversel_item_add(wd->hoversel, E_("Cancel"), NULL, ELM_ICON_NONE,
|
||||
_cancel, data);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#define INF(...) EINA_LOG_DOM_INFO(_elm_log_dom, __VA_ARGS__)
|
||||
#define DBG(...) EINA_LOG_DOM_DBG (_elm_log_dom, __VA_ARGS__)
|
||||
|
||||
#define _(string) gettext(string)
|
||||
#define E_(string) dgettext(PACKAGE, string)
|
||||
|
||||
typedef struct _Elm_Config Elm_Config;
|
||||
typedef struct _Elm_Module Elm_Module;
|
||||
|
|
Loading…
Reference in New Issue