D25530: Sonnet: Add locales that are missing in QLocale

Waqar Ahmed noreply at phabricator.kde.org
Thu Nov 28 07:25:32 GMT 2019


waqar added a comment.


  > With no respect for your lack of being subtle
  
  I meant no disrespect to anyone. If you felt offended I apologize
  
  > we need to maintain this for 20 years in the future, you making a quick hack here doesn't make this any better, the user will still see cv_RU in random places and will be all annoyed anyway.
  
  Can you give examples of places where an iso_code (cv_RU) could pop up?
  
  Spellchecker is a frequently accessed tool. It can have more languages than any other tool. The user can just place a dictionary in the directory and it is the job of spellchecker to load those dictionaries and their filenames correctly.
  
  > Now go and make the fix in Qt
  
  Please don't give orders.
  
  Anyways, I looked deep into this to figure out what's the issue. The relevant data is stored in qlocale_data_p.h, it does have most of the iso_codes (even the ones that are being displayed incorrectly). What it doesn't have is native language names.
  
  So, if I do,
  
    QLocale locale("cv");
    QLocale::Language l = locale.language();
    QString localizedLangName = locale.languageToString(l);
  
  It shows `Chuvash` as the language name.
  
  Now, qlocale_data_p.h is a generated file. You can't edit it manually. Qt takes the data from CLDR <http://cldr.unicode.org/>. And CLDR doesn't have the native names for these languages. CLDR is a huge database of locale stuff, and it is not very easy to contribute data if you aren't a native speaker.
  
  > if it gets rejected, we can speak about doing dirty fixes.
  
  It's a fallback mechanism for when QLocale fails.

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/20191128/6d28137f/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list