[i18n] Fix translations in reports section
parent
ce352fa5e3
commit
6b1293da3e
|
@ -58,14 +58,16 @@ class ProjectProfileController extends mixOf(taiga.Controller, taiga.PageMixin)
|
||||||
|
|
||||||
promise.then =>
|
promise.then =>
|
||||||
sectionName = @translate.instant( @scope.sectionName)
|
sectionName = @translate.instant( @scope.sectionName)
|
||||||
appTitle = @translate.instant("ADMIN.PROJECT_PROFILE.PAGE_TITLE", {sectionName: sectionName, projectName: @scope.project.name})
|
appTitle = @translate.instant("ADMIN.PROJECT_PROFILE.PAGE_TITLE", {
|
||||||
|
sectionName: sectionName, projectName: @scope.project.name})
|
||||||
@appTitle.set(appTitle)
|
@appTitle.set(appTitle)
|
||||||
|
|
||||||
promise.then null, @.onInitialDataError.bind(@)
|
promise.then null, @.onInitialDataError.bind(@)
|
||||||
|
|
||||||
@scope.$on "project:loaded", =>
|
@scope.$on "project:loaded", =>
|
||||||
sectionName = @translate.instant(@scope.sectionName)
|
sectionName = @translate.instant(@scope.sectionName)
|
||||||
appTitle = @translate.instant("ADMIN.PROJECT_PROFILE.PAGE_TITLE", {sectionName: sectionName, projectName: @scope.project.name})
|
appTitle = @translate.instant("ADMIN.PROJECT_PROFILE.PAGE_TITLE", {
|
||||||
|
sectionName: sectionName, projectName: @scope.project.name})
|
||||||
@appTitle.set(appTitle)
|
@appTitle.set(appTitle)
|
||||||
|
|
||||||
loadProject: ->
|
loadProject: ->
|
||||||
|
@ -131,7 +133,8 @@ ProjectProfileDirective = ($repo, $confirm, $loading, $navurls, $location) ->
|
||||||
|
|
||||||
return {link:link}
|
return {link:link}
|
||||||
|
|
||||||
module.directive("tgProjectProfile", ["$tgRepo", "$tgConfirm", "$tgLoading", "$tgNavUrls", "$tgLocation", ProjectProfileDirective])
|
module.directive("tgProjectProfile", ["$tgRepo", "$tgConfirm", "$tgLoading", "$tgNavUrls", "$tgLocation",
|
||||||
|
ProjectProfileDirective])
|
||||||
|
|
||||||
#############################################################################
|
#############################################################################
|
||||||
## Project Default Values Directive
|
## Project Default Values Directive
|
||||||
|
@ -167,7 +170,8 @@ ProjectDefaultValuesDirective = ($repo, $confirm, $loading) ->
|
||||||
|
|
||||||
return {link:link}
|
return {link:link}
|
||||||
|
|
||||||
module.directive("tgProjectDefaultValues", ["$tgRepo", "$tgConfirm", "$tgLoading", ProjectDefaultValuesDirective])
|
module.directive("tgProjectDefaultValues", ["$tgRepo", "$tgConfirm", "$tgLoading",
|
||||||
|
ProjectDefaultValuesDirective])
|
||||||
|
|
||||||
#############################################################################
|
#############################################################################
|
||||||
## Project Modules Directive
|
## Project Modules Directive
|
||||||
|
@ -243,7 +247,8 @@ ProjectExportDirective = ($window, $rs, $confirm, $translate) ->
|
||||||
loading_msg = $translate.instant("ADMIN.PROJECT_EXPORT.LOADING_MESSAGE")
|
loading_msg = $translate.instant("ADMIN.PROJECT_EXPORT.LOADING_MESSAGE")
|
||||||
dump_ready_text = -> resultTitleEl.html($translate.instant("ADMIN.PROJECT_EXPORT.DUMP_READY"))
|
dump_ready_text = -> resultTitleEl.html($translate.instant("ADMIN.PROJECT_EXPORT.DUMP_READY"))
|
||||||
asyn_message = -> resultTitleEl.html($translate.instant("ADMIN.PROJECT_EXPORT.ASYN_MESSAGE"))
|
asyn_message = -> resultTitleEl.html($translate.instant("ADMIN.PROJECT_EXPORT.ASYN_MESSAGE"))
|
||||||
syn_message = (url) -> resultTitleEl.html($translate.instant("ADMIN.PROJECT_EXPORT.SYNC_MESSAGE", {url: url}))
|
syn_message = (url) -> resultTitleEl.html($translate.instant("ADMIN.PROJECT_EXPORT.SYNC_MESSAGE", {
|
||||||
|
url: url}))
|
||||||
|
|
||||||
setLoadingTitle = -> resultTitleEl.html(loading_title)
|
setLoadingTitle = -> resultTitleEl.html(loading_title)
|
||||||
setAsyncTitle = -> resultTitleEl.html(loading_msg)
|
setAsyncTitle = -> resultTitleEl.html(loading_msg)
|
||||||
|
@ -295,7 +300,8 @@ ProjectExportDirective = ($window, $rs, $confirm, $translate) ->
|
||||||
if result.status == 429 # TOO MANY REQUESTS
|
if result.status == 429 # TOO MANY REQUESTS
|
||||||
errorMsg = $translate.instant("ADMIN.PROJECT_EXPORT.ERROR_BUSY")
|
errorMsg = $translate.instant("ADMIN.PROJECT_EXPORT.ERROR_BUSY")
|
||||||
else if result.data?._error_message
|
else if result.data?._error_message
|
||||||
errorMsg = $translate.instant("ADMIN.PROJECT_EXPORT.ERROR_BUSY", {message: result.data._error_message})
|
errorMsg = $translate.instant("ADMIN.PROJECT_EXPORT.ERROR_BUSY", {
|
||||||
|
message: result.data._error_message})
|
||||||
|
|
||||||
$confirm.notify("error", errorMsg)
|
$confirm.notify("error", errorMsg)
|
||||||
|
|
||||||
|
@ -304,7 +310,8 @@ ProjectExportDirective = ($window, $rs, $confirm, $translate) ->
|
||||||
|
|
||||||
return {link:link}
|
return {link:link}
|
||||||
|
|
||||||
module.directive("tgProjectExport", ["$window", "$tgResources", "$tgConfirm", "$translate", ProjectExportDirective])
|
module.directive("tgProjectExport", ["$window", "$tgResources", "$tgConfirm", "$translate",
|
||||||
|
ProjectExportDirective])
|
||||||
|
|
||||||
|
|
||||||
#############################################################################
|
#############################################################################
|
||||||
|
@ -372,14 +379,13 @@ module.controller("CsvExporterTasksController", CsvExporterTasksController)
|
||||||
module.controller("CsvExporterIssuesController", CsvExporterIssuesController)
|
module.controller("CsvExporterIssuesController", CsvExporterIssuesController)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#############################################################################
|
#############################################################################
|
||||||
## CSV Directive
|
## CSV Directive
|
||||||
#############################################################################
|
#############################################################################
|
||||||
|
|
||||||
CsvUsDirective = ($translate) ->
|
CsvUsDirective = ($translate) ->
|
||||||
link = ($scope) ->
|
link = ($scope) ->
|
||||||
$scope.csvType = $translate.instant("ADMIN.REPORTS.CSV_TYPE_USS")
|
$scope.sectionTitle = "ADMIN.CSV.SECTION_TITLE_US"
|
||||||
|
|
||||||
return {
|
return {
|
||||||
controller: "CsvExporterUserstoriesController",
|
controller: "CsvExporterUserstoriesController",
|
||||||
|
@ -390,9 +396,10 @@ CsvUsDirective = ($translate) ->
|
||||||
|
|
||||||
module.directive("tgCsvUs", ["$translate", CsvUsDirective])
|
module.directive("tgCsvUs", ["$translate", CsvUsDirective])
|
||||||
|
|
||||||
|
|
||||||
CsvTaskDirective = ($translate) ->
|
CsvTaskDirective = ($translate) ->
|
||||||
link = ($scope) ->
|
link = ($scope) ->
|
||||||
$scope.csvType = $translate.instant("ADMIN.REPORTS.CSV_TYPE_TASKS")
|
$scope.sectionTitle = "ADMIN.CSV.SECTION_TITLE_TASK"
|
||||||
|
|
||||||
return {
|
return {
|
||||||
controller: "CsvExporterTasksController",
|
controller: "CsvExporterTasksController",
|
||||||
|
@ -403,9 +410,10 @@ CsvTaskDirective = ($translate) ->
|
||||||
|
|
||||||
module.directive("tgCsvTask", ["$translate", CsvTaskDirective])
|
module.directive("tgCsvTask", ["$translate", CsvTaskDirective])
|
||||||
|
|
||||||
|
|
||||||
CsvIssueDirective = ($translate) ->
|
CsvIssueDirective = ($translate) ->
|
||||||
link = ($scope) ->
|
link = ($scope) ->
|
||||||
$scope.csvType = $translate.instant("ADMIN.REPORTS.CSV_TYPE_ISSUES")
|
$scope.sectionTitle = "ADMIN.CSV.SECTION_TITLE_ISSUE"
|
||||||
|
|
||||||
return {
|
return {
|
||||||
controller: "CsvExporterIssuesController",
|
controller: "CsvExporterIssuesController",
|
||||||
|
|
|
@ -260,10 +260,17 @@
|
||||||
"DESCRIPTION": "Download a CSV file or copy the generated URL and open it in your favourite text editor or spreadsheet to make your own project data reports. You will be able to visualize and analize all your data easily.",
|
"DESCRIPTION": "Download a CSV file or copy the generated URL and open it in your favourite text editor or spreadsheet to make your own project data reports. You will be able to visualize and analize all your data easily.",
|
||||||
"HELP": "How to use this on my own spreadsheet?",
|
"HELP": "How to use this on my own spreadsheet?",
|
||||||
"REGENERATE_TITLE": "Change URL",
|
"REGENERATE_TITLE": "Change URL",
|
||||||
"REGENERATE_SUBTITLE": "You going to change the CSV data access url. The previous url will be disabled. Are you sure?",
|
"REGENERATE_SUBTITLE": "You going to change the CSV data access url. The previous url will be disabled. Are you sure?"
|
||||||
"CSV_TYPE_US": "user stories",
|
},
|
||||||
"CSV_TYPE_TASK": "tasks",
|
"CSV": {
|
||||||
"CSV_TYPE_ISSUE": "issues"
|
"SECTION_TITLE_US": "user stories reports",
|
||||||
|
"SECTION_TITLE_TASK": "tasks reports",
|
||||||
|
"SECTION_TITLE_ISSUE": "issues reports",
|
||||||
|
"DOWNLOAD": "Download CSV",
|
||||||
|
"URL_FIELD_PLACEHOLDER": "Please regenerate CSV url",
|
||||||
|
"TITLE_REGENERATE_URL": "Regenerate CSV url",
|
||||||
|
"ACTION_GENERATE_URL": "Generate Url",
|
||||||
|
"ACTION_REGENERATE": "Regenerate"
|
||||||
},
|
},
|
||||||
"CUSTOM_FIELDS": {
|
"CUSTOM_FIELDS": {
|
||||||
"TITLE": "Custom Fields",
|
"TITLE": "Custom Fields",
|
||||||
|
@ -396,14 +403,6 @@
|
||||||
"LABEL_ISSUE_TYPE": "Default value for issue type selector",
|
"LABEL_ISSUE_TYPE": "Default value for issue type selector",
|
||||||
"LABEL_ISSUE_STATUS": "Default value for issue status selector"
|
"LABEL_ISSUE_STATUS": "Default value for issue status selector"
|
||||||
},
|
},
|
||||||
"CSV": {
|
|
||||||
"TITLE": "{{csvType}} reports",
|
|
||||||
"DOWNLOAD": "Download CSV",
|
|
||||||
"URL_FIELD_PLACEHOLDER": "Please regenerate CSV url",
|
|
||||||
"TITLE_REGENERATE_URL": "Regenerate CSV url",
|
|
||||||
"ACTION_GENERATE_URL": "Generate Url",
|
|
||||||
"ACTION_REGENERATE": "Regenerate"
|
|
||||||
},
|
|
||||||
"STATUS": {
|
"STATUS": {
|
||||||
"PLACEHOLDER_WRITE_STATUS_NAME": "Write a name for the new status"
|
"PLACEHOLDER_WRITE_STATUS_NAME": "Write a name for the new status"
|
||||||
},
|
},
|
||||||
|
|
|
@ -17,8 +17,9 @@ div.wrapper(ng-controller="ProjectProfileController as ctrl",
|
||||||
|
|
||||||
div.admin-attributes-section(tg-csv-us)
|
div.admin-attributes-section(tg-csv-us)
|
||||||
div.admin-attributes-section(tg-csv-task)
|
div.admin-attributes-section(tg-csv-task)
|
||||||
div.admin-attributes-section
|
div.admin-attributes-section(tg-csv-issue)
|
||||||
div(tg-csv-issue)
|
|
||||||
|
div
|
||||||
a.help-button(href="https://taiga.io/support/csv-reports/", target="_blank")
|
a.help-button(href="https://taiga.io/support/csv-reports/", target="_blank")
|
||||||
span.icon.icon-help
|
span.icon.icon-help
|
||||||
span(translate="ADMIN.REPORTS.HELP")
|
span(translate="ADMIN.REPORTS.HELP")
|
||||||
|
|
|
@ -1,16 +1,20 @@
|
||||||
section.project-csv(tg-select-input-text)
|
section.project-csv(tg-select-input-text)
|
||||||
div.project-values-title
|
div.project-values-title
|
||||||
h2(translate="ADMIN.CSV.TITLE", translate-values='{ csvType: csvType}')
|
h2(translate="{{::sectionTitle}}")
|
||||||
a.button.button-gray(title="{{'ADMIN.CSV.DOWNLOAD' | translate}}", ng-href="{{csvUrl}}", ng-show="csvUrl", target="_blank")
|
a.button.button-gray(title="{{'ADMIN.CSV.DOWNLOAD' | translate}}",
|
||||||
|
ng-href="{{csvUrl}}", ng-show="csvUrl", target="_blank")
|
||||||
span(translate="ADMIN.CSV.DOWNLOAD")
|
span(translate="ADMIN.CSV.DOWNLOAD")
|
||||||
|
|
||||||
div.csv-regenerate-field
|
div.csv-regenerate-field
|
||||||
.field-with-options
|
div.field-with-options
|
||||||
input(type="text", placeholder="{{'ADMIN.CSV.URL_FIELD_PLACEHOLDER' | translate}}", readonly, ng-model="csvUrl")
|
input(type="text", placeholder="{{'ADMIN.CSV.URL_FIELD_PLACEHOLDER' | translate}}",
|
||||||
.option-wrapper.select-input-content
|
readonly, ng-model="csvUrl")
|
||||||
.icon.icon-copy
|
div.option-wrapper.select-input-content
|
||||||
|
div.icon.icon-copy
|
||||||
|
|
||||||
a(href="", title="{{'ADMIN.CSV.TITLE_REGENERATE_URL' | translate}}", ng-click="ctrl.regenerateUuid()")
|
a(href="", title="{{'ADMIN.CSV.TITLE_REGENERATE_URL' | translate}}", ng-click="ctrl.regenerateUuid()")
|
||||||
span.icon.icon-plus(ng-hide="csvUrl")
|
span.icon.icon-plus(ng-hide="csvUrl")
|
||||||
span(ng-hide="csvUrl", translate="ADMIN.CSV.ACTION_GENERATE_URL")
|
span(ng-hide="csvUrl", translate="ADMIN.CSV.ACTION_GENERATE_URL")
|
||||||
|
|
||||||
span.icon.icon-reload(ng-Show="csvUrl")
|
span.icon.icon-reload(ng-Show="csvUrl")
|
||||||
span(ng-Show="csvUrl", translate="ADMIN.CSV.ACTION_REGENERATE")
|
span(ng-Show="csvUrl", translate="ADMIN.CSV.ACTION_REGENERATE")
|
||||||
|
|
Loading…
Reference in New Issue