Skip to content

Use moz-l10n parsePattern with options - #4370

Open
ewerybody wants to merge 6 commits into
mozilla:mainfrom
ewerybody:use-moz-l10n-parsePattern-with-options
Open

Use moz-l10n parsePattern with options#4370
ewerybody wants to merge 6 commits into
mozilla:mainfrom
ewerybody:use-moz-l10n-parsePattern-with-options

Conversation

@ewerybody

@ewerybody ewerybody commented Aug 5, 2026

Copy link
Copy Markdown
Member

fix #4362.

  • make parsePattern use options bag with xliffIsXcode flag
  • update moz-l10n requirement

The TypeScript check was failing as long as the fixed moz-l10n package was not yet published and the new version put into the translate/package.json.
That's done now :)

passing options to `parsePattern` now
setting `xliffIsXcode` to remain optional
fixed the `parsePattern` optionbag keys
added tests for Xcode variable replacement and
the `escapeHTML` option
@mathjazz
mathjazz requested a review from eemeli August 6, 2026 14:53
@ewerybody
ewerybody marked this pull request as ready for review August 7, 2026 21:58
Comment thread translate/package.json
"@fluent/react": "^0.15.1",
"@lezer/highlight": "^1.1.6",
"@mozilla/l10n": "^0.13.0",
"@mozilla/l10n": "^0.14.0",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we pick JS and Python in sync?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

XLIFF: Strings rejected without visible changes, again

2 participants