Issue 2685: Bad translation in spanish for "Add new XXX" in Admin -> attributes

stable
Alejandro Alonso 2015-05-19 09:31:51 +02:00
parent 745668849e
commit 14d43d576f
8 changed files with 30 additions and 13 deletions

View File

@ -126,7 +126,7 @@ module.controller("ProjectValuesController", ProjectValuesController)
## Project values directive ## Project values directive
############################################################################# #############################################################################
ProjectValuesDirective = ($log, $repo, $confirm, $location, animationFrame) -> ProjectValuesDirective = ($log, $repo, $confirm, $location, animationFrame, @translate, $rootscope) ->
## Drag & Drop Link ## Drag & Drop Link
linkDragAndDrop = ($scope, $el, $attrs) -> linkDragAndDrop = ($scope, $el, $attrs) ->
@ -157,6 +157,7 @@ ProjectValuesDirective = ($log, $repo, $confirm, $location, animationFrame) ->
linkValue = ($scope, $el, $attrs) -> linkValue = ($scope, $el, $attrs) ->
$ctrl = $el.controller() $ctrl = $el.controller()
valueType = $attrs.type valueType = $attrs.type
objName = $attrs.objname
initializeNewValue = -> initializeNewValue = ->
$scope.newValue = { $scope.newValue = {
@ -165,7 +166,14 @@ ProjectValuesDirective = ($log, $repo, $confirm, $location, animationFrame) ->
"is_archived": false "is_archived": false
} }
initializeTextTranslations = ->
$scope.addNewElementText = @translate.instant("ADMIN.PROJECT_VALUES_#{objName.toUpperCase()}.ACTION_ADD")
initializeNewValue() initializeNewValue()
initializeTextTranslations()
$rootscope.$on "$translateChangeEnd", ->
$scope.$evalAsync(initializeTextTranslations)
goToBottomList = (focus = false) => goToBottomList = (focus = false) =>
table = $el.find(".table-main") table = $el.find(".table-main")
@ -305,7 +313,7 @@ ProjectValuesDirective = ($log, $repo, $confirm, $location, animationFrame) ->
return {link:link} return {link:link}
module.directive("tgProjectValues", ["$log", "$tgRepo", "$tgConfirm", "$tgLocation", "animationFrame", ProjectValuesDirective]) module.directive("tgProjectValues", ["$log", "$tgRepo", "$tgConfirm", "$tgLocation", "animationFrame", "$translate", "$rootScope", ProjectValuesDirective])
############################################################################# #############################################################################

View File

@ -362,11 +362,13 @@
}, },
"PROJECT_VALUES_PRIORITIES": { "PROJECT_VALUES_PRIORITIES": {
"TITLE": "Issue 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": { "PROJECT_VALUES_SEVERITIES": {
"TITLE": "Issue 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": { "PROJECT_VALUES_STATUS": {
"TITLE": "Status", "TITLE": "Status",
@ -379,7 +381,7 @@
"TITLE": "Types", "TITLE": "Types",
"SUBTITLE": "Specify the types your issues could be", "SUBTITLE": "Specify the types your issues could be",
"ISSUE_TITLE": "Issues types", "ISSUE_TITLE": "Issues types",
"ACTION_ADD": "Add new {{objName}}" "ACTION_ADD": "Add new type"
}, },
"ROLES": { "ROLES": {
"SECTION_NAME": "Roles - {{projectName}}", "SECTION_NAME": "Roles - {{projectName}}",

View File

@ -13,5 +13,6 @@ div.wrapper(ng-controller="ProjectValuesSectionController")
div.admin-attributes-section(tg-project-values, ng-controller="ProjectValuesController as ctrl", 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'", ng-init="section='admin'; resource='userstories'; type='points'; sectionName='ADMIN.PROJECT_VALUES_POINTS.TITLE'",
objName="points",
type="points") type="points")
include ../includes/modules/admin/project-points include ../includes/modules/admin/project-points

View File

@ -12,6 +12,7 @@ div.wrapper(ng-controller="ProjectValuesSectionController")
p.admin-subtitle(translate="ADMIN.PROJECT_VALUES_PRIORITIES.SUBTITLE") p.admin-subtitle(translate="ADMIN.PROJECT_VALUES_PRIORITIES.SUBTITLE")
div.admin-attributes-section(tg-project-values, ng-controller="ProjectValuesController as ctrl", 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") type="priorities")
include ../includes/modules/admin/project-types include ../includes/modules/admin/project-types

View File

@ -12,6 +12,7 @@ div.wrapper(ng-controller="ProjectValuesSectionController")
p.admin-subtitle(translate="ADMIN.PROJECT_VALUES_SEVERITIES.SUBTITLE") p.admin-subtitle(translate="ADMIN.PROJECT_VALUES_SEVERITIES.SUBTITLE")
div.admin-attributes-section(tg-project-values, ng-controller="ProjectValuesController as ctrl", 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") type="severities")
include ../includes/modules/admin/project-types include ../includes/modules/admin/project-types

View File

@ -14,15 +14,18 @@ div.wrapper(ng-controller="ProjectValuesSectionController",
div.admin-attributes-section(tg-project-values, type="userstory-statuses", div.admin-attributes-section(tg-project-values, type="userstory-statuses",
ng-controller="ProjectValuesController as ctrl", 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 include ../includes/modules/admin/project-us-status
div.admin-attributes-section(tg-project-values, type="task-statuses", div.admin-attributes-section(tg-project-values, type="task-statuses",
ng-controller="ProjectValuesController as ctrl", 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 include ../includes/modules/admin/project-status
div.admin-attributes-section(tg-project-values, type="issue-statuses", div.admin-attributes-section(tg-project-values, type="issue-statuses",
ng-controller="ProjectValuesController as ctrl", 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 include ../includes/modules/admin/project-status

View File

@ -13,6 +13,7 @@ div.wrapper(ng-controller="ProjectValuesSectionController"
p.admin-subtitle(translate="ADMIN.PROJECT_VALUES_TYPES.SUBTITLE") p.admin-subtitle(translate="ADMIN.PROJECT_VALUES_TYPES.SUBTITLE")
div.admin-attributes-section(tg-project-values, ng-controller="ProjectValuesController as ctrl", 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") type="issue-types")
include ../includes/modules/admin/project-types include ../includes/modules/admin/project-types

View File

@ -2,8 +2,8 @@ section.colors-table
div.project-values-title div.project-values-title
h2 {{ sectionName | translate }} h2 {{ sectionName | translate }}
a.button.button-gray.show-add-new(href="") a.button.button-gray.show-add-new(href="", title="{{ addNewElementText }}")
span(translate="ADMIN.PROJECT_VALUES_TYPES.ACTION_ADD", translate-values="{ objName: objName }") span(ng-bind="addNewElementText")
div.table-header div.table-header
div.row div.row