inferno8 / wesnoth-Era_of_Magic

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

Make anti-mech translatable #32

Closed Toranks closed 1 year ago

Toranks commented 1 year ago

{MACRO} substitution aren't translatable within a string (there are tricks, but it is not practical), must be a variable or left outside the string. The change uses the same method as "heals"+" +{VALUE}" on ABILITY_EOMA_HEAL I know it's not very translate-friendly to use this method instead of the variable because we can't change the order of anti-mech + number, for some languages, but at least translation is possible.

ProditorMagnus commented 1 year ago

I believe wmllint will change this line.

ProditorMagnus commented 1 year ago

Why you still quote {VALUE}

Toranks commented 1 year ago

Why you still quote {VALUE}

To be able to put +{VALUE}. Can we put "+" outside of quotes? The text must be "anti-mech +X"

ProditorMagnus commented 1 year ago

As name= _ "anti-mech"+" +"+{VALUE}

wmllint might still add translation mark for second string, but there it looks harmless

ProditorMagnus commented 1 year ago

I dont use translations so dont know which way works best for that.

inferno8 commented 1 year ago

Ok, this looks good to me, so I will probably merge this tomorrow. But the PR is only a part of much bigger issue #33 which will have to be resolved in the very near future.