Skip to content
Permalink
Browse files
[GTK][WK2] Implement WebInspector::localizedStringsURL() to return th…
…e file URL of localizedStrings.js

https://bugs.webkit.org/show_bug.cgi?id=111448

Patch by Sudarsana Nagineni <sudarsana.nagineni@intel.com> on 2013-03-06
Reviewed by Alexey Proskuryakov.

Implement WebInspector::localizedStringsURL() method to return the
file URL of the localizedStrings.js.

This prevents printing warnings about "Localized string not found" in
the console.

* WebProcess/WebPage/gtk/WebInspectorGtk.cpp:
(WebKit::WebInspector::localizedStringsURL):

Canonical link: https://commits.webkit.org/129993@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@144982 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
Sudarsana Nagineni authored and webkit-commit-queue committed Mar 6, 2013
1 parent b2d3a27 commit 7c9165945ae4b2118dd2fac57fcdfe0888a956cb
Showing 2 changed files with 28 additions and 3 deletions.
@@ -1,3 +1,19 @@
2013-03-06 Sudarsana Nagineni <sudarsana.nagineni@intel.com>

[GTK][WK2] Implement WebInspector::localizedStringsURL() to return the file URL of localizedStrings.js
https://bugs.webkit.org/show_bug.cgi?id=111448

Reviewed by Alexey Proskuryakov.

Implement WebInspector::localizedStringsURL() method to return the
file URL of the localizedStrings.js.

This prevents printing warnings about "Localized string not found" in
the console.

* WebProcess/WebPage/gtk/WebInspectorGtk.cpp:
(WebKit::WebInspector::localizedStringsURL):

2013-03-06 Sudarsana Nagineni <sudarsana.nagineni@intel.com>

[EFL][WK2] REGRESSION(r143582): API test EWK2UnitTestBase.ewk_view_contents_size_changed failing
@@ -29,15 +29,24 @@

#if ENABLE(INSPECTOR)

#include <WebCore/NotImplemented.h>
#include <WebCore/FileSystem.h>
#include <glib.h>
#include <wtf/gobject/GOwnPtr.h>
#include <wtf/text/WTFString.h>

namespace WebKit {

String WebInspector::localizedStringsURL() const
{
notImplemented();
return String();
GOwnPtr<gchar> filePath;
const gchar* environmentPath = g_getenv("WEBKIT_INSPECTOR_PATH");
if (environmentPath && g_file_test(environmentPath, G_FILE_TEST_IS_DIR))
filePath.set(g_build_filename(environmentPath, "localizedStrings.js", NULL));
else
filePath.set(g_build_filename(WebCore::sharedResourcesPath().data(), "webinspector", "localizedStrings.js", NULL));

GOwnPtr<gchar> fileURI(g_filename_to_uri(filePath.get(), 0, 0));
return WebCore::filenameToString(fileURI.get());
}

} // namespace WebKit

0 comments on commit 7c91659

Please sign in to comment.