mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-28 18:05:36 -04:00
i18n: fix typo and code-style
This commit is contained in:
parent
53fb16437f
commit
a1fb83bdc4
1 changed files with 6 additions and 5 deletions
|
@ -24,7 +24,8 @@
|
||||||
*
|
*
|
||||||
* Returns a pair of nullptrs for non-special cases.
|
* Returns a pair of nullptrs for non-special cases.
|
||||||
*/
|
*/
|
||||||
static std::pair< QLocale*, QString* > specialCase( const QString& localeName )
|
static std::pair< QLocale*, QString* >
|
||||||
|
specialCase( const QString& localeName )
|
||||||
{
|
{
|
||||||
if ( localeName == "sr@latin" )
|
if ( localeName == "sr@latin" )
|
||||||
{
|
{
|
||||||
|
@ -33,7 +34,7 @@ static std::pair< QLocale*, QString* > specialCase( const QString& localeName )
|
||||||
}
|
}
|
||||||
if ( localeName == "ca@valencia" )
|
if ( localeName == "ca@valencia" )
|
||||||
{
|
{
|
||||||
static QString name = QStringLiteral( "Català (Valencia)" );
|
static QString name = QStringLiteral( "Català (València)" );
|
||||||
return { nullptr, &name };
|
return { nullptr, &name };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -69,10 +70,10 @@ Label::Label( const QString& locale, LabelFormat format, QObject* parent )
|
||||||
|
|
||||||
bool needsCountryName = ( format == LabelFormat::AlwaysWithCountry )
|
bool needsCountryName = ( format == LabelFormat::AlwaysWithCountry )
|
||||||
|| ( locale.contains( '_' ) && QLocale::countriesForLanguage( m_locale.language() ).count() > 1 );
|
|| ( locale.contains( '_' ) && QLocale::countriesForLanguage( m_locale.language() ).count() > 1 );
|
||||||
QString countryName =
|
QString countryName = ( needsCountryName ?
|
||||||
( needsCountryName ?
|
|
||||||
|
|
||||||
m_locale.nativeCountryName() : QString() );
|
m_locale.nativeCountryName()
|
||||||
|
: QString() );
|
||||||
m_label = needsCountryName ? longFormat.arg( languageName, countryName ) : languageName;
|
m_label = needsCountryName ? longFormat.arg( languageName, countryName ) : languageName;
|
||||||
m_englishLabel = needsCountryName ? longFormat.arg( englishName, QLocale::countryToString( m_locale.country() ) )
|
m_englishLabel = needsCountryName ? longFormat.arg( englishName, QLocale::countryToString( m_locale.country() ) )
|
||||||
: englishName;
|
: englishName;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue