Skip to content

Commit

Permalink
Fix translations regex
Browse files Browse the repository at this point in the history
  • Loading branch information
plegner committed Oct 25, 2023
1 parent 291b57e commit 135983c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion build/assets.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ async function bundleScripts(srcPath, destPath, minify = false, watch = false, o
.replace(/\/icons\.svg/g, iconsPath); // Cache busting for icons

// Replace localisation strings.
const output = text.replace(/<<([\w\s-:]+)>>/g, (_, str) => options.translate?.(locale, str) || str);
const output = text.replace(/<<([\w\s-:.,]+)>>/g, (_, str) => options.translate?.(locale, str) || str);

const dest = locale === 'en' ? destPath : destPath.replace('.js', `.${locale}.js`);
await writeFile(dest, output);
Expand Down

0 comments on commit 135983c

Please sign in to comment.