[PR #10491] feat(web): translations containing html #12910

Closed
opened 2026-02-05 15:05:36 +03:00 by OVERLORD · 0 comments
Owner

Original Pull Request: https://github.com/immich-app/immich/pull/10491

State: closed
Merged: Yes


Adds the ability to translate messages that contain HTML by building on Rich Text Formatting provided by formatjs. Because svelte-i18n doesn't export the needed function, the libraries are used directly.

The implementation considers the following:

  • tags in a translation can change position
  • translators can easily see the context and the syntax should be easy to reduce errors
  • alternative solutions are often susceptible to xss by using @html
**Original Pull Request:** https://github.com/immich-app/immich/pull/10491 **State:** closed **Merged:** Yes --- Adds the ability to translate messages that contain HTML by building on [Rich Text Formatting](https://formatjs.io/docs/core-concepts/icu-syntax#rich-text-formatting) provided by `formatjs`. Because `svelte-i18n` doesn't export the needed function, the libraries are used directly. The implementation considers the following: - tags in a translation can change position - translators can easily see the context and the syntax should be easy to reduce errors - alternative solutions are often susceptible to xss by using `@html`
OVERLORD added the pull-request label 2026-02-05 15:05:36 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#12910