i18n of the plugin (english & french for now)
This commit is contained in:
		
							parent
							
								
									a98c59fed5
								
							
						
					
					
						commit
						c84222d085
					
				
					 3 changed files with 34 additions and 26 deletions
				
			
		|  | @ -1,6 +1,9 @@ | ||||||
| # Description | # Description | ||||||
| This plugin allows users to subscribe to pads and receive email updates when a pad is being modified.  You can modify the frequency.  This plugin is very much in alpha stage and has a lot of things TODO (See TODO). | This plugin allows users to subscribe to pads and receive email updates when a pad is being modified.  You can modify the frequency.  This plugin is very much in alpha stage and has a lot of things TODO (See TODO). | ||||||
| 
 | 
 | ||||||
|  | # Source code | ||||||
|  | On Github : https://github.com/JohnMcLear/ep_email_notifications | ||||||
|  | 
 | ||||||
| # Installation | # Installation | ||||||
| Make sure an SMTP gateway is installed IE postfix | Make sure an SMTP gateway is installed IE postfix | ||||||
| Configure SPF and RDNS records to ensure proper mail flow <-- Search online | Configure SPF and RDNS records to ensure proper mail flow <-- Search online | ||||||
|  | @ -26,6 +29,11 @@ NOTE: You will NOT receive an email if you(the author that registered their emai | ||||||
|   } |   } | ||||||
| ``` | ``` | ||||||
| 
 | 
 | ||||||
