mirror of
https://github.com/vcmi/vcmi.git
synced 2026-04-24 19:54:52 +02:00
a93d3d0db7
Fix two issues with the battleLogMessage feature:
1. Translation not working: string registration now happens in
CSpellHandler::loadFromJson (before translations are loaded)
instead of in Timed::serializeJsonUnitEffect (which runs in
afterLoadFinalization, after translations are already loaded).
The effect now only generates the text ID without registering.
2. Singular/plural support: battleLogMessage is now an object with
"singular" and "plural" fields for grammatically correct messages
based on stack size.
Example: { "singular": "The %s is petrified.",
"plural": "The %s are petrified." }
Values starting with @ reference an existing text ID instead of
registering a new string. Core spells now use @core.genrltxt.XXX
to reuse the original H3 translations directly.