Bugzilla – Attachment 183715 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 fund status (inactive)
Bug-39045-Add-translation-context-to-fund-status-i.patch (text/plain), 20.07 KB, created by
Owen Leonard
on 2025-07-02 17:52:20 UTC
(
hide
)
Description:
Bug 39045: Add translation context to fund status (inactive)
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2025-07-02 17:52:20 UTC
Size:
20.07 KB
patch
obsolete
>From 90e59a405212c9ab98ccfe48d80f1918b6cd95c1 Mon Sep 17 00:00:00 2001 >From: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> >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 <oleonard@myacpl.org> >--- > .../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 d0e834b57a3..b4e3ad92ab6 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 %]</option > > > [% ELSE %] >- <option >- value="[% budget.b_id | html %]" >- data-sort1-authcat="[% budget.b_sort1_authcat | html %]" >- data-sort2-authcat="[% budget.b_sort2_authcat | html %]" >- selected="selected" >- >[% budget.b_txt | html %] (inactive)</option >- > >+ <option value="[% budget.b_id | html %]" data-sort1-authcat="[% budget.b_sort1_authcat | html %]" data-sort2-authcat="[% budget.b_sort2_authcat | html %]" selected="selected">[% budget.b_txt | html %] [% tp('Fund status', '(inactive)') | html %]</option> > [% END %] > [% ELSE %] > [% IF budget.b_active %] >@@ -264,13 +258,7 @@ > >[% budget.b_txt | html %]</option > > > [% ELSE %] >- <option >- value="[% budget.b_id | html %]" >- class="b_inactive" >- data-sort1-authcat="[% budget.b_sort1_authcat | html %]" >- data-sort2-authcat="[% budget.b_sort2_authcat | html %]" >- >[% budget.b_txt | html %] (inactive)</option >- > >+ <option value="[% budget.b_id | html %]" class="b_inactive" data-sort1-authcat="[% budget.b_sort1_authcat | html %]" data-sort2-authcat="[% budget.b_sort2_authcat | html %]">[% budget.b_txt | html %] [% tp('Fund status', '(inactive)') | html %]</option> > [% END %] > [% END %] > [% END %] >@@ -418,9 +406,9 @@ > [% END %] > [% ELSE %] > [% IF ( budget_loo.b_id ) == ( item.budget_id ) %] >- <option value="[% budget_loo.b_id | html %]" class="buget_item_inactive" selected="selected">[% budget_loo.b_txt | html %] (inactive)</option> >+ <option value="[% budget_loo.b_id | html %]" class="buget_item_inactive" selected="selected">[% budget_loo.b_txt | html %] [% tp('Fund status', '(inactive)') | html %]</option> > [% ELSE %] >- <option value="[% budget_loo.b_id | html %]" class="budget_item_inactive">[% budget_loo.b_txt | html %] (inactive)</option> >+ <option value="[% budget_loo.b_id | html %]" class="budget_item_inactive">[% budget_loo.b_txt | html %] [% tp('Fund status', '(inactive)') | html %]</option> > [% 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)</option >+ >[% budget_loo.b_txt | html %] [% tp('Fund status', '(inactive)') | html %]</option > > > [% 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 c2aa5452452..c64515b2e4b 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 %] > <option value="[% budget_loo.b_id | html %]" 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)</option >+ >[% budget_loo.b_txt | html %] [% tp('Fund status', '(inactive)') | html %]</option > > > [% 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 91ef1acade2..7a35bfa283c 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 ) %] > <option value="[% budget.b_id | html %]" data-sort1-authcat="[% budget.b_sort1_authcat | html %]" data-sort2-authcat="[% budget.b_sort2_authcat | html %]">[% budget.b_txt | html %]</option> > [% ELSE %] >- <option value="[% budget.b_id | html %]" class="b_inactive" data-sort1-authcat="[% budget.b_sort1_authcat | html %]" data-sort2-authcat="[% budget.b_sort2_authcat |html %]">[% budget.b_txt | html %] (inactive)</option> >+ <option value="[% budget.b_id | html %]" class="b_inactive" data-sort1-authcat="[% budget.b_sort1_authcat | html %]" data-sort2-authcat="[% budget.b_sort2_authcat |html %]">[% budget.b_txt | html %] [% tp('Fund status', '(inactive)') | html %]</option> > [% END %] > [% END # /FOREACH budget %] > </select> >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 5516e05f1c8..53bf6452c51 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 %] > > <option value="[% budget_loo.b_id | html %]" class="[% bdgclass | html %]" 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 %] > </option> > [% END %] > </select> >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 b36f1d39b92..8d055edc4be 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 %] > > <optgroup class="inactive_budget" label="[% optgroup_label | html %]"> >@@ -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 %] > </option> > [% END %] > </optgroup> >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 08b89893a13..70809a9b734 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcels.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcels.tt >@@ -186,7 +186,7 @@ > [% IF ( budget.b_active ) %] > <option value="[% budget.b_id | html %]">[% budget.b_txt | html %]</option> > [% ELSE %] >- <option value="[% budget.b_id | html %]" class="b_inactive">[% budget.b_txt | html %] (inactive)</option> >+ <option value="[% budget.b_id | html %]" class="b_inactive">[% budget.b_txt | html %] [% tp('Fund status', '(inactive)') | html %]</option> > [% END %] > [% END %] > </select> >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 %] > <option value="[% budgetsloo.value | html %]" class="[% option_class | html %]" [% IF budgetsloo.selected %]selected="selected"[% END %]> >- [% budgetsloo.description | html %] [% IF !budgetsloo.active %]<span>(inactive)</span>[% END %] >+ [% budgetsloo.description | html %] [% IF !budgetsloo.active %]<span>[% tp('Fund status', '(inactive)') | html %]</span>[% END %] > </option> > [% END %] > </select> >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 c6b25551d24..05a7019f019 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt >@@ -1220,11 +1220,11 @@ > [% END %] > [% FOREACH budget IN sugg_budgets %] > [% IF ( budget.selected ) %] >- <option value="[% budget.b_id | html %]" selected="selected">[% budget.b_txt | html %] [% IF ( !budget.b_active ) %](inactive)[% END %]</option> >+ <option value="[% budget.b_id | html %]" selected="selected">[% budget.b_txt | html %] [% IF ( !budget.b_active ) %][% tp('Fund status', '(inactive)') | html %][% END %]</option> > [% ELSIF ( budget.b_active ) %] > <option value="[% budget.b_id | html %]">[% budget.b_txt | html %]</option> > [% ELSE %] >- <option value="[% budget.b_id | html %]" class="b_inactive">[% budget.b_txt | html %] (inactive)</option> >+ <option value="[% budget.b_id | html %]" class="b_inactive">[% budget.b_txt | html %] [% tp('Fund status', '(inactive)') | html %]</option> > [% END %] > [% END %] > </select> >-- >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