in JS land, if a locale doesn't provide all strings, ensure we fall back
to its ancestor locales (if any) before we try `en`. this already works
correctly in ruby land.
also don't dump empty locales, since this hasn't been necessary since
cd8cd591ac
test plan:
1. run canvas without RAILS_LOAD_ALL_LOCALES or USE_OPTIMIZED_JS
2. switch to spanish
3. you should see english everywhere and not get js errors or missing
translation messages
4. run canvas with RAILS_LOAD_ALL_LOCALES and USE_OPTIMIZED_JS
5. you should see spanish
6. ensure you have a custom en-GB-* locale per CNVS-29506
7. switch to that locale
8. ensure you see its strings, and en-GB where it doesn't specify any,
e.g. "colour" in the Theme Editor instead of "color"
Change-Id: I349ef79ca3bb300a83cd45a11cf3b7ffd0fc2cf9
Reviewed-on: https://gerrit.instructure.com/80094
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>