diff --git a/custom-definitions/src/main/java/com/merkle/oss/magnolia/definition/custom/imageset/ImageSetDefinitionBuilder.java b/custom-definitions/src/main/java/com/merkle/oss/magnolia/definition/custom/imageset/ImageSetDefinitionBuilder.java index 44ed1d2..1187062 100644 --- a/custom-definitions/src/main/java/com/merkle/oss/magnolia/definition/custom/imageset/ImageSetDefinitionBuilder.java +++ b/custom-definitions/src/main/java/com/merkle/oss/magnolia/definition/custom/imageset/ImageSetDefinitionBuilder.java @@ -6,6 +6,7 @@ public class ImageSetDefinitionBuilder extends AbstractImageSetDefinitionBuilder { protected static final String LABEL_PREFIX = "merkle.customDefinitions.imageSet."; + protected static final String FIELD_LABEL_PREFIX = LABEL_PREFIX + "field."; public ImageSetDefinitionBuilder() { super(LABEL_PREFIX); @@ -24,7 +25,7 @@ protected FieldOption dam() { ImageTypes.DAM, n -> new SingleSwitchableForm<>( new AssetLinkDefinitionBuilder() - .label(LABEL_PREFIX + ImageTypes.DAM.getLabel()) + .label(FIELD_LABEL_PREFIX + ImageTypes.DAM.getLabel()) .build(n) ) ); diff --git a/custom-definitions/src/main/java/com/merkle/oss/magnolia/definition/custom/linkset/LinkSetDefinitionBuilder.java b/custom-definitions/src/main/java/com/merkle/oss/magnolia/definition/custom/linkset/LinkSetDefinitionBuilder.java index 8ac35ea..0136963 100644 --- a/custom-definitions/src/main/java/com/merkle/oss/magnolia/definition/custom/linkset/LinkSetDefinitionBuilder.java +++ b/custom-definitions/src/main/java/com/merkle/oss/magnolia/definition/custom/linkset/LinkSetDefinitionBuilder.java @@ -17,6 +17,7 @@ public class LinkSetDefinitionBuilder extends AbstractSwitchableLinkSetDefinitio public static final UnaryOperator LINK_TEXT_PROPERTY_NAME_PROVIDER = name -> name + "_text"; public static final UnaryOperator OPEN_IN_NEW_TAB_PROPERTY_NAME_PROVIDER = name -> name + "_in_new_window"; protected static final String LABEL_PREFIX = "merkle.customDefinitions.linkSet."; + protected static final String FIELD_LABEL_PREFIX = LABEL_PREFIX + "field."; public LinkSetDefinitionBuilder() { super(LABEL_PREFIX); @@ -44,7 +45,7 @@ protected FieldOption internal(final LinkType linkType) { .linkText(linkText(name)) .openInNewWindow(openInNewTab(name)) .label("") - .build(name, new InternalLinkDefinitionBuilder().label(LABEL_PREFIX + linkType.getLabel()).build(name)) + .build(name, new InternalLinkDefinitionBuilder().label(FIELD_LABEL_PREFIX + linkType.getLabel()).build(name)) ); } @@ -56,7 +57,7 @@ protected FieldOption external(final LinkType linkType) { .linkText(linkText(name)) .openInNewWindow(openInNewTab(name)) .label("") - .build(name, new TextFieldDefinitionBuilder().label(LABEL_PREFIX + linkType.getLabel()).build(name)) + .build(name, new TextFieldDefinitionBuilder().label(FIELD_LABEL_PREFIX + linkType.getLabel()).build(name)) ); } @@ -67,7 +68,7 @@ protected FieldOption asset(final LinkType linkType) { .linkText(linkText(name)) .openInNewWindow(openInNewTab(name)) .label("") - .build(name, new AssetLinkDefinitionBuilder().label(LABEL_PREFIX + linkType.getLabel()).build(name)) + .build(name, new AssetLinkDefinitionBuilder().label(FIELD_LABEL_PREFIX + linkType.getLabel()).build(name)) ); } diff --git a/custom-definitions/src/main/java/com/merkle/oss/magnolia/definition/custom/videoset/VideoSetDefinitionBuilder.java b/custom-definitions/src/main/java/com/merkle/oss/magnolia/definition/custom/videoset/VideoSetDefinitionBuilder.java index 96f8ced..9b4348d 100644 --- a/custom-definitions/src/main/java/com/merkle/oss/magnolia/definition/custom/videoset/VideoSetDefinitionBuilder.java +++ b/custom-definitions/src/main/java/com/merkle/oss/magnolia/definition/custom/videoset/VideoSetDefinitionBuilder.java @@ -11,6 +11,7 @@ public class VideoSetDefinitionBuilder extends AbstractVideoSetDefinitionBuilder { protected static final String LABEL_PREFIX = "merkle.customDefinitions.videoSet."; + protected static final String FIELD_LABEL_PREFIX = LABEL_PREFIX + "field."; public VideoSetDefinitionBuilder() { this(new ImageSetDefinitionBuilder()); @@ -39,7 +40,7 @@ private FieldOption vimeo() { VideoTypes.VIMEO, name -> new SingleSwitchableForm<>( new TextFieldDefinitionBuilder() - .label(LABEL_PREFIX + VideoTypes.VIMEO.getLabel()) + .label(FIELD_LABEL_PREFIX + VideoTypes.VIMEO.getLabel()) .converterClass(VimeoTextValueConverter.class) .build(name) ) @@ -51,7 +52,7 @@ private FieldOption youtube() { VideoTypes.YOUTUBE, name -> new SingleSwitchableForm<>( new TextFieldDefinitionBuilder() - .label(LABEL_PREFIX + VideoTypes.YOUTUBE.getLabel()) + .label(FIELD_LABEL_PREFIX + VideoTypes.YOUTUBE.getLabel()) .converterClass(YoutubeTextValueConverter.class) .build(name) ) @@ -63,7 +64,7 @@ private FieldOption dam() { VideoTypes.DAM, name -> new SingleSwitchableForm<>( new AssetLinkDefinitionBuilder() - .label(LABEL_PREFIX + VideoTypes.DAM.getLabel()) + .label(FIELD_LABEL_PREFIX + VideoTypes.DAM.getLabel()) .build(name) ) ); diff --git a/custom-definitions/src/main/resources/mgnl-i18n/magnolia-custom-definitions-messages_en.properties b/custom-definitions/src/main/resources/mgnl-i18n/magnolia-custom-definitions-messages_en.properties index e783180..995473f 100644 --- a/custom-definitions/src/main/resources/mgnl-i18n/magnolia-custom-definitions-messages_en.properties +++ b/custom-definitions/src/main/resources/mgnl-i18n/magnolia-custom-definitions-messages_en.properties @@ -1,6 +1,9 @@ merkle.customDefinitions.linkSet.linkType.internal.label=Internal merkle.customDefinitions.linkSet.linkType.external.label=External merkle.customDefinitions.linkSet.linkType.asset_dam.label=Magnolia Asset +merkle.customDefinitions.linkSet.field.linkType.internal.label=Page +merkle.customDefinitions.linkSet.field.linkType.external.label=Link +merkle.customDefinitions.linkSet.field.linkType.asset_dam.label=Asset merkle.customDefinitions.linkSet.anchorId.label=Anchor id merkle.customDefinitions.linkSet.anchorId.errorMessage.pattern=Anchor id must be alphanumeric merkle.customDefinitions.linkSet.text.label=Link Text @@ -8,12 +11,16 @@ merkle.customDefinitions.linkSet.openInNewWindow.label= merkle.customDefinitions.linkSet.openInNewWindow.buttonLabel=Open in new window merkle.customDefinitions.imageSet.imageType.dam.label=Magnolia +merkle.customDefinitions.imageSet.field.imageType.dam.label=Asset merkle.customDefinitions.imageSet.image.label=Image Source merkle.customDefinitions.imageSet.altText.label=Alternative text merkle.customDefinitions.videoSet.videoType.dam.label=Magnolia merkle.customDefinitions.videoSet.videoType.youtube.label=Youtube merkle.customDefinitions.videoSet.videoType.vimeo.label=Vimeo +merkle.customDefinitions.videoSet.field.videoType.dam.label=Asset +merkle.customDefinitions.videoSet.field.videoType.youtube.label=Youtube ID +merkle.customDefinitions.videoSet.field.videoType.vimeo.label=Vimeo ID merkle.customDefinitions.videoSet.video.label=Video source merkle.customDefinitions.videoSet.previewImage.label=Preview image