Bug 78324 - Get rid of the LocalizationStrategy
: Get rid of the LocalizationStrategy
Status: RESOLVED FIXED
: WebKit
WebKit Misc.
: 528+ (Nightly build)
: Unspecified Unspecified
: P2 Normal
Assigned To:
:
:
:
:
  Show dependency treegraph
 
Reported: 2012-02-09 21:23 PST by
Modified: 2012-02-21 11:29 PST (History)


Attachments
Patch (195.30 KB, patch)
2012-02-10 16:56 PST, Benjamin Poulain
no flags Review Patch | Details | Formatted Diff | Diff
Patch (122.59 KB, patch)
2012-02-10 17:57 PST, Benjamin Poulain
no flags Review Patch | Details | Formatted Diff | Diff
Patch (203.52 KB, patch)
2012-02-11 14:33 PST, Benjamin Poulain
no flags Review Patch | Details | Formatted Diff | Diff
Patch (204.33 KB, patch)
2012-02-11 16:48 PST, Benjamin Poulain
no flags Review Patch | Details | Formatted Diff | Diff
Patch (205.16 KB, patch)
2012-02-11 17:11 PST, Benjamin Poulain
no flags Review Patch | Details | Formatted Diff | Diff
Patch (205.27 KB, patch)
2012-02-11 17:45 PST, Benjamin Poulain
no flags Review Patch | Details | Formatted Diff | Diff
Patch (206.14 KB, patch)
2012-02-11 19:09 PST, Benjamin Poulain
no flags Review Patch | Details | Formatted Diff | Diff
Patch (205.29 KB, patch)
2012-02-14 12:51 PST, Benjamin Poulain
no flags Review Patch | Details | Formatted Diff | Diff
Patch (205.34 KB, patch)
2012-02-14 14:28 PST, Benjamin Poulain
no flags Review Patch | Details | Formatted Diff | Diff
Patch for landing (191.97 KB, patch)
2012-02-20 20:51 PST, Benjamin Poulain
no flags Review Patch | Details | Formatted Diff | Diff


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2012-02-09 21:23:58 PST
Today, all the localized string come from LocalizationStrategy.

From there we get an instance of LocalizationStrategy, and call the right virtual method.

Adding a string require at least 6 files just to add the translation.

The only platform needing LocalizationStrategy is Qt. I have the feeling we could greatly simplify this by just having a different cpp file for the handful of string Qt needs.
------- Comment #1 From 2012-02-10 16:56:56 PST -------
Created an attachment (id=126606) [details]
Patch
------- Comment #2 From 2012-02-10 16:58:15 PST -------
This is a first attempt for the bots. This is a massive amount of cleaning :)
------- Comment #3 From 2012-02-10 17:57:28 PST -------
Created an attachment (id=126610) [details]
Patch
------- Comment #4 From 2012-02-10 18:13:00 PST -------
(From update of attachment 126610 [details])
Attachment 126610 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://queues.webkit.org/results/11496601
------- Comment #5 From 2012-02-11 13:46:32 PST -------
Great! I have been meaning to get around to doing this.
------- Comment #6 From 2012-02-11 14:33:37 PST -------
Created an attachment (id=126646) [details]
Patch
------- Comment #7 From 2012-02-11 14:44:04 PST -------
(From update of attachment 126646 [details])
Attachment 126646 [details] did not pass efl-ews (efl):
Output: http://queues.webkit.org/results/11506232
------- Comment #8 From 2012-02-11 14:47:35 PST -------
(From update of attachment 126646 [details])
Attachment 126646 [details] did not pass qt-ews (qt):
Output: http://queues.webkit.org/results/11508229
------- Comment #9 From 2012-02-11 16:48:48 PST -------
Created an attachment (id=126656) [details]
Patch
------- Comment #10 From 2012-02-11 17:01:21 PST -------
(From update of attachment 126656 [details])
Attachment 126656 [details] did not pass qt-ews (qt):
Output: http://queues.webkit.org/results/11505304
------- Comment #11 From 2012-02-11 17:11:52 PST -------
Created an attachment (id=126657) [details]
Patch
------- Comment #12 From 2012-02-11 17:35:54 PST -------
(From update of attachment 126657 [details])
Attachment 126657 [details] did not pass qt-ews (qt):
Output: http://queues.webkit.org/results/11506272
------- Comment #13 From 2012-02-11 17:45:06 PST -------
Created an attachment (id=126660) [details]
Patch
------- Comment #14 From 2012-02-11 18:04:15 PST -------
Finalllly, something that build on Qt :)
------- Comment #15 From 2012-02-11 19:09:28 PST -------
Created an attachment (id=126665) [details]
Patch
------- Comment #16 From 2012-02-12 03:10:00 PST -------
(From update of attachment 126665 [details])
Attachment 126665 [details] did not pass gtk-ews (gtk):
Output: http://queues.webkit.org/results/11511082
------- Comment #17 From 2012-02-14 12:51:11 PST -------
Created an attachment (id=127020) [details]
Patch
------- Comment #18 From 2012-02-14 14:28:45 PST -------
Created an attachment (id=127047) [details]
Patch
------- Comment #19 From 2012-02-14 14:45:53 PST -------
does this help? http://queues.webkit.org/submit-to-ews  :)
------- Comment #20 From 2012-02-14 14:50:25 PST -------
(In reply to comment #19)
> does this help? http://queues.webkit.org/submit-to-ews  :)

I just attach the patch and click on "submit to ews". It looks like I nailed them all except win. Hopefully this last attempt fix the last problem on Windows. :)
------- Comment #21 From 2012-02-20 14:46:05 PST -------
(From update of attachment 127047 [details])
View in context: https://bugs.webkit.org/attachment.cgi?id=127047&action=review

