From patchwork Wed Jan 1 03:47:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 182691 Delivered-To: patch@linaro.org Received: by 2002:a92:815a:0:0:0:0:0 with SMTP id e87csp8335258ild; Tue, 31 Dec 2019 19:48:33 -0800 (PST) X-Google-Smtp-Source: APXvYqwImyWN2oRlpGKyem23XYncXubjLBJGwrPeawS6L5Jw1VpuBkakBImOqMbm0287Y/J0UaaD X-Received: by 2002:a62:28e:: with SMTP id 136mr65789527pfc.256.1577850513544; Tue, 31 Dec 2019 19:48:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577850513; cv=none; d=google.com; s=arc-20160816; b=exKaUjvMJrnGVsv0XhtJcYfBJVl5JmcVENtVxzyF1UiUJze2qpy1d4jx5BEfTEh/23 RBZpeEL1q6PPSx5hFgyrcwWXyj5czYoV83Z2lKboXElDcBXGRm08pONwcjwCPeKLxNFi +D8AD2sgBBV+OkffcBJ32uy0XXYgZqI3kl9+nCCN8F+rjGO3x4Umk96c8h2+F/XNAALw /27/Bcl6MHpRAPS08XgTf13H33UID3OmipxbgKaio2ljKgfn7PwDubHSwV8UxFRFI1hy Nar/OFDUok+ZXlL3MBCAHysPN0zSjRZ2wjhs4d9gg2hB/YXisPPBHk2h1NHc7LkNKsB7 k6bA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:message-id:date:to:from:dkim-signature:delivered-to; bh=fvYpdHi6ctD1kVQg3uqidLCtiZxT4ByT5k2u4pwB7pM=; b=jmSTBY03Ayfc2bgTHVWGgW8CJdTubYUCZz380b5CEYIg0ejb57VyvTSaD9Rb8jp2Wi 8nBFaqQD67/jjypHL1/Rc74WAbZFgc4ZHeLohTn9DsuMm3Ax7F276b95xGKzCBioz6+s tujBznnlGmnSgI5qcTydjpVjNsEm0aJ3dWPK4O16/0kIihoCXmvvuqSsjxlEygW8i6kx vzhCzNY6WkXJKiTyxxICPwfCTjE/rUeU/EaO5rWFjv0Dk3rajY3avNHDdzBIdHuLXF0z 5mgNuhu8rpNCZUPBlgmj3qaD4OhHqEsg5CbL87jMXWbTX97Ljo3wGxT3tV4PBxn/w895 HfuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=krKlAPzo; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id 75si48374453pfy.111.2019.12.31.19.48.33; Tue, 31 Dec 2019 19:48:33 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=krKlAPzo; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from ec2-34-214-78-129.us-west-2.compute.amazonaws.com (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id BDB777FC3A; Wed, 1 Jan 2020 03:48:30 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-pg1-f180.google.com (mail-pg1-f180.google.com [209.85.215.180]) by mail.openembedded.org (Postfix) with ESMTP id 881FF7FC44 for ; Wed, 1 Jan 2020 03:48:06 +0000 (UTC) Received: by mail-pg1-f180.google.com with SMTP id b137so20204085pga.6 for ; Tue, 31 Dec 2019 19:48:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=INYsgW9j0qWP78yp6xZQfk49nZ58D54f3gqyBM3GAzk=; b=krKlAPzoYc7fmJ6Tozxj5gheL3YmT18ryStWkfGo+0xmSo01Ig8ABX7rEMxqPnqQeA U3RwkrSax9THRwBNQbWdO63X4q3WilUrYrKSmv0/YxH5XpKLILxWxs/Y+ID5jLru3d1i 2IWAQQJYTH43fXGU85c5IjS/ZflGo/n6kEav7JSqzg4/vGK9iE0DMXMBo8gGshbkgbxC fIID2pA91oWZrcQy06ydAeLbH43BaepNO09gAExXDWn6ibSpqFLa884KvBZkQ7WN+1Rj oOymmSNv+3sCTVC99Wn9WZgmRLDMB6q0wL2Zooi//9mV2eR7GVctZItCOb7sHz0m+AmP XDIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=INYsgW9j0qWP78yp6xZQfk49nZ58D54f3gqyBM3GAzk=; b=XdkVCD0NhuTMJJ0oTIrrCg1E1ztFC1NimoPAjBGPyZh3hd0cf1ohPh08wqyoX30atX B4LN3uYl/0JeMacuoDOyd1TcPptI/xUyIq14cqY2SywKDfrYYm5tArUMdYaswY8+Tdqm 2aQsRW7E9K4WGB1z2KKGgX5Ho+112BTF/cPwIs2D2jltGJL2h1txnI7TCTXos1EOisRS 5nEzZw8ftI/5r354R6spBzQPX+qRdTJigyH4jDhoKjvfNAOoZ2JFdAERn+80rXk55L7x vgTzphaswNllSlt+9iQLnj2PpBktCg9KclpICHPw937cL49+xi0sb3muR4Q4Rx1HAM2b WH/g== X-Gm-Message-State: APjAAAUcDFfLAk4rWQwESXt9ajzS9FEmAE0GVQpBX5Sc6ZGyNtwOEQ5V XBENyIthaWHAqxz7VRFrCtpXqvx8rDU= X-Received: by 2002:aa7:86c3:: with SMTP id h3mr72244648pfo.225.1577850487198; Tue, 31 Dec 2019 19:48:07 -0800 (PST) Received: from apollo.hsd1.ca.comcast.net ([2601:646:9200:4e0::fa4b]) by smtp.gmail.com with ESMTPSA id o134sm53291473pfg.137.2019.12.31.19.48.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Dec 2019 19:48:06 -0800 (PST) From: Khem Raj To: openembedded-core@lists.openembedded.org Date: Tue, 31 Dec 2019 19:47:59 -0800 Message-Id: <20200101034759.8085-1-raj.khem@gmail.com> X-Mailer: git-send-email 2.24.1 MIME-Version: 1.0 Subject: [OE-core] [PATCH] gettext: Backport patch to fix po files without translations X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org Signed-off-by: Khem Raj --- ...aviour-of-for-msgfmt-on-PO-files-wit.patch | 87 +++++++++++++++++++ meta/recipes-core/gettext/gettext_0.20.1.bb | 1 + 2 files changed, 88 insertions(+) create mode 100644 meta/recipes-core/gettext/gettext-0.20.1/0001-msgmerge-Fix-behaviour-of-for-msgfmt-on-PO-files-wit.patch -- 2.24.1 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core diff --git a/meta/recipes-core/gettext/gettext-0.20.1/0001-msgmerge-Fix-behaviour-of-for-msgfmt-on-PO-files-wit.patch b/meta/recipes-core/gettext/gettext-0.20.1/0001-msgmerge-Fix-behaviour-of-for-msgfmt-on-PO-files-wit.patch new file mode 100644 index 0000000000..2245889386 --- /dev/null +++ b/meta/recipes-core/gettext/gettext-0.20.1/0001-msgmerge-Fix-behaviour-of-for-msgfmt-on-PO-files-wit.patch @@ -0,0 +1,87 @@ +From 75e315fdec82d1a17ebcd9e0712d109323578d68 Mon Sep 17 00:00:00 2001 +From: Bruno Haible +Date: Sun, 19 May 2019 11:10:06 +0200 +Subject: [PATCH] msgmerge: Fix behaviour of --for-msgfmt on PO files with no + translations. + +msgmerge: Fix behaviour of --for-msgfmt on PO files with no translations. + +Reported by Don Lawrence +in +via Daiki Ueno +in . + +* gettext-tools/src/msgmerge.c (main): Treat force_po like true if for_msgfmt +is true. +* gettext-tools/tests/msgmerge-26: Add test of PO file with no translations. + +Upstream-Status: Backport [https://git.savannah.gnu.org/gitweb/?p=gettext.git;a=commitdiff;h=2336451ed68d91ff4b5ae1acbc1eca30e47a86a9] +Signed-off-by: Khem Raj +--- + gettext-tools/src/msgmerge.c | 4 ++-- + gettext-tools/tests/msgmerge-26 | 36 ++++++++++++++++++++++++++++++--- + 2 files changed, 35 insertions(+), 5 deletions(-) + +diff --git a/gettext-tools/src/msgmerge.c b/gettext-tools/src/msgmerge.c +index cd762c0..92c9b7a 100644 +--- a/gettext-tools/src/msgmerge.c ++++ b/gettext-tools/src/msgmerge.c +@@ -520,8 +520,8 @@ There is NO WARRANTY, to the extent permitted by law.\n\ + else + { + /* Write the merged message list out. */ +- msgdomain_list_print (result, output_file, output_syntax, force_po, +- false); ++ msgdomain_list_print (result, output_file, output_syntax, ++ for_msgfmt || force_po, false); + } + + exit (EXIT_SUCCESS); +diff --git a/gettext-tools/tests/msgmerge-26 b/gettext-tools/tests/msgmerge-26 +index cd3862e..b86f7a0 100755 +--- a/gettext-tools/tests/msgmerge-26 ++++ b/gettext-tools/tests/msgmerge-26 +@@ -73,7 +73,37 @@ msgstr "Papaya" + EOF + + : ${DIFF=diff} +-${DIFF} mm-test26.ok mm-test26.out +-result=$? ++${DIFF} mm-test26.ok mm-test26.out || Exit 1 + +-exit $result ++# Test with a PO file that has no translated messages. ++ ++cat <<\EOF > mm-test26a.in1 ++msgid "" ++msgstr "" ++"Content-Type: text/plain; charset=UTF-8\n" ++ ++msgid "Hello world" ++msgstr "Hallo Welt" ++EOF ++ ++cat <<\EOF > mm-test26a.in2 ++msgid "" ++msgstr "" ++"Content-Type: text/plain; charset=ASCII\n" ++ ++msgid "Hello, world!" ++msgstr "" ++EOF ++ ++: ${MSGMERGE=msgmerge} ++${MSGMERGE} --for-msgfmt -o mm-test26a.tmp mm-test26a.in1 mm-test26a.in2 \ ++ || Exit 1 ++LC_ALL=C tr -d '\r' < mm-test26a.tmp > mm-test26a.out || Exit 1 ++ ++cat <<\EOF > mm-test26a.ok ++msgid "" ++msgstr "Content-Type: text/plain; charset=UTF-8\n" ++EOF ++ ++: ${DIFF=diff} ++${DIFF} mm-test26a.ok mm-test26a.out || Exit 1 +-- +2.24.1 + diff --git a/meta/recipes-core/gettext/gettext_0.20.1.bb b/meta/recipes-core/gettext/gettext_0.20.1.bb index a6fc219568..ca155fe8bf 100644 --- a/meta/recipes-core/gettext/gettext_0.20.1.bb +++ b/meta/recipes-core/gettext/gettext_0.20.1.bb @@ -23,6 +23,7 @@ SRC_URI = "${GNU_MIRROR}/gettext/gettext-${PV}.tar.gz \ file://use-pkgconfig.patch \ file://run-ptest \ file://serial-tests-config.patch \ + file://0001-msgmerge-Fix-behaviour-of-for-msgfmt-on-PO-files-wit.patch \ " SRC_URI[md5sum] = "bb5b0c0caa028105f3ca1905ddc306e2"