Problem with the translation editor
I tried to make some changes so that it would use the modules instead of the language templates, but something seems to have gone wrong because -sche gave me these two diffs: diff, diff. I've reverted my changes but I'm not sure why they don't work. There were also some problems with User:Hippietrail adding trreq and having them come out with language names, even though I changed it to use the codes instead. There is some discussion on their talk page. Could you have a look and fix it if possible?
The problem is caused by the new format containing an additional colon: one right after "subst" and another right after "#invoke", instead of just one for subst. In the old format, the second colon was always right after the language name ("{{subst:fr}}:"), which is what the script used for delineating where the new translation actually starts, and what has to be added even if a line for that language already exists. One solution that comes to mind is replacing the var wt = wikitext.replace('subst:','');
lines with var wt = wikitext.replace('subst:#invoke:','');
, but I don't know what other effects that might have.