Nice.

> Source/WebCore/ChangeLog:266
> +        (WebCore::localizedMediaControlElementHelpText):
> +        (WebCore::localizedMediaTimeDescription):
> +        (WebCore::validationMessageValueMissingText):
> +        (WebCore::validationMessageValueMissingForCheckboxText):
> +        (WebCore::validationMessageValueMissingForFileText):
> +        (WebCore::validationMessageValueMissingForMultipleFileText):
> +        (WebCore::validationMessageValueMissingForRadioText):
> +        (WebCore::validationMessageValueMissingForSelectText):
> +        (WebCore::validationMessageTypeMismatchText):
> +        (WebCore::validationMessageTypeMismatchForEmailText):
> +        (WebCore::validationMessageTypeMismatchForMultipleEmailText):
> +        (WebCore::validationMessageTypeMismatchForURLText):
> +        (WebCore::validationMessagePatternMismatchText):
> +        (WebCore::validationMessageTooLongText):
> +        (WebCore::validationMessageRangeUnderflowText):
> +        (WebCore::validationMessageRangeOverflowText):
> +        (WebCore::validationMessageStepMismatchText):

I don't think all these are needed in the change log.
------- Comment #22 From 2012-02-20 20:51:08 PST -------
Created an attachment (id=127909) [details]
Patch for landing
------- Comment #23 From 2012-02-20 22:37:58 PST -------
(From update of attachment 127909 [details])
Clearing flags on attachment: 127909

