Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-57802

eo locale is improperly handled

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P4: Low P4: Low
    • 5.12.0
    • 5.7.1
    • Core: Locales (i18n)
    • None
    • 44b6757fe50b6bf581864d3da519a3ff60818fa8

      Issues:

      • Instantiating a QLocale with 'eo' gives back the default "C" locale (nativeLanguageName returns empty string).
      • Instantiating a QLocale with QLocale::Esperanto gives back the default 'en' locale (nativeLanguageName returns 'American English').
      #include <QCoreApplication>
      #include <QLocale>
      #include <QTextStream>
      
      int main(int argc, char *argv[])
      {
          QCoreApplication a(argc, argv);
      
          auto locale = QLocale("eo");
          QTextStream(stdout)
            << locale.language() << endl            // "1"
            << locale.nativeLanguageName() << endl; // ""
      
          locale = QLocale(QLocale::Esperanto, QLocale::AnyCountry);
          QTextStream(stdout)
            << locale.language() << endl            // "31"
            << locale.nativeLanguageName() << endl; // "American English"
      
          QTextStream(stdout)
            << QLocale::Esperanto << endl                             // "32"
            << QLocale::languageToString(QLocale::Esperanto) << endl; // "Esperanto"
      
          return a.exec();
      }
      

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            Eddy Edward Welbourne
            sikmir Nikolay Korotkiy
            Votes:
            1 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes