Capitalize first letter of a text in track selector menu items
See original GitHub issueThis is how the audio selector of StyledPlayerView
looks like in two languages (English and Czech):
In Czech (and other languages probably as well), the language name (angličtina
) is in all lower case characters. But because of the use in this menu, I think the first letter should be upper cased in DefaultTrackNameProvider.buildLanguageOrLabelString().
- ExoPlayer version number: 2.15.0
- Android version: Android 10
- Android device: OnePlus 7
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
How to Automatically Capitalize Text the Way You Want - Zapier
Select your text, click the Format menu, then select Capitalization and choose the case you want. It supports upper and lower case, along...
Read more >regex - Notepad++ Capitalize Every First Letter of Every Word
In case you have hyphenated words, like well-known , and you only want the first part to be capitalized, you can use [\w-]+...
Read more >Convert text to all CAPS and more in Google Docs
UPPERCASE, to capitalize all the letters in your selection. Title Case, to capitalize the first letter of each word in your selection.
Read more >Change the capitalization or case of text - Microsoft Support
To capitalize all of the letters, click UPPERCASE. To capitalize the first letter of each word and leave the other letters lowercase, click...
Read more >Capitalization - Affinity Help
Capitalization transformations are available from the Text>Capitalization menu. Dynamic transformations. Items in the menu's first group are applied dynamically ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think
Locale.getDisplayName
returns a string that would be suitable for use mid-sentence. In English, language names are generally capitalized whether they occur at the start or in the middle of a sentence, so it makes no difference. I’m guessing this is not the case in Czech, which is why this ends up being problematic. We probably want to useUCharacter.toTitleCase
to convert the string into a suitable title case before returning it.This is fixed by the three commits ref’d above (the second is a rollback, and third is a roll forward that includes a fix for the initial commit).