Skip to content

Commit

Permalink
add helper script to update po files from pot
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter Putz committed Dec 17, 2024
1 parent e3820a4 commit 08d80f3
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions update-po.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash

# this script runs msgmerge to update the po files in line with the latest version of the pot files
# normally weblate does this, but if there are weblate problems or manual intervention is needed this can be useful

set -e

for locale_dir in locales/* ; do

if [ "$locale_dir" == "locales/pot" ] ; then
# skip
continue
fi

lang_code=$(basename "$locale_dir")
d=$locale_dir/LC_MESSAGES

echo "LANG: $lang_code $locale_dir - merge $(echo $po_files | wc -w ) files"
msgmerge -U $d/docs.po locales/pot/docs.pot
done

0 comments on commit 08d80f3

Please sign in to comment.