how to debug foreign language problem?

davidlallen

Deity
Joined
Apr 28, 2008
Messages
4,743
Location
California
This is probably a FAQ somewhere, but I could not find the answer.

The Dune Wars mod does not run properly when a foreign language is selected. I load vanilla, choose advanced -> options -> game options, and choose a language, say French. Then I load Dune Wars. The main menu is blank. No errors appear in any logfile I can find.

One poster has suggested that some TXT_KEYs may be missing languages in assets/xml/text. I have verified with a script that this is not the case; every tag which has <English> also has the other languages. We have not translated all the keys, just copied the English text, but the point is there is an entry.

How can we debug this problem and make the mod language-friendly?
 
I know you've said you've checked, but every time I've seen this, it's because a text file is missing a language tag. Miss a single tag somewhere, and it breaks all instances of that language, as well as the languages below it. Somewhere in your text file it says something like:
Code:
	<TEXT>
		<Tag>TXT_KEY_FOO</Tag>
		<English>foo</English>
	</TEXT>
Instead of:
Code:
	<TEXT>
		<Tag>TXT_KEY_FOO</Tag>
		<English>foo</English>
		<French>foo</French>
		<German>foo</German>
		<Italian>foo</Italian>
		<Spanish>foo</Spanish>
	</TEXT>
 
Thanks for forcing me to recheck. You were right; although my xml file was OK, the mod contains dozens of other xml/text/*.xml files from included modcomps, and one of those files was missing a half dozen tags.

I had written a script to detect this, which found nothing. I manually moved the files out of xml/text, and then moved them back in a few at a time until the problem appeared. I was eventually able to figure out which file was at fault. Then I went back to my script with a counterexample, found a bug in the script, and fixed it.

Problem solved, and as a useful side effect, the next version of civcheck will do this check automatically.
 
...the next version of civcheck will do this check automatically.

Sounds very useful. If you could, please set it up so it can account for extra languages, for instance Finnish has been added to LoR's list of languages, so I'd need to check for an extra <Finnish> tag at the end after Spanish.
 
Back
Top Bottom