Index: trunk/extensions/SemanticTasks/SemanticTasks.php |
— | — | @@ -19,11 +19,12 @@ |
20 | 20 | #Informations |
21 | 21 | $wgExtensionCredits['parserhook'][] = array( |
22 | 22 | 'name' => 'SemanticTasks', |
23 | | - 'author' =>'Steren Giannini', |
24 | | - 'version' => '1.1', |
25 | | - 'url' => 'http://www.creativecommons.org', |
26 | | - 'description' => 'Email notifications for assigned or updated tasks.' |
27 | | - ); |
| 23 | + 'author' => 'Steren Giannini', |
| 24 | + 'version' => '1.1.1', |
| 25 | + 'url' => 'http://www.creativecommons.org', //FIXME: URL should point to a page about this extension |
| 26 | + 'description' => 'Email notifications for assigned or updated tasks.', |
| 27 | + 'descriptionmsg' => 'semantictasks-desc', |
| 28 | +); |
28 | 29 | |
29 | 30 | //Do st_SetupExtension after the mediawiki setup, AND after SemanticMediaWiki setup |
30 | 31 | $wgExtensionFunctions[] = 'st_SetupExtension'; |
— | — | @@ -33,5 +34,3 @@ |
34 | 35 | |
35 | 36 | // ST_Notify_Assignment.php |
36 | 37 | require_once( $stIP . "/ST_Notify_Assignment.php" ); |
37 | | - |
38 | | -?> |
Index: trunk/extensions/SemanticTasks/ST_CheckForReminders.php |
— | — | @@ -15,4 +15,3 @@ |
16 | 16 | fnRemindAssignees( 'http://teamspace.creativecommons.org/' ); |
17 | 17 | |
18 | 18 | print( "ST check for reminders\n" ); |
19 | | -?> |
Index: trunk/extensions/SemanticTasks/ST_Notify_Assignment.php |
— | — | @@ -13,9 +13,9 @@ |
14 | 14 | $rev = $article->estimateRevisionCount(); |
15 | 15 | |
16 | 16 | if( $rev == 1 ) { |
17 | | - fnMailAssignees( $article, $current_user, '['.$wgSitename.'] '. wfMsg( 'newtask' ), 'assignedtoyou_msg', /*diff?*/ false, /*Page text*/ true ); |
| 17 | + fnMailAssignees( $article, $current_user, '['.$wgSitename.'] '. wfMsg( 'semantictasks-newtask' ), 'semantictasks-assignedtoyou-msg', /*diff?*/ false, /*Page text*/ true ); |
18 | 18 | } else { |
19 | | - fnMailAssignees( $article, $current_user, '['.$wgSitename.'] '. wfMsg( 'taskupdated' ), 'updatedtoyou_msg', /*diff?*/ true, /*Page text*/ false ); |
| 19 | + fnMailAssignees( $article, $current_user, '['.$wgSitename.'] '. wfMsg( 'semantictasks-taskupdated' ), 'semantictasks-updatedtoyou-msg', /*diff?*/ true, /*Page text*/ false ); |
20 | 20 | } |
21 | 21 | } |
22 | 22 | return TRUE; |
— | — | @@ -64,10 +64,10 @@ |
65 | 65 | $assignee_name = $assignee_user_name[1]; |
66 | 66 | $body = wfMsg( $message , $assignee_name , $title ) . $link; |
67 | 67 | if( $display_text ){ |
68 | | - $body .= "\n \n" . wfMsg( 'text-message' ) . "\n" . $article->getContent() ; |
| 68 | + $body .= "\n \n" . wfMsg( 'semantictasks-text-message' ) . "\n" . $article->getContent() ; |
69 | 69 | } |
70 | 70 | if( $display_diff){ |
71 | | - $body .= "\n \n" . wfMsg( 'diff-message' ) . "\n" . st_generateDiffBody_txt( $title ); |
| 71 | + $body .= "\n \n" . wfMsg( 'semantictasks-diff-message' ) . "\n" . st_generateDiffBody_txt( $title ); |
72 | 72 | } |
73 | 73 | |
74 | 74 | //TEST: uncomment this for test mode (Writes body in testFile) |
— | — | @@ -172,7 +172,7 @@ |
173 | 173 | |
174 | 174 | while ( $row = $results->getNext() ) { |
175 | 175 | $task_name = $row[0]->getNextObject()->getTitle(); |
176 | | - $subject = '[' . $wgSitename . '] ' . wfMsg( 'reminder' ) . $task_name; |
| 176 | + $subject = '[' . $wgSitename . '] ' . wfMsg( 'semantictasks-reminder' ) . $task_name; |
177 | 177 | //The following doesn't work, maybe because we use a cron job. |
178 | 178 | //$link = $task_name->escapeFullURL(); |
179 | 179 | //So let's do it manually |
— | — | @@ -194,7 +194,7 @@ |
195 | 195 | |
196 | 196 | $assignee = User::newFromName( $assignee_name ); |
197 | 197 | $assignee_mail = new MailAddress( $assignee->getEmail(), $assignee_name ); |
198 | | - $body = wfMsg('reminder-message', $assignee_name, $task_name, $remind_me_in, $link ); |
| 198 | + $body = wfMsgExt( 'semantictasks-reminder-message', 'parsemag', $assignee_name, $task_name, $remind_me_in, $link ); |
199 | 199 | $user_mailer->send( $assignee_mail, $sender, $subject, $body ); |
200 | 200 | } |
201 | 201 | } |
— | — | @@ -220,4 +220,3 @@ |
221 | 221 | fwrite( $fh, $stringData ); |
222 | 222 | fclose( $fh ); |
223 | 223 | } |
224 | | -?> |
Index: trunk/extensions/SemanticTasks/SemanticTasks.i18n.php |
— | — | @@ -1,26 +1,52 @@ |
2 | 2 | <?php |
| 3 | +/**Internationalization messages file for SemanticTasks extension |
| 4 | + * |
| 5 | + * @addtogroup Extensions |
| 6 | +*/ |
| 7 | + |
3 | 8 | $messages = array(); |
| 9 | + |
| 10 | +/** English (English) |
| 11 | + * @author Steren Giannini |
| 12 | + */ |
4 | 13 | $messages['en'] = array( |
5 | | - 'newtask' => 'New Task:', |
6 | | - 'taskupdated' => 'Task Updated:', |
7 | | - 'assignedtoyou_msg' => "Hello $1,\nThe task \"$2\" has just been assigned to you.\n\n", |
8 | | - 'updatedtoyou_msg' => "Hello $1,\nThe task \"$2\" has just been updated.\n\n", |
9 | | - 'reminder' => 'Reminder: ', |
10 | | - 'reminder-message' => "Hello $1, \nJust to remind you that the task \"$2\" ends in $3 days.\n\n$4", |
11 | | - 'text-message' => "Here is the Task description:", |
12 | | - 'diff-message' => "Here are the differences:", |
| 14 | + 'semantictasks-desc' => 'Email notifications for assigned or updated tasks', |
| 15 | + 'semantictasks-newtask' => 'New task:', |
| 16 | + 'semantictasks-taskupdated' => 'Task updated:', |
| 17 | + 'semantictasks-assignedtoyou-msg' => "Hello $1, |
| 18 | + |
| 19 | +The task \"$2\" has just been assigned to you", |
| 20 | + 'semantictasks-updatedtoyou-msg' => "Hello $1, |
| 21 | + |
| 22 | +The task \"$2\" has just been updated.", |
| 23 | + 'semantictasks-reminder' => 'Reminder:', |
| 24 | + 'semantictasks-reminder-message' => "Hello $1, |
| 25 | + |
| 26 | +Just to remind you that the task \"$2\" ends in $3 {{PLURAL:$3|day|days}}. |
| 27 | + |
| 28 | +$4", |
| 29 | + 'semantictasks-text-message' => "Here is the task description:", |
| 30 | + 'semantictasks-diff-message' => "Here are the differences:", |
13 | 31 | ); |
14 | 32 | |
| 33 | +/** French (Français) |
| 34 | + */ |
| 35 | +$messages['fr'] = array( |
| 36 | + 'semantictasks-newtask' => 'Nouvelle tâche :', |
| 37 | + 'semantictasks-taskupdated' => 'Tâche mise à jour :', |
| 38 | + 'semantictasks-assignedtoyou-msg' => "Bonjour $1, |
15 | 39 | |
16 | | -$messages['fr'] = array( |
17 | | - 'newtask' => 'Nouvelle tâche :', |
18 | | - 'taskupdated' => 'Tâche mise à jour :', |
19 | | - 'assignedtoyou_msg' => "Bonjour $1,\nLa tâche \"$2\" vous a été assignée.\n\n", |
20 | | - 'updatedtoyou_msg' => "Bonjour $1,\nLa tâche \"$2\" a été mise à jour.\n\n", |
21 | | - 'reminder' => 'Rappel: ', |
22 | | - 'reminder-message' => "Bonjour $1, \nN'oubliez pas que la tâche \"$2\" se termine dans $3 jours.\n\n$4", |
23 | | - 'text-message' => "Voici la description de la tâche :", |
24 | | - 'diff-message' => "Les différences sont listées ci-dessous :", |
| 40 | +La tâche \"$2\" vous a été assignée.", |
| 41 | + 'semantictasks-updatedtoyou-msg' => "Bonjour $1, |
| 42 | + |
| 43 | +La tâche \"$2\" a été mise à jour.", |
| 44 | + 'semantictasks-reminder' => 'Rappel :', |
| 45 | + 'reminder-message' => "Bonjour $1, |
| 46 | + |
| 47 | +N'oubliez pas que la tâche \"$2\" se termine dans $3 jours. |
| 48 | + |
| 49 | +$4", |
| 50 | + 'semantictasks-text-message' => "Voici la description de la tâche :", |
| 51 | + 'semantictasks-diff-message' => "Les différences sont listées ci-dessous :", |
25 | 52 | ); |
26 | 53 | |
27 | | -?> |
Index: trunk/extensions/Translate/groups/mediawiki-defines.txt |
— | — | @@ -674,6 +674,8 @@ |
675 | 675 | optional = smw_csv_link |
676 | 676 | optional = smw_json_link |
677 | 677 | |
| 678 | +Semantic Tasks |
| 679 | + |
678 | 680 | Shared User Rights |
679 | 681 | descmsg = gblrights-desc |
680 | 682 | |