inferno8 / wesnoth-Era_of_Magic

add-on for Battle for Wesnoth
GNU General Public License v2.0
10 stars 4 forks source link

{MACRO} inside a translatable string make this not translatable #33

Closed Toranks closed 1 year ago

Toranks commented 1 year ago

This problem happens on a lot of translatable strings. What we should do with this @inferno8 ?

imagen

inferno8 commented 1 year ago

I say we fix it, but it will probably require rewriting some of descriptions.

Here's a trimmed wmllint output for 4.0 with all occurrences of this issue:

\utils\abilities.cfg", line 162: macro reference in translatable string
\utils\abilities.cfg", line 1451: macro reference in translatable string
\utils\abilities.cfg", line 1584: macro reference in translatable string
\utils\abilities.cfg", line 1706: macro reference in translatable string
\utils\healing.cfg", line 107: macro reference in translatable string
\utils\healing.cfg", line 121: macro reference in translatable string
\utils\healing.cfg", line 192: macro reference in translatable string
\utils\healing.cfg", line 209: macro reference in translatable string
\utils\healing.cfg", line 226: macro reference in translatable string
\utils\healing.cfg", line 243: macro reference in translatable string
\utils\healing.cfg", line 261: macro reference in translatable string
\utils\healing.cfg", line 290: macro reference in translatable string
\utils\pain_absorption.cfg", line 98: macro reference in translatable string
\utils\pain_absorption.cfg", line 178: macro reference in translatable string

For example line 107 in healing.cfg refers to this: "This unit regenerates {VALUE} hp every turn. this ability doesn't cure poison, though." If a macro has to be outside of a translatable string, then the description should probably look like this:

"This unit regenerates some hp every turn. this ability doesn't cure poison, though.
Amount of hitpoints healed:"+" +{VALUE}"

...or something like that, if I am getting this right.

EDIT: After seeing Ravana's comment, the last sentence should probably look like this: Amount of hitpoints healed:"+" +"+{VALUE}