#!/bin/sh
if [ "$#" -ne 1 ]; then
  echo "Usage: $0 language_code" >&2
  exit 1
fi

PYTHONPATH='.' pybabel extract -F babel.cfg -k lazy_gettext -o translations/messages.pot .
pybabel init -i translations/messages.pot -d ./translations -l $1
rm translations/messages.pot
