Load angular-i18n-* after angular. Fix #1199.

This commit is contained in:
FelisCatus 2017-09-20 10:35:12 -07:00
parent 19672a3b33
commit 4e32db1d39

View File

@ -18,28 +18,11 @@ $script.ready ['angular-loader'], ->
$script.ready ['omega-pac'], ->
$script 'js/omega.js', 'omega'
locales =
'': 'en-us'
'en': 'en-us'
'zh': 'zh-cn'
'zh-hans': 'zh-cn'
'zh-hant': 'zh-tw'
'zh-cn': 'zh-cn'
'zh-hk': 'zh-hk'
'zh-tw': 'zh-tw'
lang = navigator.language
lang1 = navigator.language?.split('-')[0] || ''
locale = locales[lang] || locales[lang1] || locales['']
$script([
'js/omega_target_web.js'
'js/omega_decoration.js'
'lib/angular-animate/angular-animate.min.js'
'lib/angular-bootstrap/ui-bootstrap-tpls.min.js'
'lib/angular-i18n/angular-locale_' + locale + '.js'
'lib/ngprogress/ngProgress.min.js'
'lib/angular-ui-sortable/sortable.min.js'
'lib/angular-ui-utils/validate.min.js'
@ -59,7 +42,24 @@ $script.ready ['angular'], ->
$script 'lib/angular-ui-router/angular-ui-router.min.js', 'angular-ui-router'
$script 'lib/angular-sanitize/angular-sanitize.min.js', 'angular-sanitize'
locales =
'': 'en-us'
'en': 'en-us'
'zh': 'zh-cn'
'zh-hans': 'zh-cn'
'zh-hant': 'zh-tw'
'zh-cn': 'zh-cn'
'zh-hk': 'zh-hk'
'zh-tw': 'zh-tw'
lang = navigator.language
lang1 = navigator.language?.split('-')[0] || ''
locale = locales[lang] || locales[lang1] || locales['']
$script 'lib/angular-i18n/angular-locale_' + locale + '.js', 'angular-i18n'
$script.ready ['angular', 'omega', 'omega-deps', 'angular-ui-router',
'jquery-ui', 'spectrum', 'filesaver', 'blob', 'angular-ladda',
'angular-sanitize'], ->
'angular-sanitize', 'angular-i18n'], ->
angular.bootstrap document, ['omega']