Bug 41340

Summary: Better translatability on 'batch_item_record_modification.inc'
Product: Koha Reporter: Tomás Cohen Arazi (tcohen) <tomascohen>
Component: TemplatesAssignee: Tomás Cohen Arazi (tcohen) <tomascohen>
Status: Signed Off --- QA Contact: Testopia <testopia>
Severity: trivial    
Priority: P5 - low CC: david, jonathan.druart, tomascohen
Version: unspecified   
Hardware: All   
OS: All   
GIT URL: Initiative type: ---
Sponsorship status: --- Comma delimited list of Sponsors:
Crowdfunding goal: 0 Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on: 23010    
Bug Blocks:    
Attachments: Bug 41340: Better translatability on 'batch_item_record_modification.inc'
Bug 41340: Better translatability on 'batch_item_record_modification.inc'
Bug 41340: Better translatability on 'batch_item_record_modification.inc'

Description Tomás Cohen Arazi (tcohen) 2025-12-01 15:00:09 UTC
Bug 23010 introduced a couple 'item(s)' occurrences which we've been trying to avoid.
Comment 1 Tomás Cohen Arazi (tcohen) 2025-12-01 15:22:15 UTC
Created attachment 190053 [details] [review]
Bug 41340: Better translatability on 'batch_item_record_modification.inc'

Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Comment 2 Jonathan Druart 2025-12-01 15:40:32 UTC
+                    [% tnx('{count} item modified', '{count} items modified', modified_items_count, { count = modified_items_count }) | html %]
+                    [% tnx('(with {count} field modified).', '(with {count} fields modified).', modified_fields_count, { count = modified_fields_count }) | html %]

It's not really helping to split the sentence here. However I don't see how we can have something perfect here.

Maybe we remove the 'with' and have the number of fields in parenthesis, so we can still split.

The idea would be:
  txn({count} item(s) modified) + '(' + txn({count} field(s) modified) + ')'
Comment 3 Tomás Cohen Arazi (tcohen) 2025-12-01 19:17:00 UTC
(In reply to Jonathan Druart from comment #2)
> The idea would be:
>   txn({count} item(s) modified) + '(' + txn({count} field(s) modified) + ')'

How about this:

```
<span>
  [%
    tnx(
      '{count} item modified (with {modified_fields} field modified).',
      '{count} items modified (with {modified_fields} field modified).',
      modified_items_count,
      { count = modified_items_count
        modified_fields = modified_fields_count }) | html
  %]
</span>
```
Comment 4 Tomás Cohen Arazi (tcohen) 2025-12-01 20:56:39 UTC
Created attachment 190064 [details] [review]
Bug 41340: Better translatability on 'batch_item_record_modification.inc'

Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Comment 5 David Nind 2025-12-04 00:45:37 UTC
Created attachment 190142 [details] [review]
Bug 41340: Better translatability on 'batch_item_record_modification.inc'

Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Comment 6 David Nind 2025-12-04 00:49:52 UTC
I've signed off based on the comments and reviewing the patch.