r89768 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r89767‎ | r89768 | r89769 >
Date:10:59, 9 June 2011
Author:raymond
Status:resolved (Comments)
Tags:
Comment:
* Move special page alias defintion to its own file
* Sort i18n file: 'en', 'qqq' and the translations
* Slights message tweaks for consistency
* Normalize 'descriptionmsg' key
* 'de' translations are always informell (Du). formal address goes into 'de-formal' and will be done by our Translatewiki folks
* Add extension to Translatewiki
Modified paths:
  • /trunk/extensions/Notificator/Notificator.i18n.php (modified) (history)
  • /trunk/extensions/Notificator/Notificator.php (modified) (history)
  • /trunk/extensions/Translate/groups/mediawiki-defines.txt (modified) (history)

Diff [purge]

Index: trunk/extensions/Notificator/Notificator.i18n.php
@@ -1,15 +1,33 @@
22 <?php
33
4 -$aliases = array();
54 $messages = array();
65
7 -$aliases['en'] = array(
8 - 'Notificator' => array( 'Notificator' ),
 6+$messages['en'] = array(
 7+ 'notificator' => 'Notificator',
 8+ 'notificator-desc' => 'Notifies someone by e-mail about changes to a page when a button on that page gets clicked.',
 9+ 'notificator-db-table-does-not-exist' => 'Database table "notificator" does not exist. The update.php maintenance script needs to be run before the Notificator extension can be used.',
 10+ 'notificator-e-mail-address' => 'e-mail address',
 11+ 'notificator-notify' => 'Notify',
 12+ 'notificator-notify-address-or-name' => 'Notify $1',
 13+ 'notificator-revs-not-from-same-title' => 'Revision IDs are not from the same title/page',
 14+ 'notificator-return-to' => 'Return to',
 15+ 'notificator-special-page-accessed-directly' => 'This special page cannot be accessed directly. It is intended to be used through a Notificator button.',
 16+ 'notificator-e-mail-address-invalid' => 'The provided e-mail address is invalid.',
 17+ 'notificator-notification-not-sent' => 'Notification <em>not</em> sent.',
 18+ 'notificator-change-tag' => 'change',
 19+ 'notificator-new-tag' => 'new',
 20+ 'notificator-notification-text-changes' => '$1 wants to notify you about the following changes to $2:',
 21+ 'notificator-notification-text-new' => '$1 wants to notify you about $2.',
 22+ 'notificator-following-e-mail-sent-to' => 'The following e-mail has been sent to <em>$1</em>:',
 23+ 'notificator-subject' => 'Subject:',
 24+ 'notificator-error-sending-e-mail' => 'There was an error when sending the notification e-mail to <em>$1</em>.',
 25+ 'notificator-error-parameter-missing' => 'Error: Missing parameter.',
 26+ 'notificator-notified-already' => '$1 has been notified about this page or page change before.',
927 );
1028
1129 $messages['qqq'] = array(
1230 'notificator' => 'Name',
13 - 'notificator-description' => 'Description',
 31+ 'notificator-desc' => '{{desc}}',
1432 'notificator-db-table-does-not-exist' => 'Error message',
1533 'notificator-e-mail-address' => 'Hint in text entry field',
1634 'notificator-notify' => 'Button label',
@@ -30,48 +48,25 @@
3149 'notificator-notified-already' => 'Message on special page',
3250 );
3351
34 -$messages['en'] = array(
35 - 'notificator' => 'Notificator',
36 - 'notificator-description' => 'Notifies someone by e-mail about changes to a page when a button on that page gets clicked.',
37 - 'notificator-db-table-does-not-exist' => 'Database table \'notificator\' does not exist. The update.php maintenance script needs to be run before the Notificator extension can be used.',
38 - 'notificator-e-mail-address' => 'e-mail address',
39 - 'notificator-notify' => 'Notify',
40 - 'notificator-notify-address-or-name' => 'Notify $1',
41 - 'notificator-revs-not-from-same-title' => 'Revision IDs are not from the same title/article',
42 - 'notificator-return-to' => 'Return to',
43 - 'notificator-special-page-accessed-directly' => 'This special page cannot be accessed directly. It is intended to be used through a Notificator button.',
44 - 'notificator-e-mail-address-invalid' => 'The provided e-mail address is invalid.',
45 - 'notificator-notification-not-sent' => 'Notification <em>not</em> sent.',
46 - 'notificator-change-tag' => 'change',
47 - 'notificator-new-tag' => 'new',
48 - 'notificator-notification-text-changes' => '$1 wants to notify you about the following changes to $2:',
49 - 'notificator-notification-text-new' => '$1 wants to notify you about $2.',
50 - 'notificator-following-e-mail-sent-to' => 'The following e-mail has been sent to <em>$1</em>:',
51 - 'notificator-subject' => 'Subject:',
52 - 'notificator-error-sending-e-mail' => 'There was an error when sending the notification e-mail to <em>$1</em>.',
53 - 'notificator-error-parameter-missing' => 'Error: Missing parameter.',
54 - 'notificator-notified-already' => '$1 has been notified about this page or page change before.',
55 -);
56 -
5752 $messages['de'] = array(
5853 'notificator' => 'Notificator',
59 - 'notificator-description' => 'Sendet Benachrichtungs-Mails über Seitenänderungen, wenn ein Knopf auf der entsprechenden Seite betätigt wird.',
60 - 'notificator-db-table-does-not-exist' => 'Datenbanktabelle \'notificator\' existiert nicht. Das update.php Maintenance Script muss ausgeführt werden, bevor die Notificator-Extension verwendet werden kann.',
 54+ 'notificator-desc' => 'Sendet Benachrichtungs-Mails über Seitenänderungen, wenn ein Knopf auf der entsprechenden Seite betätigt wird.',
 55+ 'notificator-db-table-does-not-exist' => 'Datenbanktabelle "notificator" existiert nicht. Das update.php Maintenance Script muss ausgeführt werden, bevor die Notificator-Extension verwendet werden kann.',
6156 'notificator-e-mail-address' => 'E-Mail-Adresse',
6257 'notificator-notify' => 'Benachrichtigen',
6358 'notificator-notify-address-or-name' => '$1 benachrichtigen',
64 - 'notificator-revs-not-from-same-title' => 'Revision-IDs gehören nicht zum selben Titel/Artikel',
 59+ 'notificator-revs-not-from-same-title' => 'Revision-IDs gehören nicht zum selben Titel/zur selben Seite',
6560 'notificator-return-to' => 'Zurück zu',
66 - 'notificator-special-page-accessed-directly' => 'Auf diese Spezial-Seite kann nicht direkt zugegriffen werden. Sie sollte über einen Notificator-Knopf verwendet werden.',
 61+ 'notificator-special-page-accessed-directly' => 'Auf diese Spezialseite kann nicht direkt zugegriffen werden. Sie sollte über einen Notificator-Knopf verwendet werden.',
6762 'notificator-e-mail-address-invalid' => 'Die angegebene E-Mail-Adresse ist ungültig.',
6863 'notificator-notification-not-sent' => 'Benachrichtigung <em>nicht</em> gesendet.',
6964 'notificator-change-tag' => 'Änderung',
7065 'notificator-new-tag' => 'Neu',
71 - 'notificator-notification-text-changes' => '$1 möchte Sie zu folgenden Änderungen an $2 benachrichtigen:',
72 - 'notificator-notification-text-new' => '$1 möchte Sie zu $2 benachrichtigen.',
 66+ 'notificator-notification-text-changes' => '$1 möchte dich zu folgenden Änderungen an $2 benachrichtigen:',
 67+ 'notificator-notification-text-new' => '$1 möchte dich zu $2 benachrichtigen.',
7368 'notificator-following-e-mail-sent-to' => 'Folgende E-Mail wurde an <em>$1</em> gesendet:',
7469 'notificator-subject' => 'Betreff:',
75 - 'notificator-error-sending-e-mail' => 'Beim Versenden der Benachrichtigungs-Mail an <em>$1</em> ist ein Fehler aufgetreten.',
 70+ 'notificator-error-sending-e-mail' => 'Beim Versenden der Benachrichtigungs-E-Mail an <em>$1</em> ist ein Fehler aufgetreten.',
7671 'notificator-error-parameter-missing' => 'Fehler: Fehlender Parameter.',
7772 'notificator-notified-already' => '$1 wurde bereits zu dieser Seite oder Seitenänderung benachrichtigt.',
78 -);
\ No newline at end of file
 73+);
Index: trunk/extensions/Notificator/Notificator.php
@@ -8,14 +8,15 @@
99 $wgExtensionCredits['parserhook'][] = array(
1010 'path' => __FILE__, // Magic so that svn revision number can be shown
1111 'name' => 'Notificator',
12 - 'descriptionmsg' => 'notificator-description',
 12+ 'descriptionmsg' => 'notificator-desc',
1313 'version' => '1.0.2',
1414 'author' => 'Patrick Nagel',
1515 'url' => "http://www.mediawiki.org/wiki/Extension:Notificator",
1616 );
 17+$dir = dirname( __FILE__ );
1718
18 -$wgAutoloadClasses['Notificator'] = dirname( __FILE__ ) . '/Notificator.body.php';
19 -$wgAutoloadClasses['SpecialNotificator'] = dirname( __FILE__ ) . '/SpecialNotificator.php';
 19+$wgAutoloadClasses['Notificator'] = $dir . '/Notificator.body.php';
 20+$wgAutoloadClasses['SpecialNotificator'] = $dir . '/SpecialNotificator.php';
2021
2122 $wgHooks['LoadExtensionSchemaUpdates'][] = 'notificator_AddDatabaseTable';
2223 $wgHooks['ParserTestTables'][] = 'notificator_ParserTestTables';
@@ -24,7 +25,8 @@
2526
2627 $wgSpecialPages['Notificator'] = 'SpecialNotificator';
2728
28 -$wgExtensionMessagesFiles['Notificator'] = dirname( __FILE__ ) . '/Notificator.i18n.php';
 29+$wgExtensionMessagesFiles['Notificator'] = $dir . '/Notificator.i18n.php';
 30+$wgExtensionAliasesFiles['Notificator'] = $dir . '/Notificator.alias.php';
2931
3032 // Setting default here, to avoid register_globals vulnerabilites
3133 $ngFromAddress = $wgPasswordSenderName . '<' . $wgPasswordSender . '>';
Index: trunk/extensions/Translate/groups/mediawiki-defines.txt
@@ -862,6 +862,9 @@
863863 file = NewUserNotif/NewUserNotif.i18n.php
864864 descmsg = newusernotif-desc
865865
 866+Notificator
 867+aliasfile = Notificator/Notificator.alias.php
 868+
866869 NS File Repo
867870
868871 Nss MySQL Auth

Follow-up revisions

RevisionCommit summaryAuthorDate
r89815Followup r89768: Add alias file. svn add forgotten.raymond06:03, 10 June 2011

Comments

#Comment by Patrick Nagel (talk | contribs)   01:34, 10 June 2011

Thanks a lot for this, raymond!

One question though - the Notificator.alias.php file does not exist currently - is that a problem?

Status & tagging log