diff --git a/assets/js/src/form/form.jsx b/assets/js/src/form/form.jsx
index 717785c484..cdf8a744ce 100644
--- a/assets/js/src/form/form.jsx
+++ b/assets/js/src/form/form.jsx
@@ -167,7 +167,7 @@ define(
);
}
@@ -199,4 +199,4 @@ define(
return Form;
}
-);
\ No newline at end of file
+);
diff --git a/assets/js/src/i18n.js b/assets/js/src/i18n.js
index 08ae45f629..215d7b7e0f 100644
--- a/assets/js/src/i18n.js
+++ b/assets/js/src/i18n.js
@@ -15,7 +15,7 @@ define('i18n',
translations[key] = value;
},
t: function(key) {
- return translations[key] || 'TRANSLATION NOT FOUND';
+ return translations[key] || 'TRANSLATION "%$1s" NOT FOUND'.replace("%$1s", key);
},
all: function() {
return translations;
diff --git a/assets/js/src/listing/bulk_actions.jsx b/assets/js/src/listing/bulk_actions.jsx
index 8a13b61a5e..10e74eb9e3 100644
--- a/assets/js/src/listing/bulk_actions.jsx
+++ b/assets/js/src/listing/bulk_actions.jsx
@@ -1,8 +1,10 @@
define([
- 'react'
+ 'react',
+ 'mailpoet'
],
function(
- React
+ React,
+ MailPoet
) {
var ListingBulkActions = React.createClass({
getInitialState: function() {
@@ -104,7 +106,7 @@ function(
{ this.state.extra }
diff --git a/assets/js/src/listing/filters.jsx b/assets/js/src/listing/filters.jsx
index 01ad26ed81..48482df579 100644
--- a/assets/js/src/listing/filters.jsx
+++ b/assets/js/src/listing/filters.jsx
@@ -1,10 +1,12 @@
define([
'react',
- 'jquery'
+ 'jquery',
+ 'mailpoet'
],
function(
React,
- jQuery
+ jQuery,
+ MailPoet
) {
var ListingFilters = React.createClass({
handleFilterAction: function() {
@@ -69,7 +71,7 @@ function(
id="post-query-submit"
onClick={ this.handleFilterAction }
type="submit"
- defaultValue="Filter"
+ defaultValue={MailPoet.I18n.t('filter')}
className="button" />
);
}
@@ -80,7 +82,7 @@ function(
);
diff --git a/assets/js/src/listing/header.jsx b/assets/js/src/listing/header.jsx
index 39e32984fe..cbcd48cb3a 100644
--- a/assets/js/src/listing/header.jsx
+++ b/assets/js/src/listing/header.jsx
@@ -1,4 +1,12 @@
-define(['react', 'classnames'], function(React, classNames) {
+define([
+ 'react',
+ 'classnames',
+ 'mailpoet'
+ ], function(
+ React,
+ classNames,
+ MailPoet
+ ) {
var ListingHeader = React.createClass({
handleSelectItems: function() {
@@ -28,7 +36,7 @@ define(['react', 'classnames'], function(React, classNames) {
- Trash
+ {MailPoet.I18n.t('trash')}
);
@@ -145,7 +145,7 @@ define(
} else {
item_actions = (
- Edit
+ {MailPoet.I18n.t('edit')}
);
}
@@ -161,7 +161,7 @@ define(
null,
this.props.item.id
)}
- >Restore
+ >{MailPoet.I18n.t('restore')}
{ ' | ' }
@@ -172,13 +172,13 @@ define(
null,
this.props.item.id
)}
- >Delete permanently
+ >{MailPoet.I18n.t('deletePermanently')}
);
@@ -191,7 +191,7 @@ define(
);
@@ -678,12 +678,12 @@ define(
bulk_actions = [
{
name: 'restore',
- label: 'Restore',
+ label: MailPoet.I18n.t('restore'),
onSuccess: this.props.messages.onRestore
},
{
name: 'delete',
- label: 'Delete permanently',
+ label: MailPoet.I18n.t('deletePermanently'),
onSuccess: this.props.messages.onDelete
}
];
diff --git a/assets/js/src/listing/pages.jsx b/assets/js/src/listing/pages.jsx
index 3cb404ccac..f885a9a44f 100644
--- a/assets/js/src/listing/pages.jsx
+++ b/assets/js/src/listing/pages.jsx
@@ -1,4 +1,12 @@
-define(['react', 'classnames'], function(React, classNames) {
+define([
+ 'react',
+ 'classnames',
+ 'mailpoet'
+ ], function(
+ React,
+ classNames,
+ MailPoet
+ ) {
var ListingPages = React.createClass({
getInitialState: function() {
@@ -72,7 +80,7 @@ define(['react', 'classnames'], function(React, classNames) {
- Previous page
+ {MailPoet.I18n.t('previousPage')}
‹
);
@@ -83,7 +91,7 @@ define(['react', 'classnames'], function(React, classNames) {
- First page
+ {MailPoet.I18n.t('firstPage')}
«
);
@@ -94,7 +102,7 @@ define(['react', 'classnames'], function(React, classNames) {
- Next page
+ {MailPoet.I18n.t('nextPage')}
›
);
@@ -105,7 +113,7 @@ define(['react', 'classnames'], function(React, classNames) {
- Last page
+ {MailPoet.I18n.t('lastPage')}
»
);
@@ -125,7 +133,7 @@ define(['react', 'classnames'], function(React, classNames) {
+ htmlFor="current-page-selector">{MailPoet.I18n.t('currentPage')}
- of
+ {MailPoet.I18n.t('pageOutOf')}
{Math.ceil(this.props.count / this.props.limit)}
@@ -158,7 +166,9 @@ define(['react', 'classnames'], function(React, classNames) {
return (
- { this.props.count } items
+ {
+ MailPoet.I18n.t('numberOfItems').replace('%$1d', this.props.count)
+ }
{ pagination }
);
@@ -167,4 +177,4 @@ define(['react', 'classnames'], function(React, classNames) {
});
return ListingPages;
-});
\ No newline at end of file
+});
diff --git a/assets/js/src/listing/search.jsx b/assets/js/src/listing/search.jsx
index 953605f42a..e0ba020d6a 100644
--- a/assets/js/src/listing/search.jsx
+++ b/assets/js/src/listing/search.jsx
@@ -24,7 +24,7 @@ define([
|