only require translations/_core in optimized js
this was added as a hard dependency in 20f692c8
, presumably due to a
change in requirejs' include behavior. tweak it so we only actually
include/require it in optimized land. this way you can use canvas
unoptimized without having to first run i18n:generate_js
test plan: canvas shouldn't asplode, and you should still get the _core
translations when using optimized js
Change-Id: I48ee4a15e7d4d8d466a4d93e28a6d56109078274
Reviewed-on: https://gerrit.instructure.com/46198
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Landon Wilkins <lwilkins@instructure.com>
Product-Review: Landon Wilkins <lwilkins@instructure.com>
QA-Review: Landon Wilkins <lwilkins@instructure.com>
This commit is contained in:
parent
59d824ee46
commit
ac94f0211b
|
@ -8,7 +8,6 @@ require [
|
|||
|
||||
# modules that do their own thing on every page that simply need to
|
||||
# be required
|
||||
'translations/_core'
|
||||
'translations/_core_en'
|
||||
'jquery.ajaxJSON'
|
||||
'vendor/firebugx'
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
define ['i18nObj'], (I18n) ->
|
||||
define ['i18n!_core_en'], (I18n) ->
|
||||
weekMode: 'variable'
|
||||
allDayDefault: false
|
||||
# In order to display times in the time zone configured in the user's profile,
|
||||
|
|
|
@ -86,7 +86,8 @@
|
|||
'jquery.instructure_forms',
|
||||
'jquery.ajaxJSON',
|
||||
'jquery.instructure_misc_helpers',
|
||||
'media_comments'
|
||||
'media_comments',
|
||||
'translations/_core'
|
||||
]
|
||||
},
|
||||
|
||||
|
|
|
@ -20,8 +20,9 @@ define({
|
|||
return;
|
||||
}
|
||||
|
||||
// also require the translations when config.translate is true
|
||||
req(['i18nObj', 'translations/' + name], function(I18n, translations) {
|
||||
// also require the translations when config.translate is true. note
|
||||
// that build.js concats _core, but we still need to actually require it.
|
||||
req(['i18nObj', 'translations/' + name, 'translations/_core'], function(I18n) {
|
||||
load( config.isBuild ? null : I18n.scoped(name) );
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue