From 74ba6c23299496b12ae069ebc5d64132a1177631 Mon Sep 17 00:00:00 2001 From: Benjamin Fan Date: Sun, 18 May 2025 09:44:18 +0000 Subject: [PATCH] fix(react): Untranslated strings also need a trailing space (#349) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The bug appears in part title cutlist instructions. The bug behavior exists only in the React component. It does not exist with the core SVG renderer. Before: ![Screenshot 2025-05-12 at 10.59.49 AM.png](/attachments/cb43d749-bad3-4d54-95ba-ae1ed4675bd2) After: ![Screenshot 2025-05-12 at 10.59.15 AM.png](/attachments/979ca23a-1db4-49e6-8b31-4e2cd84ecbdf) Edit: (Added, in case the keyword needs to be in the PR description/first comment, not just in a subsequent comment): Fixes #331 Co-authored-by: Benjamin Fan Reviewed-on: https://codeberg.org/freesewing/freesewing/pulls/349 Reviewed-by: Joost De Cock Co-authored-by: Benjamin Fan Co-committed-by: Benjamin Fan --- packages/react/components/Pattern/utils.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react/components/Pattern/utils.mjs b/packages/react/components/Pattern/utils.mjs index 0ee0401da26..880d51c6887 100644 --- a/packages/react/components/Pattern/utils.mjs +++ b/packages/react/components/Pattern/utils.mjs @@ -74,7 +74,7 @@ export const translateStrings = (list, translations = {}) => { else if (string) { if (translations[string]) { translated += `${translations[string]}`.replace(/"/g, '"') + ' ' - } else translated += `${string}` + } else translated += `${string}` + ' ' } }