mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-29 02:15:36 -04:00
i18n: introduce special case for ca@valencia
This commit is contained in:
parent
740f1e7fe5
commit
0e977a7e42
2 changed files with 11 additions and 3 deletions
|
@ -63,6 +63,10 @@ Label::getLocale( const QString& localeName )
|
|||
QLocale loc( localeName ); // Ignores @latin
|
||||
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 );
|
||||
}
|
||||
|
|
|
@ -27,6 +27,12 @@ namespace Locale
|
|||
* Support class to turn locale names (as used by Calamares's
|
||||
* translation system) into QLocales, and also into consistent
|
||||
* 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
|
||||
{
|
||||
|
@ -86,9 +92,7 @@ public:
|
|||
|
||||
/** @brief Get a Qt locale for the given @p localeName
|
||||
*
|
||||
* 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).
|
||||
* This obeys special cases as described in the class documentation.
|
||||
*/
|
||||
static QLocale getLocale( const QString& localeName );
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue