cleanup xgettext.js code a bit