https://www.mediawiki.org/wiki/Special:Code/MediaWiki/112884
Revision: 112884
Author: siebrand
Date: 2012-03-02 13:06:20 +0000 (Fri, 02 Mar 2012)
Log Message:
-----------
Follow-up r112883: Rename files and update what needs updating.
Modified Paths:
--------------
trunk/extensions/TranslationNotifications/SpecialTranslatorSignup.php
Added Paths:
-----------
trunk/extensions/TranslationNotifications/TranslationNotifications.alias.php
trunk/extensions/TranslationNotifications/TranslationNotifications.i18n.php
trunk/extensions/TranslationNotifications/TranslationNotifications.php
Removed Paths:
-------------
trunk/extensions/TranslationNotifications/LCADFT.alias.php
trunk/extensions/TranslationNotifications/LCADFT.i18n.php
trunk/extensions/TranslationNotifications/LCADFT.php
Deleted: trunk/extensions/TranslationNotifications/LCADFT.alias.php
===================================================================
--- trunk/extensions/TranslationNotifications/LCADFT.alias.php 2012-03-02
12:57:25 UTC (rev 112883)
+++ trunk/extensions/TranslationNotifications/LCADFT.alias.php 2012-03-02
13:06:20 UTC (rev 112884)
@@ -1,14 +0,0 @@
-<?php
-/**
- * Aliases for special pages of LCADFT extension.
- *
- * @file
- * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License
2.0 or later
- */
-
-$specialPageAliases = array();
-
-/** English (English) */
-$specialPageAliases['en'] = array(
- 'TranslatorSignup' => array( 'TranslatorSignup' ),
-);
Deleted: trunk/extensions/TranslationNotifications/LCADFT.i18n.php
===================================================================
--- trunk/extensions/TranslationNotifications/LCADFT.i18n.php 2012-03-02
12:57:25 UTC (rev 112883)
+++ trunk/extensions/TranslationNotifications/LCADFT.i18n.php 2012-03-02
13:06:20 UTC (rev 112884)
@@ -1,95 +0,0 @@
-<?php
-/**
- * Translations for the translator outreach features.
- *
- * @file
- * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License
2.0 or later
- */
-
-$messages = array();
-
-/** English
- * @author Niklas Laxström
- */
-$messages['en'] = array(
- 'translatorsignup' => 'Translator signup',
- 'lcadft-desc' => 'Allows translators sign up for translation
notifications',
- 'lcadft-info' => 'User information',
- 'lcadft-username' => 'Username:',
- 'lcadft-emailstatus' => 'E-mail status:',
- 'lcadft-email-confirmed' => 'Your e-mail address is confirmed',
- 'lcadft-email-unconfirmed' => 'Your e-mail address is not confirmed.
$1',
- 'lcadft-email-notset' => 'You have not provided an e-mail address. You
can do that in your [[Special:Preferences|preferences]].',
- 'lcadft-languages' => 'Languages',
- 'lcadft-lang' => 'Language #$1',
- 'lcadft-nolang' => 'Choose a language',
- 'lcadft-contact' => 'Preferred contact methods',
- 'lcadft-cmethod-email' => 'E-mail',
- 'lcadft-cmethod-talkpage' => 'Talk page',
- 'lcadft-cmethod-talkpage-elsewhere' => 'Talk page on other wiki',
- 'lcadft-cmethod-feed' => 'Feed',
- 'lcadft-cmethod-no' => 'Do not contact me',
- 'lcadft-frequency' => 'Contact frequency',
- 'lcadft-freq-always' => 'When there is something new to translate',
- 'lcadft-freq-week' => 'At most once a week',
- 'lcadft-freq-month' => 'At most once a month',
- 'lcadft-freq-weekly' => 'Weekly digest',
- 'lcadft-freq-monthly' => 'Monthly digest',
- 'lcadft-submit' => 'Sign up',
-);
-
-$messages['qqq'] = array(
- 'lcadft' => 'Special page header',
- 'lcadft-desc' => '{{desc}}',
- 'lcadft-info' => 'Fieldset header',
- 'lcadft-username' => 'Label followed by username',
- 'lcadft-emailstatus' => 'Label',
- 'lcadft-email-unconfirmed' => 'Parameters:
-* $1 is a button which can be used to send confirmation email. Button text is
{{msg-mw|mediawiki:confirmemail_send}}.',
- 'lcadft-languages' => 'Fieldset header',
- 'lcadft-lang' => 'Label for select, $1 is a numbeer',
- 'lcadft-nolang' => 'First option in a language select',
- 'lcadft-contact' => 'Fieldset header',
- 'lcadft-cmethod-email' => 'Check option label',
- 'lcadft-cmethod-talkpage' => 'Check option label',
- 'lcadft-cmethod-talkpage-elsewhere' => 'Check option label',
- 'lcadft-cmethod-feed' => 'Check option label',
- 'lcadft-cmethod-no' => 'Check option label',
- 'lcadft-frequency' => 'Fieldset header',
- 'lcadft-freq-always' => 'Radio option label',
- 'lcadft-freq-week' => 'Radio option label',
- 'lcadft-freq-month' => 'Radio option label',
- 'lcadft-freq-weekly' => 'Radio option label',
- 'lcadft-freq-monthly' => 'Radio option label',
- 'lcadft-submit' => 'Submit button text',
-);
-
-/** Hebrew
- * @author amire80
- */
-$messages['he'] = array(
- 'translatorsignup' => 'רישום מתרגמים',
- 'lcadft-desc' => 'רישום מתרגמים לעדכונים על מיזמי תרגום',
- 'lcadft-info' => 'מידע על המשתמש',
- 'lcadft-username' => 'שם משתמש:',
- 'lcadft-emailstatus' => 'מצב דוא"ל:',
- 'lcadft-email-confirmed' => 'הדוא"ל שלך מאומת',
- 'lcadft-email-unconfirmed' => 'הדוא"ל שלך אינו מאומת. $1',
- 'lcadft-email-notset' => 'לא נתת כתובת דוא"ל. אפשר לעשות את זה
ב[[Special:Preferences|העדפות]] שלך.',
- 'lcadft-languages' => 'שפות',
- 'lcadft-lang' => 'שפה מס\' $1',
- 'lcadft-nolang' => 'בחירת שפה',
- 'lcadft-contact' => 'דרכי התקשרות מועדפות',
- 'lcadft-cmethod-email' => 'דוא"ל',
- 'lcadft-cmethod-talkpage' => 'דף שיחה',
- 'lcadft-cmethod-talkpage-elsewhere' => 'דף שיחה בוויקי אחר',
- 'lcadft-cmethod-feed' => 'הזנה',
- 'lcadft-cmethod-no' => 'לא ליצור אתי קשר',
- 'lcadft-frequency' => 'תדירות ההתקשרות',
- 'lcadft-freq-always' => 'כשיש מה לתרגם',
- 'lcadft-freq-week' => 'לכל היותר פעם בשבוע',
- 'lcadft-freq-month' => 'לכל היותר פעם בחודש',
- 'lcadft-freq-weekly' => 'סיכום שבועי',
- 'lcadft-freq-monthly' => 'סיכום חודשי',
- 'lcadft-submit' => 'רישום',
-);
Deleted: trunk/extensions/TranslationNotifications/LCADFT.php
===================================================================
--- trunk/extensions/TranslationNotifications/LCADFT.php 2012-03-02
12:57:25 UTC (rev 112883)
+++ trunk/extensions/TranslationNotifications/LCADFT.php 2012-03-02
13:06:20 UTC (rev 112884)
@@ -1,39 +0,0 @@
-<?php
-if ( !defined( 'MEDIAWIKI' ) ) die();
-/**
- * An extension to keep in touch with translators
- *
- * @file
- * @ingroup Extensions
- *
- * @author Niklas Laxström
- * @copyright Copyright © 2012, Niklas Laxström
- * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License
2.0 or later
- */
-
-/**
- * Extension credits properties.
- */
-$wgExtensionCredits['specialpage'][] = array(
- 'path' => __FILE__,
- 'name' => 'LCADFT',
- 'version' => '2012-02-20',
- 'author' => array( 'Niklas Laxström' ),
- 'descriptionmsg' => 'lcadft-desc',
- #'url' => 'https://www.mediawiki.org/wiki/Extension:',
-);
-
-$dir = dirname( __FILE__ );
-$wgSpecialPages['TranslatorSignup'] = 'SpecialTranslatorSignup';
-$wgSpecialPageGroups['TranslatorSignup'] = 'login';
-$wgExtensionMessagesFiles['LCADFT'] = "$dir/LCADFT.i18n.php";
-$wgExtensionMessagesFiles['LCADFT-alias'] = "$dir/LCADFT.alias.php";
-$wgAutoloadClasses['SpecialTranslatorSignup'] =
"$dir/SpecialTranslatorSignup.php";
-
-$wgLCADFTContactMethods = array(
- 'email' => true,
- 'talkpage' => true,
- 'talkpage-elsewhere' => false,
- 'feed' => false,
- 'no' => true,
-);
Modified: trunk/extensions/TranslationNotifications/SpecialTranslatorSignup.php
===================================================================
--- trunk/extensions/TranslationNotifications/SpecialTranslatorSignup.php
2012-03-02 12:57:25 UTC (rev 112883)
+++ trunk/extensions/TranslationNotifications/SpecialTranslatorSignup.php
2012-03-02 13:06:20 UTC (rev 112884)
@@ -25,10 +25,10 @@
}
$context = $this->getContext();
- $htmlForm = new HtmlForm( $this->getDataModel(), $context,
'lcadft' );
- $htmlForm->setId( 'lcadft-form' );
- $htmlForm->setSubmitText( $context->msg( 'lcadft-submit'
)->text() );
- $htmlForm->setSubmitID( 'lcadft-submit' );
+ $htmlForm = new HtmlForm( $this->getDataModel(), $context,
'translationnotifications' );
+ $htmlForm->setId( 'translationnotifications-form' );
+ $htmlForm->setSubmitText( $context->msg(
'translationnotifications-submit' )->text() );
+ $htmlForm->setSubmitID( 'translationnotifications-submit' );
$htmlForm->setSubmitCallback( array( $this, 'formSubmit' ) );
$htmlForm->show();
@@ -46,28 +46,28 @@
);
}
public function getDataModel() {
- global $wgLCADFTContactMethods, $wgLang;
+ global $wgTranslationNotificationsContactMethods, $wgLang;
$m['username'] = array(
'type' => 'info',
- 'label-message' => 'lcadft-username',
+ 'label-message' => 'translationnotifications-username',
'default' => $this->getUser()->getName(),
'section' => 'info',
);
$user = $this->getUser();
if ( $user->isEmailConfirmed() ) {
- $status = $this->msg( 'lcadft-email-confirmed'
)->parse();
+ $status = $this->msg(
'translationnotifications-email-confirmed' )->parse();
} elseif ( trim( $user->getEmail() ) !== '' ) {
$submit = Xml::submitButton( $this->msg(
'confirmemail_send' )->text(), array( 'name' => 'x' ) );
- $status = $this->msg( 'lcadft-email-unconfirmed'
)->rawParams( $submit )->parse();
+ $status = $this->msg(
'translationnotifications-email-unconfirmed' )->rawParams( $submit )->parse();
} else {
- $status = $this->msg( 'lcadft-email-notset' )->parse();
+ $status = $this->msg(
'translationnotifications-email-notset' )->parse();
}
$m['emailstatus'] = array(
'type' => 'info',
- 'label-message' => 'lcadft-emailstatus',
+ 'label-message' =>
'translationnotifications-emailstatus',
'default' => $status,
'section' => 'info',
'raw' => true,
@@ -83,32 +83,32 @@
$options[$display] = $code;
}
- $options = array( wfMessage( 'lcadft-nolang' )->plain() => '' )
+ $options;
+ $options = array( wfMessage( 'translationnotifications-nolang'
)->plain() => '' ) + $options;
for ( $i = 1; $i < 4; $i++ ) {
$m["lang-$i"] = array(
'type' => 'select',
- 'label-message' => array( "lcadft-lang",
$wgLang->formatNum( $i ) ),
+ 'label-message' => array(
"translationnotifications-lang", $wgLang->formatNum( $i ) ),
'section' => 'languages',
'options' => $options,
- 'default' => $user->getOption( "lcadft-lang-$i"
),
+ 'default' => $user->getOption(
"translationnotifications-lang-$i" ),
);
if ( $i === 1 ) {
- $m["lang-$i"]['default'] = $user->getOption(
"lcadft-lang-$i", $wgLang->getCode() );
+ $m["lang-$i"]['default'] = $user->getOption(
"translationnotifications-lang-$i", $wgLang->getCode() );
$m["lang-$i"]['required'] = true;
}
}
- foreach ( $wgLCADFTContactMethods as $method => $value ) {
+ foreach ( $wgTranslationNotificationsContactMethods as $method
=> $value ) {
if ( $value === false ) {
continue;
}
$m["cmethod-$method"] = array(
'type' => 'check',
- 'label-message' => "lcadft-cmethod-$method",
- 'default' => $user->getOption(
"lcadft-cmethod-$method" ),
+ 'label-message' =>
"translationnotifications-cmethod-$method",
+ 'default' => $user->getOption(
"translationnotifications-cmethod-$method" ),
'section' => 'contact',
);
if ( $method === 'email' ) {
@@ -118,7 +118,7 @@
if ( $method === 'talkpage-elsewhere' ) {
$m['cmethod-talkpage-elsewhere-loc'] = array(
'type' => 'select',
- 'default' => $user->getOption(
'lcadft-cmethod-talkpage-elsewhere-loc' ),
+ 'default' => $user->getOption(
'translationnotifications-cmethod-talkpage-elsewhere-loc' ),
'section' => 'contact',
'options' => $this->getOtherWikis(),
);
@@ -127,14 +127,14 @@
$m['freq'] = array(
'type' => 'radio',
- 'default' => $user->getOption( 'lcadft-freq', 'always'
),
+ 'default' => $user->getOption(
'translationnotifications-freq', 'always' ),
'section' => 'frequency',
'options' => array(
- $this->msg( 'lcadft-freq-always' )->text() =>
'always',
- $this->msg( 'lcadft-freq-week' )->text() =>
'week',
- $this->msg( 'lcadft-freq-month' )->text() =>
'month',
- $this->msg( 'lcadft-freq-weekly' )->text() =>
'weekly',
- $this->msg( 'lcadft-freq-monthly' )->text() =>
'monthly',
+ $this->msg(
'translationnotifications-freq-always' )->text() => 'always',
+ $this->msg(
'translationnotifications-freq-week' )->text() => 'week',
+ $this->msg(
'translationnotifications-freq-month' )->text() => 'month',
+ $this->msg(
'translationnotifications-freq-weekly' )->text() => 'weekly',
+ $this->msg(
'translationnotifications-freq-monthly' )->text() => 'monthly',
),
);
return $m;
@@ -150,7 +150,7 @@
}
foreach ( $formData as $key => $value ) {
- $user->setOption( "lcadft-$key", $value );
+ $user->setOption( "translationnotifications-$key",
$value );
}
$user->saveSettings();
}
Copied:
trunk/extensions/TranslationNotifications/TranslationNotifications.alias.php
(from rev 112883, trunk/extensions/TranslationNotifications/LCADFT.alias.php)
===================================================================
---
trunk/extensions/TranslationNotifications/TranslationNotifications.alias.php
(rev 0)
+++
trunk/extensions/TranslationNotifications/TranslationNotifications.alias.php
2012-03-02 13:06:20 UTC (rev 112884)
@@ -0,0 +1,14 @@
+<?php
+/**
+ * Aliases for special pages of TranslationNotifications extension.
+ *
+ * @file
+ * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License
2.0 or later
+ */
+
+$specialPageAliases = array();
+
+/** English (English) */
+$specialPageAliases['en'] = array(
+ 'TranslatorSignup' => array( 'TranslatorSignup' ),
+);
Copied:
trunk/extensions/TranslationNotifications/TranslationNotifications.i18n.php
(from rev 112883, trunk/extensions/TranslationNotifications/LCADFT.i18n.php)
===================================================================
--- trunk/extensions/TranslationNotifications/TranslationNotifications.i18n.php
(rev 0)
+++ trunk/extensions/TranslationNotifications/TranslationNotifications.i18n.php
2012-03-02 13:06:20 UTC (rev 112884)
@@ -0,0 +1,95 @@
+<?php
+/**
+ * Translations for the translator outreach features.
+ *
+ * @file
+ * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License
2.0 or later
+ */
+
+$messages = array();
+
+/** English
+ * @author Niklas Laxström
+ */
+$messages['en'] = array(
+ 'translatorsignup' => 'Translator signup',
+ 'translationnotifications-desc' => 'Allows translators sign up for
translation notifications',
+ 'translationnotifications-info' => 'User information',
+ 'translationnotifications-username' => 'Username:',
+ 'translationnotifications-emailstatus' => 'E-mail status:',
+ 'translationnotifications-email-confirmed' => 'Your e-mail address is
confirmed',
+ 'translationnotifications-email-unconfirmed' => 'Your e-mail address is
not confirmed. $1',
+ 'translationnotifications-email-notset' => 'You have not provided an
e-mail address. You can do that in your [[Special:Preferences|preferences]].',
+ 'translationnotifications-languages' => 'Languages',
+ 'translationnotifications-lang' => 'Language #$1',
+ 'translationnotifications-nolang' => 'Choose a language',
+ 'translationnotifications-contact' => 'Preferred contact methods',
+ 'translationnotifications-cmethod-email' => 'E-mail',
+ 'translationnotifications-cmethod-talkpage' => 'Talk page',
+ 'translationnotifications-cmethod-talkpage-elsewhere' => 'Talk page on
other wiki',
+ 'translationnotifications-cmethod-feed' => 'Feed',
+ 'translationnotifications-cmethod-no' => 'Do not contact me',
+ 'translationnotifications-frequency' => 'Contact frequency',
+ 'translationnotifications-freq-always' => 'When there is something new
to translate',
+ 'translationnotifications-freq-week' => 'At most once a week',
+ 'translationnotifications-freq-month' => 'At most once a month',
+ 'translationnotifications-freq-weekly' => 'Weekly digest',
+ 'translationnotifications-freq-monthly' => 'Monthly digest',
+ 'translationnotifications-submit' => 'Sign up',
+);
+
+$messages['qqq'] = array(
+ 'translatorsignup' => 'Special page header',
+ 'translationnotifications-desc' => '{{desc}}',
+ 'translationnotifications-info' => 'Fieldset header',
+ 'translationnotifications-username' => 'Label followed by username',
+ 'translationnotifications-emailstatus' => 'Label',
+ 'translationnotifications-email-unconfirmed' => 'Parameters:
+* $1 is a button which can be used to send confirmation email. Button text is
{{msg-mw|mediawiki:confirmemail_send}}.',
+ 'translationnotifications-languages' => 'Fieldset header',
+ 'translationnotifications-lang' => 'Label for select, $1 is a numbeer',
+ 'translationnotifications-nolang' => 'First option in a language
select',
+ 'translationnotifications-contact' => 'Fieldset header',
+ 'translationnotifications-cmethod-email' => 'Check option label',
+ 'translationnotifications-cmethod-talkpage' => 'Check option label',
+ 'translationnotifications-cmethod-talkpage-elsewhere' => 'Check option
label',
+ 'translationnotifications-cmethod-feed' => 'Check option label',
+ 'translationnotifications-cmethod-no' => 'Check option label',
+ 'translationnotifications-frequency' => 'Fieldset header',
+ 'translationnotifications-freq-always' => 'Radio option label',
+ 'translationnotifications-freq-week' => 'Radio option label',
+ 'translationnotifications-freq-month' => 'Radio option label',
+ 'translationnotifications-freq-weekly' => 'Radio option label',
+ 'translationnotifications-freq-monthly' => 'Radio option label',
+ 'translationnotifications-submit' => 'Submit button text',
+);
+
+/** Hebrew
+ * @author amire80
+ */
+$messages['he'] = array(
+ 'translatorsignup' => 'רישום מתרגמים',
+ 'translationnotifications-desc' => 'רישום מתרגמים לעדכונים על מיזמי
תרגום',
+ 'translationnotifications-info' => 'מידע על המשתמש',
+ 'translationnotifications-username' => 'שם משתמש:',
+ 'translationnotifications-emailstatus' => 'מצב דוא"ל:',
+ 'translationnotifications-email-confirmed' => 'הדוא"ל שלך מאומת',
+ 'translationnotifications-email-unconfirmed' => 'הדוא"ל שלך אינו מאומת.
$1',
+ 'translationnotifications-email-notset' => 'לא נתת כתובת דוא"ל. אפשר
לעשות את זה ב[[Special:Preferences|העדפות]] שלך.',
+ 'translationnotifications-languages' => 'שפות',
+ 'translationnotifications-lang' => 'שפה מס\' $1',
+ 'translationnotifications-nolang' => 'בחירת שפה',
+ 'translationnotifications-contact' => 'דרכי התקשרות מועדפות',
+ 'translationnotifications-cmethod-email' => 'דוא"ל',
+ 'translationnotifications-cmethod-talkpage' => 'דף שיחה',
+ 'translationnotifications-cmethod-talkpage-elsewhere' => 'דף שיחה
בוויקי אחר',
+ 'translationnotifications-cmethod-feed' => 'הזנה',
+ 'translationnotifications-cmethod-no' => 'לא ליצור אתי קשר',
+ 'translationnotifications-frequency' => 'תדירות ההתקשרות',
+ 'translationnotifications-freq-always' => 'כשיש מה לתרגם',
+ 'translationnotifications-freq-week' => 'לכל היותר פעם בשבוע',
+ 'translationnotifications-freq-month' => 'לכל היותר פעם בחודש',
+ 'translationnotifications-freq-weekly' => 'סיכום שבועי',
+ 'translationnotifications-freq-monthly' => 'סיכום חודשי',
+ 'translationnotifications-submit' => 'רישום',
+);
Copied: trunk/extensions/TranslationNotifications/TranslationNotifications.php
(from rev 112883, trunk/extensions/TranslationNotifications/LCADFT.php)
===================================================================
--- trunk/extensions/TranslationNotifications/TranslationNotifications.php
(rev 0)
+++ trunk/extensions/TranslationNotifications/TranslationNotifications.php
2012-03-02 13:06:20 UTC (rev 112884)
@@ -0,0 +1,39 @@
+<?php
+if ( !defined( 'MEDIAWIKI' ) ) die();
+/**
+ * An extension to keep in touch with translators
+ *
+ * @file
+ * @ingroup Extensions
+ *
+ * @author Niklas Laxström
+ * @copyright Copyright © 2012, Niklas Laxström
+ * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License
2.0 or later
+ */
+
+/**
+ * Extension credits properties.
+ */
+$wgExtensionCredits['specialpage'][] = array(
+ 'path' => __FILE__,
+ 'name' => 'TranslationNotifications',
+ 'version' => '2012-03-02',
+ 'author' => array( 'Niklas Laxström' ),
+ 'descriptionmsg' => 'translationnotifications-desc',
+ #'url' =>
'https://www.mediawiki.org/wiki/Extension:TranslationNotifications',
+);
+
+$dir = dirname( __FILE__ );
+$wgSpecialPages['TranslatorSignup'] = 'SpecialTranslatorSignup';
+$wgSpecialPageGroups['TranslatorSignup'] = 'login';
+$wgExtensionMessagesFiles['TranslationNotifications'] =
"$dir/TranslationNotifications.i18n.php";
+$wgExtensionMessagesFiles['TranslationNotificationsAlias'] =
"$dir/TranslationNotifications.alias.php";
+$wgAutoloadClasses['SpecialTranslatorSignup'] =
"$dir/SpecialTranslatorSignup.php";
+
+$wgTranslationNotificationsContactMethods = array(
+ 'email' => true,
+ 'talkpage' => true,
+ 'talkpage-elsewhere' => false,
+ 'feed' => false,
+ 'no' => true,
+);
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs