#!/bin/bash cd packages/frontend; PONAME=taler-merchant-backoffice POGEN=node_modules/@gnu-taler/pogen/bin/pogen.js find src \( -name '*.ts' -or -name '*.tsx' \) ! -name '*.d.ts' \ | xargs node $POGEN \ | msguniq \ | msgmerge src/i18n/poheader - \ > src/i18n/$PONAME.pot # merge existing translations for pofile in src/i18n/*.po; do echo merging $pofile; msgmerge -o $pofile $pofile src/i18n/$PONAME.pot; done; # generate .ts file containing all translations cat src/i18n/strings-prelude > src/i18n/strings.ts for pofile in src/i18n/*.po; do \ echo appending $pofile; \ ./contrib/po2ts $pofile >> src/i18n/strings.ts; \ done;