https://github.com/borgar/gettext-js
Python script to make gettext dumps from JavaScript files.
https://github.com/borgar/gettext-js
Last synced: 15 days ago
JSON representation
Python script to make gettext dumps from JavaScript files.
- Host: GitHub
- URL: https://github.com/borgar/gettext-js
- Owner: borgar
- License: mit
- Created: 2012-05-03T20:09:07.000Z (about 14 years ago)
- Default Branch: master
- Last Pushed: 2013-04-12T10:30:44.000Z (about 13 years ago)
- Last Synced: 2025-03-22T06:45:47.833Z (about 1 year ago)
- Language: Python
- Size: 107 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# gettext-js
This is a naïve hack to produce *gettext* compatible files from JavaScript. *xgettext* doesn't have support for the JavaScript language and the de-facto way of doing things seems to be applying some nasty regular expressions on the JS file and running it through xgettext as either Python or Perl.
I have found this method to be insufficient for the code I write. Thus, this nasty thing. Theoretically, it is just as crappy as the other way. However in practice it wins out because it is better maintainable, smaller, and runs as a pure-Python solution (a plus if that is your environment).