[webkit-reviews] review granted: [Bug 226361] [Modern Media Controls] put the localized information for tracks first if the track is not in the user's preferred language : [Attachment 429951] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri May 28 09:23:30 PDT 2021


Eric Carlson <eric.carlson at apple.com> has granted Devin Rousso
<drousso at apple.com>'s request for review:
Bug 226361: [Modern Media Controls] put the localized information for tracks
first if the track is not in the user's preferred language
https://bugs.webkit.org/show_bug.cgi?id=226361

Attachment 429951: Patch

https://bugs.webkit.org/attachment.cgi?id=429951&action=review




--- Comment #3 from Eric Carlson <eric.carlson at apple.com> ---
Comment on attachment 429951
  --> https://bugs.webkit.org/attachment.cgi?id=429951
Patch

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

> Source/WebCore/ChangeLog:31
> +	   This makes it clearer/easier for the user to understand what's going
on when the track label
> +	   is not in the user's preferred language. For example, if a `<video>`
has an "English" audio
> +	   track, it's not very helpful to show "English (è±è¯­)" for Chinese
users instead of something
> +	   like "è±è¯­ (English)".
> +
> +	   If the track has a `label` and either matches the user's preferred
language or its `label`
> +	   already contains the localized language name, combine the track's
`label` with a localized
> +	   description of the track if that description isn't already in the
`label`. Otherwise, add
> +	   the localized language name first, then the description of the
track, and finally the `label`.
> +
> +	   Here are some examples if the user's preferred language is English:
> +	    - `<track kind="subtitles" srclang="en">`		       would
show "English"
> +	    - `<track kind="subtitles" srclang="en" label="Foo">`      would
show "Foo"
> +	    - `<track kind="captions"  srclang="en">`		       would
show "English Captions"
> +	    - `<track kind="captions"  srclang="en" label="Foo">`      would
show "Foo Captions"
> +	    - `<track kind="captions"  srclang="en" label="Captions">` would
show "Captions"
> +	    - `<track kind="subtitles" srclang="fr">`		       would
show "French"
> +	    - `<track kind="subtitles" srclang="fr" label="Foo">`      would
show "French (Foo)"
> +	    - `<track kind="captions"  srclang="fr">`		       would
show "French Captions"
> +	    - `<track kind="captions"  srclang="fr" label="Foo">`      would
show "French Captions (Foo)"
> +	    - `<track kind="captions"  srclang="fr" label="Captions">` would
show "French Captions"

This is a fantastic explanation!


More information about the webkit-reviews mailing list