Skip to content

DEV: Switch to type="module" for translation files #33107

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jun 9, 2025

Conversation

davidtaylorhq
Copy link
Member

We will be moving towards type="module" for all of Discourse's JS bundles in the near future. This commit makes a start by applying the change to translation bundles.

@davidtaylorhq
Copy link
Member Author

Should be merged after #33106

davidtaylorhq added a commit that referenced this pull request Jun 6, 2025
Without this wrapper, `data` is defined in the global scope and clashes
when there are multiple themes with translations.

Followup to 033cccd

We can remove the wrapper once we land
#33107
We will be moving towards `type="module"` for all of Discourse's JS bundles in the near future. This commit makes a start by applying the change to translation bundles.
@davidtaylorhq davidtaylorhq force-pushed the translations-type-module branch from 1b8d15f to 3e63a9f Compare June 9, 2025 08:00
@davidtaylorhq davidtaylorhq marked this pull request as ready for review June 9, 2025 08:08
@davidtaylorhq davidtaylorhq merged commit 33dc48b into main Jun 9, 2025
16 checks passed
@davidtaylorhq davidtaylorhq deleted the translations-type-module branch June 9, 2025 09:30
nattsw added a commit that referenced this pull request Jun 9, 2025
nattsw added a commit that referenced this pull request Jun 9, 2025
davidtaylorhq added a commit that referenced this pull request Jun 9, 2025
We will be moving towards `type="module"` for all of Discourse's JS
bundles in the near future. This commit makes a start by applying the
change to translation bundles.
martin-brennan pushed a commit that referenced this pull request Jun 10, 2025
Without this wrapper, `data` is defined in the global scope and clashes
when there are multiple themes with translations.

Followup to 033cccd

We can remove the wrapper once we land
#33107
martin-brennan pushed a commit that referenced this pull request Jun 10, 2025
We will be moving towards `type="module"` for all of Discourse's JS
bundles in the near future. This commit makes a start by applying the
change to translation bundles.
martin-brennan pushed a commit that referenced this pull request Jun 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants