https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43786
--- Comment #1 from Tomás Cohen Arazi (tcohen) <[email protected]> --- Created attachment 207865 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=207865&action=edit Bug 43786: Fix string concatenation in batch_item_record_modification.inc Bug 41340 introduced the batch item modification report count string using the TT numeric addition operator (+) instead of the string concatenation operator (_). As a result, Template::Toolkit tries to add the strings numerically, emitting "isn't numeric in addition (+)" warnings and rendering only the leading item count instead of the full message. This patch replaces the + operators with _ so the translated strings are concatenated as intended. Test plan: 1. Reproduce the current behavior: $ ktd --shell k$ perl -we 'use Template; my $t=q{[% tnx("{count} item modified","{count} items modified",c,{count=c}) + " (" + tnx("with {count} field modified","with {count} fields modified",f,{count=f}) + ")." %]}; Template->new->process(\$t,{c=>3,f=>3,tnx=>sub{my($s,$p,$n,$h)=@_;my $x=$n==1?$s:$p;$x=~s/\{count\}/$h->{count}/g;$x}},\my $o); print "[$o]\n"' => FAIL: Four "Argument ... isn't numeric in addition (+)" warnings and the render is "[3]" 2. Apply this patch, repeat step 1 using _ instead of + in the template 3. Repeat the render => SUCCESS: No warnings and the render is "[3 items modified (with 3 fields modified).]" 4. Sign off :-D Assisted-by: Claude Sonnet 4.5 (Anthropic) -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list -- [email protected] To unsubscribe send an email to [email protected] website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
