Hello community,
here is the log from the commit of package itstool for openSUSE:Factory
checked in at Sun Oct 2 10:12:57 CEST 2011.
--------
--- openSUSE:Factory/itstool/itstool.changes 2011-09-23 02:03:49.000000000 +0200
+++ /mounts/work_src_done/STABLE/itstool/itstool.changes 2011-09-20 09:10:43.000000000 +0200
@@ -1,0 +2,8 @@
+Tue Sep 20 07:09:11 UTC 2011 - vuntz@opensuse.org
+
+- Update to version 1.1.1:
+ + Catch XML parsing errors and exit with error code
+ + Fixed placeholder translation when it contains sub-elements
+ + Improved autogen.sh for out of tree compilations
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
itstool-1.1.0.tar.bz2
New:
----
itstool-1.1.1.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ itstool.spec ++++++
--- /var/tmp/diff_new_pack.eIFifv/_old 2011-10-02 10:12:54.000000000 +0200
+++ /var/tmp/diff_new_pack.eIFifv/_new 2011-10-02 10:12:54.000000000 +0200
@@ -18,7 +18,7 @@
Name: itstool
-Version: 1.1.0
+Version: 1.1.1
Release: 1
License: GPLv3+
Summary: Tool to translate XML documents using PO files
++++++ itstool-1.1.0.tar.bz2 -> itstool-1.1.1.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/itstool-1.1.0/ChangeLog new/itstool-1.1.1/ChangeLog
--- old/itstool-1.1.0/ChangeLog 2011-06-27 20:58:10.000000000 +0200
+++ new/itstool-1.1.1/ChangeLog 2011-09-19 15:11:34.000000000 +0200
@@ -1,3 +1,69 @@
+commit 0520144626db679e81725aebfaba273a52fd0bf4
+Merge: 092a264 7e07396
+Author: Shaun McCance
+Date: Sat Sep 3 13:21:09 2011 -0400
+
+ Merge: Proper XML error catching [claude]
+
+commit 092a26470a5032c85ba8a40570ee6fd6c9fe9b30
+Merge: c3566db 48e4257
+Author: Shaun McCance
+Date: Sat Sep 3 13:10:19 2011 -0400
+
+ Merge commit '48e4257421beb439f23a78507f43aae694775974'
+
+commit c3566dbec79ecd2d0bbef5b42044d7b12380c034
+Merge: 6e6ca0d 6411b09
+Author: Shaun McCance
+Date: Sat Sep 3 10:56:58 2011 -0400
+
+ Merge commit 'refs/merge-requests/2' of git://gitorious.org/itstool/itstool
+
+commit 7e0739641507d92e1d2ec7e9b7f5e5c7c09a940a
+Author: Claude Paroz
+Date: Wed Aug 17 13:32:42 2011 +0200
+
+ Catch XML errors in translated content
+
+ itstool.in | 1 +
+ tests/Translate3.ll.wrong.po | 19 +++++++++++++++++++
+ tests/run_tests.py | 24 ++++++++++++++++++------
+ 3 files changed, 38 insertions(+), 6 deletions(-)
+
+commit 1abdf1b0d83b37a9f298563e139c118c9a62629b
+Author: Claude Paroz
+Date: Wed Aug 17 12:10:36 2011 +0200
+
+ Catch XML parsing errors so itstool does properly exit with error code
+
+ itstool.in | 10 ++++++++++
+ tests/Malformed.xml | 6 ++++++
+ tests/run_tests.py | 18 ++++++++++++------
+ 3 files changed, 28 insertions(+), 6 deletions(-)
+
+commit 6411b09431eb72ed5426d40a0142e7479c486d3b
+Author: Claude Paroz
+Date: Wed Jun 29 21:15:46 2011 +0200
+
+ Fix placeholder translation when it contains sub-elements
+
+ itstool.in | 12 ++++++++++--
+ tests/Placeholder.ll.po | 19 +++++++++++++++++++
+ tests/Placeholder.ll.xml | 6 ++++++
+ tests/Placeholder.xml | 5 +++++
+ tests/run_tests.py | 4 +++-
+ 5 files changed, 43 insertions(+), 3 deletions(-)
+
+commit 6e6ca0daf4084aaa94268f062461e1ec712698fa
+Author: Shaun McCance
+Date: Mon Jun 27 14:59:56 2011 -0400
+
+ Version 1.1.0
+
+ NEWS | 14 ++++++++++++++
+ configure.ac | 2 +-
+ 2 files changed, 15 insertions(+), 1 deletions(-)
+
commit 187fcbe585560f128c7436e66f6b8e3a789a73b0
Author: Shaun McCance
Date: Sun Jun 26 12:28:10 2011 -0400
@@ -353,6 +419,17 @@
itstool | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
+commit 48e4257421beb439f23a78507f43aae694775974
+Author: Javier Jardón
+Date: Tue Apr 26 17:00:23 2011 +0100
+
+ autogen.sh: Improve script to handle out of tree compilations
+
+ Also handle the option to not run the configure step
+
+ autogen.sh | 7 +++++--
+ 1 files changed, 5 insertions(+), 2 deletions(-)
+
commit 65ecbc8856e91b991d812e08dfa10300504bfb1b
Author: Shaun McCance
Date: Tue Apr 26 11:33:03 2011 -0400
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/itstool-1.1.0/NEWS new/itstool-1.1.1/NEWS
--- old/itstool-1.1.0/NEWS 2011-06-27 20:57:50.000000000 +0200
+++ new/itstool-1.1.1/NEWS 2011-09-19 15:11:16.000000000 +0200
@@ -1,3 +1,10 @@
+1.1.1
+=====
+* Catch XML parsing errors and exit with error code
+* Fixed placeholder translation when it contains sub-elements
+* Improved autogen.sh for out of tree compilations
+* Commits by Claude Paroz, Javier Jardón
+
1.1.0
=====
* Added itst:context to set msgctxt
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/itstool-1.1.0/configure new/itstool-1.1.1/configure
--- old/itstool-1.1.0/configure 2011-06-27 20:58:08.000000000 +0200
+++ new/itstool-1.1.1/configure 2011-09-19 15:11:32.000000000 +0200
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.66 for itstool 1.1.0.
+# Generated by GNU Autoconf 2.66 for itstool 1.1.1.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -548,8 +548,8 @@
# Identity of this package.
PACKAGE_NAME='itstool'
PACKAGE_TARNAME='itstool'
-PACKAGE_VERSION='1.1.0'
-PACKAGE_STRING='itstool 1.1.0'
+PACKAGE_VERSION='1.1.1'
+PACKAGE_STRING='itstool 1.1.1'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1165,7 +1165,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures itstool 1.1.0 to adapt to many kinds of systems.
+\`configure' configures itstool 1.1.1 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1231,7 +1231,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of itstool 1.1.0:";;
+ short | recursive ) echo "Configuration of itstool 1.1.1:";;
esac
cat <<\_ACEOF
@@ -1298,7 +1298,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-itstool configure 1.1.0
+itstool configure 1.1.1
generated by GNU Autoconf 2.66
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1315,7 +1315,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by itstool $as_me 1.1.0, which was
+It was created by itstool $as_me 1.1.1, which was
generated by GNU Autoconf 2.66. Invocation command line was
$ $0 $@
@@ -2130,7 +2130,7 @@
# Define the identity of the package.
PACKAGE='itstool'
- VERSION='1.1.0'
+ VERSION='1.1.1'
cat >>confdefs.h <<_ACEOF
@@ -2726,7 +2726,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by itstool $as_me 1.1.0, which was
+This file was extended by itstool $as_me 1.1.1, which was
generated by GNU Autoconf 2.66. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -2779,7 +2779,7 @@
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-itstool config.status 1.1.0
+itstool config.status 1.1.1
configured by $0, generated by GNU Autoconf 2.66,
with options \\"\$ac_cs_config\\"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/itstool-1.1.0/configure.ac new/itstool-1.1.1/configure.ac
--- old/itstool-1.1.0/configure.ac 2011-06-27 20:53:05.000000000 +0200
+++ new/itstool-1.1.1/configure.ac 2011-09-19 15:11:21.000000000 +0200
@@ -1,4 +1,4 @@
-AC_INIT([itstool], [1.1.0], [])
+AC_INIT([itstool], [1.1.1], [])
AM_INIT_AUTOMAKE([1.9 no-dist-gzip dist-bzip2])
DATADIR=`(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/itstool-1.1.0/itstool new/itstool-1.1.1/itstool
--- old/itstool-1.1.0/itstool 2011-06-27 20:58:10.000000000 +0200
+++ new/itstool-1.1.1/itstool 2011-09-19 15:11:34.000000000 +0200
@@ -17,7 +17,7 @@
# Place, Suite 330, Boston, MA 0211-1307 USA.
#
-VERSION="1.1.0"
+VERSION="1.1.1"
DATADIR="/usr/local/share"
import gettext
@@ -287,9 +287,14 @@
return False
return node.name == name and node.ns() is not None and node.ns().content == ns
+def xml_error_catcher(doc, error):
+ doc._xml_err += " %s" % error
+
class Document (object):
def __init__ (self, filename, messages):
+ self._xml_err = ''
+ libxml2.registerErrorHandler(xml_error_catcher, self)
ctxt = libxml2.createFileParserCtxt(filename)
ctxt.lineNumbers(1)
ctxt.replaceEntities(1)
@@ -313,6 +318,7 @@
self._localrules.append(child)
pre_process(child)
pre_process(self._doc)
+ self._check_errors()
self._msgs = messages
self._its_translate_nodes = {}
self._its_within_text_nodes = {}
@@ -325,6 +331,10 @@
self._itst_credits = None
self._itst_externals = []
+ def _check_errors(self):
+ if self._xml_err:
+ raise libxml2.parserError(self._xml_err)
+
def apply_its_rule(self, rule, xpath):
if rule.type != 'element':
return
@@ -644,6 +654,7 @@
if child.type == 'element':
fix_node_ns(child, childnsdefs)
fix_node_ns(node, {})
+ self._check_errors()
def translate_attrs(self, oldnode, newnode):
trans_attrs = [attr for attr in xml_attr_iter(oldnode) if self._its_translate_nodes.get(attr, 'no') == 'yes']
@@ -692,8 +703,13 @@
if child.type != 'element':
continue
if child.ns() is not None and child.ns().content == NS_BLANK:
- repl = self.get_translated(msg.get_placeholder(child.name).node, translations)
- child.replaceNode(repl)
+ ph_node = msg.get_placeholder(child.name).node
+ if self.has_child_elements(ph_node):
+ self.merge_translations(translations, None, ph_node)
+ child.replaceNode(ph_node)
+ else:
+ repl = self.get_translated(ph_node, translations)
+ child.replaceNode(repl)
scan_node(child)
scan_node(trnode)
retnode = node.copyNode(2)
@@ -802,6 +818,9 @@
def is_translation_unit (self, node):
return self.get_its_within_text(node) != 'yes'
+ def has_child_elements(self, node):
+ return len([child for child in xml_child_iter(node) if child.type=='element'])
+
def get_preserve_space (self, node):
if node.getSpacePreserve() == 1:
return True
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/itstool-1.1.0/itstool.1 new/itstool-1.1.1/itstool.1
--- old/itstool-1.1.0/itstool.1 2011-06-27 20:58:10.000000000 +0200
+++ new/itstool-1.1.1/itstool.1 2011-09-19 15:11:34.000000000 +0200
@@ -1,4 +1,4 @@
-.TH ITSTOOL "1" "May 2011" "itstool 1.1.0"
+.TH ITSTOOL "1" "May 2011" "itstool 1.1.1"
.SH NAME
itstool \- convert between XML and PO using ITS
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/itstool-1.1.0/itstool.in new/itstool-1.1.1/itstool.in
--- old/itstool-1.1.0/itstool.in 2011-06-26 18:25:36.000000000 +0200
+++ new/itstool-1.1.1/itstool.in 2011-09-03 19:23:20.000000000 +0200
@@ -287,9 +287,14 @@
return False
return node.name == name and node.ns() is not None and node.ns().content == ns
+def xml_error_catcher(doc, error):
+ doc._xml_err += " %s" % error
+
class Document (object):
def __init__ (self, filename, messages):
+ self._xml_err = ''
+ libxml2.registerErrorHandler(xml_error_catcher, self)
ctxt = libxml2.createFileParserCtxt(filename)
ctxt.lineNumbers(1)
ctxt.replaceEntities(1)
@@ -313,6 +318,7 @@
self._localrules.append(child)
pre_process(child)
pre_process(self._doc)
+ self._check_errors()
self._msgs = messages
self._its_translate_nodes = {}
self._its_within_text_nodes = {}
@@ -325,6 +331,10 @@
self._itst_credits = None
self._itst_externals = []
+ def _check_errors(self):
+ if self._xml_err:
+ raise libxml2.parserError(self._xml_err)
+
def apply_its_rule(self, rule, xpath):
if rule.type != 'element':
return
@@ -644,6 +654,7 @@
if child.type == 'element':
fix_node_ns(child, childnsdefs)
fix_node_ns(node, {})
+ self._check_errors()
def translate_attrs(self, oldnode, newnode):
trans_attrs = [attr for attr in xml_attr_iter(oldnode) if self._its_translate_nodes.get(attr, 'no') == 'yes']
@@ -692,8 +703,13 @@
if child.type != 'element':
continue
if child.ns() is not None and child.ns().content == NS_BLANK:
- repl = self.get_translated(msg.get_placeholder(child.name).node, translations)
- child.replaceNode(repl)
+ ph_node = msg.get_placeholder(child.name).node
+ if self.has_child_elements(ph_node):
+ self.merge_translations(translations, None, ph_node)
+ child.replaceNode(ph_node)
+ else:
+ repl = self.get_translated(ph_node, translations)
+ child.replaceNode(repl)
scan_node(child)
scan_node(trnode)
retnode = node.copyNode(2)
@@ -802,6 +818,9 @@
def is_translation_unit (self, node):
return self.get_its_within_text(node) != 'yes'
+ def has_child_elements(self, node):
+ return len([child for child in xml_child_iter(node) if child.type=='element'])
+
def get_preserve_space (self, node):
if node.getSpacePreserve() == 1:
return True
continue with "q"...
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org