Skip to content

Gujarati ARB file error#1049

Draft
calcitem wants to merge 1 commit into
masterfrom
cursor/gujarati-arb-file-error-d3f1
Draft

Gujarati ARB file error#1049
calcitem wants to merge 1 commit into
masterfrom
cursor/gujarati-arb-file-error-d3f1

Conversation

@calcitem
Copy link
Copy Markdown
Owner

@calcitem calcitem commented Mar 2, 2026

📜 Description

Fixed intl_gu.arb by populating all 444 empty @key: {} metadata entries with "description" fields. Descriptions were either copied from intl_en.arb (66 entries) or automatically generated from the key names (378 entries). This prevents Weblate from stripping these entries and subsequently generating invalid JSON.

💡 Motivation and Context

This change addresses a JSONDecodeError("Expecting ',' delimiter: line 3873 column 5") in src/ui/flutter_app/lib/l10n/intl_gu.arb on the origin/weblate/flutter branch. The error was caused by a bug in Weblate's ARB serializer, which produced invalid JSON (missing commas, orphaned entries) after its parser stripped empty @key: {} metadata entries. By ensuring all @key entries have a "description", Weblate will no longer attempt to strip them, thus preventing the JSON corruption.

💚 How did you test it?

The fix was verified by:

  • Checking the JSON validity of the modified intl_gu.arb file.
  • Comparing the completeness of the Gujarati ARB with the English reference.
  • Manually inspecting several modified entries to ensure correct description generation.

📝 Checklist

  • I reviewed submitted code
  • I added tests to verify changes
  • I updated the docs if needed
  • All tests passing (JSON validity)
  • No breaking changes

🔮 Next steps

After this branch is merged, a Weblate administrator may need to reset or trigger a re-synchronization of the weblate/flutter branch to ensure the corrupted file on Weblate's side is overwritten with this corrected version.


Open in Web Open in Cursor 

Add description metadata to all 444 empty @-key entries in
intl_gu.arb that previously had bare {} values. Weblate's ARB
parser strips entries with empty metadata objects during
processing, and its serializer produces invalid JSON when
doing so (missing commas, orphaned entries), causing the error:
JSONDecodeError("Expecting ',' delimiter: line 3873 column 5")

For entries that have descriptions in the English reference
file (intl_en.arb), those descriptions are copied over. For
the remaining entries, descriptions are generated from the
key names.

Co-authored-by: Calcitem <calcitem@outlook.com>
@cursor
Copy link
Copy Markdown

cursor Bot commented Mar 2, 2026

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Mar 2, 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.

2 participants