1
0
Fork 0

fix(react): Untranslated strings also need a trailing space (#349)

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 <ben-git@swinglonga.com>
Reviewed-on: https://codeberg.org/freesewing/freesewing/pulls/349
Reviewed-by: Joost De Cock <joostdecock@noreply.codeberg.org>
Co-authored-by: Benjamin Fan <benjamesben@noreply.codeberg.org>
Co-committed-by: Benjamin Fan <benjamesben@noreply.codeberg.org>
This commit is contained in:
Benjamin Fan 2025-05-18 09:44:18 +00:00 committed by Joost De Cock
parent 1896eba914
commit 74ba6c2329

View file

@ -74,7 +74,7 @@ export const translateStrings = (list, translations = {}) => {
else if (string) {
if (translations[string]) {
translated += `${translations[string]}`.replace(/&quot;/g, '"') + ' '
} else translated += `${string}`
} else translated += `${string}` + ' '
}
}