Bugzilla – Attachment 178907 Details for
Bug 39045
Add translation context for "Active" and "Inactive"
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 39045: Add translation context to ERM data providers status (active/inactive)
Bug-39045-Add-translation-context-to-ERM-data-prov.patch (text/plain), 5.17 KB, created by
Owen Leonard
on 2025-03-04 12:15:57 UTC
(
hide
)
Description:
Bug 39045: Add translation context to ERM data providers status (active/inactive)
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2025-03-04 12:15:57 UTC
Size:
5.17 KB
patch
obsolete
>From 5db75a881549d7ffabe0a48f28998efc792488cb Mon Sep 17 00:00:00 2001 >From: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> >Date: Thu, 6 Feb 2025 16:36:19 -0500 >Subject: [PATCH] Bug 39045: Add translation context to ERM data providers > status (active/inactive) > >This patch adds translation context to 'Active' and 'Inactive' when used as the status of ERM data providers. > >This patch needs the patch in bug 39061 in order to work properly. > >To test: >1. Enable the ERMModule system preference > 1.1. Go to Administration > System preferences > 1.2. Search for ERMMdoule > 1.3. Choose 'Enable' > 1.4. Click 'Save all E-resource management preferences' >2. Go to E-resource management >3. Click 'Data providers' >4. Click 'New data provider' > --> There should be a Harvester status field with Active and Inactive options >5. Click 'Create manually' >6. Fill out the mandatory fields >7. Click 'Submit' > --> There should be a Status field with value 'Active' >8. Click 'Data providers" > --> The status in the column should be 'Active' >9. Click 'Edit' >10. Change Harvester status to Inactive >11. Click 'Submit' > --> There should be a Status field with value 'Inactive' >12. Click 'Data providers" > --> The status in the column should be 'Inactive' >13. Apply patch >14. Update translations > ktd --shell > gulp po:update --lang fr-CA >15. View the fr-CA-messages.po file > --> There should be entries with 'ERM data provider status' in msgctxt >16. Optionally, translate the strings (remember to remove the fuzzy flag, if any) >17. Install new translations > ktd --root --shell > koha-translate --install fr-CA --dev kohadev >18. Enable the new language in Administration > System preferences > StaffInterfaceLanguages >19. Repeat step 1-12 > --> Translations should be whatever you put in the po file > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >--- > .../ERM/UsageStatisticsDataProviderDetails.vue | 4 ++-- > .../ERM/UsageStatisticsDataProvidersFormAdd.vue | 16 ++++++++++++++-- > .../ERM/UsageStatisticsDataProvidersList.vue | 6 ++++-- > 3 files changed, 20 insertions(+), 6 deletions(-) > >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 c418dd201f9..02f5b760eba 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 >@@ -19,8 +19,8 @@ > <span id="harvester_status"> > {{ > usage_data_provider.active >- ? $__("Active") >- : $__("Inactive") >+ ? $__p("ERM data provider status", "Active") >+ : $__p("ERM data provider status", "Inactive") > }} > </span> > </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 55e1b95d962..8dc6c72f990 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 >@@ -421,8 +421,20 @@ export default { > initialized: false, > previous_route: "", > statuses: [ >- { description: this.$__("Active"), value: 1 }, >- { description: this.$__("Inactive"), value: 0 }, >+ { >+ description: this.$__p( >+ "ERM data provider status", >+ "Active" >+ ), >+ value: 1, >+ }, >+ { >+ description: this.$__p( >+ "ERM data provider status", >+ "Inactive" >+ ), >+ value: 0, >+ }, > ], > registry_data: [], > valid_report_types: [...this.av_report_types], >diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/UsageStatisticsDataProvidersList.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/UsageStatisticsDataProvidersList.vue >index 406b29729ca..d7ff0883839 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/UsageStatisticsDataProvidersList.vue >+++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/UsageStatisticsDataProvidersList.vue >@@ -328,8 +328,10 @@ export default { > { > title: __("Status"), > render: function (data, type, row, meta) { >- const status = row.active ? "Active" : "Inactive"; >- return status; >+ const status = row.active >+ ? __p("ERM data provider status", "Active") >+ : __p("ERM data provider status", "Inactive") >+ return status > }, > searchable: true, > orderable: true, >-- >2.39.5
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 39045
:
177559
|
177560
|
177561
|
177562
|
177590
|
177591
|
177593
|
177595
|
177596
|
177601
|
177711
|
178900
|
178901
|
178902
|
178903
|
178904
|
178905
|
178906
|
178907
|
178908
|
178909
|
183708
|
183709
|
183710
|
183711
|
183712
|
183713
|
183714
|
183715
|
183716