Using a translatable string from Vanilla

Discussion of Lua and LuaWML support, development, and ideas.

Moderators: Forum Moderators, Developers

Post Reply
Choicerer
Posts: 214
Joined: April 29th, 2017, 11:37 pm

Using a translatable string from Vanilla

Post by Choicerer » June 14th, 2018, 1:18 pm

I'd like to use some translatable strings from vanilla (specifically Enemy, Owned, Allied) that get shown under village description
in lua.theme_items. But I have no idea what those strings would be called, or how I should go on about using them.

EDIT:
In the source code, they appear to be functions inside the terrain_type class... I think they might be returning "Allied Village", not just "Allied", but I could still extract the first word in lua (that would work nicely, maybe not that nicely in French, Spanish and a couple of other languages :D ) .

SOLUTION:

Got it. The text domain is #textdomain wesnoth and the variable name _"Enemy village" (case sensitive)
Creator of Choicerer's Map Randomizer - http://bit.ly/2GNcnuv Better Odds - http://bit.ly/2HP41ln
The Better Names Mod - http://bit.ly/2ICIGwz Architecture Mod - http://bit.ly/2JjbNsN
Curse of Satan Claus - http://bit.ly/2pq6MSg The Trolling Mod - http://bit.ly/2GbpAiO
and the Mushroom Isar.

Post Reply