Skip to content

Detect direct Locale#t calls based on type information#1343

Open
filipsobol wants to merge 6 commits intomasterfrom
dev/19267-update-translations-validation
Open

Detect direct Locale#t calls based on type information#1343
filipsobol wants to merge 6 commits intomasterfrom
dev/19267-update-translations-validation

Conversation

@filipsobol
Copy link
Copy Markdown
Member

@filipsobol filipsobol commented Apr 2, 2026

🚀 Summary

Detect direct Locale#t calls (such as editor.locale.t(), editor.t(), locale.t(), and this.t()) during translation validation and synchronization based on type information.


📌 Related issues


💡 Additional information

I ran translations:validate and translations:synchronize in both repositories, and it worked correctly.

The old mechanism still works for JS-only files. However, TS sources will now be based on more accurate type information.

Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

@pomek
Copy link
Copy Markdown
Member

pomek commented Apr 2, 2026

Confirm manually please, if this solution does not re-introduce this problem – https://github.com/ckeditor/ckeditor5-internal/issues/3115.

@filipsobol
Copy link
Copy Markdown
Member Author

filipsobol commented Apr 2, 2026

Confirm manually please, if this solution does not re-introduce this problem – ckeditor/ckeditor5-internal#3115.

As mentioned in the original comment, I already ran translations:validate and translations:synchronize and didn't find any regressions.

I checked this case again, and it's still covered. I added regression tests, just so we don't reintroduce this in the future.

@filipsobol filipsobol changed the title Detect valid direct Locale#t calls during translation validation and synchronization. Detect direct Locale#t calls based on type information Apr 3, 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.

Update translations validation to work based on type information

2 participants