Title: [172957] trunk/Source/WebKit2
- Revision
- 172957
- Author
- carlo...@webkit.org
- Date
- 2014-08-26 04:55:00 -0700 (Tue, 26 Aug 2014)
Log Message
[GTK] Translations are not initialized in the UI process
https://bugs.webkit.org/show_bug.cgi?id=136249
Reviewed by Philippe Normand.
This is breaking things like webkitContextMenuActionGetForContextMenuItem()
for non English locales in the cases where we use the action title to guess the
action, because the action title we get from the web process is translated while
the one in the UI process is in English.
* UIProcess/API/gtk/WebKitWebContext.cpp:
(createDefaultWebContext): Initialize gettext right before
creating the default web context.
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (172956 => 172957)
--- trunk/Source/WebKit2/ChangeLog 2014-08-26 11:25:49 UTC (rev 172956)
+++ trunk/Source/WebKit2/ChangeLog 2014-08-26 11:55:00 UTC (rev 172957)
@@ -1,3 +1,19 @@
+2014-08-26 Carlos Garcia Campos <cgar...@igalia.com>
+
+ [GTK] Translations are not initialized in the UI process
+ https://bugs.webkit.org/show_bug.cgi?id=136249
+
+ Reviewed by Philippe Normand.
+
+ This is breaking things like webkitContextMenuActionGetForContextMenuItem()
+ for non English locales in the cases where we use the action title to guess the
+ action, because the action title we get from the web process is translated while
+ the one in the UI process is in English.
+
+ * UIProcess/API/gtk/WebKitWebContext.cpp:
+ (createDefaultWebContext): Initialize gettext right before
+ creating the default web context.
+
2014-08-26 Ryuan Choi <ryuan.c...@samsung.com>
[EFL] Remove dead code in WebPageEfl.cpp
Modified: trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp (172956 => 172957)
--- trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp 2014-08-26 11:25:49 UTC (rev 172956)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp 2014-08-26 11:55:00 UTC (rev 172957)
@@ -47,6 +47,7 @@
#include <WebCore/FileSystem.h>
#include <WebCore/IconDatabase.h>
#include <WebCore/Language.h>
+#include <libintl.h>
#include <memory>
#include <wtf/HashMap.h>
#include <wtf/NeverDestroyed.h>
@@ -250,6 +251,9 @@
static gpointer createDefaultWebContext(gpointer)
{
+ bindtextdomain(GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR);
+ bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8");
+
static GRefPtr<WebKitWebContext> webContext = adoptGRef(WEBKIT_WEB_CONTEXT(g_object_new(WEBKIT_TYPE_WEB_CONTEXT, NULL)));
WebKitWebContextPrivate* priv = webContext->priv;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes