Opened 11 years ago
Last modified 11 years ago
#9652 new enhancement
case of names
Reported by: | Xapitoun | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Core validator | Version: | |
Keywords: | Cc: |
Description (last modified by )
Attachments (1)
Change History (5)
by , 11 years ago
Attachment: | name_case.png added |
---|
comment:1 by , 11 years ago
Component: | unspecified → Core validator |
---|---|
Description: | modified (diff) |
Priority: | minor → normal |
follow-up: 3 comment:2 by , 11 years ago
follow-up: 4 comment:3 by , 11 years ago
Replying to naoliv@…:
The problem is that sometimes the name is indeed all uppercase (and an autofix would make it wrong)
I assume it is the case for acronyms, then the presence of spaces should allow us to make the distinction ?
comment:4 by , 11 years ago
Replying to Don-vip:
I assume it is the case for acronyms, then the presence of spaces should allow us to make the distinction ?
Not on all cases (at least here). For example, people use a misc of short_name and name as name.
Instead using the full "Basic Health Care Unit The Full Name" they use "BHCU The Full Name" inside name. If we fix this it will stay as "Bhcu The Full Name".
Could the logic be improved to detect only one word in uppercase and ignore it?
Something like:
- if only one word in name, all uppercase and no spaces (an acronym), ignore
- if one word in uppercase and the others all in lowercase or only capitalized (first letter in uppercase), like the example above, ignore
- if multiple uppercase words separated by space, then capitalize them
But I have one doubt: do apache.commons.lang.WordUtils (or other lib/function) identifies words that shouldn't be capitalized?
"FOO OF SOMETHING" should become "Foo of Something" instead "Foo Of Something".
Here in Brazil we have the same problem.
I use this:
The problem is that sometimes the name is indeed all uppercase (and an autofix would make it wrong)