[i18n] Minor refactor
parent
89665dca59
commit
c2f6401b80
|
@ -249,20 +249,8 @@ configure = ($routeProvider, $locationProvider, $httpProvider, $provide, $tgEven
|
|||
if not window.taigaConfig.debugInfo
|
||||
$translateProvider.fallbackLanguage(preferedLangCode)
|
||||
|
||||
moment.locale(preferedLangCode)
|
||||
|
||||
|
||||
init = ($log, $config, $rootscope, $auth, $events, $analytics, $translate) ->
|
||||
$log.debug("Initialize application")
|
||||
|
||||
# Taiga Plugins
|
||||
$rootscope.contribPlugins = @.taigaContribPlugins
|
||||
$rootscope.adminPlugins = _.where(@.taigaContribPlugins, {"type": "admin"})
|
||||
|
||||
# i18n
|
||||
$rootscope.$on "$translateChangeEnd", (ctx) ->
|
||||
lang = ctx.language
|
||||
|
||||
i18nInit = (lang, $translate) ->
|
||||
# i18n - moment.js
|
||||
moment.locale(lang)
|
||||
|
||||
|
@ -296,6 +284,20 @@ init = ($log, $config, $rootscope, $auth, $events, $analytics, $translate) ->
|
|||
}
|
||||
checksley.updateMessages('default', messages)
|
||||
|
||||
|
||||
init = ($log, $config, $rootscope, $auth, $events, $analytics, $translate) ->
|
||||
$log.debug("Initialize application")
|
||||
|
||||
# Taiga Plugins
|
||||
$rootscope.contribPlugins = @.taigaContribPlugins
|
||||
$rootscope.adminPlugins = _.where(@.taigaContribPlugins, {"type": "admin"})
|
||||
|
||||
# i18n
|
||||
#$rootscope.$on "$translateChangeEnd", (ctx) ->
|
||||
$rootscope.$on "$translateLoadingEnd'", (ctx) ->
|
||||
lang = ctx.language
|
||||
i18nInit(lang, $translate)
|
||||
|
||||
# Load user
|
||||
if $auth.isAuthenticated()
|
||||
$events.setupConnection()
|
||||
|
|
Loading…
Reference in New Issue