Bugzilla – Attachment 170929 Details for
Bug 36836
Review ERM module for translation issues
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36836: Fix translation issues in ERM module
Bug-36836-Fix-translation-issues-in-ERM-module.patch (text/plain), 22.15 KB, created by
Katrin Fischer
on 2024-09-01 21:03:38 UTC
(
hide
)
Description:
Bug 36836: Fix translation issues in ERM module
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2024-09-01 21:03:38 UTC
Size:
22.15 KB
patch
obsolete
>From 95e65ebd2e8f0aca221c26a8a8cc7bf080b257ea Mon Sep 17 00:00:00 2001 >From: Katrin Fischer <katrin.fischer.83@web.de> >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) }}</a > >To test: >* Apply patch >* Run yarn build >* Make sure you have a clean work space in git >* Run gulp po:update lang de-DE (or another language) >* Verify the strings from the patch set now appear in the po files >--- > .../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 27eee68c05..bce05cde25 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 > }}</router-link > > >- (EBSCO)</span >+ {{ $__("(EBSCO)") }}</span > > > <span v-else > ><router-link >@@ -278,7 +278,7 @@ > agreement_package.package.name > }}</router-link > > >- (local)</span >+ {{ $__("(local)") }}</span > > > </div> > </div> >@@ -303,7 +303,8 @@ > {{ document.file_name }} > <i class="fa fa-download"></i> > </a> >- ({{ document.file_type }}) Uploaded on: >+ ({{ document.file_type }}) >+ {{ $__("Uploaded on:") }} > {{ format_date(document.uploaded_on) }} > </div> > <div v-if="document.physical_location"> >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 b3071af0b3..185cf38554 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 @@ > </li> > > <li> >- <label >- >Titles ({{ erm_package.resources_count }})</label >- > >+ <label>{{ >+ $__("Titles (%s)").format( >+ erm_package.resources_count >+ ) >+ }}</label> > </li> > </ol> > <div v-if="erm_package.resources_count"> >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 1c211ecdb1..f9880f583b 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 @@ > <label for="create_linked_biblio" > >{{ > title.title_id >- ? $__("Update record") >- : $__("Create record") >+ ? $__("Update bibliographic record") >+ : $__("Create bibliographic record") > }}:</label > > > <input >diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsLocalTitlesShow.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsLocalTitlesShow.vue >index fbe7ac2752..c11003a6a3 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsLocalTitlesShow.vue >+++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsLocalTitlesShow.vue >@@ -240,7 +240,9 @@ > </span> > </li> > <li> >- <label>Packages ({{ title.resources.length }})</label> >+ <label>{{ >+ $__("Packages (%s)").format(title.resources.length) >+ }}</label> > <div v-if="title.resources.length"> > <EHoldingsTitlePackagesList > :resources="title.resources" >diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/LicensesShow.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/LicensesShow.vue >index 400267c08f..f7303cd131 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/LicensesShow.vue >+++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/LicensesShow.vue >@@ -117,7 +117,8 @@ > {{ document.file_name }} > <i class="fa fa-download"></i> > </a> >- ({{ document.file_type }}) Uploaded on: >+ ({{ document.file_type }}) >+ {{ $__("Uploaded on:") }} > {{ format_date(document.uploaded_on) }} > </div> > <div v-if="document.physical_location"> >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 3eaf6dd489..f0b06d0ee1 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 <a href="/cgi-bin/koha/admin/preferences.pl?tab=&op=search&searchfield=ERMModule">ERMModule</a> to use it' >+ "The e-resource management module is disabled, turn on <a href='/cgi-bin/koha/admin/preferences.pl?tab=&op=search&searchfield=ERMModule'>ERMModule</a> 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 9190f5834a..ce569a0864 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 @@ > <li> > <label>{{ $__("Status") }}:</label> > <span id="harvester_status"> >- {{ usage_data_provider.active ? "Active" : "Inactive" }} >+ {{ >+ usage_data_provider.active >+ ? $__("Active") >+ : $__("Inactive") >+ }} > </span> > </li> > <li> >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 ab042e8f62..d117358796 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 >@@ -168,7 +168,7 @@ > </li> > </ol> > </fieldset> >- <legend>{{ $__("Sushi credentials") }}</legend> >+ <legend>{{ $__("SUSHI credentials") }}</legend> > <fieldset class="rows credentials"> > <ol class="credentials_form"> > <li> >@@ -319,8 +319,8 @@ > </label> > <span id="customer_id_info">{{ > sushi_service.customer_id_info >- ? $__(sushi_service.customer_id_info) >- : "No information provided" >+ ? sushi_service.customer_id_info >+ : $__("No information provided") > }}</span> > </li> > <li> >@@ -329,8 +329,8 @@ > </label> > <span id="requestor_id_info">{{ > sushi_service.requestor_id_info >- ? $__(sushi_service.requestor_id_info) >- : "No information provided" >+ ? sushi_service.requestor_id_info >+ : $__("No information provided") > }}</span> > </li> > <li> >@@ -339,8 +339,8 @@ > </label> > <span id="api_key_info">{{ > sushi_service.api_key_info >- ? $__(sushi_service.api_key_info) >- : "No information provided" >+ ? sushi_service.api_key_info >+ : $__("No information provided") > }}</span> > </li> > <span >@@ -412,8 +412,8 @@ export default { > initialized: false, > previous_route: "", > statuses: [ >- { description: "Active", value: 1 }, >- { description: "Inactive", value: 0 }, >+ { description: __("Active"), value: 1 }, >+ { description: __("Inactive"), value: 0 }, > ], > registry_data: [], > valid_report_types: [...this.av_report_types], >diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/UsageStatisticsDataProvidersShow.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/UsageStatisticsDataProvidersShow.vue >index 1643dbc91a..543f171165 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/UsageStatisticsDataProvidersShow.vue >+++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/UsageStatisticsDataProvidersShow.vue >@@ -58,7 +58,7 @@ > v-bind:class=" > tab_content === item.data_type ? 'active' : '' > " >- >{{ $__(item.tab_name) }}</a >+ >{{ $item.tab_name }}</a > > > </li> > <li class="nav-item"> >@@ -162,10 +162,22 @@ export default { > initialized: false, > tab_content: "detail", > available_data_types: [ >- { test: "TR", data_type: "title", tab_name: "Titles" }, >- { test: "PR", data_type: "platform", tab_name: "Platforms" }, >- { test: "IR", data_type: "item", tab_name: "Items" }, >- { test: "DR", data_type: "database", tab_name: "Databases" }, >+ { >+ test: "TR", >+ data_type: "title", >+ tab_name: this.$__("Titles"), >+ }, >+ { >+ test: "PR", >+ data_type: "platform", >+ tab_name: this.$__("Platforms"), >+ }, >+ { test: "IR", data_type: "item", tab_name: this.$__("Items") }, >+ { >+ test: "DR", >+ data_type: "database", >+ tab_name: this.$__("Databases"), >+ }, > ], > } > }, >diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/UsageStatisticsDataProvidersSummary.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/UsageStatisticsDataProvidersSummary.vue >index 6db374a523..92804039f5 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/UsageStatisticsDataProvidersSummary.vue >+++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/UsageStatisticsDataProvidersSummary.vue >@@ -100,7 +100,7 @@ export default { > render: function (data, type, row, meta) { > const date = row[`earliest_${data_type}`] > ? row[`earliest_${data_type}`] >- : "N/A" >+ : this.$__("N/A") > return date > }, > }, >@@ -112,7 +112,7 @@ export default { > render: function (data, type, row, meta) { > const date = row[`latest_${data_type}`] > ? row[`latest_${data_type}`] >- : "N/A" >+ : this.$__("N/A") > return date > }, > } >@@ -132,13 +132,13 @@ export default { > return cell > }) > cellTwo.colSpan = 2 >- cellTwo.innerHTML = "Title reports" >+ cellTwo.innerHTML = this.$__("Title reports") > cellThree.colSpan = 2 >- cellThree.innerHTML = "Platform reports" >+ cellThree.innerHTML = this.$__("Platform reports") > cellFour.colSpan = 2 >- cellFour.innerHTML = "Database reports" >+ cellFour.innerHTML = this.$__("Database reports") > cellFive.colSpan = 2 >- cellFive.innerHTML = "Item reports" >+ cellFive.innerHTML = this.$__("Item reports") > > this.$refs.table_div.classList.remove("hide-table") > }, >diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/UsageStatisticsProviderDataList.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/UsageStatisticsProviderDataList.vue >index f3bdf85f75..505607b492 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/UsageStatisticsProviderDataList.vue >+++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/UsageStatisticsProviderDataList.vue >@@ -6,7 +6,9 @@ > </div> > <div v-else-if="initialized" class="alert alert-info"> > {{ >- $__(`No ${data_type} data has been harvested for this provider`) >+ $__("No %s data has been harvested for this provider").format( >+ data_type >+ ) > }} > </div> > </div> >@@ -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 348ab40c83..32ec3d18a3 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" > > > <label :for="prop.name" class="checkbox" >- >{{ $__(prop.name) }}:</label >+ >{{ $prop.name }}:</label > > > <input > type="checkbox" >@@ -304,7 +310,7 @@ > class="month_selectors" > > > <label for="month" class="month_labels"> >- {{ $__(month.short) }} >+ {{ $month.short }} > </label> > <input > type="checkbox" >-- >2.39.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 36836
:
170929
|
173261
|
174839
|
174887