Bug 41325 - register.tt is broken by translation
Summary: register.tt is broken by translation
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Point of Sale (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on: 23355
Blocks:
  Show dependency treegraph
 
Reported: 2025-11-27 15:00 UTC by Baptiste Wojtkowski (bwoj)
Modified: 2025-11-27 15:01 UTC (History)
1 user (show)

See Also:
GIT URL:
Initiative type: ---
Sponsorship status: ---
Comma delimited list of Sponsors:
Crowdfunding goal: 0
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Baptiste Wojtkowski (bwoj) 2025-11-27 15:00:51 UTC
following template is broken since it was created in Bug 23355 after translation koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt


117   <td>{ "type": "credit", "identifier": "[%- accountline.credit_number | html -%]", "description": "[%- PROCESS account_type_description account=accountline -%] ([% AuthorisedValues.GetByCode('PAYMENT_TYPE', accountline.payment_type ) | html %])", "amount": "[% accountline.amount * -1 | $Price %]", "timestamp": "[% accountline.timestamp | $KohaDates with_hours => 1 %]" }</td>



For example in french:
 <td>{ "type" : "crédit", "identifiant" : "[%- accountline.credit_number | html -%]", "description" : "[%- PROCESS ac
count_type_description account=accountline -%] ([% AuthorisedValues.GetByCode( 'PAYMENT_TYPE', accountline.payment_ty
pe ) | html %])", "montant" : "[% accountline.amount * -1 | $Price %]", "horodatage" : "[% accountline.timestamp | $K
ohaDates with_hours => 1 %]" }</td>



Since this is in plain HTML, strings like "timestamp" get translated. Hence, while reading in this part of the code

367                     if ( group ) {
368                     var details = JSON.parse(rows.data().pluck(1).pop());
369                     var identifier = details.identifier || group;
370                     return $('<tr class="'+details.type+'"/>')