add keys for all supported languages in I18n.translations.
previously only languages with translations on the page were being added as keys to I18n.translations. this caused problems in some cases where an empty translation file was being used to send a language code to an external system. test plan: * run rake i18n:generate_js; * open any page in canvas and, in a js console, examine I18n.translations; * verify that keys exist in the object for all languages in config/locales. Change-Id: I64f5058dbfee5df0eacdd3a07374592e56523714 Reviewed-on: https://gerrit.instructure.com/12341 Tested-by: Jenkins <jenkins@instructure.com> Reviewed-by: Jon Jensen <jon@instructure.com>
This commit is contained in:
parent
6fba24a4d1
commit
9e8c6faaa0
|
@ -226,6 +226,7 @@ namespace :i18n do
|
|||
|
||||
dump_translations = lambda do |translation_name, translations|
|
||||
file = "public/javascripts/translations/#{translation_name}.js"
|
||||
locales.each { |locale| translations[locale] ||= {} }
|
||||
content = <<-TRANSLATIONS
|
||||
// this file was auto-generated by rake i18n:generate_js.
|
||||
// you probably shouldn't edit it directly
|
||||
|
|
Loading…
Reference in New Issue