Capitalize first letter of type
AbandonedPublic

Authored by xyquadrat on Mar 15 2018, 8:04 PM.

Details

Reviewers
None
Group Reviewers
Baloo
Summary

Currently, e.g. Dolphin will display "folder" or "plain text document" as the type.
It would be visually more appealing if the first letter was capitalized (so "Folder" and "Plain text document"), as other properties are also capitalized.

This patch can probably also be done inline (with some clever way of concatenating strings), but I was not able to figure out a reliable way to do it this way.

After this patch:

Test Plan
  • Works with multiple types of files

Diff Detail

Repository
R824 Baloo Widgets
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
xyquadrat created this revision.Mar 15 2018, 8:04 PM
Restricted Application added a project: Baloo. · View Herald TranscriptMar 15 2018, 8:04 PM
xyquadrat requested review of this revision.Mar 15 2018, 8:04 PM
xyquadrat edited the summary of this revision. (Show Details)Mar 15 2018, 8:06 PM

Look good already in german


Which locale are you using?

US English, I guess the German translator already capitalized "Ordner" as this is the correct way in German.

So it should be done by the translators and not here. At this point item.mimeComment() is already translated. Question is, where to place the hint for them (KIO, maybe).
Do translators from en => en exist at all?

Just chiming in: Are you sure this is the right place for this? Shouldn't that be done at the place where the string is displayed by using QFont::setCapitalization?

If you want to actually want to fix it here, your approach might not work for all languages. You probably don't want to change the first character, but the first grapheme, which can be found with QTextBoundaryFinder.

michaelh added a subscriber: lueck.Mar 16 2018, 6:57 PM

This appears to be more complicated than I thought, thanks for the hint @fabiank . I think the best solution would be to notify the translators somehow, so that they can update the respective strings.
But I am not familiar with the translation process of KDE, so I don't know how to contact them... I guess I'll abandon this patch soon because it tries to fix a problem which should be resolved on a higher level.

This appears to be more complicated than I thought, thanks for the hint @fabiank . I think the best solution would be to notify the translators somehow, so that they can update the respective strings.
But I am not familiar with the translation process of KDE, so I don't know how to contact them... I guess I'll abandon this patch soon because it tries to fix a problem which should be resolved on a higher level.

In case you want to keep going: https://api.kde.org/frameworks/ki18n/html/prg_guide.html

FYI You can formally abandon the patch using the Add Action... menu that's right above the comment field.

xyquadrat abandoned this revision.Mar 25 2018, 7:07 PM

Should be fixed on a higher level (translations) -> abandoning patch.