When we first introduced gettext translation, we used the xgettext
program to parse our JavaScript source code and extract the translated strings. Since then, we began using more and more TypeScript, but xgettext
does not support it. Thus, we wrote our own extractor command-line program that could read TypeScript files and began using it. Our extractor can also read plain JavaScript files, but we did not leverage this.
The two systems have cohabited for a while, but now that TypeScript is the norm, we should keep only our extractor and use it for both TypeScript and JavaScript files.