Bug 26697 - Make translation file for types and descriptions of charges consistent between OPAC and staff
Summary: Make translation file for types and descriptions of charges consistent betwee...
Status: Pushed to master
Alias: None
Product: Koha
Classification: Unclassified
Component: I18N/L10N (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Martin Renvoize
QA Contact: Testopia
URL:
Keywords:
Depends on: 24603
Blocks: 14825
  Show dependency treegraph
 
Reported: 2020-10-15 18:14 UTC by Katrin Fischer
Modified: 2020-11-20 20:21 UTC (History)
5 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 26697: Make account.inc consistent between staff and opac (7.90 KB, patch)
2020-10-16 14:58 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 26697: Make account.inc consistent between staff and opac (8.40 KB, patch)
2020-10-16 15:33 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 26697: Make account.inc consistent between staff and opac (8.48 KB, patch)
2020-10-17 11:18 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 26697: Make account.inc consistent between staff and opac (8.53 KB, patch)
2020-10-20 21:51 UTC, Caroline Cyr La Rose
Details | Diff | Splinter Review
Bug 26697: Make account.inc consistent between staff and opac (12.49 KB, patch)
2020-11-05 10:38 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-10-15 18:14:57 UTC
When lookin at the "your charges" tab in the OPAC the types and descriptions all remain in English when switching to another language. In the staff interface, this already works better.

I believe we might be missing something like koha-tmpl/intranet-tmpl/prog/en/includes/accounts.inc or the OPAC.
Comment 1 Martin Renvoize 2020-10-16 14:53:27 UTC
I just tried with fr-FR and most of the strings are just not translated yet, but they are pulled in as expected from the include file.

However, I could pull the blocks out into their own include to match that of the staff client and make it easier to maintain the sync between the two... there are some disparities already :(
Comment 2 Martin Renvoize 2020-10-16 14:58:15 UTC
Created attachment 111895 [details] [review]
Bug 26697: Make account.inc consistent between staff and opac
Comment 3 Martin Renvoize 2020-10-16 15:33:20 UTC
Created attachment 111915 [details] [review]
Bug 26697: Make account.inc consistent between staff and opac
Comment 4 Caroline Cyr La Rose 2020-10-16 19:42:43 UTC
I am not able to replicate the original problem. 

I did:

1) ./translate update fr-CA
2) opened fr-CA-opac-bootstrap.po and translated this part 

#: opac-tmpl/bootstrap/en/includes/account-table.inc:174
#, 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 %s%s %s %s %s "

3) ./translate install fr-CA
4) Found a patron with various charges and logged in as them in the OPAC
5) went into My charges (in fr-CA)

The charge types were in french.

Maybe some are missing like you said, but the ones that were in my patrons account were all ok.
Comment 5 Caroline Cyr La Rose 2020-10-16 19:44:53 UTC
I also tried to apply the patch to see if something changed, but it doesn't apply
Comment 6 Katrin Fischer 2020-10-17 11:18:58 UTC
Created attachment 111939 [details] [review]
Bug 26697: Make account.inc consistent between staff and opac

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 7 Katrin Fischer 2020-10-17 11:19:36 UTC
Hi Caroline, it applies ok for me if I apply the dependent bug first. I've tested and signed off, but if you could try again, we could count mine for QA.
Comment 8 Martin Renvoize 2020-10-19 13:42:23 UTC
I have a feeling you tested this just prior to me adding the dependency in Caroline.. it should all apply OK now, as Katrin verifies and I've also just checked again myself.. Many thanks for testing :)
Comment 9 Caroline Cyr La Rose 2020-10-20 21:38:56 UTC
I was able to apply the patch by applying the dependent patch first. Thanks for your help.

However, I was still not able to replicate the original problem. The charges were in French in the OPAC. There were two new terms in the .po file after I applied the patches, but I'm not sure if they come from this one or the other one.

I'm not sure I'm comfortable signing off as I was not able to see if it solved your original problem.
Comment 10 Katrin Fischer 2020-10-20 21:44:34 UTC
The initial problem turned out non-existing (I just forgot to translate...) So the goal was changed a little just to make the files where the translations stem from the same betwene staff and OPAC, so it will be easier to keep them in sync. 

If nothing breaks - it's good :)
Comment 11 Caroline Cyr La Rose 2020-10-20 21:51:06 UTC
Created attachment 112077 [details] [review]
Bug 26697: Make account.inc consistent between staff and opac

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Comment 12 Katrin Fischer 2020-10-20 23:43:05 UTC
Counting me for QA now.
Comment 13 Jonathan Druart 2020-11-05 08:29:55 UTC
error: sha1 information is lacking or useless (koha-tmpl/intranet-tmpl/prog/en/includes/accounts.inc).

Please rebase.
Comment 14 Martin Renvoize 2020-11-05 10:38:55 UTC
Created attachment 113067 [details] [review]
Bug 26697: Make account.inc consistent between staff and opac

Test plan - Regression
1/ Login to the OPAC as a user with various account charges and payments.
2/ Navigate to the 'Your charges' page.
3/ Compare the display of the table before and after applying the
patchset. They should match.

Test plan - Sync
1/ Compare koha-tmpl/intranet-tmpl/prog/en/includes/accounts.inc with
koha-tmpl/opac-tmpl/bootstrap/en/includes/accounts.inc.
2/ They files should match after the patch is applied.

Test plan - Translation
1) ./translate update fr-CA
2) Open fr-CA-opac-bootstrap.po and translated this part

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 %s%s %s %s %s "

3) ./translate install fr-CA
4) Login to the OPAC as a patron with various charges
5) Check 'My charges' (in fr-CA) to confirm the translations have been
   picked up.

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 15 Martin Renvoize 2020-11-05 10:39:17 UTC
Rebased
Comment 16 Jonathan Druart 2020-11-09 10:51:54 UTC
Still not applying.
To prevent such rebases that would be good to have dependencies on bug when they affect the same file.

CONFLICT (content): Merge conflict in koha-tmpl/opac-tmpl/bootstrap/en/includes/account-table.inc
CONFLICT (content): Merge conflict in koha-tmpl/intranet-tmpl/prog/en/includes/accounts.inc

Looks trivial but I'd prefer someone else doing it.
Comment 17 Martin Renvoize 2020-11-09 15:22:57 UTC
Hmm.. this applies fine for me assuming you applied the dependency bug 24603 first...
Comment 18 Jonathan Druart 2020-11-10 14:00:54 UTC
Pushed to master for 20.11, thanks to everybody involved!
Comment 19 Lucas Gass 2020-11-16 22:30:04 UTC
enhancement will not be backported to 20.05.x