From nobody Thu May 2 06:01:32 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=startmail.com ARC-Seal: i=1; a=rsa-sha256; t=1558343158; cv=none; d=zoho.com; s=zohoarc; b=iOZfjAAepCMWXNP00RFx7gZx9XqLuzRslK60URu6Uu0zU0eNFZZg1F0X0uZdVuCRynpyghJOsDCOTSowwrwm4hqiI92pmNpdYP0/q+aMy/LBLXFgZmAucruqJq+afe92SMR8Wuyvq7w7Y+LOm3nWPgasAYjbuYH4r0WDY2msOfI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1558343158; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To:ARC-Authentication-Results; bh=3hzy7BAeVB0XzVrJYaKAaB5e8Z5va8pOQ/hrxW1JjF4=; b=PDqXuiBpmYetWVW1zNbpgK2xy0BKObJvCmhHBbgly+gJ/z+0hif4k6cnOEIP78G6PgmSoqlN0Qvg9/TZhjqB6uDGVzSrSwsO3yRmzPjEfu8+KTIz8PGlCctW1edVKhipr1JLyzg0ZxE4W6BF5MfsmMnO+VJ9M4P0lWzxIKHWa9k= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1558343157943564.5164289189601; Mon, 20 May 2019 02:05:57 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id EE3BF3082E51; Mon, 20 May 2019 09:00:52 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BD0595D9D1; Mon, 20 May 2019 09:00:51 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 71F061833002; Mon, 20 May 2019 09:00:51 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x4IFulF0018720 for ; Sat, 18 May 2019 11:56:47 -0400 Received: by smtp.corp.redhat.com (Postfix) id DF88E1825D; Sat, 18 May 2019 15:56:47 +0000 (UTC) Received: from mx1.redhat.com (ext-mx01.extmail.prod.ext.phx2.redhat.com [10.5.110.25]) by smtp.corp.redhat.com (Postfix) with ESMTPS id DA7F560BE1 for ; Sat, 18 May 2019 15:56:45 +0000 (UTC) Received: from mx-out2.startmail.com (mx-out2.startmail.com [145.131.90.155]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 422408535C for ; Sat, 18 May 2019 15:56:39 +0000 (UTC) From: "Marty E. Plummer" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=startmail.com; s=2017-11; t=1558194993; bh=YvZlnAYwbnhOKhTGDACVZezhpAUS8Pd1YXeqVHMYOSk=; h=From:To:Cc:Subject:Date:From; b=FqUHvQghF/VJO816hgYflOURGdgnTSOjsRrEXDiY6EKT+JtxrQe1618JrAKmwSHaj YxH1C0S8SEkYI9shcOmpodFgeo40vbfNck8Khx9ZPxP85uzszYCLm7U7F1S+4g6BbJ KtVpyukEyItkXDiTHTgS5/9UFKYjK7tOektKgP8OTHPfZ+SsG6CGvquskqlSU7sNj7 j9rh0QO6vI8b8w4glmDBx60NhgWorSfrsJiP+Eae9eozVEu2AXDz7sod7gvhGaLolw 7C65IHHXO2OkpP5nyuseY51GFxdwoyieiFIelk3UNOre4WmydOOSfZCkg3yWaxwo4A 2GNfY6Fkl0fQA== To: libvir-list@redhat.com Date: Sat, 18 May 2019 10:56:01 -0500 Message-Id: <20190518155601.10541-1-hanetzer@startmail.com> Mime-Version: 1.0 X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 216 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Sat, 18 May 2019 15:56:41 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Sat, 18 May 2019 15:56:41 +0000 (UTC) for IP:'145.131.90.155' DOMAIN:'mx-out2.startmail.com' HELO:'mx-out2.startmail.com' FROM:'hanetzer@startmail.com' RCPT:'' X-RedHat-Spam-Score: -0.11 (DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS) 145.131.90.155 mx-out2.startmail.com 145.131.90.155 mx-out2.startmail.com X-Scanned-By: MIMEDefang 2.83 on 10.5.110.25 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com X-Mailman-Approved-At: Mon, 20 May 2019 05:00:09 -0400 Cc: "Marty E. Plummer" Subject: [libvirt] [PATCH] i18n: simplify mini po generation X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Mon, 20 May 2019 09:00:53 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" If you pass --for-msgfmt to msgmerge it will automatically do most of what you had the perl script doing. Signed-off-by: Marty E. Plummer --- The only downside I can see is the loss of the comment headers with the copyright year and such. A global note in the README.md or so may be an acceptable change. Makefile.am | 1 - build-aux/minimize-po.pl | 37 ------------------------------------- po/Makefile.am | 8 +++----- 3 files changed, 3 insertions(+), 43 deletions(-) delete mode 100755 build-aux/minimize-po.pl diff --git a/Makefile.am b/Makefile.am index dedd8d2ff8..ca7e012512 100644 --- a/Makefile.am +++ b/Makefile.am @@ -46,7 +46,6 @@ EXTRA_DIST =3D \ build-aux/check-spacing.pl \ build-aux/gitlog-to-changelog \ build-aux/header-ifdef.pl \ - build-aux/minimize-po.pl \ build-aux/mock-noinline.pl \ build-aux/prohibit-duplicate-header.pl \ build-aux/useless-if-before-free \ diff --git a/build-aux/minimize-po.pl b/build-aux/minimize-po.pl deleted file mode 100755 index 497533a836..0000000000 --- a/build-aux/minimize-po.pl +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/perl - -my @block; -my $msgstr =3D 0; -my $empty =3D 0; -my $unused =3D 0; -my $fuzzy =3D 0; -while (<>) { - if (/^$/) { - if (!$empty && !$unused && !$fuzzy) { - print @block; - } - @block =3D (); - $msgstr =3D 0; - $fuzzy =3D 0; - push @block, $_; - } else { - if (/^msgstr/) { - $msgstr =3D 1; - $empty =3D 1; - } - if (/^#.*fuzzy/) { - $fuzzy =3D 1; - } - if (/^#~ msgstr/) { - $unused =3D 1; - } - if ($msgstr && /".+"/) { - $empty =3D 0; - } - push @block, $_; - } -} - -if (@block && !$empty && !$unused) { - print @block; -} diff --git a/po/Makefile.am b/po/Makefile.am index da117edbd5..9ac0bf3357 100644 --- a/po/Makefile.am +++ b/po/Makefile.am @@ -55,11 +55,9 @@ update-gmo: $(GMOFILES) update-mini-po: $(POTFILE) for lang in $(LANGS); do \ echo "Minimizing $$lang content" && \ - $(MSGMERGE) --no-location --no-fuzzy-matching --sort-output \ - $$lang.po $(POTFILE) | \ - $(SED) $(SED_PO_FIXUP_ARGS) | \ - $(PERL) $(top_srcdir)/build-aux/minimize-po.pl > \ - $(srcdir)/$$lang.mini.po ; \ + $(MSGMERGE) --for-msgfmt --sort-output \ + $$lang.po $(POTFILE) \ + -o $(srcdir)/$$lang.mini.po ; \ done =20 push-pot: $(POTFILE) --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list