Replace editor translations with Twig localize function

This commit is contained in:
Tautvidas Sipavičius
2016-03-07 15:42:12 +02:00
parent 88a00bc38c
commit c3416977bb
7 changed files with 120 additions and 134 deletions

View File

@@ -191,7 +191,7 @@ define([
if (templateName === '') {
MailPoet.Notice.error(
App.getConfig().get('translations.templateNameMissing'),
MailPoetI18n.templateNameMissing,
{
positionAfter: that.$el,
scroll: true,
@@ -199,7 +199,7 @@ define([
);
} else if (templateDescription === '') {
MailPoet.Notice.error(
App.getConfig().get('translations.templateDescriptionMissing'),
MailPoetI18n.templateDescriptionMissing,
{
positionAfter: that.$el,
scroll: true,
@@ -213,7 +213,7 @@ define([
}).done(function() {
console.log('Template saved', arguments);
MailPoet.Notice.success(
App.getConfig().get('translations.templateSaved'),
MailPoetI18n.templateSaved,
{
positionAfter: that.$el,
scroll: true,
@@ -222,7 +222,7 @@ define([
}).fail(function() {
console.log('Template save failed', arguments);
MailPoet.Notice.error(
App.getConfig().get('translations.templateSaveFailed'),
MailPoetI18n.templateSaveFailed,
{
positionAfter: that.$el,
scroll: true,
@@ -247,7 +247,7 @@ define([
if (templateName === '') {
MailPoet.Notice.error(
App.getConfig().get('translations.templateNameMissing'),
MailPoetI18n.templateNameMissing,
{
positionAfter: that.$el,
scroll: true,
@@ -255,7 +255,7 @@ define([
);
} else if (templateDescription === '') {
MailPoet.Notice.error(
App.getConfig().get('translations.templateDescriptionMissing'),
MailPoetI18n.templateDescriptionMissing,
{
positionAfter: that.$el,
scroll: true,
@@ -290,7 +290,7 @@ define([
if (App.getConfig().get('validation.validateUnsubscribeLinkPresent') &&
JSON.stringify(jsonObject).indexOf("[unsubscribeUrl]") < 0) {
this.showValidationError(App.getConfig().get('translations.unsubscribeLinkMissing'));
this.showValidationError(MailPoetI18n.unsubscribeLinkMissing);
return;
}