Bug report #22076

Capitalize first letter in label not working

Added by matteo ghetta almost 5 years ago. Updated almost 5 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Labelling
Affected QGIS version:3.6.2 Regression?:Yes
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:29889

Description

If the field used to label the layer contains values all capitalized, then the option "Capitalize first letter" is not working (nothing changes). While the expression `title("field")` works correctly.

History

#1 Updated by Giovanni Manghi almost 5 years ago

  • Status changed from Open to Feedback

if is a regression it must be given high priority.

#2 Updated by Alessandro Pasotti almost 5 years ago

From the "Capitalize" function definition (Python):

In Python, the capitalize() method converts the first character of a string to capital (uppercase) letter. If the string has its first character as capital, then it returns the original string.

I'd close this as invalid or file a feature request to implement a "titleize" function.

#3 Updated by matteo ghetta almost 5 years ago

OK get it. Still it seems a little bit confusing for users: for `capitalize first letter` I expect only the first letter to be capitalized, no matter what the input is.

#4 Updated by Nyall Dawson almost 5 years ago

For what it's worth, if you search deep in the tracker this same issue has been discussed at least 3 or 4 times previously (also on the mailing list)

#5 Updated by matteo ghetta almost 5 years ago

  • Status changed from Feedback to Closed

OK then I wasn't able to find other similar issues :) OK guys, you convinced me.

#6 Updated by Harrissou Santanna almost 5 years ago

Nyall Dawson wrote:

For what it's worth, if you search deep in the tracker this same issue has been discussed at least 3 or 4 times previously (also on the mailing list)

Indeed. Then imho such a situation shows that there's an issue (people don't seem to understand this label). Or a missing option (aka "titleize" ?) that would help them put it into perspective.

#7 Updated by Alessandro Pasotti almost 5 years ago

Can you file a feature request for "titleize"?

Also available in: Atom PDF