discourse/app
Loïc Guitaut 301713ef96 DEV: Upgrade the MessageFormat library (JS)
This patch upgrades the MessageFormat library to version 3.3.0 from
0.1.5.

Our `I18n.messageFormat` method signature is unchanged, and now uses the
new API under the hood.

We don’t need dedicated locale files for handling pluralization rules
anymore as everything is now included by the library itself.

The compilation of the messages now happens through our
`messageformat-wrapper` gem. It then outputs an ES module that includes
all its needed dependencies.

Most of the changes happen in `JsLocaleHelper` and in the `ExtraLocales`
controller.

A new method called `.output_MF` has been introduced in
`JsLocaleHelper`. It handles all the fetching, compiling and
transpiling to generate the proper MF messages in JS. Overrides and
fallbacks are also handled directly in this method.

The other main change is that now the MF translations are served through
the `ExtraLocales` controller instead of being statically compiled in a
JS file, then having to patch the messages using overrides and
fallbacks. Now the MF translations are just another bundle that is
created on the fly and cached by the client.
2024-07-10 09:51:25 +02:00
..
assets DEV: Upgrade the MessageFormat library (JS) 2024-07-10 09:51:25 +02:00
controllers DEV: Upgrade the MessageFormat library (JS) 2024-07-10 09:51:25 +02:00
helpers DEV: update base url links to respect subfolder installs (#27740) 2024-07-09 12:42:38 +04:00
jobs FEATURE: Add Mechanism to redeliver all failed webhook events (#27609) 2024-07-08 15:43:16 -05:00
mailers FIX: correctly compute the window for email summaries 2024-05-27 22:33:51 +02:00
models DEV: Upgrade the MessageFormat library (JS) 2024-07-10 09:51:25 +02:00
serializers FEATURE: Add Mechanism to redeliver all failed webhook events (#27609) 2024-07-08 15:43:16 -05:00
services DEV: replace imagemagick convert commands with magick (#27767) 2024-07-08 16:55:59 +08:00
views DEV: Upgrade the MessageFormat library (JS) 2024-07-10 09:51:25 +02:00