Improve translations for create/edit lightbox
parent
4b67893e79
commit
3898d69c46
|
@ -778,6 +778,8 @@ $confirm, $q, attachmentsService, $template, $compile) ->
|
|||
params: { include_attachments: true, include_tasks: true },
|
||||
data: (project) ->
|
||||
return {
|
||||
translationID: 'US'
|
||||
translationIDPlural: 'US'
|
||||
statusList: _.sortBy(project.us_statuses, "order")
|
||||
}
|
||||
initialData: (data) ->
|
||||
|
@ -797,6 +799,8 @@ $confirm, $q, attachmentsService, $template, $compile) ->
|
|||
params: { include_attachments: true },
|
||||
data: (project) ->
|
||||
return {
|
||||
translationID: 'TASK'
|
||||
translationIDPlural: 'TASKS'
|
||||
statusList: _.sortBy(project.task_statuses, "order")
|
||||
}
|
||||
initialData: (data) ->
|
||||
|
@ -818,6 +822,8 @@ $confirm, $q, attachmentsService, $template, $compile) ->
|
|||
params: { include_attachments: true },
|
||||
data: (project) ->
|
||||
return {
|
||||
translationID: 'ISSUE'
|
||||
translationIDPlural: 'ISSUES'
|
||||
project: project
|
||||
statusList: _.sortBy(project.issue_statuses, "order")
|
||||
typeById: groupBy(project.issue_types, (x) -> x.id)
|
||||
|
@ -949,7 +955,7 @@ $confirm, $q, attachmentsService, $template, $compile) ->
|
|||
return attachmentsService.delete($scope.objType, attachment.id)
|
||||
return $q.all(promises)
|
||||
|
||||
addExisting = (item) ->
|
||||
addExistingToSprint = (item) ->
|
||||
currentLoading = $loading().target($el.find(".add-existing-button")).start()
|
||||
|
||||
if item.milestone
|
||||
|
@ -995,8 +1001,8 @@ $confirm, $q, attachmentsService, $template, $compile) ->
|
|||
$scope.isDisabledExisting = (selectedItem) ->
|
||||
isDisabledExisting(selectedItem)
|
||||
|
||||
$scope.addExisting = (selectedItem) ->
|
||||
addExisting(selectedItem)
|
||||
$scope.addExistingToSprint = (selectedItem) ->
|
||||
addExistingToSprint(selectedItem)
|
||||
|
||||
submit = debounce 2000, (event) ->
|
||||
form = $el.find("form").checksley()
|
||||
|
|
|
@ -628,7 +628,7 @@ class TaskboardController extends mixOf(taiga.Controller, taiga.PageMixin, taiga
|
|||
sprintId: @scope.sprintId,
|
||||
relatedField: 'milestone',
|
||||
relatedObjectId: @scope.sprintId,
|
||||
title: "#{@translate.instant("COMMON.FIELDS.SPRINT")} #{@scope.sprint.name}",
|
||||
targetName: @scope.sprint.name,
|
||||
})
|
||||
when "standard" then @rootscope.$broadcast("taskform:new", @scope.sprintId, us?.id)
|
||||
when "bulk" then @rootscope.$broadcast("issueform:bulk", @scope.projectId, @scope.sprintId)
|
||||
|
|
|
@ -1091,14 +1091,21 @@
|
|||
"LAST_SPRINT_NAME": "last sprint is <strong> {{lastSprint}} ;-) </strong>"
|
||||
},
|
||||
"CREATE_EDIT": {
|
||||
"PLACEHOLDER_DESCRIPTION": "Please add descriptive text to help others better understand this {{ objName }}",
|
||||
"NEW": "New {{ objName }}",
|
||||
"EDIT": "Edit {{ objName }}",
|
||||
"ADD_EXISTING": "Add {{ objName }} to {{ targetName }}",
|
||||
"TASK_PLACEHOLDER_DESCRIPTION": "Please add descriptive text to help others better understand this Task",
|
||||
"ISSUE_PLACEHOLDER_DESCRIPTION": "Please add descriptive text to help others better understand this Issue",
|
||||
"US_PLACEHOLDER_DESCRIPTION": "Please add descriptive text to help others better understand this User Story",
|
||||
"NEW_TASK": "New Task",
|
||||
"NEW_ISSUE": "New Issue",
|
||||
"NEW_US": "New User Story",
|
||||
"EDIT_TASK": "Edit Task",
|
||||
"EDIT_ISSUE": "Edit Issue",
|
||||
"EDIT_US": "Edit User Story",
|
||||
"ADD_EXISTING_ISSUE": "Add Issue to {{ targetName }}",
|
||||
"CONFIRM_CLOSE": "You have not saved changes.\nAre you sure you want to close the form?",
|
||||
"EXISTING_OBJECT": "Existing {{ objName }}",
|
||||
"NEW_OBJECT": "New {{ objName }}",
|
||||
"CHOOSE_EXISTING": "Which {{ objName }}?"
|
||||
"EXISTING_ISSUE": "Existing Issue",
|
||||
"CHOOSE_EXISTING_ISSUE": "Which Issue?",
|
||||
"ADD_ISSUE": "Add Issue",
|
||||
"FILTER_ISSUES": "Filter Issues"
|
||||
},
|
||||
"DELETE_DUE_DATE": {
|
||||
"TITLE": "Delete due date",
|
||||
|
|
|
@ -2,9 +2,9 @@ tg-lightbox-close
|
|||
|
||||
form(ng-if="lightboxOpen")
|
||||
h2.title(ng-switch="mode")
|
||||
span(ng-switch-when="new") {{ 'LIGHTBOX.CREATE_EDIT.NEW' | translate: { objName: objName } }}
|
||||
span(ng-switch-when="edit") {{ 'LIGHTBOX.CREATE_EDIT.EDIT' | translate: { objName: objName } }}
|
||||
span(ng-switch-when="add-existing") {{ 'LIGHTBOX.CREATE_EDIT.ADD_EXISTING' | translate: { objName: objName, targetName: title } }}
|
||||
span(ng-switch-when="new") {{ 'LIGHTBOX.CREATE_EDIT.NEW_' + translationID | translate }}
|
||||
span(ng-switch-when="edit") {{ 'LIGHTBOX.CREATE_EDIT.EDIT_' + translationID | translate }}
|
||||
span(ng-switch-when="add-existing") {{ 'LIGHTBOX.CREATE_EDIT.ADD_EXISTING_' + translationID | translate: { targetName: targetName } }}
|
||||
|
||||
.existing-or-new-selector(ng-show="getOrCreate == true")
|
||||
.existing-or-new-selector-single(ng-click="setMode('add-existing')")
|
||||
|
@ -16,7 +16,7 @@ form(ng-if="lightboxOpen")
|
|||
ng-model="mode"
|
||||
)
|
||||
label.e2e-existing-item-label(for="add-existing")
|
||||
span.name {{ 'LIGHTBOX.CREATE_EDIT.EXISTING_OBJECT' | translate: { objName: objName } }}
|
||||
span.name {{ 'LIGHTBOX.CREATE_EDIT.EXISTING_' + translationID | translate }}
|
||||
|
||||
.existing-or-new-selector-single(ng-click="setMode('new')")
|
||||
input(
|
||||
|
@ -27,13 +27,13 @@ form(ng-if="lightboxOpen")
|
|||
ng-model="mode"
|
||||
)
|
||||
label.e2e-new-item-label(for="new")
|
||||
span.name {{ 'LIGHTBOX.CREATE_EDIT.NEW_OBJECT' | translate: { objName: objName } }}
|
||||
span.name {{ 'LIGHTBOX.CREATE_EDIT.NEW_' + translationID | translate }}
|
||||
|
||||
div(ng-if="mode == 'add-existing'")
|
||||
.existing-item-wrapper
|
||||
tg-search-list(
|
||||
label="{{ 'LIGHTBOX.CREATE_EDIT.CHOOSE_EXISTING' | translate: { objName: objName } }}"
|
||||
placeholder="{{ 'ISSUES.FILTER_ISSUES' | translate }}"
|
||||
label="{{ 'LIGHTBOX.CREATE_EDIT.CHOOSE_EXISTING_' + translationID | translate }}"
|
||||
placeholder="{{ 'LIGHTBOX.CREATE_EDIT.FILTER_' + translationIDPlural | translate }}"
|
||||
items="existingItems"
|
||||
ng-model="selectedItem"
|
||||
filter-by="['ref', 'subject']"
|
||||
|
@ -43,9 +43,9 @@ form(ng-if="lightboxOpen")
|
|||
)
|
||||
|
||||
button.button-green.add-existing-button(
|
||||
ng-click="addExisting(selectedItem)"
|
||||
ng-click="addExistingToSprint(selectedItem)"
|
||||
ng-disabled="!selectedItem || isDisabledExisting(selectedItem)"
|
||||
) {{ 'COMMON.ADD' | translate }} {{ objName }}
|
||||
) {{ 'LIGHTBOX.CREATE_EDIT.ADD_' + translationID | translate }}
|
||||
|
||||
div(ng-if="mode != 'add-existing'")
|
||||
.form-wrapper
|
||||
|
@ -77,7 +77,7 @@ form(ng-if="lightboxOpen")
|
|||
name="description"
|
||||
ng-model="obj.description"
|
||||
ng-model-options="{ debounce: 200 }"
|
||||
ng-attr-placeholder="{{ 'LIGHTBOX.CREATE_EDIT.PLACEHOLDER_DESCRIPTION' | translate }}"
|
||||
ng-attr-placeholder="{{ 'LIGHTBOX.CREATE_EDIT.' + translationID + '_PLACEHOLDER_DESCRIPTION' | translate }}"
|
||||
)
|
||||
fieldset
|
||||
section
|
||||
|
|
Loading…
Reference in New Issue