Bug 28240 - Some classes in register.tt are translatable
Summary: Some classes in register.tt are translatable
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: I18N/L10N (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-04-27 20:40 UTC by Caroline Cyr La Rose
Modified: 2021-06-15 10:51 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Screenshot of register.pl in French (30.73 KB, image/png)
2021-04-27 21:20 UTC, Caroline Cyr La Rose
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Caroline Cyr La Rose 2021-04-27 20:40:29 UTC
Hiya!

I usually whine because things are not translatable, but today I will whine because something is translatable. Hehe! 

I don't know if this is something that is meant to be this way or not, but the classes for "debit" and "credit" in register.tt are translatable, which means that, if translated, it prevents the colours from appearing. It's not the end of the world, but I was surprised when I switched to English and saw the red and green for debits and credits. 

To test:
1) Set up your system to use cash registers
(mine was already set up, so I'm doing this from memory)
  - In system preferences, enable UseCashRegisters
  - In Administration > Cash registers, set up a cash register
  - In Administration > Authorized values > PAYMENT_TYPE, add some payment types
2) Make some transactions
  - In a patron's file add some manual fees
  - Pay some fees, write off some others
3) Go to Tools > Cashup registers 
4) Click on the register name <-- Notice debits are red and credits are green
5) Install a new language
(again, mine was already installed, so doing this from memory)
  - In the terminal, go to misc/translator
  - gulp po:update
  - ./translate install xx-XX
6) Translate the line that looks like
"{ \"type\": \"credit\", \"identifier\": \"%s\", \"description\": \"%s "
"(%s)\", \"amount\": \"%s\" }"
Remove the "fuzzy" line if needed
7) Update your translation
  - ./translate install xx-XX
8) Go back to Koha, change the language
9) Go to Tools > Cashup registers 
10) Click on the register name <-- Notice credits are black

Again, it's not the end of the world, we'll just have to tell translators not to translate those lines.
Comment 1 Caroline Cyr La Rose 2021-04-27 21:19:51 UTC
I noticed it also prevents the sum to be displayed... (see attached screenshot)
So it's VERY important to NOT translate that line. It's not just a question of colours, but actual data...
Comment 2 Caroline Cyr La Rose 2021-04-27 21:20:47 UTC
Created attachment 120246 [details]
Screenshot of register.pl in French

See the "undefined" where the amount should be