summaryrefslogtreecommitdiff
path: root/support/autolatex/dev/update_po.sh
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /support/autolatex/dev/update_po.sh
Initial commit
Diffstat (limited to 'support/autolatex/dev/update_po.sh')
-rwxr-xr-xsupport/autolatex/dev/update_po.sh62
1 files changed, 62 insertions, 0 deletions
diff --git a/support/autolatex/dev/update_po.sh b/support/autolatex/dev/update_po.sh
new file mode 100755
index 0000000000..f66a176d69
--- /dev/null
+++ b/support/autolatex/dev/update_po.sh
@@ -0,0 +1,62 @@
+#!/bin/sh
+
+#############################################################
+echo "Generating the pot file..."
+
+echo " [cli]"
+xgettext -L perl -k_T --from-code=UTF-8 --files-from=po/POTFILES_cli.in -o po/template_cli.pot || exit 1
+
+echo " [gtk]"
+xgettext -L perl -k_T --from-code=UTF-8 --files-from=po/POTFILES_gtk.in -o po/template_gtk.pot || exit 1
+
+echo " [gedit]"
+xgettext -L python -k_T --from-code=UTF-8 --files-from=po/POTFILES_gedit.in -o po/template_gedit.pot || exit 1
+
+echo " [sublime_text2]"
+xgettext -L python -k_T --from-code=UTF-8 --files-from=po/POTFILES_sublime_text_2.in -o po/template_sublime_text_2.pot || exit 1
+
+echo " [gedit3]"
+xgettext -L python -k_T --from-code=UTF-8 --files-from=po/POTFILES_gedit3.in -o po/template_gedit3.pot || exit 1
+
+echo " [config]"
+xgettext -L python -k_T --from-code=UTF-8 --files-from=po/POTFILES_config.in -o po/template_config.pot || exit 1
+
+#############################################################
+echo "Updating the existing translations..."
+
+echo " [cli]"
+for PO_FILE in po/*/LC_MESSAGES/autolatex.po
+do
+ msgmerge --backup=none -U "$PO_FILE" "po/template_cli.pot" || exit 1
+done
+
+echo " [gtk]"
+for PO_FILE in po/*/LC_MESSAGES/autolatexgtk.po
+do
+ msgmerge --backup=none -U "$PO_FILE" "po/template_gtk.pot" || exit 1
+done
+
+echo " [gedit]"
+for PO_FILE in po/*/LC_MESSAGES/geditautolatex.po
+do
+ msgmerge --backup=none -U "$PO_FILE" "po/template_gedit.pot" || exit 1
+done
+
+echo " [sublime_text_2]"
+for PO_FILE in po/*/LC_MESSAGES/sublime-text-2-autolatex.po
+do
+ msgmerge --backup=none -U "$PO_FILE" "po/template_sublime_text_2.pot" || exit 1
+done
+
+echo " [gedit3]"
+for PO_FILE in po/*/LC_MESSAGES/autolatex-gedit3.po
+do
+ msgmerge --backup=none -U "$PO_FILE" "po/template_gedit3.pot" || exit 1
+done
+
+echo " [config]"
+for PO_FILE in po/*/LC_MESSAGES/autolatex-config.po
+do
+ msgmerge --backup=none -U "$PO_FILE" "po/template_config.pot" || exit 1
+done
+