[libcalamares] Prepare for ie (Interlingue) support in Qt
This commit is contained in:
parent
c34d401cc3
commit
ec5272ad65
@ -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 );
|
||||
|
@ -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" },
|
||||
|
@ -18,6 +18,9 @@
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
|
||||
///@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
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user