Fix translations to be injected at config time

This commit is contained in:
Tautvidas Sipavičius
2016-03-07 17:52:14 +02:00
parent b2682fa0b7
commit f688a69f8b
8 changed files with 30 additions and 18 deletions

View File

@@ -191,7 +191,7 @@ define([
if (templateName === '') {
MailPoet.Notice.error(
MailPoetI18n.templateNameMissing,
App.getConfig().get('translations.templateNameMissing'),
{
positionAfter: that.$el,
scroll: true,
@@ -199,7 +199,7 @@ define([
);
} else if (templateDescription === '') {
MailPoet.Notice.error(
MailPoetI18n.templateDescriptionMissing,
App.getConfig().get('translations.templateDescriptionMissing'),
{
positionAfter: that.$el,
scroll: true,
@@ -211,7 +211,7 @@ define([
description: templateDescription,
}).done(function() {
MailPoet.Notice.success(
MailPoetI18n.templateSaved,
App.getConfig().get('translations.templateSaved'),
{
positionAfter: that.$el,
scroll: true,
@@ -219,7 +219,7 @@ define([
);
}).fail(function() {
MailPoet.Notice.error(
MailPoetI18n.templateSaveFailed,
App.getConfig().get('translations.templateSaveFailed'),
{
positionAfter: that.$el,
scroll: true,
@@ -244,7 +244,7 @@ define([
if (templateName === '') {
MailPoet.Notice.error(
MailPoetI18n.templateNameMissing,
App.getConfig().get('translations.templateNameMissing'),
{
positionAfter: that.$el,
scroll: true,
@@ -252,7 +252,7 @@ define([
);
} else if (templateDescription === '') {
MailPoet.Notice.error(
MailPoetI18n.templateDescriptionMissing,
App.getConfig().get('translations.templateDescriptionMissing'),
{
positionAfter: that.$el,
scroll: true,
@@ -285,7 +285,7 @@ define([
if (App.getConfig().get('validation.validateUnsubscribeLinkPresent') &&
JSON.stringify(jsonObject).indexOf("[unsubscribeUrl]") < 0) {
this.showValidationError(MailPoetI18n.unsubscribeLinkMissing);
this.showValidationError(App.getConfig().get('translations.unsubscribeLinkMissing'));
return;
}