mirror of
https://github.com/zero-peak/ZeroOmega.git
synced 2025-01-22 23:08:13 -05:00
Load angular-i18n-* after angular. Fix #1199.
This commit is contained in:
parent
19672a3b33
commit
4e32db1d39
@ -18,28 +18,11 @@ $script.ready ['angular-loader'], ->
|
|||||||
$script.ready ['omega-pac'], ->
|
$script.ready ['omega-pac'], ->
|
||||||
$script 'js/omega.js', 'omega'
|
$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([
|
$script([
|
||||||
'js/omega_target_web.js'
|
'js/omega_target_web.js'
|
||||||
'js/omega_decoration.js'
|
'js/omega_decoration.js'
|
||||||
'lib/angular-animate/angular-animate.min.js'
|
'lib/angular-animate/angular-animate.min.js'
|
||||||
'lib/angular-bootstrap/ui-bootstrap-tpls.min.js'
|
'lib/angular-bootstrap/ui-bootstrap-tpls.min.js'
|
||||||
'lib/angular-i18n/angular-locale_' + locale + '.js'
|
|
||||||
'lib/ngprogress/ngProgress.min.js'
|
'lib/ngprogress/ngProgress.min.js'
|
||||||
'lib/angular-ui-sortable/sortable.min.js'
|
'lib/angular-ui-sortable/sortable.min.js'
|
||||||
'lib/angular-ui-utils/validate.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-ui-router/angular-ui-router.min.js', 'angular-ui-router'
|
||||||
$script 'lib/angular-sanitize/angular-sanitize.min.js', 'angular-sanitize'
|
$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',
|
$script.ready ['angular', 'omega', 'omega-deps', 'angular-ui-router',
|
||||||
'jquery-ui', 'spectrum', 'filesaver', 'blob', 'angular-ladda',
|
'jquery-ui', 'spectrum', 'filesaver', 'blob', 'angular-ladda',
|
||||||
'angular-sanitize'], ->
|
'angular-sanitize', 'angular-i18n'], ->
|
||||||
angular.bootstrap document, ['omega']
|
angular.bootstrap document, ['omega']
|
||||||
|
Loading…
Reference in New Issue
Block a user