Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

24 lines (19 sloc) 1.369 kb
echo off
echo Extracting keys from javascript code
xgettext --omit-header --default-domain=javascript --language=Perl --keyword=_ --keyword=n_ --keyword=gettext_noop --keyword=gettext_lazy --keyword=ngettext_lazy --from-code=UTF-8 -o locales\en\LC_MESSAGES\javascript.pot *.js
xgettext --omit-header --default-domain=javascript --language=Perl --keyword=_ --keyword=n_ --keyword=gettext_noop --keyword=gettext_lazy --keyword=ngettext_lazy --from-code=UTF-8 -o locales\fr\LC_MESSAGES\javascript.pot *.js
echo Merging new keys with existing keys
msgmerge --quiet --update locales\fr\LC_MESSAGES\javascript.po locales\fr\LC_MESSAGES\javascript.pot
msgmerge --quiet --update locales\en\LC_MESSAGES\javascript.po locales\en\LC_MESSAGES\javascript.pot
echo Converting message files to binary
msgfmt -v -o locales\en\LC_MESSAGES\ locales\en\LC_MESSAGES\javascript.po
msgfmt -v -o locales\fr\LC_MESSAGES\ locales\fr\LC_MESSAGES\javascript.po
echo Converting binary files to JSON
rem Usage: domain . locale output-filename
python javascript locales en javascript.en.json
python javascript locales fr
echo Removing temp files
del locales\en\LC_MESSAGES\javascript.pot
del locales\en\LC_MESSAGES\javascript.po~
del locales\fr\LC_MESSAGES\javascript.pot
del locales\fr\LC_MESSAGES\javascript.po~
Jump to Line
Something went wrong with that request. Please try again.