D25530: Sonnet: Add locales that are missing in QLocale

Alexander Potashev noreply at phabricator.kde.org
Tue Nov 26 13:32:39 GMT 2019


aspotashev added inline comments.

INLINE COMMENTS

> waqar wrote in loader.cpp:255
> I used wikipedia and the description files provided with the dictionaries for this information. It may not be correct however. If you know the language or the rules, please feel free to correct me and I will amend the commit accordingly

There may be different consistent approaches to capitalization:

1. Use the spelling like if the language name comes in the middle of a sentence. This implies all-lowercase spelling for many Cyrillic-based languages, e.g. "русский" for Russian.
2. Use the spelling like if the language name comes in the beginning of a sentence. In many languages that means that first letter is in uppercase, e.g. "Русский" for Russian.

I don't know which of these approaches is taken by Qt, but we should follow the pattern. Until then, I can't say how to fix this patch.

---

After having a look on the Qt source code (qlocale_unix.cpp, qlocale_win.cpp) I'm not sure where do these native language names from on Unix/Linux. QSystemLocale::query() as defined in qlocale_unix.cpp seems to returns an empty QVariant.

I think it would be really helpful if we add unit tests for this Loader::languageNameForCode() method.

---

I don't know these languages, however I can read Russian and at least detect capital letters in languages that mostly reuse the Russian alphabet.

Now so sure about Chuvash language anymore because English Wikipedia says "Чӑвашла" while Russian 
Wikipedia and many other resources in Russian say "чӑвашла", e.g. https://en.wiktionary.org/wiki/чӑваш_чӗлхи

REPOSITORY
  R246 Sonnet

REVISION DETAIL
  https://phabricator.kde.org/D25530

To: waqar
Cc: aspotashev, aacid, yurchor, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20191126/f9502675/attachment.html>


More information about the Kde-frameworks-devel mailing list