From: Piotr Grad
Date: Tue, 3 Feb 2015 20:47:33 +0000 (+0100)
Subject: Get rid off "Webkit" locale text domain
X-Git-Tag: submit/tizen/20201118.160233~1339
X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=52143164d04bc07bc8c130b2ad36eabd1931e7ae;p=platform%2Fframework%2Fweb%2Fchromium-efl.git
Get rid off "Webkit" locale text domain
[Requirement] WCS TC 1-57
This commit removes need for Webkit domain locale dependency.
Before we were mapping "Webkit" domain to "browser" domain which was redundant.
This was causing translation to not work when text domain for browser changed
it's path.
Bug: http://107.108.218.239/bugzilla/show_bug.cgi?id=10689
Reviewed by: Antonio Gomes, Karol Furmaniak
Change-Id: Ic13fa7f92c02e7064931a4b9d55534518a82df7f
Signed-off-by: Piotr Grad
---
diff --git a/tizen_src/ewk/efl_webview_app/browser-string.h b/tizen_src/ewk/efl_webview_app/browser-string.h
index 362c4ab..e3e5425 100644
--- a/tizen_src/ewk/efl_webview_app/browser-string.h
+++ b/tizen_src/ewk/efl_webview_app/browser-string.h
@@ -587,7 +587,7 @@
#define BR_STRING_CTXMENU_SHARE_IMAGE_URL _("Share image URL")
#define BR_STRING_CTXMENU_SHARE_LINK _("IDS_BR_BODY_SHARE_LINK")
#define BR_STRING_CTXMENU_SAVE_LINK _("IDS_BR_BODY_SAVE_LINK")
-#define BR_STRING_CTXMENU_SELECT_ALL dgettext("WebKit", "IDS_WEBVIEW_OPT_SELECT_ALL_ABB")
+#define BR_STRING_CTXMENU_SELECT_ALL dgettext("browser", "IDS_WEBVIEW_OPT_SELECT_ALL_ABB")
#define BR_STRING_CTXMENU_SELECT _("IDS_BR_OPT_SELECT")
#define BR_STRING_CTXMENU_GO_BACK _("IDS_BR_OPT_NAVIGATE_GO_BACKWARD")
#define BR_STRING_CTXMENU_GO_FORWARD _("IDS_BR_OPT_NAVIGATE_GO_FORWARD")
diff --git a/tizen_src/impl/context_menu_controller_efl.cc b/tizen_src/impl/context_menu_controller_efl.cc
index 315be7b..1c9a1d2 100644
--- a/tizen_src/impl/context_menu_controller_efl.cc
+++ b/tizen_src/impl/context_menu_controller_efl.cc
@@ -94,32 +94,32 @@ void ContextMenuControllerEfl::GetProposedContextMenu() {
if (!params_.link_url.is_empty()) {
AddItemToPropsedList(MENU_ITEM_TYPE_ACTION,
MENU_ITEM_OPEN_LINK_IN_NEW_WINDOW,
- std::string(dgettext("WebKit",
+ std::string(dgettext("browser",
"IDS_WEBVIEW_OPT_OPEN_LINK_IN_NEW_TAB_ABB")),
params_.link_url.spec(),
params_.link_url.spec());
AddItemToPropsedList(MENU_ITEM_TYPE_ACTION,
MENU_ITEM_COPY_LINK_TO_CLIPBOARD,
- std::string(dgettext("WebKit", "IDS_WEBVIEW_OPT_COPY_LINK_URL_ABB")),
+ std::string(dgettext("browser", "IDS_WEBVIEW_OPT_COPY_LINK_URL_ABB")),
std::string(),
params_.link_url.spec());
AddItemToPropsedList(MENU_ITEM_TYPE_ACTION,
MENU_ITEM_DOWNLOAD_LINK_TO_DISK,
- std::string(dgettext("WebKit", "IDS_BR_BODY_SAVE_LINK")),
+ std::string(dgettext("browser", "IDS_BR_BODY_SAVE_LINK")),
std::string(),
params_.link_url.spec());
}
if (params_.is_editable && ClipboardHelperEfl::NumberOfItems() > 0) {
AddItemToPropsedList(MENU_ITEM_TYPE_ACTION, MENU_ITEM_PASTE,
- std::string(dgettext("WebKit", "IDS_WEBVIEW_OPT_PASTE")));
+ std::string(dgettext("browser", "IDS_WEBVIEW_OPT_PASTE")));
}
if (!params_.selection_text.empty() && params_.is_editable) {
AddItemToPropsedList(MENU_ITEM_TYPE_ACTION, MENU_ITEM_CUT,
- std::string(dgettext("WebKit", "IDS_WEBVIEW_OPT_CUT_ABB")));
+ std::string(dgettext("browser", "IDS_WEBVIEW_OPT_CUT_ABB")));
}
if (!params_.selection_text.empty()) {
AddItemToPropsedList(MENU_ITEM_TYPE_ACTION, MENU_ITEM_COPY,
- std::string(dgettext("WebKit", "IDS_WEBVIEW_OPT_COPY")));
+ std::string(dgettext("browser", "IDS_WEBVIEW_OPT_COPY")));
if (!params_.is_editable) {
AddItemToPropsedList(MENU_ITEM_TYPE_ACTION, MENU_ITEM_SEARCH_WEB,
std::string());
@@ -131,43 +131,43 @@ void ContextMenuControllerEfl::GetProposedContextMenu() {
if (params_.has_image_contents && !params_.src_url.is_empty()) {
AddItemToPropsedList(MENU_ITEM_TYPE_ACTION,
MENU_ITEM_OPEN_IMAGE_IN_NEW_WINDOW,
- std::string(dgettext("WebKit",
+ std::string(dgettext("browser",
"IDS_WEBVIEW_OPT_OPEN_IMAGE_IN_NEW_TAB_ABB")),
params_.src_url.spec(),
params_.src_url.spec());
AddItemToPropsedList(MENU_ITEM_TYPE_ACTION,
MENU_ITEM_DOWNLOAD_IMAGE_TO_DISK,
- std::string(dgettext("WebKit", "IDS_WEBVIEW_OPT_SAVE_IMAGE_ABB")),
+ std::string(dgettext("browser", "IDS_WEBVIEW_OPT_SAVE_IMAGE_ABB")),
params_.src_url.spec(),
params_.src_url.spec());
AddItemToPropsedList(MENU_ITEM_TYPE_ACTION,
MENU_ITEM_COPY_IMAGE_TO_CLIPBOARD,
- std::string(dgettext("WebKit", "IDS_WEBVIEW_OPT_COPY_IMAGE")),
+ std::string(dgettext("browser", "IDS_WEBVIEW_OPT_COPY_IMAGE")),
params_.src_url.spec(),
params_.src_url.spec());
} else if (!params_.link_url.is_empty()) {
AddItemToPropsedList(MENU_ITEM_TYPE_ACTION,
MENU_ITEM_TEXT_SELECTION_MODE,
- std::string(dgettext("WebKit", "IDS_WEBVIEW_OPT_SELECTION_MODE_ABB")),
+ std::string(dgettext("browser", "IDS_WEBVIEW_OPT_SELECTION_MODE_ABB")),
params_.link_url.spec(),
params_.link_url.spec());
}
if (!params_.selection_text.empty()
|| (params_.is_editable && !webview_->GetImpl()->IsLastAvailableTextEmpty())) {
AddItemToPropsedList(MENU_ITEM_TYPE_ACTION, MENU_ITEM_SELECT_WORD,
- std::string(dgettext("WebKit", "IDS_WEBVIEW_OPT_SELECT_ABB")));
+ std::string(dgettext("browser", "IDS_WEBVIEW_OPT_SELECT_ABB")));
AddItemToPropsedList(MENU_ITEM_TYPE_ACTION, MENU_ITEM_SELECT_ALL,
- std::string(dgettext("WebKit", "IDS_WEBVIEW_OPT_SELECT_ALL_ABB")));
+ std::string(dgettext("browser", "IDS_WEBVIEW_OPT_SELECT_ALL_ABB")));
}
#if !defined(EWK_BRINGUP)
if (params_.is_draggable) {
AddItemToPropsedList(MENU_ITEM_TYPE_ACTION, MENU_ITEM_DRAG,
- std::string(dgettext("WebKit", "IDS_WEBVIEW_OPT_DRAG_AND_DROP")));
+ std::string(dgettext("browser", "IDS_WEBVIEW_OPT_DRAG_AND_DROP")));
}
#endif
if (params_.is_editable && ClipboardHelperEfl::NumberOfItems() > 0) {
AddItemToPropsedList(MENU_ITEM_TYPE_ACTION, MENU_ITEM_CLIPBOARD,
- std::string(dgettext("WebKit", "IDS_WEBVIEW_OPT_CLIPBOARD")));
+ std::string(dgettext("browser", "IDS_WEBVIEW_OPT_CLIPBOARD")));
}
}
diff --git a/tizen_src/impl/renderer/content_renderer_client_efl.cc b/tizen_src/impl/renderer/content_renderer_client_efl.cc
index 4f909ef..7c1f77a 100644
--- a/tizen_src/impl/renderer/content_renderer_client_efl.cc
+++ b/tizen_src/impl/renderer/content_renderer_client_efl.cc
@@ -190,18 +190,10 @@ void ContentRendererClientEfl::GetNavigationErrorStrings(
std::string* error_html,
base::string16* error_description) {
if (error_html) {
-#if defined(OS_TIZEN)
- base::FilePath locale_dir;
- PathService::Get(PathsEfl::DIR_LOCALE, &locale_dir);
-
- setlocale(LC_ALL, vconf_get_str(VCONFKEY_LANGSET));
- bindtextdomain("WebKit", locale_dir.value().c_str());
-#endif
-
std::string errorHead = std::string(dgettext(
- "WebKit", "IDS_WEBVIEW_HEADER_THIS_WEBPAGE_IS_NOT_AVAILABLE"));
+ "browser", "IDS_WEBVIEW_HEADER_THIS_WEBPAGE_IS_NOT_AVAILABLE"));
std::string errorMessage = std::string(dgettext(
- "WebKit",
+ "browser",
"IDS_WEBVIEW_BODY_THE_SERVER_AT_PS_CANT_BE_FOUND_BECAUSE_THE_DNS_LOOK_UP_FAILED_MSG"));
errorMessage = base::StringPrintf(
errorMessage.c_str(), error.unreachableURL.string().utf8().c_str());
diff --git a/tizen_src/impl/selection_controller_efl.cc b/tizen_src/impl/selection_controller_efl.cc
index cc388c8..76ef932 100644
--- a/tizen_src/impl/selection_controller_efl.cc
+++ b/tizen_src/impl/selection_controller_efl.cc
@@ -43,9 +43,7 @@ SelectionControllerEfl::SelectionControllerEfl(EWebView* parent_view)
evas_object_event_callback_add(parent_view_->evas_object(), EVAS_CALLBACK_MOVE, &EvasParentViewMoveCallback, this);
#if defined(OS_TIZEN)
- setlocale(LC_ALL, vconf_get_str(VCONFKEY_LANGSET));
- bindtextdomain("WebKit", WEBKIT_TEXT_DIR);
- vconf_notify_key_changed(VCONFKEY_LANGSET, PlatformLanguageChanged, this);
+ vconf_notify_key_changed(VCONFKEY_LANGSET, PlatformLanguageChanged, this);
#endif
}
@@ -62,9 +60,6 @@ bool SelectionControllerEfl::GetSelectionStatus() const {
#if defined(OS_TIZEN)
void SelectionControllerEfl::PlatformLanguageChanged(keynode_t* keynode, void* data) {
- setlocale(LC_ALL, vconf_get_str(VCONFKEY_LANGSET));
- bindtextdomain("WebKit", WEBKIT_TEXT_DIR);
-
SelectionControllerEfl* selection_controller = static_cast(data);
if (!selection_controller)
return;