From a1fb83bdc466effcf73dc939277a07601a09fe7b Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 26 Jul 2021 11:16:26 +0200 Subject: [PATCH] i18n: fix typo and code-style --- src/libcalamares/locale/Label.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/libcalamares/locale/Label.cpp b/src/libcalamares/locale/Label.cpp index fd3d6feec..e2cfbc70a 100644 --- a/src/libcalamares/locale/Label.cpp +++ b/src/libcalamares/locale/Label.cpp @@ -24,7 +24,8 @@ * * 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" ) { @@ -33,7 +34,7 @@ static std::pair< QLocale*, QString* > specialCase( const QString& localeName ) } if ( localeName == "ca@valencia" ) { - static QString name = QStringLiteral( "Català (Valencia)" ); + static QString name = QStringLiteral( "Català (València)" ); return { nullptr, &name }; } @@ -69,10 +70,10 @@ Label::Label( const QString& locale, LabelFormat format, QObject* parent ) bool needsCountryName = ( format == LabelFormat::AlwaysWithCountry ) || ( locale.contains( '_' ) && QLocale::countriesForLanguage( m_locale.language() ).count() > 1 ); - QString countryName = - ( needsCountryName ? + QString countryName = ( needsCountryName ? - m_locale.nativeCountryName() : QString() ); + m_locale.nativeCountryName() + : QString() ); m_label = needsCountryName ? longFormat.arg( languageName, countryName ) : languageName; m_englishLabel = needsCountryName ? longFormat.arg( englishName, QLocale::countryToString( m_locale.country() ) ) : englishName;