[NetworkManager-openconnect] Improve OpenConnect translation import



commit cf2f87e6b48df99251877ed697ae9270c7f0c6e5
Author: David Woodhouse <dwmw2 infradead org>
Date:   Mon Dec 30 00:38:38 2019 +0000

    Improve OpenConnect translation import
    
    Firstly, allow NM-openconnect strings updates to propagate to OpenConnect.
    Previously, strings only got copied over if they didn't exist at all, but
    since translations are maintained and updated in GNOME we want to consume
    those changes too.
    
    Also, use msgattrib to keep the OpenConnect po files tidy when copying.

 import-strings.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/import-strings.sh b/import-strings.sh
index 6c85427..77a4450 100644
--- a/import-strings.sh
+++ b/import-strings.sh
@@ -104,11 +104,11 @@ 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 -F $OPENCONNECT_DIR/$a -C $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.merged
        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
            echo New changes for OpenConnect $a
-           mv $OPENCONNECT_DIR/$a.merged $OPENCONNECT_DIR/$a
+           msgattrib -F --no-fuzzy --no-obsolete $OPENCONNECT_DIR/$a.merged > $OPENCONNECT_DIR/$a
        fi
        rm -f $OPENCONNECT_DIR/$a.merged $OPENCONNECT_DIR/$a.unmerged $a.nmo
     fi


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