Skip to content

Commit 3e67fa4

Browse files
heiskrCopilot
andauthored
Fix translation Liquid corruptions (French decimal comma, missing data keyword) (#60286)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 1bbcfff commit 3e67fa4

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/languages/lib/correct-translation-content.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,10 @@ export function correctTranslatedContentStrings(
340340
content = content.replace(/\{%-? (?:ifversion|elsif) [^%]*?ou [^%]*?%\}/g, (match) => {
341341
return match.replace(/ ou /g, ' or ')
342342
})
343+
// French decimal comma in version numbers: `3,16` → `3.16`
344+
content = content.replace(/\{%-? (?:ifversion|elsif) [^%]*?%\}/g, (match) => {
345+
return match.replace(/(\d),(\d)/g, '$1.$2')
346+
})
343347
// Translated block tags
344348
content = content.replaceAll('{% remarque %}', '{% note %}')
345349
content = content.replaceAll('{%- remarque %}', '{%- note %}')
@@ -460,6 +464,7 @@ export function correctTranslatedContentStrings(
460464

461465
// Common Latin-script typos across multiple languages.
462466
content = content.replaceAll('{% variables.', '{% data variables.')
467+
content = content.replaceAll('{% reusables.', '{% data reusables.')
463468
content = content.replaceAll('{% datavariables', '{% data variables')
464469

465470
// Empty `{% %}` corruptions where the tag name was removed.

0 commit comments

Comments
 (0)