By default xgettext will guess file type from its extension. However, I have JavaScript files (with .js extension) which it doesn’t currently understand. So, I have to specify language manually, Java seems like a good choice. But then, I also have Glade files (XML), which obviously cannot be parsed as Java… When I specify multiple --language options on command line, only the last seems to have any effect.
It seems to be a non-issue for projects with file types understood by xgettext (e.g. C and Glade).
It seems that
--join-existingoption is what I need. I.e. runxgettextseparately for each language with the same output file, only adding--join-existingfor each but the first. Note that if output file doesn’t have suffix.pot,xgettextwill print a (useless) warning about charset.