diff --git a/src/bundle/Resources/public/js/alloyeditor/src/buttons/ez-btn-embed.js b/src/bundle/Resources/public/js/alloyeditor/src/buttons/ez-btn-embed.js index 5d73a8b2a0..44b0765e42 100644 --- a/src/bundle/Resources/public/js/alloyeditor/src/buttons/ez-btn-embed.js +++ b/src/bundle/Resources/public/js/alloyeditor/src/buttons/ez-btn-embed.js @@ -79,7 +79,7 @@ eZ.addConfig('ezAlloyEditor.ezBtnEmbed', EzBtnEmbed); EzBtnEmbed.defaultProps = { command: 'ezembed', modifiesSelection: true, - udwTitle: Translator.trans(/*@Desc("Select a content to embed")*/ 'embed_btn.udw.title', {}, 'alloy_editor'), + udwTitle: Translator.trans(/*@Desc("Select a Content item to embed")*/ 'embed_btn.udw.title', {}, 'alloy_editor'), udwContentDiscoveredMethod: 'addEmbed', udwConfigName: 'richtext_embed', }; diff --git a/src/bundle/Resources/public/js/alloyeditor/src/buttons/ez-btn-embedinline.js b/src/bundle/Resources/public/js/alloyeditor/src/buttons/ez-btn-embedinline.js index 33e5541c56..7093e7527b 100644 --- a/src/bundle/Resources/public/js/alloyeditor/src/buttons/ez-btn-embedinline.js +++ b/src/bundle/Resources/public/js/alloyeditor/src/buttons/ez-btn-embedinline.js @@ -34,7 +34,7 @@ eZ.addConfig('ezAlloyEditor.ezBtnEmbedInline', EzBtnEmbedInline); EzBtnEmbedInline.defaultProps = { command: 'ezembedinline', modifiesSelection: true, - udwTitle: Translator.trans(/*@Desc("Select a content to embed")*/ 'embed_btn.udw.title', {}, 'alloy_editor'), + udwTitle: Translator.trans(/*@Desc("Select a Content item to embed")*/ 'embed_btn.udw.title', {}, 'alloy_editor'), udwContentDiscoveredMethod: 'addEmbed', udwConfigName: 'richtext_embed', }; diff --git a/src/bundle/Resources/public/js/alloyeditor/src/buttons/ez-btn-embedupdate.js b/src/bundle/Resources/public/js/alloyeditor/src/buttons/ez-btn-embedupdate.js index 4b53cf50c4..e13ff9c4e1 100644 --- a/src/bundle/Resources/public/js/alloyeditor/src/buttons/ez-btn-embedupdate.js +++ b/src/bundle/Resources/public/js/alloyeditor/src/buttons/ez-btn-embedupdate.js @@ -50,7 +50,7 @@ AlloyEditor.Buttons[EzBtnEmbedUpdate.key] = AlloyEditor.EzBtnEmbedUpdate = EzBtn eZ.addConfig('ezAlloyEditor.ezBtnEmbedUpdate', EzBtnEmbedUpdate); EzBtnEmbedUpdate.defaultProps = { - udwTitle: Translator.trans(/*@Desc("Select a content to embed")*/ 'embed_update_btn.udw.title', {}, 'alloy_editor'), + udwTitle: Translator.trans(/*@Desc("Select a Content item to embed")*/ 'embed_update_btn.udw.title', {}, 'alloy_editor'), udwContentDiscoveredMethod: 'updateEmbed', udwConfigName: 'richtext_embed', label: Translator.trans(/*@Desc("Select another content item")*/ 'embed_update_btn.label', {}, 'alloy_editor'), diff --git a/src/bundle/Resources/public/js/alloyeditor/src/buttons/ez-btn-image.js b/src/bundle/Resources/public/js/alloyeditor/src/buttons/ez-btn-image.js index f09e4ca4c3..a2081ccc14 100644 --- a/src/bundle/Resources/public/js/alloyeditor/src/buttons/ez-btn-image.js +++ b/src/bundle/Resources/public/js/alloyeditor/src/buttons/ez-btn-image.js @@ -81,7 +81,7 @@ eZ.addConfig('ezAlloyEditor.ezBtnImage', EzBtnImage); EzBtnImage.defaultProps = { command: 'ezembed', modifiesSelection: true, - udwTitle: Translator.trans(/*@Desc("Select an image to embed")*/ 'image_btn.udw.label', {}, 'alloy_editor'), + udwTitle: Translator.trans(/*@Desc("Select an image")*/ 'image_btn.udw.label', {}, 'alloy_editor'), udwContentDiscoveredMethod: 'addImage', udwConfigName: 'richtext_embed_image', udwLoadContent: true, diff --git a/src/bundle/Resources/public/js/alloyeditor/src/buttons/ez-btn-imageupdate.js b/src/bundle/Resources/public/js/alloyeditor/src/buttons/ez-btn-imageupdate.js index dad1b152d8..060f9e5fc9 100644 --- a/src/bundle/Resources/public/js/alloyeditor/src/buttons/ez-btn-imageupdate.js +++ b/src/bundle/Resources/public/js/alloyeditor/src/buttons/ez-btn-imageupdate.js @@ -51,7 +51,7 @@ AlloyEditor.Buttons[EzBtnImageUpdate.key] = AlloyEditor.EzBtnImageUpdate = EzBtn eZ.addConfig('ezAlloyEditor.ezBtnImageUpdate', EzBtnImageUpdate); EzBtnImageUpdate.defaultProps = { - udwTitle: Translator.trans(/*@Desc("Select an image to embed")*/ 'image_update_btn.udw.title', {}, 'alloy_editor'), + udwTitle: Translator.trans(/*@Desc("Select an image")*/ 'image_update_btn.udw.title', {}, 'alloy_editor'), udwContentDiscoveredMethod: 'updateImage', udwConfigName: 'richtext_embed_image', label: Translator.trans(/*@Desc("Select another image item")*/ 'image_update_btn.label', {}, 'alloy_editor'), diff --git a/src/bundle/Resources/public/js/scripts/fieldType/ezobjectrelationlist.js b/src/bundle/Resources/public/js/scripts/fieldType/ezobjectrelationlist.js index 3d3eccbbce..28f0bd4264 100644 --- a/src/bundle/Resources/public/js/scripts/fieldType/ezobjectrelationlist.js +++ b/src/bundle/Resources/public/js/scripts/fieldType/ezobjectrelationlist.js @@ -1,4 +1,4 @@ -(function(global, doc, eZ, React, ReactDOM, Translator) { +(function (global, doc, eZ, React, ReactDOM, Translator) { const CLASS_FIELD_SINGLE = 'ez-field-edit--ezobjectrelation'; const SELECTOR_FIELD_MULTIPLE = '.ez-field-edit--ezobjectrelationlist'; const SELECTOR_FIELD_SINGLE = '.ez-field-edit--ezobjectrelation'; @@ -121,7 +121,19 @@ event.preventDefault(); const config = JSON.parse(event.currentTarget.dataset.udwConfig); - const title = Translator.trans(/*@Desc("Select content")*/ 'ezobjectrelationlist.title', {}, 'universal_discovery_widget'); + const limit = parseInt(event.currentTarget.dataset.limit, 10); + const title = + limit === 1 + ? Translator.trans( + /*@Desc("Select a Content item")*/ 'ezobjectrelationlist.title.single', + {}, + 'universal_discovery_widget' + ) + : Translator.trans( + /*@Desc("Select Content item(s)")*/ 'ezobjectrelationlist.title.multi', + {}, + 'universal_discovery_widget' + ); ReactDOM.render( React.createElement( @@ -163,9 +175,9 @@