Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

format.language returns und for unknown locales #6153

Closed
Romadro opened this issue Jul 9, 2019 · 3 comments
Closed

format.language returns und for unknown locales #6153

Romadro opened this issue Jul 9, 2019 · 3 comments
Assignees
Labels

Comments

@Romadro
Copy link

Romadro commented Jul 9, 2019

Issue description

format.language returns "und" for unknown locales on Sony C6603, but on other devices at the same case format.language returns original value from "lang" attribute.

Reproduction steps

Parse Dash manifest where AdaptationSet tag have "lang" attribute with "hello" value

Link to test content

I have no public link

Version of ExoPlayer being used

2.10.1

Device(s) and version(s) of Android being used

Sony C6603 (android 5.1.1)

@google-oss-bot

This comment has been minimized.

@ojw28
Copy link
Contributor

ojw28 commented Jul 14, 2019

@tonihei - IIRC you looked at language tag normalization recently. Could you take a look at this (it sounds OS version or device specific, but we have some Xperia Z devices to test on).

ojw28 pushed a commit that referenced this issue Jul 18, 2019
1. Using the Locale on API<21 doesn't make any sense because it's a no-op
   anyway. Slightly restructured the code to avoid that.
2. API<21 often reports languages with non-standard underscores instead of
   dashes. Normalize that too.
3. Some invalid language tags on API>21 get normalized to "und". Use original
   tag in such a case.

Issue:#6153
PiperOrigin-RevId: 258773463
@tonihei
Copy link
Collaborator

tonihei commented Jul 22, 2019

Problem was fixed by the commit above.

@tonihei tonihei closed this as completed Jul 22, 2019
ojw28 pushed a commit that referenced this issue Jul 28, 2019
1. Using the Locale on API<21 doesn't make any sense because it's a no-op
   anyway. Slightly restructured the code to avoid that.
2. API<21 often reports languages with non-standard underscores instead of
   dashes. Normalize that too.
3. Some invalid language tags on API>21 get normalized to "und". Use original
   tag in such a case.

Issue:#6153
PiperOrigin-RevId: 258773463
@google google locked and limited conversation to collaborators Oct 1, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants