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

eo locale is improperly handled

    XMLWordPrintable

Details

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

    Description

      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();
      }
      

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: