Bug 466894 - AutoCorrectionLanguage widget shows entries in lowercase
Summary: AutoCorrectionLanguage widget shows entries in lowercase
Status: REPORTED
Alias: None
Product: ktextaddons
Classification: Frameworks and Libraries
Component: general (other bugs)
Version First Reported In: unspecified
Platform: Flatpak Linux
: NOR normal
Target Milestone: ---
Assignee: Laurent Montel
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-03-05 15:11 UTC by Raphael Kubo da Costa
Modified: 2023-03-05 20:00 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
KMail screenshot (37.28 KB, image/png)
2023-03-05 15:11 UTC, Raphael Kubo da Costa
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Raphael Kubo da Costa 2023-03-05 15:11:23 UTC
Created attachment 157015 [details]
KMail screenshot

This does not match the KDE HIG (https://develop.kde.org/hig/components/editing/combobox/ and https://develop.kde.org/hig/style/writing/capitalization/) and makes users like KMail's "Autocorrection language" option look weird.

See the attached screenshot and how the options for "Dictionary" and "Autocorrection language" differ.
Comment 1 Laurent Montel 2023-03-05 17:48:48 UTC
Hi,
this list comes from QLocale.
QString languageName = nativeName.isEmpty() ? QLocale::languageToString(lang.language()) : nativeName;

I don't see how to fix it.
Comment 2 Raphael Kubo da Costa 2023-03-05 18:33:11 UTC
The next line does

            languageName = languageName.toLower();

although QLocale::nativeLanguageName() returns a string that might or might not be capitalized (e.g. it returns "American English" but "français").

I'm not sure if it makes sense to do what the Sonnet combobox for the Dictionary option does, which is not call toLower(). That would lead to a combobox with inconsistent capitalization in the entries (just like Sonnet's), otherwise I guess you could just capitalize each word, or at least the first one?
Comment 3 Laurent Montel 2023-03-05 18:55:59 UTC
(In reply to Raphael Kubo da Costa from comment #2)
> The next line does
> 
>             languageName = languageName.toLower();
> 
> although QLocale::nativeLanguageName() returns a string that might or might
> not be capitalized (e.g. it returns "American English" but "français").
> 
> I'm not sure if it makes sense to do what the Sonnet combobox for the
> Dictionary option does, which is not call toLower(). That would lead to a
> combobox with inconsistent capitalization in the entries (just like
> Sonnet's), otherwise I guess you could just capitalize each word, or at
> least the first one?

but In language as arabic/corean etc. I don't know if it's possible to do it etc.
Comment 4 Raphael Kubo da Costa 2023-03-05 20:00:20 UTC
Doesn't that also apply to lowercasing everything like it's currently done, in which case it might be better to just provide a mix of capitalized and non-capitalized entries as returned by QLocale?