Index: trunk/extensions/Notificator/Notificator.body.php |
— | — | @@ -31,7 +31,7 @@ |
32 | 32 | <input type="hidden" name="revId" value="' . $wgTitle->getLatestRevID() . '" /> |
33 | 33 | <input type="hidden" name="receiver" value="' . $receiver . '" /> |
34 | 34 | <input type="submit" value="' . |
35 | | -wfMsg( 'notify-address-or-name', htmlspecialchars( $receiverLabel ) ) . '" /> |
| 35 | +wfMsg( 'notificator-notify-address-or-name', htmlspecialchars( $receiverLabel ) ) . '" /> |
36 | 36 | </form>'; |
37 | 37 | } else { |
38 | 38 | // No valid e-mail address available, show text entry field and button |
— | — | @@ -39,10 +39,10 @@ |
40 | 40 | '/Special:Notificator" method="post" enctype="multipart/form-data"> |
41 | 41 | <input type="hidden" name="pageId" value="' . $wgTitle->getArticleID() . '" /> |
42 | 42 | <input type="hidden" name="revId" value="' . $wgTitle->getLatestRevID() . '" /> |
43 | | -<input type="text" name="receiver" value="' . wfMsg( 'e-mail-address' ) . |
44 | | -'" onfocus="if (this.value == \'' . wfMsg( 'e-mail-address' ) . |
| 43 | +<input type="text" name="receiver" value="' . wfMsg( 'notificator-e-mail-address' ) . |
| 44 | +'" onfocus="if (this.value == \'' . wfMsg( 'notificator-e-mail-address' ) . |
45 | 45 | '\') {this.value=\'\'}" /> |
46 | | -<input type="submit" value="' . wfMsg( 'notify' ) . '" /> |
| 46 | +<input type="submit" value="' . wfMsg( 'notificator-notify' ) . '" /> |
47 | 47 | </form>'; |
48 | 48 | } |
49 | 49 | |
— | — | @@ -156,7 +156,7 @@ |
157 | 157 | |
158 | 158 | if ( $oldRevisionObj->getTitle() != $newRevisionObj->getTitle() ) { |
159 | 159 | return '<span class="error">' . |
160 | | - wfMsg( 'revs-not-from-same-title' ) . '</span>'; |
| 160 | + wfMsg( 'notificator-revs-not-from-same-title' ) . '</span>'; |
161 | 161 | } |
162 | 162 | |
163 | 163 | $titleObj = $oldRevisionObj->getTitle(); |
— | — | @@ -219,7 +219,7 @@ |
220 | 220 | |
221 | 221 | public static function getReturnToText( $linkToPage, $pageTitle ) { |
222 | 222 | return '<p style="margin-top: 2em;">' . |
223 | | - wfMsg( 'return-to' ) . ' <a href="' . $linkToPage . '">' . $pageTitle . '</a>.'; |
| 223 | + wfMsg( 'notificator-return-to' ) . ' <a href="' . $linkToPage . '">' . $pageTitle . '</a>.'; |
224 | 224 | } |
225 | 225 | |
226 | 226 | } |
Index: trunk/extensions/Notificator/Notificator.i18n.php |
— | — | @@ -7,48 +7,71 @@ |
8 | 8 | 'Notificator' => array( 'Notificator' ), |
9 | 9 | ); |
10 | 10 | |
| 11 | +$messages['qqq'] = array( |
| 12 | + 'notificator' => 'Name', |
| 13 | + 'notificator-description' => 'Description', |
| 14 | + 'notificator-db-table-does-not-exist' => 'Error message', |
| 15 | + 'notificator-e-mail-address' => 'Hint in text entry field', |
| 16 | + 'notificator-notify' => 'Button label', |
| 17 | + 'notificator-notify-address-or-name' => 'Button label', |
| 18 | + 'notificator-revs-not-from-same-title' => 'Error message (unlikely to show up)', |
| 19 | + 'notificator-return-to' => 'Link at the bottom of the special page', |
| 20 | + 'notificator-special-page-accessed-directly' => 'Error message', |
| 21 | + 'notificator-e-mail-address-invalid' => 'Error message', |
| 22 | + 'notificator-notification-not-sent' => 'Message on special page', |
| 23 | + 'notificator-change-tag' => 'Tag that goes into the e-mail subject (should be as short as possible)', |
| 24 | + 'notificator-new-tag' => 'Tag that goes into the e-mail subject (should be as short as possible)', |
| 25 | + 'notificator-notification-text-changes' => 'Message on special page', |
| 26 | + 'notificator-notification-text-new' => 'Message on special page', |
| 27 | + 'notificator-following-e-mail-sent-to' => 'Message on special page', |
| 28 | + 'notificator-subject' => 'Clarifies that the following text is an e-mail subject', |
| 29 | + 'notificator-error-sending-e-mail' => 'Error message', |
| 30 | + 'notificator-error-parameter-missing' => 'Error message (unlikely to show up)', |
| 31 | + 'notificator-notified-already' => 'Message on special page', |
| 32 | +); |
| 33 | + |
11 | 34 | $messages['en'] = array( |
12 | 35 | 'notificator' => 'Notificator', |
13 | 36 | 'notificator-description' => 'Notifies someone by e-mail about changes to a page when a button on that page gets clicked.', |
14 | 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.', |
15 | | - 'e-mail-address' => 'e-mail address', |
16 | | - 'notify' => 'Notify', // Button label |
17 | | - 'notify-address-or-name' => 'Notify $1', // Button label |
18 | | - 'revs-not-from-same-title' => 'Revision IDs are not from the same title/article', // Unlikely to be seen by the user |
19 | | - 'return-to' => 'Return to', // Return to <link> - at the bottom of the special page |
20 | | - 'special-page-accessed-directly' => 'This special page cannot be accessed directly. It is intended to be used through a Notificator button.', |
21 | | - 'e-mail-address-invalid' => 'The provided e-mail address is invalid.', |
22 | | - 'notification-not-sent' => 'Notification <em>not</em> sent.', |
23 | | - 'change-tag' => 'change', |
24 | | - 'new-tag' => 'new', |
25 | | - 'notification-text-changes' => '$1 wants to notify you about the following changes to $2:', |
26 | | - 'notification-text-new' => '$1 wants to notify you about $2.', |
27 | | - 'following-e-mail-sent-to' => 'The following e-mail has been sent to <em>$1</em>:', |
28 | | - 'subject' => 'Subject:', // The subject line of an e-mail |
29 | | - 'error-sending-e-mail' => 'There was an error when sending the notification e-mail to <em>$1</em>.', |
30 | | - 'error-parameter-missing' => 'Error: Missing parameter.', // Unlikely to be seen by the user |
31 | | - 'notified-already' => '$1 has been notified about this page or page change before.', |
| 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.', |
32 | 55 | ); |
33 | 56 | |
34 | 57 | $messages['de'] = array( |
35 | 58 | 'notificator' => 'Notificator', |
36 | 59 | 'notificator-description' => 'Sendet Benachrichtungs-Mails über Seitenänderungen, wenn ein Knopf auf der entsprechenden Seite betätigt wird.', |
37 | 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.', |
38 | | - 'e-mail-address' => 'E-Mail-Adresse', |
39 | | - 'notify' => 'Benachrichtigen', |
40 | | - 'notify-address-or-name' => '$1 benachrichtigen', |
41 | | - 'revs-not-from-same-title' => 'Revision-IDs gehören nicht zum selben Titel/Artikel', |
42 | | - 'return-to' => 'Zurück zu', |
43 | | - 'special-page-accessed-directly' => 'Auf diese Spezial-Seite kann nicht direkt zugegriffen werden. Sie sollte über einen Notificator-Knopf verwendet werden.', |
44 | | - 'e-mail-address-invalid' => 'Die angegebene E-Mail-Adresse ist ungültig.', |
45 | | - 'notification-not-sent' => 'Benachrichtigung <em>nicht</em> gesendet.', |
46 | | - 'change-tag' => 'Änderung', |
47 | | - 'new-tag' => 'Neu', |
48 | | - 'notification-text-changes' => '$1 möchte Sie zu folgenden Änderungen an $2 benachrichtigen:', |
49 | | - 'notification-text-new' => '$1 möchte Sie zu $2 benachrichtigen.', |
50 | | - 'following-e-mail-sent-to' => 'Folgende E-Mail wurde an <em>$1</em> gesendet:', |
51 | | - 'subject' => 'Betreff:', |
52 | | - 'error-sending-e-mail' => 'Beim Versenden der Benachrichtigungs-Mail an <em>$1</em> ist ein Fehler aufgetreten.', |
53 | | - 'error-parameter-missing' => 'Fehler: Fehlender Parameter.', |
54 | | - 'notified-already' => '$1 wurde bereits zu dieser Seite oder Seitenänderung benachrichtigt.', |
| 61 | + 'notificator-e-mail-address' => 'E-Mail-Adresse', |
| 62 | + 'notificator-notify' => 'Benachrichtigen', |
| 63 | + 'notificator-notify-address-or-name' => '$1 benachrichtigen', |
| 64 | + 'notificator-revs-not-from-same-title' => 'Revision-IDs gehören nicht zum selben Titel/Artikel', |
| 65 | + '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.', |
| 67 | + 'notificator-e-mail-address-invalid' => 'Die angegebene E-Mail-Adresse ist ungültig.', |
| 68 | + 'notificator-notification-not-sent' => 'Benachrichtigung <em>nicht</em> gesendet.', |
| 69 | + 'notificator-change-tag' => 'Änderung', |
| 70 | + '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.', |
| 73 | + 'notificator-following-e-mail-sent-to' => 'Folgende E-Mail wurde an <em>$1</em> gesendet:', |
| 74 | + 'notificator-subject' => 'Betreff:', |
| 75 | + 'notificator-error-sending-e-mail' => 'Beim Versenden der Benachrichtigungs-Mail an <em>$1</em> ist ein Fehler aufgetreten.', |
| 76 | + 'notificator-error-parameter-missing' => 'Fehler: Fehlender Parameter.', |
| 77 | + 'notificator-notified-already' => '$1 wurde bereits zu dieser Seite oder Seitenänderung benachrichtigt.', |
55 | 78 | ); |
\ No newline at end of file |
Index: trunk/extensions/Notificator/SpecialNotificator.php |
— | — | @@ -22,15 +22,15 @@ |
23 | 23 | $receiver = $wgRequest->getText( 'receiver' ); |
24 | 24 | |
25 | 25 | if ( ! $pageId || ! $revId || ! $receiver ) { |
26 | | - $output = '<span class="error">' . wfMsg( 'special-page-accessed-directly' ) . '</span>'; |
| 26 | + $output = '<span class="error">' . wfMsg( 'notificator-special-page-accessed-directly' ) . '</span>'; |
27 | 27 | } else { |
28 | 28 | $titleObj = Title::newFromID( $pageId ); |
29 | 29 | $pageTitle = $titleObj->getFullText(); |
30 | 30 | $linkToPage = $titleObj->getFullURL(); |
31 | 31 | |
32 | 32 | if ( ! Notificator::checkEmailAddress( $receiver ) ) { |
33 | | - $output = '<span class="error">' . wfMsg( 'e-mail-address-invalid' ) . ' ' . |
34 | | - wfMsg( 'notification-not-sent' ) . '</span>'; |
| 33 | + $output = '<span class="error">' . wfMsg( 'notificator-e-mail-address-invalid' ) . ' ' . |
| 34 | + wfMsg( 'notificator-notification-not-sent' ) . '</span>'; |
35 | 35 | $output .= Notificator::getReturnToText( $linkToPage, $pageTitle ); |
36 | 36 | $wgOut->addHTML( $output ); |
37 | 37 | return; |
— | — | @@ -41,37 +41,37 @@ |
42 | 42 | if ( $oldRevId >= 0 ) { |
43 | 43 | if ( $oldRevId > 0 ) { |
44 | 44 | // Receiver has been notified before - send the diff to the last notified revision |
45 | | - $mailSubjectPrefix = '[' . wfMsg( 'change-tag' ) . '] '; |
| 45 | + $mailSubjectPrefix = '[' . wfMsg( 'notificator-change-tag' ) . '] '; |
46 | 46 | |
47 | 47 | $wgOut->addModules( 'mediawiki.legacy.diff' ); |
48 | 48 | $diff = Notificator::getNotificationDiffHtml( $oldRevId, $revId ); |
49 | | - $notificationText = wfMsg( 'notification-text-changes', |
| 49 | + $notificationText = wfMsg( 'notificator-notification-text-changes', |
50 | 50 | htmlspecialchars( $wgUser->getName() ), '<a href="' . $linkToPage . '">' . |
51 | 51 | $pageTitle . '</a>' ) . '<div style="margin-top: 1em;">' . $diff . '</div>'; |
52 | 52 | } else { |
53 | 53 | // Receiver has never been notified about this page - so don't send a diff, just the link |
54 | | - $mailSubjectPrefix = '[' . wfMsg( 'new-tag' ) . '] '; |
55 | | - $notificationText = wfMsg( 'notification-text-new', |
| 54 | + $mailSubjectPrefix = '[' . wfMsg( 'notificator-new-tag' ) . '] '; |
| 55 | + $notificationText = wfMsg( 'notificator-notification-text-new', |
56 | 56 | htmlspecialchars( $wgUser->getName() ), '<a href="' . $linkToPage . '">' . |
57 | 57 | $pageTitle . '</a>' ); |
58 | 58 | } |
59 | 59 | $mailSubject = htmlspecialchars( $mailSubjectPrefix . $pageTitle ); |
60 | 60 | |
61 | 61 | if ( Notificator::sendNotificationMail( $receiver, $mailSubject, $notificationText ) ) { |
62 | | - $output = '<strong>' . wfMsg( 'following-e-mail-sent-to', |
| 62 | + $output = '<strong>' . wfMsg( 'notificator-following-e-mail-sent-to', |
63 | 63 | htmlspecialchars( $receiver ) ) . '</strong><div style="margin-top: 1em;"><h3>' . |
64 | | - wfMsg( 'subject' ) . ' ' . $mailSubject . '</h3><p>' . $notificationText . |
| 64 | + wfMsg( 'notificator-subject' ) . ' ' . $mailSubject . '</h3><p>' . $notificationText . |
65 | 65 | '</p></div>'; |
66 | 66 | Notificator::recordNotificationInDatabase( $pageId, $revId, $receiver ); |
67 | 67 | } else { |
68 | | - $output = '<span class="error">' . wfMsg( 'error-sending-e-mail', |
| 68 | + $output = '<span class="error">' . wfMsg( 'notificator-error-sending-e-mail', |
69 | 69 | htmlspecialchars( $receiver ) ) . '</span>'; |
70 | 70 | } |
71 | 71 | } elseif ( $oldRevId == -1 ) { |
72 | | - $output = '<span class="error">' . wfMsg( 'error-parameter-missing' ) . '</span>'; |
| 72 | + $output = '<span class="error">' . wfMsg( 'notificator-error-parameter-missing' ) . '</span>'; |
73 | 73 | } elseif ( $oldRevId == -2 ) { |
74 | | - $output = '<strong>' . wfMsg( 'notified-already', htmlspecialchars( $receiver ) ) . |
75 | | - ' ' . wfMsg( 'notification-not-sent' ) . '</strong>'; |
| 74 | + $output = '<strong>' . wfMsg( 'notificator-notified-already', htmlspecialchars( $receiver ) ) . |
| 75 | + ' ' . wfMsg( 'notificator-notification-not-sent' ) . '</strong>'; |
76 | 76 | } |
77 | 77 | |
78 | 78 | $output .= Notificator::getReturnToText( $linkToPage, $pageTitle ); |