[Modern Media Controls] Don't use arrays as values for localisable strings
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 14 Feb 2018 18:46:10 +0000 (18:46 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 14 Feb 2018 18:46:10 +0000 (18:46 +0000)
commit419932a09bbddbe2b07116a8ec92bb5deee04055
tree1445c9eb766b836cdfa12e96f9ff1d516678e0a9
parent13bd50a344068cf40e70ffeb357d5ff230bc11de
[Modern Media Controls] Don't use arrays as values for localisable strings
https://bugs.webkit.org/show_bug.cgi?id=182791
<rdar://problem/36007262>

Patch by Antoine Quint <graouts@apple.com> on 2018-02-14
Reviewed by Dean Jackson.

Source/WebCore:

Localization tools expect localizable strings to be specified as key-value pairs where both the key and the pair
are plain strings. For the skip buttons, we used an array value to specify a replacement string. We now perform
this task in code with a centralized SkipSeconds constant defining the skip amount.

* English.lproj/modern-media-controls-localized-strings.js:
* Modules/modern-media-controls/controls/icon-service.js:
* Modules/modern-media-controls/main.js:
(UIString):
* Modules/modern-media-controls/media/skip-back-support.js:
(SkipBackSupport.prototype.buttonWasPressed):
* Modules/modern-media-controls/media/skip-forward-support.js:
(SkipForwardSupport.prototype.buttonWasPressed):

LayoutTests:

* media/modern-media-controls/localized-strings/replaced-string-expected.txt:
* media/modern-media-controls/localized-strings/replaced-string.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@228471 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/media/modern-media-controls/localized-strings/replaced-string-expected.txt
LayoutTests/media/modern-media-controls/localized-strings/replaced-string.html
Source/WebCore/ChangeLog
Source/WebCore/English.lproj/modern-media-controls-localized-strings.js
Source/WebCore/Modules/modern-media-controls/controls/icon-service.js
Source/WebCore/Modules/modern-media-controls/main.js
Source/WebCore/Modules/modern-media-controls/media/skip-back-support.js
Source/WebCore/Modules/modern-media-controls/media/skip-forward-support.js