Committed r108308: <http://trac.webkit.org/changeset/108308>
------- Comment #24 From 2012-02-20 22:38:06 PST -------
All reviewed patches have been landed.  Closing bug.
------- Comment #25 From 2012-02-20 23:03:59 PST -------
Reopen, because it broke the Qt build:
g++ -m64 -fuse-ld=gold -Wl,--gc-sections -Wl,--no-undefined -Wl,-O1 -Wl,-rpath,/usr/local/Trolltech/Qt5/Qt-5.0.0-r22/lib -shared -Wl,-Bsymbolic-functions -Wl,-soname,libQtWebKit.so.4 -o libQtWebKit.so.4.10.0 obj/release/WebKit/qt/Api/qwebframe.o obj/release/WebKit/qt/Api/qgraphicswebview.o obj/release/WebKit/qt/Api/qwebpage.o obj/release/WebKit/qt/Api/qwebview.o obj/release/WebKit/qt/Api/qwebelement.o obj/release/WebKit/qt/Api/qwebhistory.o obj/release/WebKit/qt/Api/qwebsettings.o obj/release/WebKit/qt/Api/qwebhistoryinterface.o obj/release/WebKit/qt/Api/qwebplugindatabase.o obj/release/WebKit/qt/Api/qwebpluginfactory.o obj/release/WebKit/qt/Api/qwebsecurityorigin.o obj/release/WebKit/qt/Api/qwebscriptworld.o obj/release/WebKit/qt/Api/qwebdatabase.o obj/release/WebKit/qt/Api/qwebinspector.o obj/release/WebKit/qt/Api/qwebkitversion.o obj/release/WebKit/qt/Api/qhttpheader.o obj/release/WebKit/qt/WebCoreSupport/QtFallbackWebPopup.o obj/release/WebKit/qt/WebCoreSupport/QtWebComboBox.o obj/release/WebKit/qt/WebCoreSupport/ChromeClientQt.o obj/release/WebKit/qt/WebCoreSupport/ContextMenuClientQt.o obj/release/WebKit/qt/WebCoreSupport/DragClientQt.o obj/release/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.o obj/release/WebKit/qt/WebCoreSupport/EditorClientQt.o obj/release/WebKit/qt/WebCoreSupport/UndoStepQt.o obj/release/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.o obj/release/WebKit/qt/WebCoreSupport/FrameNetworkingContextQt.o obj/release/WebKit/qt/WebCoreSupport/GeolocationPermissionClientQt.o obj/release/WebKit/qt/WebCoreSupport/InitWebCoreQt.o obj/release/WebKit/qt/WebCoreSupport/InspectorClientQt.o obj/release/WebKit/qt/WebCoreSupport/InspectorServerQt.o obj/release/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.o obj/release/WebKit/qt/WebCoreSupport/PageClientQt.o obj/release/WebKit/qt/WebCoreSupport/PopupMenuQt.o obj/release/WebKit/qt/WebCoreSupport/QtPlatformPlugin.o obj/release/WebKit/qt/WebCoreSupport/SearchPopupMenuQt.o obj/release/WebKit/qt/WebCoreSupport/TextCheckerClientQt.o obj/release/WebKit/qt/WebCoreSupport/PlatformStrategiesQt.o obj/release/WebKit/qt/WebCoreSupport/WebEventConversion.o obj/release/WebKit/qt/WebCoreSupport/FullScreenVideoQt.o obj/release/WebKit/qt/WebCoreSupport/IconDatabaseClientQt.o obj/release/WebKit/qt/WebCoreSupport/GeolocationClientQt.o obj/release/home/webkitbuildbot/slaves/release64bit-perf/buildslave/qt-linux-64-release-perf-tests/build/WebKitBuild/Release/Source/moc/moc_qwebkitplatformplugin.o obj/release/home/webkitbuildbot/slaves/release64bit-perf/buildslave/qt-linux-64-release-perf-tests/build/WebKitBuild/Release/Source/moc/moc_qwebhistoryinterface.o obj/release/home/webkitbuildbot/slaves/release64bit-perf/buildslave/qt-linux-64-release-perf-tests/build/WebKitBuild/Release/Source/moc/moc_qwebpluginfactory.o obj/release/home/webkitbuildbot/slaves/release64bit-perf/buildslave/qt-linux-64-release-perf-tests/build/WebKitBuild/Release/Source/moc/moc_qwebinspector.o obj/release/home/webkitbuildbot/slaves/release64bit-perf/buildslave/qt-linux-64-release-perf-tests/build/WebKitBuild/Release/Source/moc/moc_qwebplugindatabase_p.o obj/release/home/webkitbuildbot/slaves/release64bit-perf/buildslave/qt-linux-64-release-perf-tests/build/WebKitBuild/Release/Source/moc/moc_InspectorServerQt.o obj/release/home/webkitbuildbot/slaves/release64bit-perf/buildslave/qt-linux-64-release-perf-tests/build/WebKitBuild/Release/Source/moc/moc_QtFallbackWebPopup.o obj/release/home/webkitbuildbot/slaves/release64bit-perf/buildslave/qt-linux-64-release-perf-tests/build/WebKitBuild/Release/Source/moc/moc_QtWebComboBox.o obj/release/home/webkitbuildbot/slaves/release64bit-perf/buildslave/qt-linux-64-release-perf-tests/build/WebKitBuild/Release/Source/moc/moc_FullScreenVideoQt.o   -L/home/webkitbuildbot/slaves/release64bit-perf/buildslave/qt-linux-64-release-perf-tests/build/WebKitBuild/Release/Source/WebKit2/release -L/home/webkitbuildbot/slaves/release64bit-perf/buildslave/qt-linux-64-release-perf-tests/build/WebKitBuild/Release/Source/WebCore/release -L/home/webkitbuildbot/slaves/release64bit-perf/buildslave/qt-linux-64-release-perf-tests/build/WebKitBuild/Release/Source/JavaScriptCore/release -L/home/webkitbuildbot/slaves/release64bit-perf/buildslave/qt-linux-64-release-perf-tests/build/WebKitBuild/Release/Source/WTF/release -L/usr/local/Trolltech/Qt5/Qt-5.0.0-r22/lib -L/usr/X11R6/lib64 -Wl,-whole-archive -lWebKit2 -Wl,-no-whole-archive -Wl,-whole-archive -lWebCore -Wl,-no-whole-archive -lsqlite3 -Wl,-whole-archive -lJavaScriptCore -Wl,-no-whole-archive -Wl,-whole-archive -lWTF -Wl,-no-whole-archive -licui18n -licuuc -licudata -lgio-2.0 -lgstapp-0.10 -lgstinterfaces-0.10 -lgstpbutils-0.10 -pthread -lgstvideo-0.10 -lgstbase-0.10 -lgstreamer-0.10 -lgobject-2.0 -lgmodule-2.0 -lxml2 -lgthread-2.0 -lrt -lglib-2.0 -lQtQuick -L/usr/local/Trolltech/Qt5/Qt-5.0.0-r22/lib -L/home/wkperf/sources/qt5/qtdeclarative/lib -L/usr/X11R6/lib64 -lQtDeclarative -lQtV8 -lQtLocation -lQt3D -lQtOpenGL -lQtPrintSupport -lQtXmlPatterns -lQtWidgets -lQtSql -lQtSensors -lQtNetwork -lQtGui -lQtCore -lGL -lpthread  
/home/webkitbuildbot/slaves/release64bit-perf/buildslave/qt-linux-64-release-perf-tests/build/WebKitBuild/Release/Source/WebKit2/release/libWebKit2.a(WebPlatformStrategies.o):(.data.rel.ro._ZTVN6WebKit21WebPlatformStrategiesE[vtable for WebKit::WebPlatformStrategies]+0x30): undefined reference to `WebCore::PlatformStrategies::createLocalizationStrategy()'
c
------- Comment #26 From 2012-02-21 11:29:02 PST -------
Given all Qt bots are building now, I assume it was a problem with the Qt bots.