jenkins-bot has submitted this change and it was merged. Change subject: Internationalization of users stats boxes ......................................................................
Internationalization of users stats boxes Creating messages and removing lego. Change-Id: Ia3907fe08c084182962a60170887c93b9f6e9d56 --- M MainPage/MainPage.i18n.php M MainPage/resources/css/ext.translate.mainpage.css M MainPage/specials/SpecialTwnMainPage.php 3 files changed, 37 insertions(+), 7 deletions(-) Approvals: Amire80: Looks good to me, but someone else must approve Siebrand: Looks good to me, approved jenkins-bot: Verified diff --git a/MainPage/MainPage.i18n.php b/MainPage/MainPage.i18n.php index a2c5133..664b0c5 100644 --- a/MainPage/MainPage.i18n.php +++ b/MainPage/MainPage.i18n.php @@ -26,6 +26,10 @@ 'twnmp-proofread-link' => 'Proofread', 'twnmp-translate-button' => 'Translate', 'twnmp-proofread-button' => 'Proofread', + + 'twnmp-translations-per-month' => 'Translations/month', + 'twnmp-reviews-per-month' => 'Reviews/month', + 'twnmp-translations-translator-ranking' => '{{GENDER:$1|Ranked}} $2 of $3 translators<br />in $4', ); /** English @@ -55,6 +59,20 @@ Pressing the button brings the user to the translation editor. Parallel to {{ms-msg|twnmp-proofread-button}}.', 'twnmp-proofread-button' => 'A label for the button that appears near the user\'s translation statistics. Pressing the button brings the user to the translation editor in proofread mode. Parallel to {{ms-msg|twnmp-translate-button}}.', + + 'twnmp-translations-per-month' => "Appears in the user's statistics box near a number. +Means that the users performs that number of translations every month. +Translate it in a way that is natural to your language - you don't have to use the '/' character.", + 'twnmp-reviews-per-month' => "Appears in the user's statistics box near a number. +Means that the users performs that number of review actions every month. +Translate it in a way that is natural to your language - you don't have to use the '/' character.", + 'twnmp-translations-translator-ranking' => 'Shown in the "Translate" and "Proofread" boxes in the center of the main page. +Can be broken to two lines. <br /> is a line break. Break it in any way that is natural in your language. +Parameters: +* $1 - the username, which can be used for GENDER. +* $2 - the ranking of this user. +* $3 - the total number of translators into that language. +* $4 - the language name.', ); /** Hebrew (עברית) @@ -81,6 +99,10 @@ 'twnmp-proofread-link' => 'הגהה', 'twnmp-translate-button' => 'תרגום', 'twnmp-proofread-button' => 'הגהה', + + 'twnmp-translations-per-month' => 'תרגומים לחודש', + 'twnmp-reviews-per-month' => 'הגהות לחודש', + 'twnmp-translations-translator-ranking' => '{{GENDER:$1|אתה דורג|את מדורגת}} במקום ה{{GRAMMAR:תחילית|$2}} מתוך $3 מתרגמים<br />ל{{GRAMMAR:תחילית|$4}}', ); /** Dutch (Nederlands) diff --git a/MainPage/resources/css/ext.translate.mainpage.css b/MainPage/resources/css/ext.translate.mainpage.css index c7e72fa..37418bf 100644 --- a/MainPage/resources/css/ext.translate.mainpage.css +++ b/MainPage/resources/css/ext.translate.mainpage.css @@ -189,8 +189,7 @@ font-size: 18px; } -.ranking .rank-description, -.ranking .language-description { +.ranking .rank-description { color: #555555; font-size: 15px; } diff --git a/MainPage/specials/SpecialTwnMainPage.php b/MainPage/specials/SpecialTwnMainPage.php index 7d7d627..9ca8ed0 100644 --- a/MainPage/specials/SpecialTwnMainPage.php +++ b/MainPage/specials/SpecialTwnMainPage.php @@ -452,9 +452,13 @@ foreach ( $stats as $user => $count ) { if ( $user === $myuser ) { $out .= Html::element( 'div', array( 'class' => 'count' ), $count ); - $out .= Html::element( 'div', array( 'class' => 'count-description' ), 'Translations/month' ); - $out .= Html::element( 'div', array( 'class' => 'rank-description' ), "Ranked $i of $translators translators" ); - $out .= Html::element( 'div', array( 'class' => 'language-description' ), "in $languageName" ); + $out .= Html::element( 'div', array( 'class' => 'count-description' ), $this->msg( 'twnmp-translations-per-month' )->text() ); + + $msg = $this->msg( 'twnmp-translations-translator-ranking' ) + ->params( $myuser, $i, $translators, $languageName ) + ->plain(); + $wrap = new RawMessage( "<div class='rank-description'>$msg</div>" ); + $out .= $wrap->parse(); break; } $i++; @@ -474,8 +478,13 @@ if ( $user === $myuser ) { $out .= Html::element( 'div', array( 'class' => 'count' ), $count ); $out .= Html::element( 'div', array( 'class' => 'count-description' ), 'Revisions/month' ); - $out .= Html::element( 'div', array( 'class' => 'rank-description' ), "Ranked $i of $translators translators" ); - $out .= Html::element( 'div', array( 'class' => 'language-description' ), "in $languageName" ); + + $msg = $this->msg( 'twnmp-translations-translator-ranking' ) + ->params( $myuser, $i, $translators, $languageName ) + ->plain(); + $wrap = new RawMessage( "<div class='rank-description'>$msg</div>" ); + $out .= $wrap->parse(); + break; } $i++; -- To view, visit https://gerrit.wikimedia.org/r/58866 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia3907fe08c084182962a60170887c93b9f6e9d56 Gerrit-PatchSet: 2 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Amire80 <amir.ahar...@mail.huji.ac.il> Gerrit-Reviewer: Amire80 <amir.ahar...@mail.huji.ac.il> Gerrit-Reviewer: Nikerabbit <niklas.laxst...@gmail.com> Gerrit-Reviewer: Siebrand <siebr...@wikimedia.org> Gerrit-Reviewer: jenkins-bot _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits