File: update-translations.sh

package info (click to toggle)
python-humanize 4.12.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 760 kB
  • sloc: python: 1,943; sh: 14; makefile: 10
file content (13 lines) | stat: -rwxr-xr-x 465 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
set -e

# extract new phrases
xgettext --from-code=UTF-8 -o humanize.pot -k'_' -k'N_' -k'P_:1c,2' -k'NS_:1,2' -k'_ngettext:1,2' -l python src/humanize/*.py

for d in src/humanize/locale/*/; do
    locale="$(basename $d)"
    echo "$locale"
    # add them to locale files
    msgmerge -U src/humanize/locale/$locale/LC_MESSAGES/humanize.po humanize.pot
    # compile to binary .mo
    msgfmt --check -o src/humanize/locale/$locale/LC_MESSAGES/humanize{.mo,.po}
done