From 283c0e29e5fd0ef47d563b0ecb84cc3119b760a3 Mon Sep 17 00:00:00 2001 From: Caroline Cyr La Rose Date: Mon, 10 Feb 2025 15:41:12 -0500 Subject: [PATCH] Bug 39045: Add translation context to fund status (inactive) This patch adds translation context to '(inactive)' when used for the fund status in acquisitions. To test: 1. Create an inactive budget and fund 1.1. Go to Administration > Budgets 1.2. Click 'New budget' 1.3. Fill out the mandatory fields and the total amount, DO NOT check the 'Make budget active' box 1.4. Click 'Save' 1.5. Click 'Inactive budgets' 1.6. Next to the new budget, click 'Actions' > 'Add fund' 1.7. Fill out the mandatory fields 1.8. Click 'Submit' 2. Create a suggestion and link it to an inactive fund 2.1. Go to Acquisitions > Suggestions 2.2. Click 'New purchase suggestion' 2.3. Fill out the title 2.4. Under 'Acquisition information', check 'Show inactive' 2.5. Open the 'Fund' dropdown --> There should be your new fund with (inactive) next to it 2.6. Choose the inactive fund 2.7. Click 'Submit your suggestion' 3. Create an order from new file, link it to an inactive fund 3.1. Go to Acquisitions 3.2. Click 'Search' under 'Search vendors' 3.3. Click 'Add to basket' next to 'My basket' 3.4. Click 'From a new file' 3.5. Choose a MARC file (I attached an example if necessary) 3.6. Click 'Upload file' 3.7. Click 'Stage for import' 3.8. Click 'Add staged files to basket' 3.9. Click 'Default accounting details' 3.10. Check 'Show inactive' next to the fund dropdown 3.11. Open the 'Fund' dropdown --> There should be your new fund with (inactive) next to it 3.12. Choose the inactive fund 3.13. Click 'Item information' 3.14. Fill out the 'y - Koha item type' field 3.15. Click 'Select to import' 3.16. Check the 'Show inactive funds' box 3.17. Check the box next to the record 3.18. Open the 'Fund' dropdown --> There should be your new fund with (inactive) next to it 3.19. Enter a price 3.20. Click 'Save' **Note: there are 5 occurrences of "(inactive)" in that page, but I only found those two...** 4. Create a duplicate order 4.1. Click 'Add to basket' 4.2. Click 'From existing orders (copy)' 4.3. Search for the previous order 4.4. Check the box next to the order 4.5. Click 'Next ->' 4.6. Check 'Show inactive' next to the fund dropdown 4.7. Open the 'Fund' dropdown --> There should be your new fund with (inactive) next to it 4.8. Choose the inactive fund 4.9. Click 'Duplicate orders' 5. Create an order from an empty record 5.1. Click 'Add to basket' 5.2. Click 'From a new (empty) record' 5.3. Fill out catalog details (at least the title) 5.4. Fill out the 'y - Koha item type' field 5.5. Check 'Show inactive' next to the fund dropdown 5.6. Open the 'Fund' dropdown --> There should be your new fund with (inactive) next to it 5.7. Choose the inactive fund 5.8. Enter a vendor price 5.9. Click 'Save' 6. Close the basket and receive the orders 6.1. Click 'Close basket' 6.2. Click 'Yes, close (Y)' 6.3. Click 'Receive shipments' 6.4. Enter a vendor invoice number 6.5. Check 'Show inactive' 6.6. Open the 'Fund' dropdown --> There should be your new fund with (inactive) next to it 6.7. Click 'Next' 6.8. Click 'Receive' next to an order 6.9. Check 'Show inactive' 6.10. Open the 'Fund' dropdown --> There should be your budget with (Inactive) next to it --> There should be your new fund with (inactive) next to it 6.11. Choose the inactive fund 6.12. Check 'Receive?' 6.13. Click 'Confirm' 6.14. Click 'Finish receiving' 6.15. Click 'Show inactive' next to 'Shipping fund' --> There should be your new fund with (inactive) next to it 7. View Orders by fund report 7.1. Go to Reports > Orders by fund 7.2. Check 'Show inactive' 7.3. Open the 'Fund' dropdown --> There should be your new fund with (inactive) next to it 8. Apply patch 9. Update translations ktd --shell gulp po:update --lang fr-CA 10. View the fr-CA-messages.po file --> There should be entries with 'Fund status' and one entry with 'Budget status' in msgctxt 11. Optionally, translate the strings (remember to remove the fuzzy flag, if any) 12. Install new translations ktd --root --shell koha-translate --install fr-CA --dev kohadev 13. Enable the new language in Administration > System preferences > StaffInterfaceLanguages 14. Repeat steps 1-7 --> Translations should be whatever you put in the po file --- .../prog/en/modules/acqui/addorderiso2709.tt | 10 +++++----- .../prog/en/modules/acqui/duplicate_orders.tt | 2 +- .../intranet-tmpl/prog/en/modules/acqui/invoice.tt | 2 +- .../prog/en/modules/acqui/neworderempty.tt | 2 +- .../prog/en/modules/acqui/orderreceive.tt | 4 ++-- .../intranet-tmpl/prog/en/modules/acqui/parcels.tt | 2 +- .../prog/en/modules/reports/orders_by_budget.tt | 2 +- .../prog/en/modules/suggestion/suggestion.tt | 4 ++-- 8 files changed, 14 insertions(+), 14 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt index 06949b61ba..a7bccd9e38 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt @@ -219,11 +219,11 @@ [% IF budget.b_active %] [% ELSE %] - + [% END %] [% ELSE %] [% IF budget.b_active %] - [% ELSE %] + [% ELSE %] [% END %] [% END %] [% END %] @@ -355,9 +355,9 @@ [% END %] [% ELSE %] [% IF ( budget_loo.b_id ) == ( item.budget_id ) %] - + [% ELSE %] - + [% END %] [% END %] [% END %] @@ -510,7 +510,7 @@ [% IF ( budget_loo.b_active ) %] [% ELSE %] - + [% END %] [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/duplicate_orders.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/duplicate_orders.tt index 3c854eb4c8..1bfe2ab03d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/duplicate_orders.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/duplicate_orders.tt @@ -213,7 +213,7 @@ [% FOREACH budget_loo IN budget_loop %] [% IF ( budget_loo.b_active ) %] - [% ELSE %] + [% ELSE %] [% END %] [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt index 13e86a8fd1..cffad318dc 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt @@ -535,7 +535,7 @@ [% IF ( budget.b_active ) %] [% ELSE %] - + [% END %] [% END # /FOREACH budget %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt index 5cf600951c..d682042481 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt @@ -621,7 +621,7 @@ [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt index 3c3aa4c64b..067547d295 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt @@ -302,7 +302,7 @@ [% IF budget_period.active %] [% ELSE %] - + [% END %] [% FOREACH budget_loo IN budget_period.funds %] [% level_indent_cnt = 0 %] @@ -321,7 +321,7 @@ [% bdgclass=budget_loo.b_active? "": "inactive_budget" | html %] [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcels.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcels.tt index 271a4ce2c1..6c00b078a3 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcels.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcels.tt @@ -183,7 +183,7 @@ [% IF ( budget.b_active ) %] [% ELSE %] - + [% END %] [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/orders_by_budget.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/orders_by_budget.tt index e4e994afd2..36c2110c1a 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/orders_by_budget.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/orders_by_budget.tt @@ -117,7 +117,7 @@ [% bdgclass=budgetsloo.active? "": "b_inactive" | html %] [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt index 79687304bf..49a26dfd22 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt @@ -1298,11 +1298,11 @@ [% END %] [% FOREACH budget IN sugg_budgets %] [% IF ( budget.selected ) %] - + [% ELSIF ( budget.b_active ) %] [% ELSE %] - + [% END %] [% END %] -- 2.43.0