|  | # Translation | ||||||
|  | This plugin has for now an english and french translation. | ||||||
|  | In case you would like to have it in another language, you can easily translate the few sentences and then contact us on irc (#etherpad-lite-dev on irc.freenode.net) or create a Pull-Request on the GitHub repository. | ||||||
|  | You can find the sentences to translate in the ep_email_notifications/locales/ directory. | ||||||
|  | 
 | ||||||
| # TODO | # TODO | ||||||
| * Clean up all code | * Clean up all code | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -10,9 +10,9 @@ exports.postAceInit = function(hook, context){ | ||||||
|   if (typeof clientVars.panelDisplayLocation != "object") { |   if (typeof clientVars.panelDisplayLocation != "object") { | ||||||
|     $.gritter.add({ |     $.gritter.add({ | ||||||
|       // (string | mandatory) the heading of the notification
 |       // (string | mandatory) the heading of the notification
 | ||||||
|       title: "Email subscription error", |       title: window._('ep_email_notifications.titleGritterError'), | ||||||
|       // (string | mandatory) the text inside the notification
 |       // (string | mandatory) the text inside the notification
 | ||||||
|       text: "Some settings for the 'email_Notifications' plugin are missing.<br />Please contact your administrator.", |       text: window._('ep_email_notifications.msgParamsMissing'), | ||||||
|       // (int | optional) the time you want it to be alive for before fading out
 |       // (int | optional) the time you want it to be alive for before fading out
 | ||||||
|       time: 10000, |       time: 10000, | ||||||
|     }); |     }); | ||||||
|  | @ -150,9 +150,9 @@ function askClientToEnterEmail(){ | ||||||
| 
 | 
 | ||||||
|   $.gritter.add({ |   $.gritter.add({ | ||||||
|     // (string | mandatory) the heading of the notification
 |     // (string | mandatory) the heading of the notification
 | ||||||
|     title: "Email subscription", |     title: window._('ep_email_notifications.titleGritterSubscr'), | ||||||
|     // (string | mandatory) the text inside the notification
 |     // (string | mandatory) the text inside the notification
 | ||||||
|     text: "<p>(Receive an email when someone modifies this pad)</p>" + formContent, |     text: "<p>" + window._('ep_email_notifications.headerGritterSubscr') + "</p>" + formContent, | ||||||
|     // (bool | optional) if you want it to fade out on its own or just sit there
 |     // (bool | optional) if you want it to fade out on its own or just sit there
 | ||||||
|     sticky: true, |     sticky: true, | ||||||
|     // (int | optional) the time you want it to be alive for before fading out
 |     // (int | optional) the time you want it to be alive for before fading out
 | ||||||
|  | @ -195,9 +195,9 @@ function checkAndSend(e) { | ||||||
|       && !$('#' + formName + ' [name=ep_email_onEnd]').is(':checked')) { |       && !$('#' + formName + ' [name=ep_email_onEnd]').is(':checked')) { | ||||||
|     $.gritter.add({ |     $.gritter.add({ | ||||||
|       // (string | mandatory) the heading of the notification
 |       // (string | mandatory) the heading of the notification
 | ||||||
|       title: "Email subscription error", |       title: window._('ep_email_notifications.titleGritterError'), | ||||||
|       // (string | mandatory) the text inside the notification
 |       // (string | mandatory) the text inside the notification
 | ||||||
|       text: "You need to check at least one of the two options from 'Send a mail when someone..'" |       text: window._('ep_email_notifications.msgOptionsNotChecked') | ||||||
|     }); |     }); | ||||||
|   } else if (email) { |   } else if (email) { | ||||||
|     $('#' + formName).submit(); |     $('#' + formName).submit(); | ||||||
|  | @ -253,9 +253,9 @@ Manage return msgs from server | ||||||
| function showRegistrationSuccess(){ | function showRegistrationSuccess(){ | ||||||
|   $.gritter.add({ |   $.gritter.add({ | ||||||
|     // (string | mandatory) the heading of the notification
 |     // (string | mandatory) the heading of the notification
 | ||||||
|     title: "Email subscription", |     title: window._('ep_email_notifications.titleGritterSubscr'), | ||||||
|     // (string | mandatory) the text inside the notification
 |     // (string | mandatory) the text inside the notification
 | ||||||
|     text: "An email was sent to your address.<br />Click on the link in order to validate your subscription.", |     text: window._('ep_email_notifications.msgSubscrSuccess'), | ||||||
|     // (int | optional) the time you want it to be alive for before fading out
 |     // (int | optional) the time you want it to be alive for before fading out
 | ||||||
|     time: 10000 |     time: 10000 | ||||||
|   }); |   }); | ||||||
|  | @ -266,19 +266,19 @@ function showRegistrationSuccess(){ | ||||||
|  */ |  */ | ||||||
| function showAlreadyRegistered(type){ | function showAlreadyRegistered(type){ | ||||||
|   if (type == "malformedEmail") { |   if (type == "malformedEmail") { | ||||||
|     var msg = "The email address is malformed"; |     var msg = window._('ep_email_notifications.msgEmailMalformed'); | ||||||
|   } else if (type == "alreadyRegistered") { |   } else if (type == "alreadyRegistered") { | ||||||
|     var msg = "You are already registered for emails for this pad"; |     var msg = window._('ep_email_notifications.msgAlreadySubscr'); | ||||||
|   } else { |   } else { | ||||||
|     var msg = "Unknown error"; |     var msg = window._('ep_email_notifications.msgUnknownErr'); | ||||||
|   } |   } | ||||||
|   $.gritter.add({ |   $.gritter.add({ | ||||||
|     // (string | mandatory) the heading of the notification
 |     // (string | mandatory) the heading of the notification
 | ||||||
|     title: "Email subscription", |     title: window._('ep_email_notifications.titleGritterSubscr'), | ||||||
|     // (string | mandatory) the text inside the notification
 |     // (string | mandatory) the text inside the notification
 | ||||||
|     text: msg, |     text: msg, | ||||||
|     // (bool | optional) if you want it to fade out on its own or just sit there
 |     // (int | optional) the time you want it to be alive for before fading out
 | ||||||
|     sticky: false |     time: 7000 | ||||||
|   }); |   }); | ||||||
| 
 | 
 | ||||||
| } | } | ||||||
|  | @ -289,9 +289,9 @@ function showAlreadyRegistered(type){ | ||||||
| function showUnregistrationSuccess(){ | function showUnregistrationSuccess(){ | ||||||
|   $.gritter.add({ |   $.gritter.add({ | ||||||
|     // (string | mandatory) the heading of the notification
 |     // (string | mandatory) the heading of the notification
 | ||||||
|     title: "Email unsubscription", |     title: window._('ep_email_notifications.titleGritterUnsubscr'), | ||||||
|     // (string | mandatory) the text inside the notification
 |     // (string | mandatory) the text inside the notification
 | ||||||
|     text: "An email was sent to your address.<br />Click on the link in order to validate your unsubscription.", |     text: window._('ep_email_notifications.msgUnsubscrSuccess'), | ||||||
|     // (int | optional) the time you want it to be alive for before fading out
 |     // (int | optional) the time you want it to be alive for before fading out
 | ||||||
|     time: 10000 |     time: 10000 | ||||||
|   }); |   }); | ||||||
|  | @ -303,11 +303,11 @@ function showUnregistrationSuccess(){ | ||||||
| function showWasNotRegistered(){ | function showWasNotRegistered(){ | ||||||
|   $.gritter.add({ |   $.gritter.add({ | ||||||
|     // (string | mandatory) the heading of the notification
 |     // (string | mandatory) the heading of the notification
 | ||||||
|     title: "Email unsubscription", |     title: window._('ep_email_notifications.titleGritterUnsubscr'), | ||||||
|     // (string | mandatory) the text inside the notification
 |     // (string | mandatory) the text inside the notification
 | ||||||
|     text: "This email address is not registered for this pad", |     text: window._('ep_email_notifications.msgUnsubscrNotExisting'), | ||||||
|     // (bool | optional) if you want it to fade out on its own or just sit there
 |     // (int | optional) the time you want it to be alive for before fading out
 | ||||||
|     sticky: false |     time: 7000 | ||||||
|   }); |   }); | ||||||
| 
 | 
 | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -1,21 +1,21 @@ | ||||||
| <p> | <p> | ||||||
|   <input type="checkbox" id="options-emailNotifications"></input> |   <input type="checkbox" id="options-emailNotifications"></input> | ||||||
|   <label for="options-emailNotifications">Email Notifications</label> |   <label for="options-emailNotifications" data-l10n-id="ep_email_notifications.menuLabel"></label> | ||||||
|   <div class="ep_email_settings"> |   <div class="ep_email_settings"> | ||||||
|     <form id='ep_email_form_mysettings'> |     <form id='ep_email_form_mysettings'> | ||||||
|       <input name='ep_email' class='ep_email_input' placeholder='your@email.com' type=email> |       <input name='ep_email' class='ep_email_input' placeholder='your@email.com' type=email> | ||||||
|       <br /> |       <br /> | ||||||
|       <label>Send a mail when someone..</label> |       <label data-l10n-id="ep_email_notifications.formOptionsTitle"></label> | ||||||
|       <br /> |       <br /> | ||||||
|       <input name='ep_email_onStart' type="checkbox" class="ep_email_checkbox"></input> |       <input name='ep_email_onStart' type="checkbox" class="ep_email_checkbox"></input> | ||||||
|       <label for="ep_email_onStart">starts editing the pad</label> |       <label for="ep_email_onStart" data-l10n-id="ep_email_notifications.formOptionOnStart"></label> | ||||||
|       <br /> |       <br /> | ||||||
|       <input name='ep_email_onEnd' type="checkbox" class="ep_email_checkbox"></input> |       <input name='ep_email_onEnd' type="checkbox" class="ep_email_checkbox"></input> | ||||||
|       <label for="ep_email_onEnd">finish editing the pad</label> |       <label for="ep_email_onEnd" data-l10n-id="ep_email_notifications.formOptionOnEnd"></label> | ||||||
|       <input name='ep_email_option' type=hidden > |       <input name='ep_email_option' type=hidden > | ||||||
|       <br /> |       <br /> | ||||||
|       <input name='ep_email_subscribe' type=button class="ep_email_buttons" value=subscribe> |       <button name='ep_email_subscribe' type=button class="ep_email_buttons" data-l10n-id="ep_email_notifications.formBtnSubscr"></button> | ||||||
|       <input name='ep_email_unsubscribe'type=button class="ep_email_buttons" value=unsubscribe> |       <button name='ep_email_unsubscribe'type=button class="ep_email_buttons" data-l10n-id="ep_email_notifications.formBtnUnsubscr"></button> | ||||||
|     </form> |     </form> | ||||||
|   </div> |   </div> | ||||||
| </p> | </p> | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 quenenni
						quenenni