aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2017-11-29 13:24:22 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2017-11-29 13:24:29 +0100
commitc9a4c8658e1cf689e8565d664677dfd7f56f023d (patch)
tree0ec6d6317dcb024199bde85c5d04927fd6575792
parenta8439d229ad4813e8c2768248dd6a8a5be02368b (diff)
downloadayatana-indicator-printers-c9a4c8658e1cf689e8565d664677dfd7f56f023d.tar.gz
ayatana-indicator-printers-c9a4c8658e1cf689e8565d664677dfd7f56f023d.tar.bz2
ayatana-indicator-printers-c9a4c8658e1cf689e8565d664677dfd7f56f023d.zip
update-po.sh: Preserve .pot file when updating *.po files.
-rwxr-xr-xupdate-po.sh8
1 files changed, 6 insertions, 2 deletions
diff --git a/update-po.sh b/update-po.sh
index d1f375d..dff6f3a 100755
--- a/update-po.sh
+++ b/update-po.sh
@@ -16,12 +16,14 @@ set -x
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>
-GETTEXT_DOMAIN=$(cat configure.ac | grep -E "^GETTEXT_PACKAGE=" | sed -e 's/GETTEXT_PACKAGE=//')
+GETTEXT_DOMAIN=$(cat CMakeLists.txt | grep 'set.*(.*GETTEXT_PACKAGE' | sed -r -e 's/.*\"([^"]+)\"\)/\1/')
+
+cp po/${GETTEXT_DOMAIN}.pot po/${GETTEXT_DOMAIN}.pot~
cd po/
cat LINGUAS | while read lingua; do
if [ ! -e ${lingua}.po ]; then
- msginit --input=${GETTEXT_DOMAIN}.pot --locale=${lingua} --no-translator --output-file=$lingua.po
+ msginit --input=${GETTEXT_DOMAIN}.pot --locale=${lingua} --no-translator --output-file=$lingua.po
else
intltool-update --gettext-package ${GETTEXT_DOMAIN} $(basename ${lingua})
fi
@@ -34,3 +36,5 @@ cat LINGUAS | while read lingua; do
done
cd - 1>/dev/null
+
+mv po/${GETTEXT_DOMAIN}.pot~ po/${GETTEXT_DOMAIN}.pot