diff --git a/src/libcalamares/locale/Tests.cpp b/src/libcalamares/locale/Tests.cpp index 812f53d06..45e9fc094 100644 --- a/src/libcalamares/locale/Tests.cpp +++ b/src/libcalamares/locale/Tests.cpp @@ -122,9 +122,15 @@ LocaleTests::testEsperanto() void LocaleTests::testInterlingue() { +#if CALAMARES_QT_SUPPORT_INTERLINGUE + // ie was fixed in version ... of Qt + QCOMPARE( QLocale( "ie" ).language(), QLocale::Interlingue ); + QCOMPARE( QLocale( QLocale::Interlingue ).language(), QLocale::Interlingue ); +#else // ie / Interlingue is borked (is "ie" even the right name?) QCOMPARE( QLocale( "ie" ).language(), QLocale::C ); QCOMPARE( QLocale( QLocale::Interlingue ).language(), QLocale::English ); +#endif // "ia" exists (post-war variant of Interlingue) QCOMPARE( QLocale( "ia" ).language(), QLocale::Interlingua ); diff --git a/src/libcalamares/locale/Translation.cpp b/src/libcalamares/locale/Translation.cpp index 49e4c05d2..0a7312704 100644 --- a/src/libcalamares/locale/Translation.cpp +++ b/src/libcalamares/locale/Translation.cpp @@ -94,11 +94,11 @@ static constexpr const TranslationSpecialCase special_cases[] = { QLocale::Script::AnyScript, QLocale::Country::AnyCountry, nullptr }, - // Interlingue is mapped to interlingu*a* because + // Interlingue is mapped to interlingu*a* (up until Qt version ...) because // the real Language::Interlingue acts like C locale. { "ie", nullptr, - QLocale::Language::Interlingua, + CALAMARES_QT_SUPPORT_INTERLINGUE ? QLocale::Language::Interlingue : QLocale::Language::Interlingua, QLocale::Script::AnyScript, QLocale::Country::AnyCountry, "Interlingue" }, diff --git a/src/libcalamares/locale/Translation.h b/src/libcalamares/locale/Translation.h index cec70f525..4c71538a2 100644 --- a/src/libcalamares/locale/Translation.h +++ b/src/libcalamares/locale/Translation.h @@ -18,6 +18,9 @@ #include #include +///@brief Define to 1 if the Qt version being used supports Interlingue fully +#define CALAMARES_QT_SUPPORT_INTERLINGUE 0 + namespace Calamares { namespace Locale @@ -35,6 +38,8 @@ namespace Locale * Serbian written with Latin characters (not Cyrillic). * - `ca@valencia` is the Catalan dialect spoken in Valencia. * There is no Qt code for it. + * + * (There are more special cases, not documented here) */ class DLLEXPORT Translation : public QObject {