Title: [151469] trunk
Revision
151469
Author
eric.carl...@apple.com
Date
2013-06-11 13:55:02 -0700 (Tue, 11 Jun 2013)

Log Message

[Mac] Update text track menu
https://bugs.webkit.org/show_bug.cgi?id=117351

Reviewed by Darin Adler.

Source/WebCore: 

No new tests, existing tests updated.

* English.lproj/Localizable.strings: Update the menu title.

* page/CaptionUserPreferencesMac.mm: System language is no longer needed.

* platform/LocalizedStrings.cpp: Ditto.
* platform/LocalizedStrings.h:

LayoutTests: 

* media/video-controls-captions-trackmenu-localized.html:
* media/video-controls-captions-trackmenu-sorted.html:
* platform/mac-lion/media/video-controls-captions-trackmenu-localized-expected.txt:
* platform/mac/media/video-controls-captions-trackmenu-localized-expected.txt:
* platform/mac/media/video-controls-captions-trackmenu-sorted-expected.txt:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (151468 => 151469)


--- trunk/LayoutTests/ChangeLog	2013-06-11 20:53:31 UTC (rev 151468)
+++ trunk/LayoutTests/ChangeLog	2013-06-11 20:55:02 UTC (rev 151469)
@@ -1,3 +1,16 @@
+2013-06-11  Eric Carlson  <eric.carl...@apple.com>
+
+        [Mac] Update text track menu
+        https://bugs.webkit.org/show_bug.cgi?id=117351
+
+        Reviewed by Darin Adler.
+
+        * media/video-controls-captions-trackmenu-localized.html:
+        * media/video-controls-captions-trackmenu-sorted.html:
+        * platform/mac-lion/media/video-controls-captions-trackmenu-localized-expected.txt:
+        * platform/mac/media/video-controls-captions-trackmenu-localized-expected.txt:
+        * platform/mac/media/video-controls-captions-trackmenu-sorted-expected.txt:
+
 2013-06-11  Robert Hogan  <rob...@webkit.org>
 
         Rebaseline results after r151451

Modified: trunk/LayoutTests/media/video-controls-captions-trackmenu-localized.html (151468 => 151469)


--- trunk/LayoutTests/media/video-controls-captions-trackmenu-localized.html	2013-06-11 20:53:31 UTC (rev 151468)
+++ trunk/LayoutTests/media/video-controls-captions-trackmenu-localized.html	2013-06-11 20:55:02 UTC (rev 151469)
@@ -40,8 +40,8 @@
             testExpected("item.textContent", "Off");
 
             item = captionsEntries[1];
-            consoleWrite("<br>Second item in captions menu should be labelled 'Automatic (English)'");
-            testExpected("item.textContent", "Automatic (English)");
+            consoleWrite("<br>Second item in captions menu should be labelled 'Auto (Recommended)'");
+            testExpected("item.textContent", "Auto (Recommended)");
 
 
             item = captionsEntries[2];

Modified: trunk/LayoutTests/media/video-controls-captions-trackmenu-sorted.html (151468 => 151469)


--- trunk/LayoutTests/media/video-controls-captions-trackmenu-sorted.html	2013-06-11 20:53:31 UTC (rev 151468)
+++ trunk/LayoutTests/media/video-controls-captions-trackmenu-sorted.html	2013-06-11 20:55:02 UTC (rev 151469)
@@ -41,7 +41,7 @@
                 case 1:
                     trackMenuItems = textTrackMenuItems();
                     testExpected("trackMenuItems[0].textContent", "Off");
-                    testExpected("trackMenuItems[1].textContent", "Automatic (English)");
+                    testExpected("trackMenuItems[1].textContent", "Auto (Recommended)");
                     testExpected("trackMenuItems[2].textContent", "u (English) SDH");
                     testExpected("trackMenuItems[3].textContent", "y (English-Australia) SDH");
                     testExpected("trackMenuItems[4].textContent", "v (English)");
@@ -62,7 +62,7 @@
                 case 2:
                     trackMenuItems = textTrackMenuItems();
                     testExpected("trackMenuItems[0].textContent", "Off");
-                    testExpected("trackMenuItems[1].textContent", "Automatic (Japanese)");
+                    testExpected("trackMenuItems[1].textContent", "Auto (Recommended)");
                     testExpected("trackMenuItems[2].textContent", "z (Japanese)");
                     testExpected("trackMenuItems[3].textContent", "v (English)");
                     testExpected("trackMenuItems[4].textContent", "x (English-Australia)");

Modified: trunk/LayoutTests/platform/mac/media/video-controls-captions-trackmenu-localized-expected.txt (151468 => 151469)


--- trunk/LayoutTests/platform/mac/media/video-controls-captions-trackmenu-localized-expected.txt	2013-06-11 20:53:31 UTC (rev 151468)
+++ trunk/LayoutTests/platform/mac/media/video-controls-captions-trackmenu-localized-expected.txt	2013-06-11 20:55:02 UTC (rev 151469)
@@ -10,8 +10,8 @@
 First item in captions menu should be labelled 'Off'
 EXPECTED (item.textContent == 'Off') OK
 
-Second item in captions menu should be labelled 'Automatic (English)'
-EXPECTED (item.textContent == 'Automatic (English)') OK
+Second item in captions menu should be labelled 'Auto (Recommended)'
+EXPECTED (item.textContent == 'Auto (Recommended)') OK
 
 Third item in captions menu should be labelled 'English CC'
 EXPECTED (item.textContent == 'English CC') OK

Modified: trunk/LayoutTests/platform/mac/media/video-controls-captions-trackmenu-sorted-expected.txt (151468 => 151469)


--- trunk/LayoutTests/platform/mac/media/video-controls-captions-trackmenu-sorted-expected.txt	2013-06-11 20:53:31 UTC (rev 151468)
+++ trunk/LayoutTests/platform/mac/media/video-controls-captions-trackmenu-sorted-expected.txt	2013-06-11 20:55:02 UTC (rev 151469)
@@ -8,7 +8,7 @@
 ** Test with preferred language set to English, track type set to captions
 RUN(internals.settings.setShouldDisplayTrackKind('Captions', true))
 EXPECTED (trackMenuItems[0].textContent == 'Off') OK
-EXPECTED (trackMenuItems[1].textContent == 'Automatic (English)') OK
+EXPECTED (trackMenuItems[1].textContent == 'Auto (Recommended)') OK
 EXPECTED (trackMenuItems[2].textContent == 'u (English) SDH') OK
 EXPECTED (trackMenuItems[3].textContent == 'y (English-Australia) SDH') OK
 EXPECTED (trackMenuItems[4].textContent == 'v (English)') OK
@@ -23,7 +23,7 @@
 RUN(internals.settings.setShouldDisplayTrackKind('Captions', false))
 RUN(internals.settings.setShouldDisplayTrackKind('Subtitles', true))
 EXPECTED (trackMenuItems[0].textContent == 'Off') OK
-EXPECTED (trackMenuItems[1].textContent == 'Automatic (Japanese)') OK
+EXPECTED (trackMenuItems[1].textContent == 'Auto (Recommended)') OK
 EXPECTED (trackMenuItems[2].textContent == 'z (Japanese)'), OBSERVED 'w (Japanese) SDH' FAIL
 EXPECTED (trackMenuItems[3].textContent == 'v (English)'), OBSERVED 'z (Japanese)' FAIL
 EXPECTED (trackMenuItems[4].textContent == 'x (English-Australia)'), OBSERVED 'u (English) SDH' FAIL

Modified: trunk/LayoutTests/platform/mac-lion/media/video-controls-captions-trackmenu-localized-expected.txt (151468 => 151469)


--- trunk/LayoutTests/platform/mac-lion/media/video-controls-captions-trackmenu-localized-expected.txt	2013-06-11 20:53:31 UTC (rev 151468)
+++ trunk/LayoutTests/platform/mac-lion/media/video-controls-captions-trackmenu-localized-expected.txt	2013-06-11 20:55:02 UTC (rev 151469)
@@ -10,8 +10,8 @@
 First item in captions menu should be labelled 'Off'
 EXPECTED (item.textContent == 'Off') OK
 
-Second item in captions menu should be labelled 'Automatic (English)'
-EXPECTED (item.textContent == 'Automatic (English)') OK
+Second item in captions menu should be labelled 'Auto (Recommended)'
+EXPECTED (item.textContent == 'Auto (Recommended)') OK
 
 Third item in captions menu should be labelled 'English CC'
 EXPECTED (item.textContent == 'English CC') OK

Modified: trunk/Source/WebCore/ChangeLog (151468 => 151469)


--- trunk/Source/WebCore/ChangeLog	2013-06-11 20:53:31 UTC (rev 151468)
+++ trunk/Source/WebCore/ChangeLog	2013-06-11 20:55:02 UTC (rev 151469)
@@ -1,3 +1,19 @@
+2013-06-11  Eric Carlson  <eric.carl...@apple.com>
+
+        [Mac] Update text track menu
+        https://bugs.webkit.org/show_bug.cgi?id=117351
+
+        Reviewed by Darin Adler.
+
+        No new tests, existing tests updated.
+
+        * English.lproj/Localizable.strings: Update the menu title.
+
+        * page/CaptionUserPreferencesMac.mm: System language is no longer needed.
+
+        * platform/LocalizedStrings.cpp: Ditto.
+        * platform/LocalizedStrings.h:
+
 2013-06-11  Benjamin Poulain  <bpoul...@apple.com>
 
         Fix the element type in the selector checkers

Modified: trunk/Source/WebCore/English.lproj/Localizable.strings (151468 => 151469)


--- trunk/Source/WebCore/English.lproj/Localizable.strings	2013-06-11 20:53:31 UTC (rev 151468)
+++ trunk/Source/WebCore/English.lproj/Localizable.strings	2013-06-11 20:55:02 UTC (rev 151469)
@@ -73,8 +73,8 @@
 /* Undo action name */
 "Align Right (Undo action name)" = "Align Right";
 
-/* Menu item label for automatic track selection behavior in the form of 'Automatic (SystemLanguage)' */
-"Automatic (%@)" = "Automatic (%@)";
+/* Menu item label for automatic track selection behavior */
+"Auto (Recommended)" = "Auto (Recommended)";
 
 /* Back context menu item */
 "Back" = "Back";

Modified: trunk/Source/WebCore/page/CaptionUserPreferencesMac.mm (151468 => 151469)


--- trunk/Source/WebCore/page/CaptionUserPreferencesMac.mm	2013-06-11 20:53:31 UTC (rev 151468)
+++ trunk/Source/WebCore/page/CaptionUserPreferencesMac.mm	2013-06-11 20:55:02 UTC (rev 151469)
@@ -539,10 +539,8 @@
 {
     if (track == TextTrack::captionMenuOffItem())
         return textTrackOffMenuItemText();
-    if (track == TextTrack::captionMenuAutomaticItem()) {
-        String preferredLanguageDisplayName = displayNameForLanguageLocale(languageIdentifier(defaultLanguage()));
-        return textTrackAutomaticMenuItemText(preferredLanguageDisplayName);
-    }
+    if (track == TextTrack::captionMenuAutomaticItem())
+        return textTrackAutomaticMenuItemText();
 
     StringBuilder displayName;
     String label = track->label();

Modified: trunk/Source/WebCore/platform/LocalizedStrings.cpp (151468 => 151469)


--- trunk/Source/WebCore/platform/LocalizedStrings.cpp	2013-06-11 20:53:31 UTC (rev 151468)
+++ trunk/Source/WebCore/platform/LocalizedStrings.cpp	2013-06-11 20:55:02 UTC (rev 151469)
@@ -1026,9 +1026,9 @@
     return WEB_UI_STRING("Off", "Menu item label for the track that represents disabling closed captions");
 }
 
-String textTrackAutomaticMenuItemText(const String& language)
+String textTrackAutomaticMenuItemText()
 {
-    return formatLocalizedString(WEB_UI_STRING("Automatic (%@)", "Menu item label for automatic track selection behavior in the form of 'Automatic (SystemLanguage)'"), language.createCFString().get());
+    return formatLocalizedString(WEB_UI_STRING("Auto (Recommended)", "Menu item label for automatic track selection behavior"));
 }
 
 String textTrackNoLabelText()

Modified: trunk/Source/WebCore/platform/LocalizedStrings.h (151468 => 151469)


--- trunk/Source/WebCore/platform/LocalizedStrings.h	2013-06-11 20:53:31 UTC (rev 151468)
+++ trunk/Source/WebCore/platform/LocalizedStrings.h	2013-06-11 20:55:02 UTC (rev 151469)
@@ -238,7 +238,7 @@
 #if ENABLE(VIDEO_TRACK)
     String textTrackSubtitlesText();
     String textTrackOffMenuItemText();
-    String textTrackAutomaticMenuItemText(const String& language);
+    String textTrackAutomaticMenuItemText();
     String textTrackNoLabelText();
 #if PLATFORM(MAC)
     String textTrackCountryAndLanguageMenuItemText(const String& title, const String& country, const String& language);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to