i18n: introduce special case for ca@valencia
This commit is contained in:
parent
740f1e7fe5
commit
0e977a7e42
@ -63,6 +63,10 @@ Label::getLocale( const QString& localeName )
|
|||||||
QLocale loc( localeName ); // Ignores @latin
|
QLocale loc( localeName ); // Ignores @latin
|
||||||
return QLocale( loc.language(), QLocale::Script::LatinScript, loc.country() );
|
return QLocale( loc.language(), QLocale::Script::LatinScript, loc.country() );
|
||||||
}
|
}
|
||||||
|
if ( localeName == QStringLiteral( "ca@valencia" ) )
|
||||||
|
{
|
||||||
|
return QLocale( localeName ); // Ignores @valencia, but there is **really** no way to handle this
|
||||||
|
}
|
||||||
|
|
||||||
return QLocale( localeName );
|
return QLocale( localeName );
|
||||||
}
|
}
|
||||||
|
@ -27,6 +27,12 @@ namespace Locale
|
|||||||
* Support class to turn locale names (as used by Calamares's
|
* Support class to turn locale names (as used by Calamares's
|
||||||
* translation system) into QLocales, and also into consistent
|
* translation system) into QLocales, and also into consistent
|
||||||
* human-readable text labels.
|
* human-readable text labels.
|
||||||
|
*
|
||||||
|
* This handles special-cases in Calamares translations:
|
||||||
|
* - `sr@latin` is the name which Qt recognizes as `sr@latn`,
|
||||||
|
* Serbian written with Latin characters (not Cyrillic).
|
||||||
|
* - `ca@valencia` is the Catalan dialect spoken in Valencia.
|
||||||
|
* There is no Qt code for it.
|
||||||
*/
|
*/
|
||||||
class Label : public QObject
|
class Label : public QObject
|
||||||
{
|
{
|
||||||
@ -86,9 +92,7 @@ public:
|
|||||||
|
|
||||||
/** @brief Get a Qt locale for the given @p localeName
|
/** @brief Get a Qt locale for the given @p localeName
|
||||||
*
|
*
|
||||||
* This handles special-cases in Calamares translations:
|
* This obeys special cases as described in the class documentation.
|
||||||
* - `sr@latin` is the name which Qt recognizes as `sr@latn`,
|
|
||||||
* Serbian written with Latin characters (not Cyrillic).
|
|
||||||
*/
|
*/
|
||||||
static QLocale getLocale( const QString& localeName );
|
static QLocale getLocale( const QString& localeName );
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user