[NetworkManager-openconnect] Fix false positives in comparing translations



commit e65ccf42abc6b5103e553cfc0fefc191d91c90e4
Author: David Woodhouse <dwmw2 infradead org>
Date:   Fri Jan 3 12:41:11 2020 +0000

    Fix false positives in comparing translations
    
    Now that we clean them up with msgattrib when copying over to OpenConnect,
    that's the version we should actually compare with.

 import-strings.sh | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/import-strings.sh b/import-strings.sh
index 77a4450..fe45839 100644
--- a/import-strings.sh
+++ b/import-strings.sh
@@ -104,13 +104,14 @@ for a in po/*.po ; do
        fi
        rm -f $a.openconnect $a.merged $a.unmerged
        msgattrib -F --no-fuzzy $a > $a.nmo
-       msgmerge -q -N -C $OPENCONNECT_DIR/$a -F $a.nmo $OPENCONNECT_BUILD_DIR/po/openconnect.pot > 
$OPENCONNECT_DIR/$a.merged
+       msgmerge -q -N -C $OPENCONNECT_DIR/$a -F $a.nmo $OPENCONNECT_BUILD_DIR/po/openconnect.pot > 
$OPENCONNECT_DIR/$a.merged1
+       msgattrib -F --no-fuzzy --no-obsolete $OPENCONNECT_DIR/$a.merged1 > $OPENCONNECT_DIR/$a.merged2
        msgmerge -q -N -F $OPENCONNECT_DIR/$a $OPENCONNECT_BUILD_DIR/po/openconnect.pot > 
$OPENCONNECT_DIR/$a.unmerged
-       if ! cmp $OPENCONNECT_DIR/$a.merged $OPENCONNECT_DIR/$a.unmerged; then
+       if ! cmp $OPENCONNECT_DIR/$a.merged2 $OPENCONNECT_DIR/$a.unmerged; then
            echo New changes for OpenConnect $a
-           msgattrib -F --no-fuzzy --no-obsolete $OPENCONNECT_DIR/$a.merged > $OPENCONNECT_DIR/$a
+           mv $OPENCONNECT_DIR/$a.merged2 $OPENCONNECT_DIR/$a
        fi
-       rm -f $OPENCONNECT_DIR/$a.merged $OPENCONNECT_DIR/$a.unmerged $a.nmo
+       rm -f $OPENCONNECT_DIR/$a.merged2 $OPENCONNECT_DIR/$a.merged1 $OPENCONNECT_DIR/$a.unmerged $a.nmo
     fi
 done
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]