Minor changes on locales.

stable
Andrey Antukh 2014-06-18 14:55:04 +02:00
parent de23dae404
commit c2ac5c0d9e
4 changed files with 24 additions and 8 deletions

View File

@ -56,6 +56,7 @@ modules = [
"taigaConfig",
"taigaBase",
"taigaResources",
"taigaLocales",
# Specific Modules
"taigaBacklog",

View File

@ -29,8 +29,7 @@ defaults = {
}
class I18nService extends taiga.TaigaService
@.$inject = ["$rootScope", "localeEnglish"]
class I18nService extends taiga.Service
constructor: (@rootscope, @localeEn) ->
setLanguage: (language) ->
@ -46,6 +45,7 @@ class I18nService extends taiga.TaigaService
options.resStore = {
en: { app: @localeEn }
}
i18n.init(options)
@rootscope.t = i18n.t
@ -60,17 +60,17 @@ I18nDirective = ($rootscope, $i18n) ->
for v in values
if v.indexOf(":") == -1
element.html($scope.t(v, opts))
$el.html($scope.t(v, opts))
else
[ns, v] = v.split(":")
element.attr(ns, $scope.t(v, opts))
$el.attr(ns, $scope.t(v, opts))
bindOnce(scope, "t", applyTranslation)
bindOnce($scope, "t", applyTranslation)
$scope.$on("i18n:changeLang", applyTranslation)
return {link: link}
module = angular.module("taigaBase")
module.service("$tgI18n", ["$rootScope", I18nService])
module.service("$tgI18n", ["$rootScope", "localesEnglish", I18nService])
module.directive("tgI18n", ["$rootScope", "$tgI18n", I18nDirective])

View File

@ -27,5 +27,19 @@
"pagination": {
"next": "Next",
"prev": "Previous"
},
"common": {
"subject": "Subject"
"save": "Save",
"blocked": "Blocked",
"cancel": "Cancel",
"status": "Status",
"new-bulk": "New bulk insert",
"one-item-line": "One item per line..."
},
"us": {
"title-new": "New User Story",
"team-requirement": "Ream Requirement",
"client-requirement": "Client Requirement"
}
}

View File

@ -36,10 +36,11 @@ paths = {
coffee: ["app/coffee/app.coffee",
"config/main.coffee",
"app/coffee/*.coffee",
"app/coffee/modules/controllerMixins.coffee",
"app/coffee/modules/*.coffee",
"app/coffee/modules/locales/*.coffee",
"app/coffee/modules/base/*.coffee",
"app/coffee/modules/resources/*.coffee",
"app/coffee/**/*.coffee"]
"app/coffee/modules/resources/*.coffee"]
}