cooljeanius / The_Earths_Gut

The Earth's Gut (TEG) is a Wesnoth add-on campaign; originally by @anonymissimus
https://forums.wesnoth.org/viewtopic.php?f=8&t=26800
GNU General Public License v2.0
6 stars 6 forks source link

Translatability #6

Closed cooljeanius closed 3 years ago

cooljeanius commented 3 years ago

Currently, wmlxgettext chokes on utils/abilities.cfg when trying to generate a .pot file; that will have to be fixed if this campaign is ever going to be translatable.

cooljeanius commented 3 years ago

(I've tried adjusting the magic comments, but that only seems to make things worse if I go much further with them...)

CelticMinstrel commented 3 years ago

I'm not quite sure, but is it possible that you need a # wmlxgettext: [attack] above this line?

https://github.com/cooljeanius/The_Earths_Gut/blob/master/utils/abilities.cfg#L83

cooljeanius commented 3 years ago

I'm not quite sure, but is it possible that you need a # wmlxgettext: [attack] above this line?

https://github.com/cooljeanius/The_Earths_Gut/blob/master/utils/abilities.cfg#L83

That just changes the error from this:

$ ./wmlxgettext --domain=wesnoth-The_Earths_Gut --directory=/Users/ericgallager/Library/Containers/org.wesnoth.Wesnoth/Data/Library/Application\ Support/Wesnoth_1.14/data/add-ons/The_Earths_Gut --recursive -o /Users/ericgallager/Library/Containers/org.wesnoth.Wesnoth/Data/Library/Application\ Support/Wesnoth_1.14/data/add-ons/The_Earths_Gut/translations/TEG.pot
error: The_Earths_Gut/utils/abilities.cfg:93: unexpected closing tag '[/attack]' outside any scope.

...into this:

$ ./wmlxgettext --domain=wesnoth-The_Earths_Gut --directory=/Users/ericgallager/Library/Containers/org.wesnoth.Wesnoth/Data/Library/Application\ Support/Wesnoth_1.14/data/add-ons/The_Earths_Gut --recursive -o /Users/ericgallager/Library/Containers/org.wesnoth.Wesnoth/Data/Library/Application\ Support/Wesnoth_1.14/data/add-ons/The_Earths_Gut/translations/TEG.pot
error: The_Earths_Gut/utils/abilities.cfg:210: End of WML file reached, but some tags were not properly closed.
(nearest unclosed tag is: [specials])
CelticMinstrel commented 3 years ago

Then add this at the end of the file:

# wmlxgettext: [/specials]
# wmlxgettext: [/attack]
cooljeanius commented 3 years ago

Then add this at the end of the file:

# wmlxgettext: [/specials]
# wmlxgettext: [/attack]

ok that works; thanks!

cooljeanius commented 3 years ago

potfile successfully generated; closing!