Materialious / Materialious

Modern material design for Invidious.
https://materialio.us
GNU Affero General Public License v3.0
573 stars 26 forks source link

Keep common acronyms capitalized when title case is selected / Treat words separated by punctuation as separate words when doing title case transforms. #689

Closed Spaghetto392 closed 1 month ago

Spaghetto392 commented 1 month ago

Is your feature request related to a problem? Please describe. When title case is enabled for video titles, certain acronyms become harder to read, including Roman numerals. For example, should a video be denoted as video 2 in Roman numerals, instead of rendering as 'II', it will instead render as 'Ii', which given the font on Materialious, makes it look nearly identical to 'li.' Generally it can make certain acronyms a bit harder to read.

Describe the solution you'd like I propose the addition of some sort of whitelist where, should strings match entries in the list, they shall retain their original case. In addition, there should also be a condition to stop regular words from having cases capitalized. For example, assuming the original title of a video contained the word "NESTED" in all caps, it should not keep NES (acronym for Nintendo Entertainment System) capitalized when changing the case. Furthermore, if a special character is in between two acronyms, e.g. CPU/RAM, the two acronyms should be treated as separate words.

Describe alternatives you've considered Given that it's a minor aesthetic change for the most part, I don't believe this should be treated as a particularly high priority. It also comes with the obvious downside of having to retain a list of acronyms, which unless someone else is maintaining one already, could potentially be quite tedious. Ideally only the most common acronyms/Roman numerals are added to the list if it must be manually done.

Lastly, should the above be considered too much work, I would still like to treat this as a semi bug report on casing being inconsistent should punctuation separate two different words.

Additional context If you would like me to, I would be willing to compile a small list of acronyms myself and then present them to you. Also, I’m not quite sure whether to treat this as a feature request or a bug report.

Admittedly, this idea is probably overly ambitious.

WardPearce commented 1 month ago

Having a database of common acronyms and how to treat them is completely out of scope of this project. If you believe their is a bug with the title casing feature please open a separate issue.

Spaghetto392 commented 1 month ago

That's understandable, I was hoping by some chance you may have been aware of some easy way to do it. With that being said, would you consider a function to make numerals properly capitalized?

WardPearce commented 1 month ago

That's understandable, I was hoping by some chance you may have been aware of some easy way to do it. With that being said, would you consider a function to make numerals properly capitalized?

The issue is YouTube provides us the exact capitalisation the content creator wanted. Our feature for custom title capitalisation is already completely changing what the content creator wanted, so its difficult to know when to pick and choose capitalisation for different situations.

Spaghetto392 commented 1 month ago

In that case, I will write a separate issue for the punctuation. Thank you for taking the time to address this.