canvas-lms/ui/ext
Charley Kline b6c3b0804a Convert translations to JSON not JS & use fetch
Closes FOO-2801
flag=none

Translation files used to be generated into JS files which then
wound up in the webpack build so that they could be dynamically
imported by the engine's I18n capability. But those JS files were
basically nothing but definitions of huge JS objects with all
the string translations for the locale. There's no reason to have
those in JS files that need import.

It makes a lot more sense to generate them as JSON files, handle
them as regular old assets, and then have the I18n capability
use the fetch API to pull them in. Then webpack is no longer
involved in dealing with translation files at all.

Test plan:
* Try out Canvas in English and one other locale.
* Look in the network tab for the fetch load of a file named
  something like `en-xxxxxxxxxx.json` (or whatever locale
  identifier you have Canvas set to)
* Translations inside the Canvas front end should all work as
  always, in any locale
* Must be checked in CD after merge to be sure there are not
  any additional issues related to the CDN

Change-Id: I3ed03b6adda720c78c84b005e07a8a28b815f06f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/296080
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
2022-08-11 20:53:20 +00:00
..
custom_moment_locales Convert translations to JSON not JS & use fetch 2022-08-11 20:53:20 +00:00
custom_timezone_locales add support for Thai (th) locale 2021-11-17 22:46:39 +00:00