Changeset 151469 in webkit


Ignore:
Timestamp:
Jun 11, 2013 1:55:02 PM (11 years ago)
Author:
eric.carlson@apple.com
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:
Location:
trunk
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r151463 r151469  
     12013-06-11  Eric Carlson  <eric.carlson@apple.com>
     2
     3        [Mac] Update text track menu
     4        https://bugs.webkit.org/show_bug.cgi?id=117351
     5
     6        Reviewed by Darin Adler.
     7
     8        * media/video-controls-captions-trackmenu-localized.html:
     9        * media/video-controls-captions-trackmenu-sorted.html:
     10        * platform/mac-lion/media/video-controls-captions-trackmenu-localized-expected.txt:
     11        * platform/mac/media/video-controls-captions-trackmenu-localized-expected.txt:
     12        * platform/mac/media/video-controls-captions-trackmenu-sorted-expected.txt:
     13
    1142013-06-11  Robert Hogan  <robert@webkit.org>
    215
  • trunk/LayoutTests/media/video-controls-captions-trackmenu-localized.html

    r147679 r151469  
    4141
    4242            item = captionsEntries[1];
    43             consoleWrite("<br>Second item in captions menu should be labelled 'Automatic (English)'");
    44             testExpected("item.textContent", "Automatic (English)");
     43            consoleWrite("<br>Second item in captions menu should be labelled 'Auto (Recommended)'");
     44            testExpected("item.textContent", "Auto (Recommended)");
    4545
    4646
  • trunk/LayoutTests/media/video-controls-captions-trackmenu-sorted.html

    r147675 r151469  
    4242                    trackMenuItems = textTrackMenuItems();
    4343                    testExpected("trackMenuItems[0].textContent", "Off");
    44                     testExpected("trackMenuItems[1].textContent", "Automatic (English)");
     44                    testExpected("trackMenuItems[1].textContent", "Auto (Recommended)");
    4545                    testExpected("trackMenuItems[2].textContent", "u (English) SDH");
    4646                    testExpected("trackMenuItems[3].textContent", "y (English-Australia) SDH");
     
    6363                    trackMenuItems = textTrackMenuItems();
    6464                    testExpected("trackMenuItems[0].textContent", "Off");
    65                     testExpected("trackMenuItems[1].textContent", "Automatic (Japanese)");
     65                    testExpected("trackMenuItems[1].textContent", "Auto (Recommended)");
    6666                    testExpected("trackMenuItems[2].textContent", "z (Japanese)");
    6767                    testExpected("trackMenuItems[3].textContent", "v (English)");
  • trunk/LayoutTests/platform/mac-lion/media/video-controls-captions-trackmenu-localized-expected.txt

    r149741 r151469  
    1111EXPECTED (item.textContent == 'Off') OK
    1212
    13 Second item in captions menu should be labelled 'Automatic (English)'
    14 EXPECTED (item.textContent == 'Automatic (English)') OK
     13Second item in captions menu should be labelled 'Auto (Recommended)'
     14EXPECTED (item.textContent == 'Auto (Recommended)') OK
    1515
    1616Third item in captions menu should be labelled 'English CC'
  • trunk/LayoutTests/platform/mac/media/video-controls-captions-trackmenu-localized-expected.txt

    r149503 r151469  
    1111EXPECTED (item.textContent == 'Off') OK
    1212
    13 Second item in captions menu should be labelled 'Automatic (English)'
    14 EXPECTED (item.textContent == 'Automatic (English)') OK
     13Second item in captions menu should be labelled 'Auto (Recommended)'
     14EXPECTED (item.textContent == 'Auto (Recommended)') OK
    1515
    1616Third item in captions menu should be labelled 'English CC'
  • trunk/LayoutTests/platform/mac/media/video-controls-captions-trackmenu-sorted-expected.txt

    r149503 r151469  
    99RUN(internals.settings.setShouldDisplayTrackKind('Captions', true))
    1010EXPECTED (trackMenuItems[0].textContent == 'Off') OK
    11 EXPECTED (trackMenuItems[1].textContent == 'Automatic (English)') OK
     11EXPECTED (trackMenuItems[1].textContent == 'Auto (Recommended)') OK
    1212EXPECTED (trackMenuItems[2].textContent == 'u (English) SDH') OK
    1313EXPECTED (trackMenuItems[3].textContent == 'y (English-Australia) SDH') OK
     
    2424RUN(internals.settings.setShouldDisplayTrackKind('Subtitles', true))
    2525EXPECTED (trackMenuItems[0].textContent == 'Off') OK
    26 EXPECTED (trackMenuItems[1].textContent == 'Automatic (Japanese)') OK
     26EXPECTED (trackMenuItems[1].textContent == 'Auto (Recommended)') OK
    2727EXPECTED (trackMenuItems[2].textContent == 'z (Japanese)'), OBSERVED 'w (Japanese) SDH' FAIL
    2828EXPECTED (trackMenuItems[3].textContent == 'v (English)'), OBSERVED 'z (Japanese)' FAIL
  • trunk/Source/WebCore/ChangeLog

    r151467 r151469  
     12013-06-11  Eric Carlson  <eric.carlson@apple.com>
     2
     3        [Mac] Update text track menu
     4        https://bugs.webkit.org/show_bug.cgi?id=117351
     5
     6        Reviewed by Darin Adler.
     7
     8        No new tests, existing tests updated.
     9
     10        * English.lproj/Localizable.strings: Update the menu title.
     11
     12        * page/CaptionUserPreferencesMac.mm: System language is no longer needed.
     13
     14        * platform/LocalizedStrings.cpp: Ditto.
     15        * platform/LocalizedStrings.h:
     16
    1172013-06-11  Benjamin Poulain  <bpoulain@apple.com>
    218
  • trunk/Source/WebCore/English.lproj/Localizable.strings

    r148101 r151469  
    7474"Align Right (Undo action name)" = "Align Right";
    7575
    76 /* Menu item label for automatic track selection behavior in the form of 'Automatic (SystemLanguage)' */
    77 "Automatic (%@)" = "Automatic (%@)";
     76/* Menu item label for automatic track selection behavior */
     77"Auto (Recommended)" = "Auto (Recommended)";
    7878
    7979/* Back context menu item */
  • trunk/Source/WebCore/page/CaptionUserPreferencesMac.mm

    r150260 r151469  
    540540    if (track == TextTrack::captionMenuOffItem())
    541541        return textTrackOffMenuItemText();
    542     if (track == TextTrack::captionMenuAutomaticItem()) {
    543         String preferredLanguageDisplayName = displayNameForLanguageLocale(languageIdentifier(defaultLanguage()));
    544         return textTrackAutomaticMenuItemText(preferredLanguageDisplayName);
    545     }
     542    if (track == TextTrack::captionMenuAutomaticItem())
     543        return textTrackAutomaticMenuItemText();
    546544
    547545    StringBuilder displayName;
  • trunk/Source/WebCore/platform/LocalizedStrings.cpp

    r149980 r151469  
    10271027}
    10281028
    1029 String textTrackAutomaticMenuItemText(const String& language)
    1030 {
    1031     return formatLocalizedString(WEB_UI_STRING("Automatic (%@)", "Menu item label for automatic track selection behavior in the form of 'Automatic (SystemLanguage)'"), language.createCFString().get());
     1029String textTrackAutomaticMenuItemText()
     1030{
     1031    return formatLocalizedString(WEB_UI_STRING("Auto (Recommended)", "Menu item label for automatic track selection behavior"));
    10321032}
    10331033
  • trunk/Source/WebCore/platform/LocalizedStrings.h

    r150876 r151469  
    239239    String textTrackSubtitlesText();
    240240    String textTrackOffMenuItemText();
    241     String textTrackAutomaticMenuItemText(const String& language);
     241    String textTrackAutomaticMenuItemText();
    242242    String textTrackNoLabelText();
    243243#if PLATFORM(MAC)
Note: See TracChangeset for help on using the changeset viewer.