Added mailer i18n (#436)

* Added mailer i18n

* Added translation to mailer in the JS

Also added a generic way to add JS translation through a javascript entry in the locale file

* Moved line-breaks from translations to JS file
This commit is contained in:
Rafael Baldasso Audibert
2019-04-11 12:30:50 -03:00
committed by Jesus Federico
parent 88776eaadb
commit 822dd27509
8 changed files with 83 additions and 26 deletions

View File

@ -43,10 +43,14 @@ $(document).on('turbolinks:load', function(){
// Handle recording emails.
$('.email-link').each(function(){
$(this).click(function(){
var subject = $(".username").text() + " has invited you to view a recording.";
var body = "To view the recording, follow the link below:\n\n" + $(this).attr("data-pres-link");
var footer = "\n\nThis e-mail is auto-generated by BigBlueButton.\nBigBlueButton is an open source web conferencing system. For more information on BigBlueButton, see https://bigbluebutton.org/."
var win = window.open("mailto:?subject=" + encodeURIComponent(subject) + "&body=" + encodeURIComponent(body) + encodeURIComponent(footer), '_blank');
var subject = $(".username").text() + " " + t('room.mailer.subject');
var body = t('room.mailer.body') + "\n\n" + $(this).attr("data-pres-link");
var autogenerated = "\n\n" + t('room.mailer.autogenerated') + "\n";
var footer = t('room.mailer.footer');
var url = "mailto:?subject=" + encodeURIComponent(subject) + "&body=" + encodeURIComponent(body) + encodeURIComponent(autogenerated) + encodeURIComponent(footer);
var win = window.open(url, '_blank');
win.focus();
});
});