WeblateOrg / weblate

Web based localization tool with tight version control integration.
https://weblate.org/
GNU General Public License v3.0
4.56k stars 1.01k forks source link

Check for more than one capital letter per word #8753

Open comradekingu opened 1 year ago

comradekingu commented 1 year ago

Describe the problem

THis is an error, and it often stems from holding down shift for too long, etc.

Describe the solution you'd like

A check triggered when a word contains more than one capital letter, which is an error in most any language (?)

Describe alternatives you've considered

If someone wants to do "ALL CAPS", or "CamelCase" in user-facing strings I think it follows that it is most often dumb enough to where having to add "ignore-doublecapital" flags for the ones that actually make sense is warranted.

Screenshots

No response

Additional context

Taken from #5281

github-actions[bot] commented 1 year ago

This issue seems to be a good fit for newbie contributors. You are welcome to contribute to Weblate! Don't hesitate to ask any questions you would have while implementing this.

You can learn about how to get started in our contributors documentation.

tjhietala commented 1 year ago

There are lots of names like DeLorean, McFly, O'Brien, etc. with more than one capital letter per word. And in computing: SmartArt, JavaScript, GitHub (!), etc.

You could of course look for two consecutive capital letters. But no more than two, unless you want to get false positives for things like PDF, SQL, HTML, etc.

nijel commented 1 year ago

The check should work the same as others – anything what is present in the source string is considered okay, it should trigger only on capitalization added in the translation.