lefreut Posted July 28, 2017 Share Posted July 28, 2017 This is a tool I wrote to help find errors in tra files. I already post it on the Beamdog forum but ALIENQuake suggest that I also post it here so more modders can see it. Basic usage TraChecker.exe file.tra 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) Checking directory TraChecker.exe directory In 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.tra By default, the errors are outputted on the console. This option allows to redirect the errors to a file. TraChecker.exe -check-illegal-character file.tra This 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.tra This option will check if any keyword (<CHARNAME> for example) is misspelled. The list of keywords are loaded from the file keywords.txt. TraChecker.exe -check-newlines file.tra This 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 two files or the content of 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.tra With this option, only the errors in the translated file(s) are reported. TraChecker.exe -check-translations reference.tra translation.tra 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: reference -> translation TraChecker.exe -check-sounds reference.tra translation.tra This option will check if there is some mismatch between the sound tags.All the options can be combined if you want to check everything at the same time Feel free to report bugs or feature requests. Link to comment
Roxanne Posted July 28, 2017 Share Posted July 28, 2017 Looks like a helpful tool. Just a question TraChecker.exe -check-illegal-character file.tra This option will check if the entries contain any 'œ', 'Œ' or '…' which were problematic in vanilla. In the EEs these characters are now allowed. Is there a possibility to use this function in a wider scope? There were a number of reports recently that players could not start their games if certain mods were installed. The reason identified was that illegal characters were used in EE Journal entries. A tool to find such issues would be a great advantage. Link to comment
lefreut Posted July 28, 2017 Author Share Posted July 28, 2017 Is there a possibility to use this function in a wider scope? There were a number of reports recently that players could not start their games if certain mods were installed. The reason identified was that illegal characters were used in EE Journal entries. A tool to find such issues would be a great advantage. The list is harcoded, but I can add new illegal character to check. The thing is that TraChecker does not know in which context a string will be used. If a character is problematic only in journal entries, it may produce a lot of false positive when this character is used in other strings. Link to comment
Roxanne Posted July 28, 2017 Share Posted July 28, 2017 Is there a possibility to use this function in a wider scope? There were a number of reports recently that players could not start their games if certain mods were installed. The reason identified was that illegal characters were used in EE Journal entries. A tool to find such issues would be a great advantage. The list is harcoded, but I can add new illegal character to check. The thing is that TraChecker does not know in which context a string will be used. If a character is problematic only in journal entries, it may produce a lot of false positive when this character is used in other strings. As far as I know the same symbols/characters create issues whereever they are. The journal ones prevent the game to even start, but if they are in dialogues they *freeze* the game if the dialogue line is triggered. Thus they are worth detecting when they appear. Anyway, it was just an idea. The problem may as well be eliminated if all EE mods correctly use HANDLE_CHARSETS in the future. Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.