Update to 0.19-2
This commit is contained in:
parent
15ef493c43
commit
991bf5f363
84
gettext-no-strict-header-check.patch
Normal file
84
gettext-no-strict-header-check.patch
Normal file
@ -0,0 +1,84 @@
|
||||
From 806a05b0e8b2020cdaaa08b535bceb6a0bce6764 Mon Sep 17 00:00:00 2001
|
||||
From: Daiki Ueno <ueno@gnu.org>
|
||||
Date: Mon, 2 Jun 2014 18:04:41 +0900
|
||||
Subject: [PATCH] msgl-check: Ignore non-fatal errors in check_header_entry
|
||||
|
||||
Problem reported by Richard Hughes at
|
||||
<https://lists.fedoraproject.org/pipermail/devel/2014-June/199539.html>.
|
||||
After <https://savannah.gnu.org/bugs/?40262>, "msgfmt -c" reports
|
||||
error on missing PO headers. However, it turned out to be too strict
|
||||
for the projects using Launchpad Translations. Let's relax the check
|
||||
for the moment and wait for one or two release cycles.
|
||||
* gettext-tools/src/msgl-check.c (check_header_entry): Report missing
|
||||
required headers as warning, instead of error.
|
||||
---
|
||||
gettext-tools/src/msgl-check.c | 11 +++++++++--
|
||||
gettext-tools/tests/msgfmt-10 | 6 +++---
|
||||
2 files changed, 12 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/gettext-tools/src/msgl-check.c b/gettext-tools/src/msgl-check.c
|
||||
index ee68ae4..a745cb0 100644
|
||||
--- a/gettext-tools/src/msgl-check.c
|
||||
+++ b/gettext-tools/src/msgl-check.c
|
||||
@@ -777,8 +777,13 @@ check_header_entry (const message_ty *mp, const char *msgstr_string)
|
||||
|
||||
for (cnt = 0; cnt < nfields; ++cnt)
|
||||
{
|
||||
+#if 0
|
||||
int severity =
|
||||
(cnt < nrequiredfields ? PO_SEVERITY_ERROR : PO_SEVERITY_WARNING);
|
||||
+#else
|
||||
+ int severity =
|
||||
+ PO_SEVERITY_WARNING;
|
||||
+#endif
|
||||
const char *field = required_fields[cnt];
|
||||
size_t len = strlen (field);
|
||||
const char *line;
|
||||
@@ -805,7 +810,8 @@ check_header_entry (const message_ty *mp, const char *msgstr_string)
|
||||
field);
|
||||
po_xerror (severity, mp, NULL, 0, 0, true, msg);
|
||||
free (msg);
|
||||
- seen_errors++;
|
||||
+ if (severity == PO_SEVERITY_ERROR)
|
||||
+ seen_errors++;
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -821,7 +827,8 @@ check_header_entry (const message_ty *mp, const char *msgstr_string)
|
||||
field);
|
||||
po_xerror (severity, mp, NULL, 0, 0, true, msg);
|
||||
free (msg);
|
||||
- seen_errors++;
|
||||
+ if (severity == PO_SEVERITY_ERROR)
|
||||
+ seen_errors++;
|
||||
}
|
||||
}
|
||||
return seen_errors;
|
||||
diff --git a/gettext-tools/tests/msgfmt-10 b/gettext-tools/tests/msgfmt-10
|
||||
index 03ee55b..ddc1566 100755
|
||||
--- a/gettext-tools/tests/msgfmt-10
|
||||
+++ b/gettext-tools/tests/msgfmt-10
|
||||
@@ -48,7 +48,6 @@ msgstr ""
|
||||
"Project-Id-Version: GNU bison\n"
|
||||
"PO-Revision-Date: 2001-04-05 19:47+0200\n"
|
||||
"Last-Translator: ABC DEF <abc@gnu.uucp>\n"
|
||||
-"Language-Team: test <test@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=ISO-8859-9\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
@@ -68,9 +67,10 @@ ${MSGFMT} --check -o /dev/null mf-test10.po2 \
|
||||
2>&1 | grep -v '^==' | sed -e 's|[^ ]*\\msgfmt\.exe|msgfmt|' -e 's|^msgfmt\.exe|msgfmt|' | LC_ALL=C tr -d '\r' > mf-test10.err
|
||||
|
||||
cat << EOF > mf-test10.ok
|
||||
+mf-test10.po2:6: warning: header field 'Language-Team' missing in header
|
||||
mf-test10.po2:6: warning: header field 'Language' missing in header
|
||||
-mf-test10.po2:20: number of format specifications in 'msgid_plural' and 'msgstr[1]' does not match
|
||||
-msgfmt: found 2 fatal errors
|
||||
+mf-test10.po2:19: number of format specifications in 'msgid_plural' and 'msgstr[1]' does not match
|
||||
+msgfmt: found 1 fatal errors
|
||||
EOF
|
||||
|
||||
: ${DIFF=diff}
|
||||
--
|
||||
1.9.0
|
||||
|
@ -6,13 +6,14 @@
|
||||
Summary: GNU libraries and utilities for producing multi-lingual messages
|
||||
Name: gettext
|
||||
Version: 0.19
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
License: GPLv3+ and LGPLv2+
|
||||
Group: Development/Tools
|
||||
URL: http://www.gnu.org/software/gettext/
|
||||
Source: ftp://ftp.gnu.org/gnu/gettext/%{name}-%{version}.tar.gz
|
||||
Source2: msghack.py
|
||||
Source3: msghack.1
|
||||
Patch0: gettext-no-strict-header-check.patch
|
||||
# removal of openmp.m4
|
||||
BuildRequires: autoconf >= 2.62
|
||||
BuildRequires: automake
|
||||
@ -134,6 +135,7 @@ Emacs.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1 -b .gettext-no-strict-header-check
|
||||
|
||||
|
||||
%build
|
||||
@ -329,6 +331,9 @@ fi
|
||||
%{_emacs_sitelispdir}/%{name}/*.el
|
||||
|
||||
%changelog
|
||||
* Mon Jun 2 2014 Daiki Ueno <dueno@redhat.com> - 0.19-2
|
||||
- apply patch to workaround msgfmt bug that counts warnings as errors
|
||||
|
||||
* Mon Jun 2 2014 Daiki Ueno <dueno@redhat.com> - 0.19-1
|
||||
- update to 0.19 release
|
||||
- remove upstreamed -Wformat-security patch
|
||||
|
Loading…
Reference in New Issue
Block a user