Fixed #23788 -- Used new JavaScript support in recent gettext

JavaScript string extraction support has been added in gettext
0.18.3.
You can avoid `thefile` by adding here:

    work_file = orig_file