This is a tool I wrote to help find errors in tra files. I just finish a new version and even if I initially wrote it for french translations, it may be useful to any modders that write tra files.
The tools will parse the file and report errors (if any) in the console.
Here are some of the errors that the tools can find:
- entries using the same number in a single file
- amount of '~' different from 2 or 4 for one entry
- reference to a sound file [XXX] including a space or more than 8 characters
- text outside '~'
- multiple entries in the same line (but I'm not sure if this is a real problem or not)
In this mode, the tool will recursively scans the directory for all files with the extension .tra and check them.
By default, the errors are outputed on the console. This option allows to redirect the errors to a file.
This option will check if the entries contain any 'œ', 'Œ' or '…' which were problematic in vanilla. In the EEs these characters are now allowed.
This option will check if any keyword ( for example) is misspelled. The list of keywords are loaded from the file keywords.txt.
This option will check if any entries end with a newline.
Here are some of the errors that it will find (in addition to the previous errors):
- entries available only in one language
- files available only in one directory
With this option, only the errors in the translated file(s) are reported.
This option will check that some word(s) are always translated the same way (useful for character name for example).
The list is constructed from the file translations.txt. The archive contains an example in French but you should be able to adapt it to any languages.
The syntax is one entry per line like this:
All the options can be combined if you want to check everything at the same time![:) :)]()
Feel free to report bugs or feature requests.
Here is a sample output on some of the mods I have on my computer:
Basic usage
TraChecker.exe file.traThe tools will parse the file and report errors (if any) in the console.
Here are some of the errors that the tools can find:
- entries using the same number in a single file
- amount of '~' different from 2 or 4 for one entry
- reference to a sound file [XXX] including a space or more than 8 characters
- text outside '~'
- multiple entries in the same line (but I'm not sure if this is a real problem or not)
Checking directory
TraChecker.exe directoryIn this mode, the tool will recursively scans the directory for all files with the extension .tra and check them.
Options
TraChecker.exe -out out.txt file.traBy default, the errors are outputed on the console. This option allows to redirect the errors to a file.
TraChecker.exe -check-illegal-character file.traThis option will check if the entries contain any 'œ', 'Œ' or '…' which were problematic in vanilla. In the EEs these characters are now allowed.
TraChecker.exe -check-keywords file.traThis option will check if any keyword ( for example) is misspelled. The list of keywords are loaded from the file keywords.txt.
TraChecker.exe -check-newlines file.traThis option will check if any entries end with a newline.
File comparison
TraChecker.exe reference.tra translation.tra
TraChecker.exe ref_directory tra_directory
In this mode, the tool will compare the two files or the content of the two directories. It's useful for translators to check that they did not miss anything.Here are some of the errors that it will find (in addition to the previous errors):
- entries available only in one language
- files available only in one directory
Comparison Options
TraChecker.exe -only-report-translated-files reference.tra translation.traWith this option, only the errors in the translated file(s) are reported.
TraChecker.exe -check-translations reference.tra translation.traThis option will check that some word(s) are always translated the same way (useful for character name for example).
The list is constructed from the file translations.txt. The archive contains an example in French but you should be able to adapt it to any languages.
The syntax is one entry per line like this:
reference -> translationAll the options can be combined if you want to check everything at the same time

Feel free to report bugs or feature requests.
Here is a sample output on some of the mods I have on my computer:
@89 in bg1npc\tra\german\x#jaint.tra contains keyword CHARNAME not within '<>'
@139 in bg1npc\tra\german\x#jaint.tra contains unknown keyword <CHANAME>
@8 in bg1npc\tra\spanish\x#ajpcfl_tmp.tra contains only male version
@13 in bg1npc\tra\spanish\x#ajpcfl_tmp.tra contains only male version
@17 in bg1npc\tra\spanish\x#miint.tra contains only male version
@207 in bg1npc\tra\spanish\x#xanlt.tra contains only male version
@336 in bg1npc\tra\spanish\x#xanlt.tra contains only male version
@338 in bg1npc\tra\spanish\x#xanlt.tra contains only male version
@361 in bg1npc\tra\spanish\x#xanlt.tra contains only male version
@368 in bg1npc\tra\spanish\x#xanlt.tra contains only male version
@380 in bg1npc\tra\spanish\x#xanlt.tra contains only male version
@388 in bg1npc\tra\spanish\x#xanlt.tra contains only male version
@394 in bg1npc\tra\spanish\x#xanlt.tra contains only male version
@411 in bg1npc\tra\spanish\x#xanlt.tra contains only male version
@413 in bg1npc\tra\spanish\x#xanlt.tra contains only male version
@421 in bg1npc\tra\spanish\x#xanlt.tra contains only male version
@427 in bg1npc\tra\spanish\x#xanlt.tra contains only male version
@518 in bg1npc\tra\spanish\x#xanlt.tra contains only male version
@548 in bg1npc\tra\spanish\x#xanlt.tra contains only male version
@551 in bg1npc\tra\spanish\x#xanlt.tra contains only male version
@598 in bg1npc\tra\spanish\x#xanlt.tra contains only male version
@1290 in bg1npc\tra\spanish\x#xanlt.tra contains only male version
@100 in bgqe\tra\german\C#Q10001.TRA contains unknown keyword <CHARNANE>




.jpg)







