DEV: Make wizard an ember addon (#17027)

Co-authored-by: David Taylor <david@taylorhq.com>
This commit is contained in:
Jarek Radosz
2022-06-17 14:50:21 +02:00
committed by GitHub
parent fddd6fd5e0
commit fcb4e5a1a1
111 changed files with 688 additions and 928 deletions

View File

@ -210,7 +210,19 @@ module JsLocaleHelper
end
end
translations.present? ? "I18n.extras = #{translations.to_json};" : ""
return "" if translations.blank?
<<~JS
if (!I18n.extras) {
I18n.extras = {}
}
if (!I18n.extras["#{locale}"]) {
I18n.extras["#{locale}"] = {};
}
Object.assign(I18n.extras["#{locale}"], #{translations[locale].to_json});
JS
end
MOMENT_LOCALE_MAPPING ||= {