# run in a cygwin bash with ". ./build/gettext.bat" from the Subcommander
# source root folder to update the .po files and create the .mo files.

find subcommander \
     submerge     \
     sublib       \
     svn          \
     util         \
     win32st      \
    -name *.cpp -print \
-or -name *.h   -print \
-or -name .svn  -prune \
-or -name moc   -prune | \
c:/usr/bin/xgettext.exe --sort-by-file -d Subcommander \
  --msgid-bugs-address=dev@subcommander.tigris.org \
  --add-comments --qt -k_ -k_q -k_s -k_n --flag=_:1:pass-c-format \
  --files-from=- -o po/Subcommander.pot
 
cd po
for i in `find . -name "*.po"` ; do \
  c:/usr/bin/msgmerge.exe --sort-by-file --update $i Subcommander.pot ; \
done
cd ..

cd po
for i in `find . -name "*.po"` ; do \
  echo "$i: => ${i/.po/}.mo"; \
  c:/usr/bin/msgfmt.exe --check --statistics -o ${i:2:2}.mo $i ; \
done
cd ..

