-
Notifications
You must be signed in to change notification settings - Fork 131
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add helper script to update po files from pot
- Loading branch information
Peter Putz
committed
Dec 17, 2024
1 parent
e3820a4
commit 08d80f3
Showing
1 changed file
with
20 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |