Bug 120956 - Regression: media controls and status messages are no longer localized
Summary: Regression: media controls and status messages are no longer localized
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jer Noble
URL:
Keywords: InRadar
Depends on: 123749
Blocks: 131569 131570
  Show dependency treegraph
 
Reported: 2013-09-07 09:54 PDT by Jer Noble
Modified: 2014-04-12 00:20 PDT (History)
13 users (show)

See Also:


Attachments
Patch (16.37 KB, patch)
2014-04-11 12:27 PDT, Brent Fulgham
jer.noble: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jer Noble 2013-09-07 09:54:06 PDT
[Mac] Localize the JavaScript controls
Comment 1 James Craig 2013-10-31 13:28:10 PDT
related to bug 121990
Comment 2 Radar WebKit Bug Importer 2013-10-31 13:30:42 PDT
<rdar://problem/15365231>
Comment 3 James Craig 2013-11-04 18:54:41 PST
Blocking against bug 123749 because I've got more strings coming in that one.
Comment 4 Brent Fulgham 2014-04-11 12:27:17 PDT
Created attachment 229151 [details]
Patch
Comment 5 Jer Noble 2014-04-11 13:38:50 PDT
Comment on attachment 229151 [details]
Patch

Nice! r=me.
Comment 6 Jon Lee 2014-04-11 13:42:32 PDT
Comment on attachment 229151 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=229151&action=review

> Source/WebCore/English.lproj/mediaControlsLocalizedStringsiOS.js:4
> +        '##AIRPLAY_DEVICE_NAME##': 'This video is playing on "##DEVICE_NAME##".',

