From df1b57fc39da304ae854846ab0c15b008b21d17a Mon Sep 17 00:00:00 2001 From: Katrin Fischer Date: Sun, 30 Jun 2024 22:04:04 +0000 Subject: [PATCH] Bug 36836: Fix translation issues in ERM module This tries to fix multiple translation issues in the ERM module. This includes: * Making strings translatable * Using double quotes instead of single around strings according to coding guidelines * Fixing some translations where the variable was marked for translation, but not the strings themselves: ...>{{ $__(item.tab_name) }} Amended-by: Jonathan Druart - {{ $__("Uploaded on:") }} + {{ $__("Uploaded on") }}: Signed-off-by: Jonathan Druart --- .../js/vue/components/ERM/AgreementsShow.vue | 7 +++--- .../ERM/EHoldingsEBSCOPackagesShow.vue | 8 ++++--- .../ERM/EHoldingsLocalTitlesFormAdd.vue | 4 ++-- .../ERM/EHoldingsLocalTitlesShow.vue | 4 +++- .../js/vue/components/ERM/LicensesShow.vue | 3 ++- .../prog/js/vue/components/ERM/Main.vue | 2 +- .../UsageStatisticsDataProviderDetails.vue | 6 ++++- .../UsageStatisticsDataProvidersFormAdd.vue | 18 +++++++-------- .../ERM/UsageStatisticsDataProvidersShow.vue | 22 ++++++++++++++---- .../UsageStatisticsDataProvidersSummary.vue | 12 +++++----- .../ERM/UsageStatisticsProviderDataList.vue | 23 ++++++++++--------- .../ERM/UsageStatisticsReportBuilder.vue | 22 +++++++++++------- 12 files changed, 80 insertions(+), 51 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsShow.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsShow.vue index 7b49fe88d67..e21c54c53b2 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsShow.vue +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsShow.vue @@ -262,7 +262,7 @@ agreement_package.package.name }} - (EBSCO) - (local) @@ -303,7 +303,8 @@ {{ document.file_name }} - ({{ document.file_type }}) Uploaded on: + ({{ document.file_type }}) + {{ $__("Uploaded on") }}: {{ format_date(document.uploaded_on) }}
diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsEBSCOPackagesShow.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsEBSCOPackagesShow.vue index b3071af0b32..185cf38554e 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsEBSCOPackagesShow.vue +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsEBSCOPackagesShow.vue @@ -87,9 +87,11 @@
  • - +
  • diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsLocalTitlesFormAdd.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsLocalTitlesFormAdd.vue index 1c211ecdb1b..f9880f583b0 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsLocalTitlesFormAdd.vue +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsLocalTitlesFormAdd.vue @@ -382,8 +382,8 @@
  • - +
    - ({{ document.file_type }}) Uploaded on: + ({{ document.file_type }}) + {{ $__("Uploaded on") }}: {{ format_date(document.uploaded_on) }}
    diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/Main.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/Main.vue index 3eaf6dd4891..f0b06d0ee10 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/Main.vue +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/Main.vue @@ -135,7 +135,7 @@ export default { if (this.config.settings.ERMModule != 1) { return this.setError( this.$__( - 'The e-resource management module is disabled, turn on ERMModule to use it' + "The e-resource management module is disabled, turn on ERMModule to use it" ), false ) diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/UsageStatisticsDataProviderDetails.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/UsageStatisticsDataProviderDetails.vue index 3032b8d6685..86434d2486a 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/UsageStatisticsDataProviderDetails.vue +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/UsageStatisticsDataProviderDetails.vue @@ -17,7 +17,11 @@
  • - {{ usage_data_provider.active ? "Active" : "Inactive" }} + {{ + usage_data_provider.active + ? $__("Active") + : $__("Inactive") + }}
  • diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/UsageStatisticsDataProvidersFormAdd.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/UsageStatisticsDataProvidersFormAdd.vue index b0c35107f54..b9db6ceee5a 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/UsageStatisticsDataProvidersFormAdd.vue +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/UsageStatisticsDataProvidersFormAdd.vue @@ -177,7 +177,7 @@
  • - {{ $__("Sushi credentials") }} + {{ $__("SUSHI credentials") }}
    1. @@ -328,8 +328,8 @@ {{ sushi_service.customer_id_info - ? $__(sushi_service.customer_id_info) - : "No information provided" + ? sushi_service.customer_id_info + : $__("No information provided") }}
    2. @@ -338,8 +338,8 @@ {{ sushi_service.requestor_id_info - ? $__(sushi_service.requestor_id_info) - : "No information provided" + ? sushi_service.requestor_id_info + : $__("No information provided") }}
    3. @@ -348,8 +348,8 @@ {{ sushi_service.api_key_info - ? $__(sushi_service.api_key_info) - : "No information provided" + ? sushi_service.api_key_info + : $__("No information provided") }}
    4. {{ $__(item.tab_name) }}{{ $item.tab_name }}
    {{ - $__(`No ${data_type} data has been harvested for this provider`) + $__("No %s data has been harvested for this provider").format( + data_type + ) }}
    @@ -68,10 +70,9 @@ export default { { used_by: ["title", "platform", "item", "database"], column: { - title: __( + title: this.data_type.charAt(0).toUpperCase() + - this.data_type.slice(1) - ), + this.data_type.slice(1), data: this.data_type, searchable: true, orderable: true, @@ -80,7 +81,7 @@ export default { { used_by: ["item", "database", "platforms"], column: { - title: "Platform", + title: __("Platform"), data: "platform", searchable: true, orderable: true, @@ -89,7 +90,7 @@ export default { { used_by: ["title", "item", "database"], column: { - title: "Publisher", + title: __("Publisher"), data: "publisher", searchable: true, orderable: true, @@ -98,7 +99,7 @@ export default { { used_by: ["title", "database"], column: { - title: "Publisher ID", + title: __("Publisher ID"), data: "publisher_id", searchable: true, orderable: true, @@ -107,7 +108,7 @@ export default { { used_by: ["title"], column: { - title: "DOI", + title: __("DOI"), data: "title_doi", searchable: true, orderable: true, @@ -116,7 +117,7 @@ export default { { used_by: ["title"], column: { - title: "Print ISSN", + title: __("Print ISSN"), data: "print_issn", searchable: true, orderable: true, @@ -125,7 +126,7 @@ export default { { used_by: ["title"], column: { - title: "Online ISSN", + title: __("Online ISSN"), data: "online_issn", searchable: true, orderable: true, @@ -134,7 +135,7 @@ export default { { used_by: ["title"], column: { - title: "URI", + title: __("URI"), data: "title_uri", searchable: true, orderable: true, diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/UsageStatisticsReportBuilder.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/UsageStatisticsReportBuilder.vue index 348ab40c838..32ec3d18a33 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/UsageStatisticsReportBuilder.vue +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/UsageStatisticsReportBuilder.vue @@ -18,21 +18,27 @@ :options="[ { value: 'monthly', - description: 'By month', + description: __('By month'), }, { value: 'monthly_with_totals', - description: - 'By month with period total', + description: __( + 'By month with period total' + ), + }, + { + value: 'yearly', + description: __('By year'), }, - { value: 'yearly', description: 'By year' }, { value: 'metric_type', - description: 'By metric type', + description: __('By metric type'), }, { value: 'usage_data_provider', - description: 'By data provider totals', + description: __( + 'By data provider totals' + ), }, ]" :required="!query.data_display" @@ -219,7 +225,7 @@ class="checkbox_options" > {{ $prop.name }}: