Skip to content

Comments

fix(translations): use language instead of locale + refactor the loadTranslations method#927

Merged
susnux merged 1 commit intomainfrom
refactor/load-translations
May 28, 2025
Merged

fix(translations): use language instead of locale + refactor the loadTranslations method#927
susnux merged 1 commit intomainfrom
refactor/load-translations

Conversation

@susnux
Copy link
Contributor

@susnux susnux commented May 28, 2025

  • Use language instead of locale for loading translations.
  • Refactor to use fetch API instead of XMLHttpRequest.
  • Deprecate callback parameter in favor of directly using the returned promise.
  • Use MSW for tests.

- Use language instead of locale for loading translations.
- Refactor to use `fetch` API instead of `XMLHttpRequest`.
- Deprecate `callback` parameter in favor of directly using the returned
  promise.
- Use MSW for tests.

Signed-off-by: Ferdinand Thiessen <[email protected]>
@susnux susnux requested review from ChristophWurst and ShGKme May 28, 2025 14:29
@susnux susnux added type: bug 🐛 Something isn't working 3. to review 3️⃣ Waiting for reviews labels May 28, 2025
Copy link
Contributor

@ChristophWurst ChristophWurst left a comment

Choose a reason for hiding this comment

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

Looks gut

@susnux susnux merged commit 258e4b3 into main May 28, 2025
16 checks passed
@susnux susnux deleted the refactor/load-translations branch May 28, 2025 15:05
reject(new Error('Invalid content of translation bundle'))
} else {
reject(new Error(request.statusText))
if (response.status >= 200 && response.status < 300) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

nice

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

Labels

3. to review 3️⃣ Waiting for reviews type: bug 🐛 Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants