Bug 26398 - Credit and Debit types on creating a manual credits and manual invoices are not translatable
Summary: Credit and Debit types on creating a manual credits and manual invoices are n...
Status: Pushed to master
Alias: None
Product: Koha
Classification: Unclassified
Component: I18N/L10N (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Martin Renvoize
QA Contact: Testopia
URL:
Keywords: regression
Depends on: 23049 23805
Blocks: 24381
  Show dependency treegraph
 
Reported: 2020-09-06 11:56 UTC by Katrin Fischer
Modified: 2020-11-16 20:39 UTC (History)
8 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:
20.11.00


Attachments
Bug 26398: Restore translations for credit/debit type dropdown (6.79 KB, patch)
2020-09-07 12:09 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 26398: Restore translations for credit/debit type dropdown (6.79 KB, patch)
2020-10-05 10:57 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 26398: Restore translations for credit/debit type dropdown (6.86 KB, patch)
2020-10-16 16:14 UTC, Caroline Cyr La Rose
Details | Diff | Splinter Review
Bug 26398: Restore translations for credit/debit type dropdown (7.90 KB, patch)
2020-10-17 11:53 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 26398: Restore translations for credit/debit type dropdown (8.00 KB, patch)
2020-11-02 14:54 UTC, Martin Renvoize
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Katrin Fischer 2020-09-06 11:56:55 UTC
The "Credit type" pull down on the "Manual credit" page contains untranslatable values.

To test:
- Make sure another language than English is installed (tested with de-DE)
- Go to any patron account
- Accounting tab
- Create manual credit tab
- Verify the credit type pull down is there
- Switch language to non-English
- Verify the values remain in English
Comment 1 Martin Renvoize 2020-09-07 09:30:54 UTC
This also applies to the debit type dropdown in Manual invoice.

I think I was waiting on bug 24975 to base work on to make this more flexible with regards translations.

I think it could be done, but wouldn't be trivial, using the existing template level include translations (the challenge is that the dropdown is built from a list of credit_types/debit_types whereas the existing template include is designed to receive accountline rows).
Comment 2 Katrin Fischer 2020-09-07 11:21:32 UTC
It is a regression to previous versions. We should at least catch the default Forgiven and Credit on template level for translations.
Comment 3 Martin Renvoize 2020-09-07 12:09:34 UTC
Created attachment 109701 [details] [review]
Bug 26398: Restore translations for credit/debit type dropdown
Comment 4 David Nind 2020-10-03 07:53:05 UTC
Patch no longer applies 8-(..
Comment 5 Martin Renvoize 2020-10-05 10:57:48 UTC
Created attachment 111219 [details] [review]
Bug 26398: Restore translations for credit/debit type dropdown
Comment 6 David Nind 2020-10-06 13:57:02 UTC
The values are still in English after applying for me, I'm sure I'm missing something for testing this one...
Comment 7 Martin Renvoize 2020-10-08 05:44:58 UTC
This one is a bit challenging for me to write a test plan as I only just understand the translation workflow myself.

What the patch does is update the templates to include the English strings for translation in the right places.

Regression tests
* Create some debts and payments of various types.
* Check that they appear as expected in the accounts tables on both the transactions and pay tabs of the members page.

Bug fix test
* We need to check that the strings appear in .po files. I believe this is a case of running the 'update' method of misc/translator/translator script.
* The final aim of the bug is to make the drop-down options for manual invoice and manual credit type drop downs are translated.

Katrin, perhaps you could lend a hand on how this can be properly tested?
Comment 8 Caroline Cyr La Rose 2020-10-16 16:11:35 UTC
Ok, here's what I did to test

1) run ./translate update xx-XX
2) Translate this big chunk in your xx-XX-staff-prog.po or make sure it's translated

#: intranet-tmpl/prog/en/includes/accounts.inc:2
#, c-format
msgid ""
"%s %s %sPayment %sWriteoff %sForgiven %sCredit %sLost item fee refund "
"%sRefund %s%s %s %s %s %sAccount creation fee %sAccount renewal fee %sLost "
"item %sManual fee %sNew card %sFine %sLost item processing fee %sRental fee "
"%sDaily rental fee %sRenewal of rental item %sRenewal of daily rental item "
"%sHold fee %sHold waiting too long %sPayout %s%s %s %s %s "

(tip: I search the po file for "Forgiven", there are only two occurrences)

3) run ./translate install xx-XX
4) In your staff interface in your other language, go to a patron's account > Accounting > Create manual Credit
5) Check that the values in the credit drop down are in English
6) Apply patch
7) redo steps 1-4 (careful, the string to be translated changes)
8) Do a hard refresh (Ctrl+F5) (I guess you'd have to restart plack if you have it)
9) Values in the credit drop down are translated
Comment 9 Caroline Cyr La Rose 2020-10-16 16:14:04 UTC
Created attachment 111928 [details] [review]
Bug 26398: Restore translations for credit/debit type dropdown

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Comment 10 Martin Renvoize 2020-10-16 17:28:07 UTC
That's a great test plan Caroline, thanks, I shall grab it for other similar bugs.. thanks so much for t sting and moving this on. 😀
Comment 11 Katrin Fischer 2020-10-17 11:53:20 UTC
Created attachment 111941 [details] [review]
Bug 26398: Restore translations for credit/debit type dropdown

1) run ./translate update xx-XX
2) Translate this big chunk in your xx-XX-staff-prog.po or make sure it's translated

msgid ""
"%s %s %sPayment %sWriteoff %sForgiven %sCredit %sLost item fee refund "
"%sRefund %s%s %s %s %s %sAccount creation fee %sAccount renewal fee %sLost "
"item %sManual fee %sNew card %sFine %sLost item processing fee %sRental fee "
"%sDaily rental fee %sRenewal of rental item %sRenewal of daily rental item "
"%sHold fee %sHold waiting too long %sPayout %s%s %s %s %s "

(tip: I search the po file for "Forgiven", there are only two occurrences)

3) run ./translate install xx-XX
4) In your staff interface in your other language, go to a patron's account > Accounting > Create manual Credit
5) Check that the values in the credit drop down are in English
6) Apply patch
7) redo steps 1-4 (careful, the string to be translated changes)
8) Do a hard refresh (Ctrl+F5) (I guess you'd have to restart plack if you have it)
9) Values in the credit drop down are translated

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 12 Jonathan Druart 2020-11-02 10:10:32 UTC
CONFLICT (content): Merge conflict in koha-tmpl/intranet-tmpl/prog/en/includes/accounts.inc

Please rebase.
Comment 13 Martin Renvoize 2020-11-02 14:54:16 UTC
Created attachment 112844 [details] [review]
Bug 26398: Restore translations for credit/debit type dropdown

1) run ./translate update xx-XX
2) Translate this big chunk in your xx-XX-staff-prog.po or make sure it's translated

msgid ""
"%s %s %sPayment %sWriteoff %sForgiven %sCredit %sLost item fee refund "
"%sRefund %s%s %s %s %s %sAccount creation fee %sAccount renewal fee %sLost "
"item %sManual fee %sNew card %sFine %sLost item processing fee %sRental fee "
"%sDaily rental fee %sRenewal of rental item %sRenewal of daily rental item "
"%sHold fee %sHold waiting too long %sPayout %s%s %s %s %s "

(tip: I search the po file for "Forgiven", there are only two occurrences)

3) run ./translate install xx-XX
4) In your staff interface in your other language, go to a patron's account > Accounting > Create manual Credit
5) Check that the values in the credit drop down are in English
6) Apply patch
7) redo steps 1-4 (careful, the string to be translated changes)
8) Do a hard refresh (Ctrl+F5) (I guess you'd have to restart plack if you have it)
9) Values in the credit drop down are translated

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 14 Jonathan Druart 2020-11-03 09:58:49 UTC
Pushed to master for 20.11, thanks to everybody involved!
Comment 15 Lucas Gass 2020-11-16 20:39:06 UTC
does not apply clean 20.05.x, no backport