Skip to content

Fluent: Catch strings with "[" at line start as a syntax error - #4587

Closed
ayshushus wants to merge 8 commits into
mozilla:mainfrom
ayshushus:3621-syntax-error
Closed

ayshushus wants to merge 8 commits into
mozilla:mainfrom
ayshushus:3621-syntax-error

Conversation

@ayshushus

@ayshushus ayshushus commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Fix #3621

The idea is to effectively parse the translation as a single entry and then check whether there’s any non-whitespace left after that entry’s span.

The report is "unexpected text after the end of the message" and consideration for [*.}, see reference below:
Screenshot 2026-10-09 at 00 28 37
http://localhost:8000/mua/common-voice/web/locales/common-voice/en/pages/contribute/common.ftl/?string=312854

@codecov-commenter

codecov-commenter commented Oct 9, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 91.07143% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.86%. Comparing base (c416aee) to head (2fd285c).

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@eemeli eemeli left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is a syntax error which needs to be caught by moz-l10n, not in Pontoon.

@ayshushus

Copy link
Copy Markdown
Contributor Author

Closing in reference to moz-l10n PR 222

@ayshushus ayshushus closed this Oct 10, 2026
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.

Fluent string with [ at line start not caught as syntax error

3 participants