subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1841716 - /subversion/trunk/tools/po/po-update.sh
Date Sun, 23 Sep 2018 06:58:34 GMT
Author: stsp
Date: Sun Sep 23 06:58:34 2018
New Revision: 1841716

URL: http://svn.apache.org/viewvc?rev=1841716&view=rev
Log:
Prevent duplicate message ID entries in translation files.

Fixes a build problem for me where msgfmt errors out with:
  subversion/po/sv.po:13836: duplicate message definition...
  subversion/po/sv.po:4723: ...this is the location of the first definition

* tools/po/po-update.sh: Run the 'msguniq' tool when updating .po files.
   Tools such as msgmerge and msgfmt error out otherwise.

Modified:
    subversion/trunk/tools/po/po-update.sh

Modified: subversion/trunk/tools/po/po-update.sh
URL: http://svn.apache.org/viewvc/subversion/trunk/tools/po/po-update.sh?rev=1841716&r1=1841715&r2=1841716&view=diff
==============================================================================
--- subversion/trunk/tools/po/po-update.sh (original)
+++ subversion/trunk/tools/po/po-update.sh Sun Sep 23 06:58:34 2018
@@ -32,6 +32,7 @@ set -e
 
 XGETTEXT=${XGETTEXT:-xgettext}
 MSGMERGE=${MSGMERGE:-msgmerge}
+MSGUNIQ=${MSGUNIQ:-msguniq}
 
 svn_base=
 for i in . .. ../..; do
@@ -89,6 +90,8 @@ update_po()
   (cd $svn_base/subversion/po &&
   for i in $1.po; do
     echo "Updating $i..."
+    # Prevent duplicate entries which would cause msgmerge and msgfmt errors.
+    $MSGUNIQ -o $i $i
     # In a display of truly bizarre behaviour, msgmerge (at least, the
     # GNU gettext-tools 0.14.6 implementation) inverts the order of obsolete
     # messages every time it is run. Therefore, run it twice, to invert and



Mime
View raw message