Latest Posts

Topic: Add-On System

Nordfriese
Avatar
Joined: 2017-01-17, 18:07
Posts: 1477
Ranking
One Elder of Players
Location: 0x55555d3a34c0
Posted at: 2021-09-30, 21:35

On the server-side this is now working correctly, and the error is:

[Thu Sep 30 21:18:07 CEST 2021 @ Client#000026] ERROR: WL Protocol Exception: Name 'Singleplayer Scenarios' may not contain the character ' '

you should call it something like "SP_Scenarios" and add an entry in the dirnames file to set a (localizable) display name.

Will investigate why Widelands swallows up the error message – on my system it works fine. I guess on windows it terminates with a SIGPIPE – on Unix this signal is explicitly ignored in code to allow subsequent errors to be passed through, but on Windows this doesn't work so the SIGPIPE hides the real error message.


Top Quote
hessenfarmer
Avatar
Joined: 2014-12-11, 23:16
Posts: 2037
Ranking
One Elder of Players
Location: Bavaria
Posted at: 2021-09-30, 21:43

ok it works now.
Improvement suggestion: provide a UI to add the translatable Dirname in the packager


Top Quote
hessenfarmer
Avatar
Joined: 2014-12-11, 23:16
Posts: 2037
Ranking
One Elder of Players
Location: Bavaria
Posted at: 2021-10-10, 13:20

I just found out that the translations in the SP Scenario Along the River are not working. However I can't get them to work. I tried pushing the correct textdomain Which is "SP_Scenario_Along_the_River.wad", but it didn't help.


Top Quote
Nordfriese
Avatar
Joined: 2017-01-17, 18:07
Posts: 1477
Ranking
One Elder of Players
Location: 0x55555d3a34c0
Posted at: 2021-10-10, 13:28

push_textdomain needs an additional parameter for add-ons:

push_textdomain("SP_Scenario_Along_the_River.wad", true)

Top Quote
hessenfarmer
Avatar
Joined: 2014-12-11, 23:16
Posts: 2037
Ranking
One Elder of Players
Location: Bavaria
Posted at: 2021-10-10, 14:23

thanks I did miss that one.
I got the translations working by pushing this correctly. I pushed / popped it as well before and after each of the send_to_inbox instances in init.lua to make this work.
However this did not work for the send_to_inbox in functions.lua (the text about the transport using ngettext,)

Edit: the reason lies somewhere within the use of ngettext, as I found out.

Edited: 2021-10-10, 14:45

Top Quote
Nordfriese
Avatar
Joined: 2017-01-17, 18:07
Posts: 1477
Ranking
One Elder of Players
Location: 0x55555d3a34c0
Posted at: 2021-10-10, 14:46

Confirmed. I'm looking at it in a debugger now, looks like our wrappers for ngettext and pgettext have a bug in them. Will investigate.

Edit: Fix is up: https://github.com/widelands/widelands/pull/5080

Edited: 2021-10-10, 15:01

Top Quote