Amire80 has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/58866


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, 40 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/66/58866/1

diff --git a/MainPage/MainPage.i18n.php b/MainPage/MainPage.i18n.php
index a2c5133..44eb54a 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. &lt;br /> is a line break. Break it in any way 
that is natural in your langauge.
+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..16cbae5 100644
--- a/MainPage/specials/SpecialTwnMainPage.php
+++ b/MainPage/specials/SpecialTwnMainPage.php
@@ -452,9 +452,15 @@
                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() );
+                               $out .= Html::rawElement( 'div', array( 'class' 
=> 'rank-description' ), $this->msg(
+                                       'twnmp-translations-translator-ranking',
+                                       $myuser,
+                                       $i,
+                                       $translators,
+                                       $languageName )->text()
+                               );
+
                                break;
                        }
                        $i++;
@@ -474,8 +480,14 @@
                        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" );
+                               $out .= Html::rawElement( 'div', array( 'class' 
=> 'rank-description' ), $this->msg(
+                                       'twnmp-translations-translator-ranking',
+                                       $myuser,
+                                       $i,
+                                       $translators,
+                                       $languageName )->text()
+                               );
+
                                break;
                        }
                        $i++;

-- 
To view, visit https://gerrit.wikimedia.org/r/58866
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia3907fe08c084182962a60170887c93b9f6e9d56
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Amire80 <amir.ahar...@mail.huji.ac.il>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to