The xgettext utility is a command-line tool that scans source code and can process a variety of languages including C, C++, ObjectiveC, Shell, Python, Lisp, EmacsLisp, librep, Scheme, Java, C#, awk, Tcl, Perl, PHP, GCC-source, and Glade.
While JavaScript is not officially supported by xgettext, experimenting with different languages like Perl has shown some success. For example, running the following command on a test.js file:
echo "testFunc('foo');" > test.js;
xgettext --keyword=testFunc --output=- test.js --language="perl";
To make this process more efficient using POEdit, you can customize the parser settings. By adding ".js" to the list of file extensions and including "--language=Perl" in the parser command field under Preferences > Parsers > Perl, you can extract strings from JavaScript files seamlessly.
For a more streamlined approach, consider converting PO files to a native JavaScript format using tools like localise.biz's converter. This alternative method may provide a better solution for handling localization within JavaScript projects.