From 4b8c4d045ab58c3b14d7de09dd10eb5d7b818a00 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 Signed-off-by: Owen Leonard --- .../prog/en/modules/acqui/addorderiso2709.tt | 22 +++++-------------- .../prog/en/modules/acqui/duplicate_orders.tt | 2 +- .../prog/en/modules/acqui/invoice.tt | 2 +- .../prog/en/modules/acqui/neworderempty.tt | 2 +- .../prog/en/modules/acqui/orderreceive.tt | 4 ++-- .../prog/en/modules/acqui/parcels.tt | 2 +- .../en/modules/reports/orders_by_budget.tt | 2 +- .../prog/en/modules/suggestion/suggestion.tt | 4 ++-- 8 files changed, 14 insertions(+), 26 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 96a0ae9d82b..2acf4b57d83 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt @@ -250,13 +250,7 @@ >[% budget.b_txt | html %] [% ELSE %] - + [% END %] [% ELSE %] [% IF budget.b_active %] @@ -264,13 +258,7 @@ >[% budget.b_txt | html %] [% ELSE %] - + [% END %] [% END %] [% END %] @@ -418,9 +406,9 @@ [% END %] [% ELSE %] [% IF ( budget_loo.b_id ) == ( item.budget_id ) %] - + [% ELSE %] - + [% END %] [% END %] [% END %] @@ -613,7 +601,7 @@ class="b_inactive" data-sort1-authcat="[% budget_loo.b_sort1_authcat | html %]" data-sort2-authcat="[% budget_loo.b_sort2_authcat | html %]" - >[% budget_loo.b_txt | html %] (inactive)[% budget_loo.b_txt | html %] [% tp('Fund status', '(inactive)') | html %] [% 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 9ce4becaa52..04c81a0fcfa 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 @@ -222,7 +222,7 @@ > [% ELSE %] [% budget_loo.b_txt | html %] [% tp('Fund status', '(inactive)') | html %] [% 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 a083d41e2e3..de8fc77805d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt @@ -531,7 +531,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 e1f9353b549..6efac5f94d1 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt @@ -610,7 +610,7 @@ [% END %] [% 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 e18662c8560..cee8e6cb8a3 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt @@ -290,7 +290,7 @@ [% SET optgroup_label = budget_period.description %] [% IF budget_period.active %] [% SET optgroup_class = "inactive_budget" %] - [% SET optgroup_label = t("{budget_description} (Inactive)", {budget_description = budget_period.description}) %] + [% SET optgroup_label = tp("Budget status", "{budget_description} (Inactive)", {budget_description = budget_period.description}) %] [% END %] @@ -317,7 +317,7 @@ data-sort1-authcat="[% budget_loo.b_sort1_authcat | html %]" data-sort2-authcat="[% budget_loo.b_sort2_authcat | html %]" > - [% level_indent | html %][% budget_loo.b_txt | html %][% IF !budget_loo.b_active %](inactive)[% END %] + [% level_indent | html %][% budget_loo.b_txt | html %][% IF !budget_loo.b_active %][% tp('Fund status', '(inactive)') | html %][% END %] [% 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 81aef2a1f62..939e2ebe49f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcels.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcels.tt @@ -185,7 +185,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 71ae52d44e2..2b10897f611 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 @@ -118,7 +118,7 @@ [% option_class = budgetsloo.active ? "": "b_inactive" %] [% END %] [% 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 c50da2d860a..c06faa394b7 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt @@ -1345,11 +1345,11 @@ [% END %] [% FOREACH budget IN sugg_budgets %] [% IF ( budget.selected ) %] - + [% ELSIF ( budget.b_active ) %] [% ELSE %] - + [% END %] [% END %] -- 2.39.5