Bug 78324 - Get rid of the LocalizationStrategy
: Get rid of the LocalizationStrategy
Status: RESOLVED FIXED
Product: WebKit
Classification: Unclassified
Component: WebKit Misc.
: 528+ (Nightly build)
: Unspecified Unspecified
: P2 Normal
Assigned To: Benjamin Poulain
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-02-09 21:23 PST by Benjamin Poulain
Modified: 2012-02-21 11:29 PST (History)
16 users (show)

See Also:


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

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Poulain 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 Benjamin Poulain 2012-02-10 16:56:56 PST
Created attachment 126606 [details]
Patch
Comment 2 Benjamin Poulain 2012-02-10 16:58:15 PST
This is a first attempt for the bots. This is a massive amount of cleaning :)
Comment 3 Benjamin Poulain 2012-02-10 17:57:28 PST
Created attachment 126610 [details]
Patch
Comment 4 WebKit Review Bot 2012-02-10 18:13:00 PST
Comment on attachment 126610 [details]
Patch

Attachment 126610 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://queues.webkit.org/results/11496601
Comment 5 Sam Weinig 2012-02-11 13:46:32 PST
Great! I have been meaning to get around to doing this.
Comment 6 Benjamin Poulain 2012-02-11 14:33:37 PST
Created attachment 126646 [details]
Patch
Comment 7 Gyuyoung Kim 2012-02-11 14:44:04 PST
Comment on attachment 126646 [details]
Patch

Attachment 126646 [details] did not pass efl-ews (efl):
Output: http://queues.webkit.org/results/11506232
Comment 8 Early Warning System Bot 2012-02-11 14:47:35 PST
Comment on attachment 126646 [details]
Patch

Attachment 126646 [details] did not pass qt-ews (qt):
Output: http://queues.webkit.org/results/11508229
Comment 9 Benjamin Poulain 2012-02-11 16:48:48 PST
Created attachment 126656 [details]
Patch
Comment 10 Early Warning System Bot 2012-02-11 17:01:21 PST
Comment on attachment 126656 [details]
Patch

Attachment 126656 [details] did not pass qt-ews (qt):
Output: http://queues.webkit.org/results/11505304
Comment 11 Benjamin Poulain 2012-02-11 17:11:52 PST
Created attachment 126657 [details]
Patch
Comment 12 Early Warning System Bot 2012-02-11 17:35:54 PST
Comment on attachment 126657 [details]
Patch

Attachment 126657 [details] did not pass qt-ews (qt):
Output: http://queues.webkit.org/results/11506272
Comment 13 Benjamin Poulain 2012-02-11 17:45:06 PST
Created attachment 126660 [details]
Patch
Comment 14 Benjamin Poulain 2012-02-11 18:04:15 PST
Finalllly, something that build on Qt :)
Comment 15 Benjamin Poulain 2012-02-11 19:09:28 PST
Created attachment 126665 [details]
Patch
Comment 16 Philippe Normand 2012-02-12 03:10:00 PST
Comment on attachment 126665 [details]
Patch

Attachment 126665 [details] did not pass gtk-ews (gtk):
Output: http://queues.webkit.org/results/11511082
Comment 17 Benjamin Poulain 2012-02-14 12:51:11 PST
Created attachment 127020 [details]
Patch
Comment 18 Benjamin Poulain 2012-02-14 14:28:45 PST
Created attachment 127047 [details]
Patch
Comment 19 Antonio Gomes 2012-02-14 14:45:53 PST
does this help? http://queues.webkit.org/submit-to-ews  :)
Comment 20 Benjamin Poulain 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 Sam Weinig 2012-02-20 14:46:05 PST
Comment on attachment 127047 [details]
Patch

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 Benjamin Poulain 2012-02-20 20:51:08 PST
Created attachment 127909 [details]
Patch for landing
Comment 23 WebKit Review Bot 2012-02-20 22:37:58 PST
Comment on attachment 127909 [details]
Patch for landing

Clearing flags on attachment: 127909

Committed r108308: <http://trac.webkit.org/changeset/108308>
Comment 24 WebKit Review Bot 2012-02-20 22:38:06 PST
All reviewed patches have been landed.  Closing bug.
Comment 25 Csaba Osztrogonác 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 Benjamin Poulain 2012-02-21 11:29:02 PST
Given all Qt bots are building now, I assume it was a problem with the Qt bots.