These should be the nicer quotes!
Comment 7 Brent Fulgham 2014-04-11 13:42:43 PDT
Committed r167145: <http://trac.webkit.org/changeset/167145>
Comment 8 Brent Fulgham 2014-04-11 13:48:10 PDT
(In reply to comment #6)
> (From update of attachment 229151 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=229151&action=review
> 
> > Source/WebCore/English.lproj/mediaControlsLocalizedStringsiOS.js:4
> > +        '##AIRPLAY_DEVICE_NAME##': 'This video is playing on "##DEVICE_NAME##".',
> 
> These should be the nicer quotes!

I don't understand what you mean here. Is there a UNICODE character for start/end quote we should be using?
Comment 9 Jon Lee 2014-04-11 13:55:21 PDT
(In reply to comment #8)
> (In reply to comment #6)
> > (From update of attachment 229151 [details] [details])
> > View in context: https://bugs.webkit.org/attachment.cgi?id=229151&action=review
> > 
> > > Source/WebCore/English.lproj/mediaControlsLocalizedStringsiOS.js:4
> > > +        '##AIRPLAY_DEVICE_NAME##': 'This video is playing on "##DEVICE_NAME##".',
> > 
> > These should be the nicer quotes!
> 
> I don't understand what you mean here. Is there a UNICODE character for start/end quote we should be using?

“##DEVICE_NAME##” rather than "##DEVICE_NAME##"
Comment 10 Brent Fulgham 2014-04-11 14:04:18 PDT
Curl quotes landed in follow-up:
r167147 <http://trac.webkit.org/changeset/167147>
Comment 11 Xabier Rodríguez Calvar 2014-04-11 15:41:46 PDT
Comment on attachment 229151 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=229151&action=review

> Source/WebCore/rendering/RenderThemeMac.mm:245
> -    if (m_mediaControlsScript.isEmpty())
> -        m_mediaControlsScript = [NSString stringWithContentsOfFile:[[NSBundle bundleForClass:[WebCoreRenderThemeBundle class]] pathForResource:@"mediaControlsApple" ofType:@"js"] encoding:NSUTF8StringEncoding error:nil];
> +    if (m_mediaControlsScript.isEmpty()) {
> +        StringBuilder scriptBuilder;
> +        scriptBuilder.append([NSString stringWithContentsOfFile:[[NSBundle bundleForClass:[WebCoreRenderThemeBundle class]] pathForResource:@"mediaControlsLocalizedStrings" ofType:@"js"] encoding:NSUTF8StringEncoding error:nil]);
> +        scriptBuilder.append([NSString stringWithContentsOfFile:[[NSBundle bundleForClass:[WebCoreRenderThemeBundle class]] pathForResource:@"mediaControlsApple" ofType:@"js"] encoding:NSUTF8StringEncoding error:nil]);
> +        m_mediaControlsScript = scriptBuilder.toString();
> +    }

If I am not mistaken, moving the localized strings to a different file will break both GTK and EFL (EFL just moved to JS controls and actually they use the Apple ones until they redesign them). I think you need to add the localized string file also for GTK and EFL in order not to break those ports.
Comment 12 Xabier Rodríguez Calvar 2014-04-11 15:52:26 PDT
(In reply to comment #11)
> (From update of attachment 229151 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=229151&action=review
> 
> > Source/WebCore/rendering/RenderThemeMac.mm:245
> > -    if (m_mediaControlsScript.isEmpty())
> > -        m_mediaControlsScript = [NSString stringWithContentsOfFile:[[NSBundle bundleForClass:[WebCoreRenderThemeBundle class]] pathForResource:@"mediaControlsApple" ofType:@"js"] encoding:NSUTF8StringEncoding error:nil];
> > +    if (m_mediaControlsScript.isEmpty()) {
> > +        StringBuilder scriptBuilder;
> > +        scriptBuilder.append([NSString stringWithContentsOfFile:[[NSBundle bundleForClass:[WebCoreRenderThemeBundle class]] pathForResource:@"mediaControlsLocalizedStrings" ofType:@"js"] encoding:NSUTF8StringEncoding error:nil]);
> > +        scriptBuilder.append([NSString stringWithContentsOfFile:[[NSBundle bundleForClass:[WebCoreRenderThemeBundle class]] pathForResource:@"mediaControlsApple" ofType:@"js"] encoding:NSUTF8StringEncoding error:nil]);
> > +        m_mediaControlsScript = scriptBuilder.toString();
> > +    }
> 
> If I am not mistaken, moving the localized strings to a different file will break both GTK and EFL (EFL just moved to JS controls and actually they use the Apple ones until they redesign them). I think you need to add the localized string file also for GTK and EFL in order not to break those ports.

And actually, it did.

http://build.webkit.org/results/GTK%20Linux%2064-bit%20Release/r167157%20%2846401%29/accessibility/media-element-pretty-diff.html
Comment 13 Brent Fulgham 2014-04-11 19:14:38 PDT
(In reply to comment #12)
> (In reply to comment #11)

> > 
> > If I am not mistaken, moving the localized strings to a different file will break both GTK and EFL (EFL just moved to JS controls and actually they use the Apple ones until they redesign them). I think you need to add the localized string file also for GTK and EFL in order not to break those ports.
> 
> And actually, it did.
> 
> http://build.webkit.org/results/GTK%20Linux%2064-bit%20Release/r167157%20%2846401%29/accessibility/media-element-pretty-diff.html

Martin Robinson and I already saw this, and he has an approved patch waiting to land as soon as EWS showed successful runs.
Comment 14 Xabier Rodríguez Calvar 2014-04-12 00:20:28 PDT
(In reply to comment #13)
> (In reply to comment #12)
> > (In reply to comment #11)
> 
> > > 
> > > If I am not mistaken, moving the localized strings to a different file will break both GTK and EFL (EFL just moved to JS controls and actually they use the Apple ones until they redesign them). I think you need to add the localized string file also for GTK and EFL in order not to break those ports.
> > 
> > And actually, it did.
> > 
> > http://build.webkit.org/results/GTK%20Linux%2064-bit%20Release/r167157%20%2846401%29/accessibility/media-element-pretty-diff.html
> 
> Martin Robinson and I already saw this, and he has an approved patch waiting to land as soon as EWS showed successful runs.

EFL could be broken too, see bug 120956