A while ago, I also wrote a .tr file checker to check for syntax errors, called mtt_check.py. You can find it here:
https://codeberg.org/Wuzzy/Minetest_Translation_Tools
Please tell me what you think about it and if it's good enough for inclusion and if not, what needs to be changed.