jenkins-bot has submitted this change and it was merged.

Change subject: Internationalized some strings
......................................................................


Internationalized some strings

Change-Id: Iab55704edabb3badbc62633cd039446fa6d79639
---
M MainPage/MainPage.i18n.php
M MainPage/Resources.php
M MainPage/resources/js/ext.translate.mainpage.js
M MainPage/specials/SpecialTwnMainPage.php
4 files changed, 51 insertions(+), 11 deletions(-)

Approvals:
  Nikerabbit: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/MainPage/MainPage.i18n.php b/MainPage/MainPage.i18n.php
index 755f531..a2c5133 100644
--- a/MainPage/MainPage.i18n.php
+++ b/MainPage/MainPage.i18n.php
@@ -15,6 +15,17 @@
        'twnmp-s-messages' => 'Messages to translate',
 
        'twnmp-bannerwho' => 'Image $1',
+
+       'twnmp-show-more-projects' => 'Show more projects...',
+       'twnmp-brand-motto' => 'Open source translation community',
+       'twnmp-login' => 'Log in',
+       'twnmp-search-placeholder' => 'Find and fix translations',
+       'twnmp-search-button' => 'Find',
+       'twnmp-search-choose-project' => 'Choose a project to translate',
+       'twnmp-translate-link' => 'Translate',
+       'twnmp-proofread-link' => 'Proofread',
+       'twnmp-translate-button' => 'Translate',
+       'twnmp-proofread-button' => 'Proofread',
 );
 
 /** English
@@ -31,6 +42,19 @@
        'twnmp-s-messages' => 'Appears in a box on the main page, near the 
number of the messages (strings) to translate at the site.',
 
        'twnmp-bannerwho' => 'Banner image attribution. $1 usually contains the 
name of the photographer and license abbreviation',
+
+       'twnmp-show-more-projects' => 'Shown in large font in a box at the 
bottom of the main page next to boxes with icons and names of other projects.',
+       'twnmp-brand-motto' => 'A motto shown under the site name at the top of 
the main page.',
+       'twnmp-login' => 'A link for logging in.',
+       'twnmp-search-placeholder' => 'A placeholder for the search box on the 
main page.',
+       'twnmp-search-button' => 'A label for the search button on the main 
page.',
+       'twnmp-search-choose-project' => 'A heading for the project icons 
buttons section.',
+       'twnmp-translate-link' => 'A link that appears at the bottom of a box 
with the project icon near {{ms-msg|twnmp-proofread-link}}.',
+       'twnmp-proofread-link' => 'A link that appears at the bottom of a box 
with the project icon near {{ms-msg|twnmp-translate-link}}.',
+       'twnmp-translate-button' => 'A label for the button that appears near 
the user\'s translation statistics.
+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}}.',
 );
 
 /** Hebrew (עברית)
@@ -46,6 +70,17 @@
        'twnmp-s-messages' => 'הודעות לתרגם',
 
        'twnmp-bannerwho' => 'תמונה $1',
+
+       'twnmp-show-more-projects' => 'מיזמים נוספים...',
+       'twnmp-brand-motto' => 'קהילת תרגום בקוד פתוח',
+       'twnmp-login' => 'כניסה',
+       'twnmp-search-placeholder' => 'למצוא ולתקן תרגומים',
+       'twnmp-search-button' => 'למצוא',
+       'twnmp-search-choose-project' => 'בחירת מיזם לתרגום',
+       'twnmp-translate-link' => 'תרגום',
+       'twnmp-proofread-link' => 'הגהה',
+       'twnmp-translate-button' => 'תרגום',
+       'twnmp-proofread-button' => 'הגהה',
 );
 
 /** Dutch (Nederlands)
diff --git a/MainPage/Resources.php b/MainPage/Resources.php
index 71c8a46..80e607c 100644
--- a/MainPage/Resources.php
+++ b/MainPage/Resources.php
@@ -21,5 +21,8 @@
                'mediawiki.util',
                'mediawiki.Uri',
        ),
+       'messages' => array(
+               'twnmp-show-more-projects',
+       ),
        'position' => 'top',
 ) + $resourcePaths;
diff --git a/MainPage/resources/js/ext.translate.mainpage.js 
b/MainPage/resources/js/ext.translate.mainpage.js
index bab3ca2..4a84aec 100644
--- a/MainPage/resources/js/ext.translate.mainpage.js
+++ b/MainPage/resources/js/ext.translate.mainpage.js
@@ -27,7 +27,7 @@
                $tiles.eq( 7 )
                        .empty()
                        .addClass( 'more' )
-                       .text( 'Show more projects...' )
+                       .text( mw.msg( 'twnmp-show-more-projects' ) )
                        .one( 'click', function () {
                                $.when(
                                        mw.translate.loadMessageGroups()
diff --git a/MainPage/specials/SpecialTwnMainPage.php 
b/MainPage/specials/SpecialTwnMainPage.php
index 91df954..7d7d627 100644
--- a/MainPage/specials/SpecialTwnMainPage.php
+++ b/MainPage/specials/SpecialTwnMainPage.php
@@ -46,13 +46,14 @@
                $out .= Html::element( 'div',
                        array(
                                'class' => 'twn-brand-name',
+                               'lang' => 'en',
                        )
                        , 'translatewiki.net' );
                $out .= Html::element( 'div',
                        array(
                                'class' => 'twn-brand-motto',
                        )
-                       , 'Opensource translation community' );
+                       , $this->msg( 'twnmp-brand-motto' )->text() );
                $out .= Html::closeElement( 'div' );
                $out .= Html::element( 'span',
                        array(
@@ -73,7 +74,7 @@
                                        'href' => SpecialPage::getTitleFor( 
'Userlogin' )
                                                ->getLocalUrl( array( 
'returnto' => 'Special:MainPage' ) ),
                                )
-                               , 'Login' );
+                               , $this->msg( 'twnmp-login' )->text() );
                }
                $out .= Html::closeElement( 'div' );
 
@@ -89,7 +90,8 @@
                $out .= Html::element( 'input',
                        array(
                                'class' => 'ten columns searchbox',
-                               'placeholder' => 'Find and fix translations',
+                               // @todo move to JS, placeholders are not 
supported in IE
+                               'placeholder' => $this->msg( 
'twnmp-search-placeholder' )->text(),
                                'type' => 'search',
                                'name' => 'query',
                        ) );
@@ -99,7 +101,7 @@
                                'class' => 'columns end blue button',
                                'type' => 'submit',
                        ),
-                       'Find' );
+                       $this->msg( 'twnmp-search-button' )->text() );
                $out .= Html::closeElement( 'form' );
 
                return $out;
@@ -107,7 +109,7 @@
 
        public function projectSelector() {
                $out = Html::element( 'div', array( 'class' => 'row 
twn-mainpage-project-selector-title' ),
-                       'Choose a project to translate' );
+                       $this->msg( 'twnmp-search-choose-project' )->text() );
                $out .= Html::openElement( 'div', array( 'class' => 'row 
twn-mainpage-project-tiles' ) );
 
                $projects = ProjectHandler::getProjects();
@@ -158,11 +160,11 @@
                $title = SpecialPage::getTitleFor( 'Translate' );
                $translate = Html::element( 'a', array(
                                'href' => $title->getLocalUrl( array( 'group' 
=> $group->getId() ) )
-                       ), 'Translate' );
+                       ), $this->msg( 'twnmp-translate-button' )->text() );
 
                $proofread = Html::element( 'a', array(
                                'href' => $title->getLocalUrl( array( 'group' 
=> $group->getId(), 'action' => 'proofread' ) )
-                       ), 'Proofread' );
+                       ), $this->msg( 'twnmp-proofread-button' )->text() );
 
                $out = <<<HTML
 <div class="three columns twn-mainpage-project-tile">
@@ -327,7 +329,7 @@
                                if ( $value > 1000 ) {
                                        $digits = 3 - ceil( log( $value, 100 ) 
);
                                        $value = number_format( $value / 1000, 
$digits );
-                                       $value = $lang->formatNum( $value ) . 
'k';
+                                       $value = $lang->formatNum( $value ) . 
'k'; // @todo needs proper i18n
                                } else {
                                        $value = $lang->formatNum( $value );
                                }
@@ -459,7 +461,7 @@
                }
                $out .= Html::closeElement( 'div' );
                $out .= Html::openElement( 'div', array( 'class' => 'four 
columns' ) );
-               $out .= Html::element( 'button', array( 'class' => 'button 
green' ), 'Translate' );
+               $out .= Html::element( 'button', array( 'class' => 'button 
green' ), $this->msg( 'twnmp-translate-button' )->text() );
                $out .= Html::closeElement( 'div' );
                $out .= Html::closeElement( 'div' );
 
@@ -480,7 +482,7 @@
                }
                $out .= Html::closeElement( 'div' );
                $out .= Html::openElement( 'div', array( 'class' => 'four 
columns' ) );
-               $out .= Html::element( 'button', array( 'class' => 'button 
green' ), 'Proofread' );
+               $out .= Html::element( 'button', array( 'class' => 'button 
green' ), $this->msg( 'twnmp-proofread-button' )->text() );
                $out .= Html::closeElement( 'div' );
                $out .= Html::closeElement( 'div' );
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iab55704edabb3badbc62633cd039446fa6d79639
Gerrit-PatchSet: 2
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: 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

Reply via email to