Hello community, here is the log from the commit of package itstool for openSUSE:Factory checked in at 2012-05-21 08:04:16 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/itstool (Old) and /work/SRC/openSUSE:Factory/.itstool.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "itstool", Maintainer is "" Changes: -------- --- /work/SRC/openSUSE:Factory/itstool/itstool.changes 2012-03-19 09:57:55.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.itstool.new/itstool.changes 2012-05-21 08:04:27.000000000 +0200 @@ -1,0 +2,8 @@ +Mon May 14 07:49:11 UTC 2012 - [email protected] + +- Update to version 1.1.3: + + Handle UTF-8 in attribute values + + Don't output non-translatable external ref messages + + Better error handling + +------------------------------------------------------------------- Old: ---- itstool-1.1.2.tar.bz2 New: ---- itstool-1.1.3.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ itstool.spec ++++++ --- /var/tmp/diff_new_pack.oplNQ9/_old 2012-05-21 08:04:30.000000000 +0200 +++ /var/tmp/diff_new_pack.oplNQ9/_new 2012-05-21 08:04:30.000000000 +0200 @@ -17,7 +17,7 @@ Name: itstool -Version: 1.1.2 +Version: 1.1.3 Release: 0 Summary: Tool to translate XML documents using PO files License: GPL-3.0+ ++++++ itstool-1.1.2.tar.bz2 -> itstool-1.1.3.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/itstool-1.1.2/ChangeLog new/itstool-1.1.3/ChangeLog --- old/itstool-1.1.2/ChangeLog 2012-02-05 17:48:33.000000000 +0100 +++ new/itstool-1.1.3/ChangeLog 2012-05-07 22:39:29.000000000 +0200 @@ -1,3 +1,49 @@ +commit 63e2b5739977a99a70898e6c78798b7eaa66293e +Author: Shaun McCance <[email protected]> +Date: Wed Apr 4 12:39:06 2012 -0400 + + Don't error out when invalid msgstr is non-ascii + + itstool.in | 3 ++- + 1 files changed, 2 insertions(+), 1 deletions(-) + +commit 367d347cfc0d7bfcc25ab5b83c59e8824af4ae27 +Author: Shaun McCance <[email protected]> +Date: Mon Apr 2 10:16:29 2012 -0400 + + Proper error message when source XML file can't be read + + itstool.in | 6 +++++- + 1 files changed, 5 insertions(+), 1 deletions(-) + +commit 3ff47350b0386c971e4fb1955f87fefc2c5aafd1 +Author: Shaun McCance <[email protected]> +Date: Mon Apr 2 09:51:30 2012 -0400 + + Handle UTF-8 in attribute values + + itstool.in | 2 ++ + 1 files changed, 2 insertions(+), 0 deletions(-) + +commit 1e0fa47194bbfcbd30e402a4897a0856a6045b73 +Author: Shaun McCance <[email protected]> +Date: Fri Mar 23 10:09:55 2012 -0400 + + Don't output external ref messages under its:translate="no" + + itstool.in | 9 +++++++++ + 1 files changed, 9 insertions(+), 0 deletions(-) + +commit 80b34e2870abd08cb96f2929d8ee32acab3d89e9 +Author: Shaun McCance <[email protected]> +Date: Sun Feb 5 11:53:41 2012 -0500 + + Version 1.1.2 + + NEWS | 4 ++++ + configure.ac | 2 +- + 2 files changed, 5 insertions(+), 1 deletions(-) + commit ed24c8ab3b22a085daea614638cbc15796011f15 Author: Shaun McCance <[email protected]> Date: Tue Sep 27 10:16:55 2011 -0400 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/itstool-1.1.2/NEWS new/itstool-1.1.3/NEWS --- old/itstool-1.1.2/NEWS 2012-02-05 17:48:12.000000000 +0100 +++ new/itstool-1.1.3/NEWS 2012-05-07 22:39:02.000000000 +0200 @@ -1,3 +1,9 @@ +1.1.3 +===== +* Handle UTF-8 in attribute values +* Don't output non-translatable external ref messages +* Better error handling + 1.1.2 ===== * Better handling of XML errors in PO files diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/itstool-1.1.2/configure new/itstool-1.1.3/configure --- old/itstool-1.1.2/configure 2012-02-05 17:48:31.000000000 +0100 +++ new/itstool-1.1.3/configure 2012-05-07 22:39:27.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.2. +# Generated by GNU Autoconf 2.66 for itstool 1.1.3. # # # 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.2' -PACKAGE_STRING='itstool 1.1.2' +PACKAGE_VERSION='1.1.3' +PACKAGE_STRING='itstool 1.1.3' 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.2 to adapt to many kinds of systems. +\`configure' configures itstool 1.1.3 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.2:";; + short | recursive ) echo "Configuration of itstool 1.1.3:";; 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.2 +itstool configure 1.1.3 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.2, which was +It was created by itstool $as_me 1.1.3, 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.2' + VERSION='1.1.3' 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.2, which was +This file was extended by itstool $as_me 1.1.3, 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.2 +itstool config.status 1.1.3 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.2/configure.ac new/itstool-1.1.3/configure.ac --- old/itstool-1.1.2/configure.ac 2012-02-05 17:48:20.000000000 +0100 +++ new/itstool-1.1.3/configure.ac 2012-05-07 22:36:49.000000000 +0200 @@ -1,4 +1,4 @@ -AC_INIT([itstool], [1.1.2], []) +AC_INIT([itstool], [1.1.3], []) 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.2/itstool new/itstool-1.1.3/itstool --- old/itstool-1.1.2/itstool 2012-02-05 17:48:33.000000000 +0100 +++ new/itstool-1.1.3/itstool 2012-05-07 22:39:29.000000000 +0200 @@ -17,7 +17,7 @@ # Place, Suite 330, Boston, MA 0211-1307 USA. # -VERSION="1.1.2" +VERSION="1.1.3" DATADIR="/usr/local/share" import gettext @@ -169,6 +169,8 @@ if prop.ns() is not None: name = prop.ns().name + ':' + name atval = prop.content + if not isinstance(atval, unicode): + atval = unicode(atval, 'utf-8') atval = atval.replace('&', '&').replace('<', '<').replace('>', '>').replace('"', '"') self._message += " %s=\"%s\"" % (name, atval) if node.children is not None: @@ -295,7 +297,11 @@ def __init__ (self, filename, messages): self._xml_err = '' libxml2.registerErrorHandler(xml_error_catcher, self) - ctxt = libxml2.createFileParserCtxt(filename) + try: + ctxt = libxml2.createFileParserCtxt(filename) + except: + sys.stderr.write('Error: cannot open XML file %s\n' % filename) + sys.exit(1) ctxt.lineNumbers(1) ctxt.replaceEntities(1) ctxt.parseDocument() @@ -707,7 +713,8 @@ if strict: raise else: - sys.stderr.write('Warning: Could not merge translation for msgid:\n%s\n' % msgstr) + sys.stderr.write('Warning: Could not merge translation for msgid:\n%s\n' % + msgstr.encode('utf-8')) self._xml_err = '' return node def scan_node(node): @@ -734,6 +741,15 @@ if self._itst_credits is not None: self._msgs.add_credits() for ext in self._itst_externals: + translate = None + node = ext[0] + while node != None: + translate = self.get_its_translate(node) + if translate is not None: + break + node = node.parent + if translate == 'no': + continue msg = Message() try: fullfile = os.path.join(os.path.dirname(self._filename), ext[1]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/itstool-1.1.2/itstool.1 new/itstool-1.1.3/itstool.1 --- old/itstool-1.1.2/itstool.1 2012-02-05 17:48:33.000000000 +0100 +++ new/itstool-1.1.3/itstool.1 2012-05-07 22:39:29.000000000 +0200 @@ -1,4 +1,4 @@ -.TH ITSTOOL "1" "May 2011" "itstool 1.1.2" +.TH ITSTOOL "1" "May 2011" "itstool 1.1.3" .SH NAME itstool \- convert between XML and PO using ITS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/itstool-1.1.2/itstool.in new/itstool-1.1.3/itstool.in --- old/itstool-1.1.2/itstool.in 2011-09-27 16:18:30.000000000 +0200 +++ new/itstool-1.1.3/itstool.in 2012-05-07 22:36:10.000000000 +0200 @@ -169,6 +169,8 @@ if prop.ns() is not None: name = prop.ns().name + ':' + name atval = prop.content + if not isinstance(atval, unicode): + atval = unicode(atval, 'utf-8') atval = atval.replace('&', '&').replace('<', '<').replace('>', '>').replace('"', '"') self._message += " %s=\"%s\"" % (name, atval) if node.children is not None: @@ -295,7 +297,11 @@ def __init__ (self, filename, messages): self._xml_err = '' libxml2.registerErrorHandler(xml_error_catcher, self) - ctxt = libxml2.createFileParserCtxt(filename) + try: + ctxt = libxml2.createFileParserCtxt(filename) + except: + sys.stderr.write('Error: cannot open XML file %s\n' % filename) + sys.exit(1) ctxt.lineNumbers(1) ctxt.replaceEntities(1) ctxt.parseDocument() @@ -707,7 +713,8 @@ if strict: raise else: - sys.stderr.write('Warning: Could not merge translation for msgid:\n%s\n' % msgstr) + sys.stderr.write('Warning: Could not merge translation for msgid:\n%s\n' % + msgstr.encode('utf-8')) self._xml_err = '' return node def scan_node(node): @@ -734,6 +741,15 @@ if self._itst_credits is not None: self._msgs.add_credits() for ext in self._itst_externals: + translate = None + node = ext[0] + while node != None: + translate = self.get_its_translate(node) + if translate is not None: + break + node = node.parent + if translate == 'no': + continue msg = Message() try: fullfile = os.path.join(os.path.dirname(self._filename), ext[1]) -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
