Bug 41340 - Better translatability on 'batch_item_record_modification.inc'
Summary: Better translatability on 'batch_item_record_modification.inc'
Status: Signed Off
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low trivial
Assignee: Tomás Cohen Arazi (tcohen)
QA Contact: Testopia
URL:
Keywords:
Depends on: 23010
Blocks:
  Show dependency treegraph
 
Reported: 2025-12-01 15:00 UTC by Tomás Cohen Arazi (tcohen)
Modified: 2025-12-04 00:49 UTC (History)
3 users (show)

See Also:
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:


Attachments
Bug 41340: Better translatability on 'batch_item_record_modification.inc' (2.48 KB, patch)
2025-12-01 15:22 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 41340: Better translatability on 'batch_item_record_modification.inc' (3.12 KB, patch)
2025-12-01 20:56 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 41340: Better translatability on 'batch_item_record_modification.inc' (3.15 KB, patch)
2025-12-04 00:45 UTC, David Nind
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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.