Skip to content
This repository has been archived by the owner on May 3, 2022. It is now read-only.

Commit

Permalink
EZP-26444: Added translatable strings for Online Editor
Browse files Browse the repository at this point in the history
  • Loading branch information
dpobel committed Nov 4, 2016
1 parent 6ab71e0 commit 59cce21
Show file tree
Hide file tree
Showing 48 changed files with 94 additions and 72 deletions.
28 changes: 16 additions & 12 deletions Resources/config/yui.yml
Expand Up @@ -32,7 +32,7 @@ system:
requires: ['ez-alloyeditor']
path: "%ez_platformui.public_dir%/js/alloyeditor/toolbars/config/block-base.js"
ez-alloyeditor-toolbar-config-heading:
requires: ['ez-alloyeditor', 'ez-alloyeditor-toolbar-config-block-base']
requires: ['ez-alloyeditor', 'ez-alloyeditor-toolbar-config-block-base', 'ez-translator']
path: "%ez_platformui.public_dir%/js/alloyeditor/toolbars/config/heading.js"
ez-alloyeditor-toolbar-config-paragraph:
requires: ['ez-alloyeditor', 'ez-alloyeditor-toolbar-config-block-base']
Expand Down Expand Up @@ -62,23 +62,24 @@ system:
requires: ['ez-alloyeditor']
path: "%ez_platformui.public_dir%/js/alloyeditor/plugins/paste.js"
ez-alloyeditor-button-heading:
requires: ['ez-alloyeditor']
requires: ['ez-alloyeditor', 'ez-translator']
path: "%ez_platformui.public_dir%/js/alloyeditor/buttons/heading.js"
ez-alloyeditor-button-paragraph:
requires: ['ez-alloyeditor']
requires: ['ez-alloyeditor', 'ez-translator']
path: "%ez_platformui.public_dir%/js/alloyeditor/buttons/paragraph.js"
ez-alloyeditor-button-list:
requires: ['ez-alloyeditor']
requires: ['ez-alloyeditor', 'ez-translator']
path: "%ez_platformui.public_dir%/js/alloyeditor/buttons/list.js"
ez-alloyeditor-button-image:
requires:
- 'ez-alloyeditor'
- 'ez-alloyeditor-button-mixin-embeddiscovercontent'
- 'ez-alloyeditor-button-mixin-embedimage'
- 'ez-alloyeditor-button-mixin-widgetbutton'
- 'ez-translator'
path: "%ez_platformui.public_dir%/js/alloyeditor/buttons/image.js"
ez-alloyeditor-button-embed:
requires: ['ez-alloyeditor', 'ez-alloyeditor-button-mixin-embeddiscovercontent', 'ez-alloyeditor-button-mixin-widgetbutton']
requires: ['ez-alloyeditor', 'ez-alloyeditor-button-mixin-embeddiscovercontent', 'ez-alloyeditor-button-mixin-widgetbutton', 'ez-translator']
path: "%ez_platformui.public_dir%/js/alloyeditor/buttons/embed.js"
ez-alloyeditor-button-imagevariation:
requires: ['ez-alloyeditor', 'ez-alloyeditor-button-mixin-embedimage']
Expand All @@ -87,42 +88,45 @@ system:
requires:
- 'ez-alloyeditor'
- 'ez-alloyeditor-button-mixin-embedalign'
- 'ez-translator'
path: "%ez_platformui.public_dir%/js/alloyeditor/buttons/embedcenter.js"
ez-alloyeditor-button-embedright:
requires:
- 'ez-alloyeditor'
- 'ez-alloyeditor-button-mixin-embedalign'
- 'ez-translator'
path: "%ez_platformui.public_dir%/js/alloyeditor/buttons/embedright.js"
ez-alloyeditor-button-embedleft:
requires:
- 'ez-alloyeditor'
- 'ez-alloyeditor-button-mixin-embedalign'
- 'ez-translator'
path: "%ez_platformui.public_dir%/js/alloyeditor/buttons/embedleft.js"
ez-alloyeditor-button-mixin-embedalign:
requires:
- 'ez-alloyeditor'
- 'ez-alloyeditor-button-mixin-widgetbutton'
path: "%ez_platformui.public_dir%/js/alloyeditor/buttons/mixins/embedalign.js"
ez-alloyeditor-button-blocktextalignleft:
requires: ['ez-alloyeditor', 'ez-alloyeditor-button-mixin-blocktextalign']
requires: ['ez-alloyeditor', 'ez-alloyeditor-button-mixin-blocktextalign', 'ez-translator']
path: "%ez_platformui.public_dir%/js/alloyeditor/buttons/blocktextalignleft.js"
ez-alloyeditor-button-blocktextaligncenter:
requires: ['ez-alloyeditor', 'ez-alloyeditor-button-mixin-blocktextalign']
requires: ['ez-alloyeditor', 'ez-alloyeditor-button-mixin-blocktextalign', 'ez-translator']
path: "%ez_platformui.public_dir%/js/alloyeditor/buttons/blocktextaligncenter.js"
ez-alloyeditor-button-blocktextalignright:
requires: ['ez-alloyeditor', 'ez-alloyeditor-button-mixin-blocktextalign']
requires: ['ez-alloyeditor', 'ez-alloyeditor-button-mixin-blocktextalign', 'ez-translator']
path: "%ez_platformui.public_dir%/js/alloyeditor/buttons/blocktextalignright.js"
ez-alloyeditor-button-blocktextalignjustify:
requires: ['ez-alloyeditor', 'ez-alloyeditor-button-mixin-blocktextalign']
requires: ['ez-alloyeditor', 'ez-alloyeditor-button-mixin-blocktextalign', 'ez-translator']
path: "%ez_platformui.public_dir%/js/alloyeditor/buttons/blocktextalignjustify.js"
ez-alloyeditor-button-blockremove:
requires: ['ez-alloyeditor']
requires: ['ez-alloyeditor', 'ez-translator']
path: "%ez_platformui.public_dir%/js/alloyeditor/buttons/blockremove.js"
ez-alloyeditor-button-embedhref:
requires: ['ez-alloyeditor', 'ez-alloyeditor-button-mixin-embeddiscovercontent', 'ez-alloyeditor-button-mixin-widgetbutton']
requires: ['ez-alloyeditor', 'ez-alloyeditor-button-mixin-embeddiscovercontent', 'ez-alloyeditor-button-mixin-widgetbutton', 'ez-translator']
path: "%ez_platformui.public_dir%/js/alloyeditor/buttons/embedhref.js"
ez-alloyeditor-button-imagehref:
requires: ['ez-alloyeditor', 'ez-alloyeditor-button-mixin-embeddiscovercontent', 'ez-alloyeditor-button-mixin-embedimage', 'ez-alloyeditor-button-mixin-widgetbutton']
requires: ['ez-alloyeditor', 'ez-alloyeditor-button-mixin-embeddiscovercontent', 'ez-alloyeditor-button-mixin-embedimage', 'ez-alloyeditor-button-mixin-widgetbutton', 'ez-translator']
path: "%ez_platformui.public_dir%/js/alloyeditor/buttons/imagehref.js"
ez-alloyeditor-button-mixin-blocktextalign:
requires: ['ez-alloyeditor']
Expand Down
2 changes: 1 addition & 1 deletion Resources/public/js/alloyeditor/buttons/blockremove.js
Expand Up @@ -51,7 +51,7 @@ YUI.add('ez-alloyeditor-button-blockremove', function (Y) {
return {
command: 'eZRemoveBlock',
modifiesSelection: true,
label: 'Remove this block',
label: Y.eZ.trans('remove.this.block', {}, 'onlineeditor'),
};
},

Expand Down
2 changes: 1 addition & 1 deletion Resources/public/js/alloyeditor/buttons/blockremove.jsx
Expand Up @@ -46,7 +46,7 @@ YUI.add('ez-alloyeditor-button-blockremove', function (Y) {
return {
command: 'eZRemoveBlock',
modifiesSelection: true,
label: 'Remove this block',
label: Y.eZ.trans('remove.this.block', {}, 'onlineeditor'),
};
},

Expand Down
Expand Up @@ -40,7 +40,7 @@ YUI.add('ez-alloyeditor-button-blocktextaligncenter', function (Y) {
return {
textAlign: 'center',
classIcon: 'center',
label: 'Center',
label: Y.eZ.trans('center', {}, 'onlineeditor'),
};
},
});
Expand Down
Expand Up @@ -35,7 +35,7 @@ YUI.add('ez-alloyeditor-button-blocktextaligncenter', function (Y) {
return {
textAlign: 'center',
classIcon: 'center',
label: 'Center',
label: Y.eZ.trans('center', {}, 'onlineeditor'),
};
},
});
Expand Down
Expand Up @@ -40,7 +40,7 @@ YUI.add('ez-alloyeditor-button-blocktextalignjustify', function (Y) {
return {
textAlign: 'justify',
classIcon: 'justified',
label: 'Justify',
label: Y.eZ.trans('justify', {}, 'onlineeditor'),
};
},
});
Expand Down
Expand Up @@ -35,7 +35,7 @@ YUI.add('ez-alloyeditor-button-blocktextalignjustify', function (Y) {
return {
textAlign: 'justify',
classIcon: 'justified',
label: 'Justify',
label: Y.eZ.trans('justify', {}, 'onlineeditor'),
};
},
});
Expand Down
Expand Up @@ -40,7 +40,7 @@ YUI.add('ez-alloyeditor-button-blocktextalignleft', function (Y) {
return {
textAlign: 'left',
classIcon: 'left',
label: 'Left',
label: Y.eZ.trans('left', {}, 'onlineeditor'),
};
},
});
Expand Down
Expand Up @@ -35,7 +35,7 @@ YUI.add('ez-alloyeditor-button-blocktextalignleft', function (Y) {
return {
textAlign: 'left',
classIcon: 'left',
label: 'Left',
label: Y.eZ.trans('left', {}, 'onlineeditor'),
};
},
});
Expand Down
Expand Up @@ -40,7 +40,7 @@ YUI.add('ez-alloyeditor-button-blocktextalignright', function (Y) {
return {
textAlign: 'right',
classIcon: 'right',
label: 'Right',
label: Y.eZ.trans('right', {}, 'onlineeditor'),
};
},
});
Expand Down
Expand Up @@ -35,7 +35,7 @@ YUI.add('ez-alloyeditor-button-blocktextalignright', function (Y) {
return {
textAlign: 'right',
classIcon: 'right',
label: 'Right',
label: Y.eZ.trans('right', {}, 'onlineeditor'),
};
},
});
Expand Down
4 changes: 2 additions & 2 deletions Resources/public/js/alloyeditor/buttons/embed.js
Expand Up @@ -39,7 +39,7 @@ YUI.add('ez-alloyeditor-button-embed', function (Y) {
return {
command: 'ezembed',
modifiesSelection: true,
udwTitle: "Select a content to embed",
udwTitle: Y.eZ.trans('select.a.content.to.embed', {}, 'onlineeditor'),
udwContentDiscoveredMethod: '_addEmbed',
};
},
Expand Down Expand Up @@ -69,7 +69,7 @@ YUI.add('ez-alloyeditor-button-embed', function (Y) {
return (
React.createElement("button", {className: css, onClick: this._chooseContent, tabIndex: this.props.tabIndex},
React.createElement("span", {className: "ez-ae-icon ez-ae-icon-embed ez-font-icon"}),
React.createElement("p", {className: "ez-ae-label"}, "Embed")
React.createElement("p", {className: "ez-ae-label"}, Y.eZ.trans('embed', {}, 'onlineeditor'))
)
);
},
Expand Down
4 changes: 2 additions & 2 deletions Resources/public/js/alloyeditor/buttons/embed.jsx
Expand Up @@ -34,7 +34,7 @@ YUI.add('ez-alloyeditor-button-embed', function (Y) {
return {
command: 'ezembed',
modifiesSelection: true,
udwTitle: "Select a content to embed",
udwTitle: Y.eZ.trans('select.a.content.to.embed', {}, 'onlineeditor'),
udwContentDiscoveredMethod: '_addEmbed',
};
},
Expand Down Expand Up @@ -64,7 +64,7 @@ YUI.add('ez-alloyeditor-button-embed', function (Y) {
return (
<button className={css} onClick={this._chooseContent} tabIndex={this.props.tabIndex}>
<span className="ez-ae-icon ez-ae-icon-embed ez-font-icon"></span>
<p className="ez-ae-label">Embed</p>
<p className="ez-ae-label">{Y.eZ.trans('embed', {}, 'onlineeditor')}</p>
</button>
);
},
Expand Down
2 changes: 1 addition & 1 deletion Resources/public/js/alloyeditor/buttons/embedcenter.js
Expand Up @@ -42,7 +42,7 @@ YUI.add('ez-alloyeditor-button-embedcenter', function (Y) {
return {
alignment: 'center',
classIcon: 'embedcenter',
label: 'Center',
label: Y.eZ.trans('center', {}, 'onlineeditor'),
};
},
});
Expand Down
2 changes: 1 addition & 1 deletion Resources/public/js/alloyeditor/buttons/embedcenter.jsx
Expand Up @@ -37,7 +37,7 @@ YUI.add('ez-alloyeditor-button-embedcenter', function (Y) {
return {
alignment: 'center',
classIcon: 'embedcenter',
label: 'Center',
label: Y.eZ.trans('center', {}, 'onlineeditor'),
};
},
});
Expand Down
4 changes: 2 additions & 2 deletions Resources/public/js/alloyeditor/buttons/embedhref.js
Expand Up @@ -41,9 +41,9 @@ YUI.add('ez-alloyeditor-button-embedhref', function (Y) {

getDefaultProps: function () {
return {
udwTitle: "Select a content to embed",
udwTitle: Y.eZ.trans('select.a.content.to.embed', {}, 'onlineeditor'),
udwContentDiscoveredMethod: "_updateEmbed",
label: "Select another content item",
label: Y.eZ.trans('select.another.content.item', {}, 'onlineeditor'),
};
},

Expand Down
4 changes: 2 additions & 2 deletions Resources/public/js/alloyeditor/buttons/embedhref.jsx
Expand Up @@ -36,9 +36,9 @@ YUI.add('ez-alloyeditor-button-embedhref', function (Y) {

getDefaultProps: function () {
return {
udwTitle: "Select a content to embed",
udwTitle: Y.eZ.trans('select.a.content.to.embed', {}, 'onlineeditor'),
udwContentDiscoveredMethod: "_updateEmbed",
label: "Select another content item",
label: Y.eZ.trans('select.another.content.item', {}, 'onlineeditor'),
};
},

Expand Down
2 changes: 1 addition & 1 deletion Resources/public/js/alloyeditor/buttons/embedleft.js
Expand Up @@ -42,7 +42,7 @@ YUI.add('ez-alloyeditor-button-embedleft', function (Y) {
return {
alignment: 'left',
classIcon: 'embedleft',
label: 'Left',
label: Y.eZ.trans('left', {}, 'onlineeditor'),
};
},
});
Expand Down
2 changes: 1 addition & 1 deletion Resources/public/js/alloyeditor/buttons/embedleft.jsx
Expand Up @@ -37,7 +37,7 @@ YUI.add('ez-alloyeditor-button-embedleft', function (Y) {
return {
alignment: 'left',
classIcon: 'embedleft',
label: 'Left',
label: Y.eZ.trans('left', {}, 'onlineeditor'),
};
},
});
Expand Down
2 changes: 1 addition & 1 deletion Resources/public/js/alloyeditor/buttons/embedright.js
Expand Up @@ -42,7 +42,7 @@ YUI.add('ez-alloyeditor-button-embedright', function (Y) {
return {
alignment: 'right',
classIcon: 'embedright',
label: 'Right',
label: Y.eZ.trans('right', {}, 'onlineeditor'),
};
},
});
Expand Down
2 changes: 1 addition & 1 deletion Resources/public/js/alloyeditor/buttons/embedright.jsx
Expand Up @@ -37,7 +37,7 @@ YUI.add('ez-alloyeditor-button-embedright', function (Y) {
return {
alignment: 'right',
classIcon: 'embedright',
label: 'Right',
label: Y.eZ.trans('right', {}, 'onlineeditor'),
};
},
});
Expand Down
3 changes: 2 additions & 1 deletion Resources/public/js/alloyeditor/buttons/heading.js
Expand Up @@ -56,7 +56,8 @@ YUI.add('ez-alloyeditor-button-heading', function (Y) {

return (
React.createElement("button", {className: css, onClick: this._addHeading, tabIndex: this.props.tabIndex},
React.createElement("span", {className: "ez-ae-icon ae-icon-h1"}), React.createElement("p", {className: "ez-ae-label"}, "Heading")
React.createElement("span", {className: "ez-ae-icon ae-icon-h1"}),
React.createElement("p", {className: "ez-ae-label"}, Y.eZ.trans('heading', {}, 'onlineeditor'))
)
);
},
Expand Down
3 changes: 2 additions & 1 deletion Resources/public/js/alloyeditor/buttons/heading.jsx
Expand Up @@ -51,7 +51,8 @@ YUI.add('ez-alloyeditor-button-heading', function (Y) {

return (
<button className={css} onClick={this._addHeading} tabIndex={this.props.tabIndex}>
<span className="ez-ae-icon ae-icon-h1"></span><p className="ez-ae-label">Heading</p>
<span className="ez-ae-icon ae-icon-h1"></span>
<p className="ez-ae-label">{Y.eZ.trans('heading', {}, 'onlineeditor')}</p>
</button>
);
},
Expand Down
4 changes: 2 additions & 2 deletions Resources/public/js/alloyeditor/buttons/image.js
Expand Up @@ -41,7 +41,7 @@ YUI.add('ez-alloyeditor-button-image', function (Y) {
return {
command: 'ezembed',
modifiesSelection: true,
udwTitle: "Select an image to embed",
udwTitle: Y.eZ.trans('select.an.image.to.embed', {}, 'onlineeditor'),
udwContentDiscoveredMethod: '_addImage',
udwIsSelectableMethod: '_isImage',
udwLoadContent: true,
Expand Down Expand Up @@ -76,7 +76,7 @@ YUI.add('ez-alloyeditor-button-image', function (Y) {
return (
React.createElement("button", {className: css, onClick: this._chooseContent, tabIndex: this.props.tabIndex},
React.createElement("span", {className: "ez-ae-icon ez-ae-icon-image ez-font-icon"}),
React.createElement("p", {className: "ez-ae-label"}, "Image")
React.createElement("p", {className: "ez-ae-label"}, Y.eZ.trans('image', {}, 'onlineeditor'))
)
);
},
Expand Down
4 changes: 2 additions & 2 deletions Resources/public/js/alloyeditor/buttons/image.jsx
Expand Up @@ -36,7 +36,7 @@ YUI.add('ez-alloyeditor-button-image', function (Y) {
return {
command: 'ezembed',
modifiesSelection: true,
udwTitle: "Select an image to embed",
udwTitle: Y.eZ.trans('select.an.image.to.embed', {}, 'onlineeditor'),
udwContentDiscoveredMethod: '_addImage',
udwIsSelectableMethod: '_isImage',
udwLoadContent: true,
Expand Down Expand Up @@ -71,7 +71,7 @@ YUI.add('ez-alloyeditor-button-image', function (Y) {
return (
<button className={css} onClick={this._chooseContent} tabIndex={this.props.tabIndex}>
<span className="ez-ae-icon ez-ae-icon-image ez-font-icon"></span>
<p className="ez-ae-label">Image</p>
<p className="ez-ae-label">{Y.eZ.trans('image', {}, 'onlineeditor')}</p>
</button>
);
},
Expand Down
4 changes: 2 additions & 2 deletions Resources/public/js/alloyeditor/buttons/imagehref.js
Expand Up @@ -43,11 +43,11 @@ YUI.add('ez-alloyeditor-button-imagehref', function (Y) {

getDefaultProps: function () {
return {
udwTitle: "Select an image to embed",
udwTitle: Y.eZ.trans('select.an.image.to.embed', {}, 'onlineeditor'),
udwContentDiscoveredMethod: "_updateEmbed",
udwIsSelectableMethod: '_isImage',
udwLoadContent: true,
label: "Select another image",
label: Y.eZ.trans('select.another.image', {}, 'onlineeditor'),
};
},

Expand Down
4 changes: 2 additions & 2 deletions Resources/public/js/alloyeditor/buttons/imagehref.jsx
Expand Up @@ -38,11 +38,11 @@ YUI.add('ez-alloyeditor-button-imagehref', function (Y) {

getDefaultProps: function () {
return {
udwTitle: "Select an image to embed",
udwTitle: Y.eZ.trans('select.an.image.to.embed', {}, 'onlineeditor'),
udwContentDiscoveredMethod: "_updateEmbed",
udwIsSelectableMethod: '_isImage',
udwLoadContent: true,
label: "Select another image",
label: Y.eZ.trans('select.another.image', {}, 'onlineeditor'),
};
},

Expand Down
2 changes: 1 addition & 1 deletion Resources/public/js/alloyeditor/buttons/list.js
Expand Up @@ -60,7 +60,7 @@ YUI.add('ez-alloyeditor-button-list', function (Y) {
return (
React.createElement("button", {className: css, onClick: this._addList, tabIndex: this.props.tabIndex},
React.createElement("span", {className: "ez-ae-icon ae-icon-bulleted-list"}),
React.createElement("p", {className: "ez-ae-label"}, "List")
React.createElement("p", {className: "ez-ae-label"}, Y.eZ.trans('list', {}, 'onlineeditor'))
)
);
},
Expand Down
2 changes: 1 addition & 1 deletion Resources/public/js/alloyeditor/buttons/list.jsx
Expand Up @@ -55,7 +55,7 @@ YUI.add('ez-alloyeditor-button-list', function (Y) {
return (
<button className={css} onClick={this._addList} tabIndex={this.props.tabIndex}>
<span className="ez-ae-icon ae-icon-bulleted-list"></span>
<p className="ez-ae-label">List</p>
<p className="ez-ae-label">{Y.eZ.trans('list', {}, 'onlineeditor')}</p>
</button>
);
},
Expand Down

0 comments on commit 59cce21

Please sign in to comment.