Issue 2685: Bad translation in spanish for "Add new XXX" in Admin -> attributes
parent
745668849e
commit
14d43d576f
|
@ -126,7 +126,7 @@ module.controller("ProjectValuesController", ProjectValuesController)
|
|||
## Project values directive
|
||||
#############################################################################
|
||||
|
||||
ProjectValuesDirective = ($log, $repo, $confirm, $location, animationFrame) ->
|
||||
ProjectValuesDirective = ($log, $repo, $confirm, $location, animationFrame, @translate, $rootscope) ->
|
||||
## Drag & Drop Link
|
||||
|
||||
linkDragAndDrop = ($scope, $el, $attrs) ->
|
||||
|
@ -157,6 +157,7 @@ ProjectValuesDirective = ($log, $repo, $confirm, $location, animationFrame) ->
|
|||
linkValue = ($scope, $el, $attrs) ->
|
||||
$ctrl = $el.controller()
|
||||
valueType = $attrs.type
|
||||
objName = $attrs.objname
|
||||
|
||||
initializeNewValue = ->
|
||||
$scope.newValue = {
|
||||
|
@ -165,7 +166,14 @@ ProjectValuesDirective = ($log, $repo, $confirm, $location, animationFrame) ->
|
|||
"is_archived": false
|
||||
}
|
||||
|
||||
initializeTextTranslations = ->
|
||||
$scope.addNewElementText = @translate.instant("ADMIN.PROJECT_VALUES_#{objName.toUpperCase()}.ACTION_ADD")
|
||||
|
||||
initializeNewValue()
|
||||
initializeTextTranslations()
|
||||
|
||||
$rootscope.$on "$translateChangeEnd", ->
|
||||
$scope.$evalAsync(initializeTextTranslations)
|
||||
|
||||
goToBottomList = (focus = false) =>
|
||||
table = $el.find(".table-main")
|
||||
|
@ -305,7 +313,7 @@ ProjectValuesDirective = ($log, $repo, $confirm, $location, animationFrame) ->
|
|||
|
||||
return {link:link}
|
||||
|
||||
module.directive("tgProjectValues", ["$log", "$tgRepo", "$tgConfirm", "$tgLocation", "animationFrame", ProjectValuesDirective])
|
||||
module.directive("tgProjectValues", ["$log", "$tgRepo", "$tgConfirm", "$tgLocation", "animationFrame", "$translate", "$rootScope", ProjectValuesDirective])
|
||||
|
||||
|
||||
#############################################################################
|
||||
|
|
|
@ -362,11 +362,13 @@
|
|||
},
|
||||
"PROJECT_VALUES_PRIORITIES": {
|
||||
"TITLE": "Issue priorities",
|
||||
"SUBTITLE": "Specify the priorities your issues will have"
|
||||
"SUBTITLE": "Specify the priorities your issues will have",
|
||||
"ACTION_ADD": "Add new priority"
|
||||
},
|
||||
"PROJECT_VALUES_SEVERITIES": {
|
||||
"TITLE": "Issue severities",
|
||||
"SUBTITLE": "Specify the severities your issues will have"
|
||||
"SUBTITLE": "Specify the severities your issues will have",
|
||||
"ACTION_ADD": "Add new severity"
|
||||
},
|
||||
"PROJECT_VALUES_STATUS": {
|
||||
"TITLE": "Status",
|
||||
|
@ -379,7 +381,7 @@
|
|||
"TITLE": "Types",
|
||||
"SUBTITLE": "Specify the types your issues could be",
|
||||
"ISSUE_TITLE": "Issues types",
|
||||
"ACTION_ADD": "Add new {{objName}}"
|
||||
"ACTION_ADD": "Add new type"
|
||||
},
|
||||
"ROLES": {
|
||||
"SECTION_NAME": "Roles - {{projectName}}",
|
||||
|
|
|
@ -13,5 +13,6 @@ div.wrapper(ng-controller="ProjectValuesSectionController")
|
|||
|
||||
div.admin-attributes-section(tg-project-values, ng-controller="ProjectValuesController as ctrl",
|
||||
ng-init="section='admin'; resource='userstories'; type='points'; sectionName='ADMIN.PROJECT_VALUES_POINTS.TITLE'",
|
||||
objName="points",
|
||||
type="points")
|
||||
include ../includes/modules/admin/project-points
|
||||
|
|
|
@ -12,6 +12,7 @@ div.wrapper(ng-controller="ProjectValuesSectionController")
|
|||
p.admin-subtitle(translate="ADMIN.PROJECT_VALUES_PRIORITIES.SUBTITLE")
|
||||
|
||||
div.admin-attributes-section(tg-project-values, ng-controller="ProjectValuesController as ctrl",
|
||||
ng-init="section='admin'; resource='issues'; type='priorities'; sectionName='ADMIN.PROJECT_VALUES_PRIORITIES.TITLE'; objName='priority'",
|
||||
ng-init="section='admin'; resource='issues'; type='priorities'; sectionName='ADMIN.PROJECT_VALUES_PRIORITIES.TITLE';",
|
||||
objName="priorities",
|
||||
type="priorities")
|
||||
include ../includes/modules/admin/project-types
|
||||
|
|
|
@ -12,6 +12,7 @@ div.wrapper(ng-controller="ProjectValuesSectionController")
|
|||
p.admin-subtitle(translate="ADMIN.PROJECT_VALUES_SEVERITIES.SUBTITLE")
|
||||
|
||||
div.admin-attributes-section(tg-project-values, ng-controller="ProjectValuesController as ctrl",
|
||||
ng-init="section='admin'; resource='issues'; type='severities'; sectionName='ADMIN.PROJECT_VALUES_SEVERITIES.TITLE'; objName='severity'",
|
||||
ng-init="section='admin'; resource='issues'; type='severities'; sectionName='ADMIN.PROJECT_VALUES_SEVERITIES.TITLE';",
|
||||
objName="severities",
|
||||
type="severities")
|
||||
include ../includes/modules/admin/project-types
|
||||
|
|
|
@ -14,15 +14,18 @@ div.wrapper(ng-controller="ProjectValuesSectionController",
|
|||
|
||||
div.admin-attributes-section(tg-project-values, type="userstory-statuses",
|
||||
ng-controller="ProjectValuesController as ctrl",
|
||||
ng-init="section='admin'; resource='userstories'; type='userstory-statuses'; sectionName='ADMIN.PROJECT_VALUES_STATUS.US_TITLE'")
|
||||
ng-init="section='admin'; resource='userstories'; type='userstory-statuses'; sectionName='ADMIN.PROJECT_VALUES_STATUS.US_TITLE'",
|
||||
objName="status")
|
||||
include ../includes/modules/admin/project-us-status
|
||||
|
||||
div.admin-attributes-section(tg-project-values, type="task-statuses",
|
||||
ng-controller="ProjectValuesController as ctrl",
|
||||
ng-init="section='admin'; resource='tasks'; type='task-statuses'; sectionName='ADMIN.PROJECT_VALUES_STATUS.TASK_TITLE'")
|
||||
ng-init="section='admin'; resource='tasks'; type='task-statuses'; sectionName='ADMIN.PROJECT_VALUES_STATUS.TASK_TITLE'"
|
||||
objName="status")
|
||||
include ../includes/modules/admin/project-status
|
||||
|
||||
div.admin-attributes-section(tg-project-values, type="issue-statuses",
|
||||
ng-controller="ProjectValuesController as ctrl",
|
||||
ng-init="section='admin'; resource='issues'; type='issue-statuses'; sectionName='ADMIN.PROJECT_VALUES_STATUS.ISSUE_TITLE'")
|
||||
ng-init="section='admin'; resource='issues'; type='issue-statuses'; sectionName='ADMIN.PROJECT_VALUES_STATUS.ISSUE_TITLE'",
|
||||
objName="status")
|
||||
include ../includes/modules/admin/project-status
|
||||
|
|
|
@ -13,6 +13,7 @@ div.wrapper(ng-controller="ProjectValuesSectionController"
|
|||
p.admin-subtitle(translate="ADMIN.PROJECT_VALUES_TYPES.SUBTITLE")
|
||||
|
||||
div.admin-attributes-section(tg-project-values, ng-controller="ProjectValuesController as ctrl",
|
||||
ng-init="section='admin'; resource='issues'; sectionName='ADMIN.PROJECT_VALUES_TYPES.ISSUE_TITLE'; type='issue-types'; objName='type'",
|
||||
ng-init="section='admin'; resource='issues'; sectionName='ADMIN.PROJECT_VALUES_TYPES.ISSUE_TITLE'; type='issue-types';",
|
||||
objName="types",
|
||||
type="issue-types")
|
||||
include ../includes/modules/admin/project-types
|
||||
|
|
|
@ -2,8 +2,8 @@ section.colors-table
|
|||
|
||||
div.project-values-title
|
||||
h2 {{ sectionName | translate }}
|
||||
a.button.button-gray.show-add-new(href="")
|
||||
span(translate="ADMIN.PROJECT_VALUES_TYPES.ACTION_ADD", translate-values="{ objName: objName }")
|
||||
a.button.button-gray.show-add-new(href="", title="{{ addNewElementText }}")
|
||||
span(ng-bind="addNewElementText")
|
||||
|
||||
div.table-header
|
||||
div.row
|
||||
|
|
Loading…
Reference in New Issue