Adjust makefile for UI translations

This commit is contained in:
Charles Gagnon
2023-02-08 08:37:49 -05:00
parent 406f520ac9
commit 8cc506634a
2 changed files with 8 additions and 4 deletions

2
.gitignore vendored
View File

@@ -4,4 +4,4 @@ gschemas.compiled
dash-to-panel@jderose9.github.com*.zip
*.mo
po/dash-to-panel.pot
Settings.ui.h
*.ui.h

View File

@@ -50,11 +50,15 @@ mergepo: potfile
msgmerge -U $$l ./po/dash-to-panel.pot; \
done;
./po/dash-to-panel.pot: $(TOLOCALIZE) Settings.ui
./po/dash-to-panel.pot: $(TOLOCALIZE)
mkdir -p po
xgettext -k_ -kN_ -o po/dash-to-panel.pot --package-name "Dash To Panel" $(TOLOCALIZE) --from-code=UTF-8
intltool-extract --type=gettext/glade Settings.ui
xgettext -k_ -kN_ --join-existing -o po/dash-to-panel.pot Settings.ui.h
for l in $(UI_MODULES) ; do \
intltool-extract --type=gettext/glade $$l; \
xgettext -k_ -kN_ -o po/dash-to-panel.pot $$l.h --join-existing --from-code=UTF-8; \
done;
sed -i -e 's/&\#10;/\\n/g' po/dash-to-panel.pot
./po/%.mo: ./po/%.po