From cdb4a5f86e960724cb4f309a30830635344e8d69 Mon Sep 17 00:00:00 2001 From: Cristian Uibar Date: Mon, 15 Apr 2024 11:58:34 +0300 Subject: [PATCH] Unescape visible code tags in release-actions component --- assets/js/components/release-actions.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/assets/js/components/release-actions.js b/assets/js/components/release-actions.js index ba518f4..6aad9ce 100644 --- a/assets/js/components/release-actions.js +++ b/assets/js/components/release-actions.js @@ -1,6 +1,7 @@ -import { components, html, i18n } from '../utils/index.js'; +import { components, element, html, i18n } from '../utils/index.js'; const { Button, TextControl } = components; +const { createElement, createInterpolateElement } = element; const { __, sprintf } = i18n; const selectField = ( e ) => e.nativeEvent.target.select(); @@ -19,8 +20,10 @@ function ReleaseActions( props ) { /* translators: %s: version number */ const buttonText = __( 'Download %s', 'satispress' ); - /* translators: %s: composer.json */ - const copyPasteText = __( 'Copy and paste into %s', 'satispress' ); + const copyPasteHtml = createInterpolateElement( + __( 'Copy and paste into composer.json', 'satispress' ), + { code: createElement( 'code' ) } + ); return html`
@@ -51,7 +54,7 @@ function ReleaseActions( props ) { onClick=${ selectField } /> - ${ sprintf( copyPasteText, 'composer.json' ) } + ${ copyPasteHtml }