strings versus translatable strings
Moderator: Forum Moderators
strings versus translatable strings
wesnoth.show_popup_dialog
(https://wiki.wesnoth.org/LuaWML/Display ... pup_dialog) is an easy way to bring up a message box that resembles the [objectives] we all see at the start of a scenario. (It also resembles the old-style messages, before they were moved to the bottom of the screen.)I'm not sure whether this is just a matter of me being rusty or whether there is a bug in
wesnoth.show_popup_dialog
, but passing a translatable string to that function causes an error. I've looked at what works with wesnoth.show_dialog
, but it's not clear to me how to apply it. It seems like there might be a hint at https://wiki.wesnoth.org/LuaWML/Display ... textdomain, but I don't understand what it's saying and don't put too much stock in that. Does anyone know of a working example of wesnoth.show_popup_dialog
?Thanks.
BfW 1.12 supported, but active development only for BfW 1.13/1.14: Bad Moon Rising | Trinity | Archaic Era |
| Abandoned: Tales of the Setting Sun
GitHub link for these projects
| Abandoned: Tales of the Setting Sun
GitHub link for these projects
Re: strings versus translatable strings
you coudl file a bugreport. As a workaroudn you can simply add a tostring() call on the prameter of wesnoth.show_popup_dialog
Scenario with Robots SP scenario (1.11/1.12), allows you to build your units with components, PYR No preperation turn 1.12 mp-mod that allows you to select your units immideately after the game begins.
- Pentarctagon
- Project Manager
- Posts: 5564
- Joined: March 22nd, 2009, 10:50 pm
- Location: Earth (occasionally)
Re: strings versus translatable strings
There's
data/lua/wml/object.lua:66
in mainline, which I would assume works.99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code
take one down, patch it around
-2,147,483,648 little bugs in the code
Re: strings versus translatable strings
I'll assume it works too. (Not sure how I missed that.) It uses tostring(), like gfgtdf said. Is that a workaround of a bug, or is it customizing a flexibility? Maybe it doesn't matter.Pentarctagon wrote:There'sdata/lua/wml/object.lua:66
in mainline, which I would assume works.
Thanks.
BfW 1.12 supported, but active development only for BfW 1.13/1.14: Bad Moon Rising | Trinity | Archaic Era |
| Abandoned: Tales of the Setting Sun
GitHub link for these projects
| Abandoned: Tales of the Setting Sun
GitHub link for these projects
- Celtic_Minstrel
- Developer
- Posts: 2209
- Joined: August 3rd, 2012, 11:26 pm
- Location: Canada
- Contact:
Re: strings versus translatable strings
I'd say
show_popup_dialog
should be changed to accept translatable strings though. It would be pretty easy to do, just call luaW_checktstring
or something instead of luaL_checkstring
.