Hello community,

here is the log from the commit of package python3-polib for openSUSE:Factory 
checked in at 2015-08-05 06:50:09
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python3-polib (Old)
 and      /work/SRC/openSUSE:Factory/.python3-polib.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python3-polib"

Changes:
--------
--- /work/SRC/openSUSE:Factory/python3-polib/python3-polib.changes      
2015-06-30 10:19:43.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.python3-polib.new/python3-polib.changes 
2015-08-05 06:50:13.000000000 +0200
@@ -1,0 +2,13 @@
+Mon Jul 13 21:38:25 UTC 2015 - [email protected]
+
+- update to version 1.0.7:
+  * Fixed bad parsing of indented msgstr_plural
+  * Fixed ordering of "Language" metadata entry
+  * Removed space after "#" in header if comment line is empty (like
+    gettext tools) * Fixed typos / grammar errors (thanks Jakub Wilk)
+  * Take into account msgid_plural if needed when comparing entries
+    (thanks Leonardo Constantino Oliveira)
+  * Fixed issue #63 (str() on a bytes instance when using python3)
+    (thanks Jakub Wilk)
+
+-------------------------------------------------------------------

Old:
----
  polib-1.0.6.tar.gz

New:
----
  polib-1.0.7.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python3-polib.spec ++++++
--- /var/tmp/diff_new_pack.K3gKXw/_old  2015-08-05 06:50:14.000000000 +0200
+++ /var/tmp/diff_new_pack.K3gKXw/_new  2015-08-05 06:50:14.000000000 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package python3-polib
 #
-# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
 
 
 Name:           python3-polib
-Version:        1.0.6
+Version:        1.0.7
 Release:        0
 Summary:        Library to Manipulate gettext Files (PO and MO Files)
 License:        MIT

++++++ polib-1.0.6.tar.gz -> polib-1.0.7.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/polib-1.0.6/CHANGELOG new/polib-1.0.7/CHANGELOG
--- old/polib-1.0.6/CHANGELOG   2015-01-04 12:28:42.000000000 +0100
+++ new/polib-1.0.7/CHANGELOG   2015-07-08 08:21:36.000000000 +0200
@@ -2,6 +2,15 @@
 Changelog
 =========
 
+Version 1.0.7 (2015/07/08)
+--------------------------
+ - Fixed bad parsing of indented msgstr_plural
+ - Fixed ordering of "Language" metadata entry
+ - Removed space after "#" in header if comment line is empty (like gettext 
tools)
+ - Fixed typos / grammar errors (thanks Jakub Wilk)
+ - Take into account msgid_plural if needed when comparing entries (thanks 
Leonardo Constantino Oliveira)
+ - Fixed issue #63 (str() on a bytes instance when using python3) (thanks 
Jakub Wilk)
+
 Version 1.0.6 (2015/01/04)
 --------------------------
  - Wheel support
@@ -12,14 +21,14 @@
 --------------------------
  - Fixed issue #59: tokens variable referenced before assignment
  - Implemented feature request #56: line number information in PO entries
- - Fixed issue #61: polib does not handle previous msgid on multines properly
+ - Fixed issue #61: polib does not handle previous msgid on multilines properly
 
 Version 1.0.4 (2014/02/19)
 --------------------------
  - Fixed issue #43: improved check that determine if polib is dealing with a 
filepath or unicode content
  - Fixed issue #44: polib now checks MO files revision number and throws an 
error if the number is unexpected
  - Fixed issue #45: parse properly mo files with no header entry
- - Fixed issue #47: added flags attribute for MOEntry to be consistant with 
POEntry
+ - Fixed issue #47: added flags attribute for MOEntry to be consistent with 
POEntry
  - Fixed issue #49: use integers rather than strings for msgstr_plural keys
  - Fixed issue #51: if a PO file ends with a comment, polib adds a spurious 
empty entry at the end
  - Fixed issue #52: bad magic number written on big endian platforms
@@ -27,7 +36,7 @@
  - Fixed issue #54: use lowercase for state identifiers. This fixes issues 
with certain locales and string.lower()
  - Fixed issue #58: use io.open() instead of codecs.open() because the latter 
doesn't handle very well universal line endings
  - Make sure the mo file is closed at garbage collection, this prevents 
warnings on unclosed file when running tests with python >= 3.2
- - Better way to test indianness
+ - Better way to test endianness
  - polib download URL is now on Pypi
 
 Version 1.0.3 (2013/02/09)
@@ -36,11 +45,11 @@
  - Fixed issue #39: Added __init__.py file for convenience
  - Fixed issue #41: UnicodeDecodeError when running setup.py build on python3 
with C locale
  - polib is now fully PEP8 compliant
- - Small improvements: remove unused "typ" var (thanks Rodrigo Silva), mproved 
Makefile, Make sure _BaseFile.__contains__ returns a boolean value
+ - Small improvements: remove unused "typ" var (thanks Rodrigo Silva), 
improved Makefile, Make sure _BaseFile.__contains__ returns a boolean value
 
 Version 1.0.2 (2012/10/23)
 --------------------------
- - allow empty comments, flags or occurences lines
+ - allow empty comments, flags or occurrences lines
 
 Version 1.0.1 (2012/09/11)
 --------------------------
@@ -64,7 +73,7 @@
 
 Version 0.6.4 (2011/07/13)
 --------------------------
- - Better api, autodetected_encoding is no longer required to explicitely set 
the encoding (fixes issue #23),
+ - Better api, autodetected_encoding is no longer required to explicitly set 
the encoding (fixes issue #23),
  - Fixed issue #24 Support indented PO files (thanks to François Poirotte).
 
 Version 0.6.3 (2011/02/19)
@@ -103,7 +112,7 @@
  - correctly unescape lines containing both \\\\n and \\n (thanks to Martin 
Geisler),
  - fixed issue #6: __str__() methods are returning unicode instead of str,
  - fixed issue #8: POFile.merge error when an entry is obsolete in a .po, that 
this entry reappears in the .pot and that we merge the two,
- - added support to instanciate POFile objects using data instead of file path 
(thanks to Diego Búrigo Zacarão),
+ - added support to instantiate POFile objects using data instead of file path 
(thanks to Diego Búrigo Zacarão),
  - fixed issue #9: POFile.merge drop fuzzy attributes from translations 
(thanks to Tim Gerundt),
  - fixed issue #10: Finding entries with the same msgid and different context 
(msgctxt).
 
@@ -142,7 +151,7 @@
 --------------------------
  - fixed issue #0006: plural msgstrs were saved unsorted,
  - fixed issue #0008: long comment lines broke 'save()' method,
- - removed performance shortcuts: they were in fact inefficient, I was 
misleaded by the python profile module, kudos to Thomas for making me realise 
that,
+ - removed performance shortcuts: they were in fact inefficient, I was mislead 
by the python profile module, kudos to Thomas for making me realise that,
  - fixed issue #0010: wrong polib version number,
  - fixed issue #0011: occurrences parsing is now more robust and can handle 
weird references formats (like in eToys OLPC po files),
  - fixed issue #0012: improved merge() method.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/polib-1.0.6/PKG-INFO new/polib-1.0.7/PKG-INFO
--- old/polib-1.0.6/PKG-INFO    2015-01-04 12:33:25.000000000 +0100
+++ new/polib-1.0.7/PKG-INFO    2015-07-08 08:23:06.000000000 +0200
@@ -1,30 +1,30 @@
 Metadata-Version: 1.1
 Name: polib
-Version: 1.0.6
+Version: 1.0.7
 Summary: A library to manipulate gettext files (po and mo files).
 Home-page: http://bitbucket.org/izi/polib/
 Author: David Jean Louis
 Author-email: [email protected]
 License: MIT
-Download-URL: 
https://pypi.python.org/packages/source/p/polib/polib-1.0.6.tar.gz
+Download-URL: 
https://pypi.python.org/packages/source/p/polib/polib-1.0.7.tar.gz
 Description: 
         =====
         polib
         =====
         
-        .. image:: https://pypip.in/download/polib/badge.png
+        .. image:: https://img.shields.io/pypi/dm/polib.svg
             :alt: Downloads
         
         
-        .. image:: https://pypip.in/py_versions/polib/badge.png
+        .. image:: https://img.shields.io/pypi/pyversions/polib.svg
             :alt: Supported Python versions
         
         
-        .. image:: https://pypip.in/status/polib/badge.png
+        .. image:: https://img.shields.io/pypi/status/polib.svg
             :alt: Development Status
         
         
-        .. image:: https://pypip.in/license/polib/badge.png
+        .. image:: https://img.shields.io/pypi/l/polib.svg
             :alt: License
         
         
@@ -52,6 +52,15 @@
         Changelog
         =========
         
+        Version 1.0.7 (2015/07/08)
+        --------------------------
+         - Fixed bad parsing of indented msgstr_plural
+         - Fixed ordering of "Language" metadata entry
+         - Removed space after "#" in header if comment line is empty (like 
gettext tools)
+         - Fixed typos / grammar errors (thanks Jakub Wilk)
+         - Take into account msgid_plural if needed when comparing entries 
(thanks Leonardo Constantino Oliveira)
+         - Fixed issue #63 (str() on a bytes instance when using python3) 
(thanks Jakub Wilk)
+        
         Version 1.0.6 (2015/01/04)
         --------------------------
          - Wheel support
@@ -62,14 +71,14 @@
         --------------------------
          - Fixed issue #59: tokens variable referenced before assignment
          - Implemented feature request #56: line number information in PO 
entries
-         - Fixed issue #61: polib does not handle previous msgid on multines 
properly
+         - Fixed issue #61: polib does not handle previous msgid on multilines 
properly
         
         Version 1.0.4 (2014/02/19)
         --------------------------
          - Fixed issue #43: improved check that determine if polib is dealing 
with a filepath or unicode content
          - Fixed issue #44: polib now checks MO files revision number and 
throws an error if the number is unexpected
          - Fixed issue #45: parse properly mo files with no header entry
-         - Fixed issue #47: added flags attribute for MOEntry to be consistant 
with POEntry
+         - Fixed issue #47: added flags attribute for MOEntry to be consistent 
with POEntry
          - Fixed issue #49: use integers rather than strings for msgstr_plural 
keys
          - Fixed issue #51: if a PO file ends with a comment, polib adds a 
spurious empty entry at the end
          - Fixed issue #52: bad magic number written on big endian platforms
@@ -77,7 +86,7 @@
          - Fixed issue #54: use lowercase for state identifiers. This fixes 
issues with certain locales and string.lower()
          - Fixed issue #58: use io.open() instead of codecs.open() because the 
latter doesn't handle very well universal line endings
          - Make sure the mo file is closed at garbage collection, this 
prevents warnings on unclosed file when running tests with python >= 3.2
-         - Better way to test indianness
+         - Better way to test endianness
          - polib download URL is now on Pypi
         
         Version 1.0.3 (2013/02/09)
@@ -86,11 +95,11 @@
          - Fixed issue #39: Added __init__.py file for convenience
          - Fixed issue #41: UnicodeDecodeError when running setup.py build on 
python3 with C locale
          - polib is now fully PEP8 compliant
-         - Small improvements: remove unused "typ" var (thanks Rodrigo Silva), 
mproved Makefile, Make sure _BaseFile.__contains__ returns a boolean value
+         - Small improvements: remove unused "typ" var (thanks Rodrigo Silva), 
improved Makefile, Make sure _BaseFile.__contains__ returns a boolean value
         
         Version 1.0.2 (2012/10/23)
         --------------------------
-         - allow empty comments, flags or occurences lines
+         - allow empty comments, flags or occurrences lines
         
         Version 1.0.1 (2012/09/11)
         --------------------------
@@ -114,7 +123,7 @@
         
         Version 0.6.4 (2011/07/13)
         --------------------------
-         - Better api, autodetected_encoding is no longer required to 
explicitely set the encoding (fixes issue #23),
+         - Better api, autodetected_encoding is no longer required to 
explicitly set the encoding (fixes issue #23),
          - Fixed issue #24 Support indented PO files (thanks to François 
Poirotte).
         
         Version 0.6.3 (2011/02/19)
@@ -153,7 +162,7 @@
          - correctly unescape lines containing both \\\\n and \\n (thanks to 
Martin Geisler),
          - fixed issue #6: __str__() methods are returning unicode instead of 
str,
          - fixed issue #8: POFile.merge error when an entry is obsolete in a 
.po, that this entry reappears in the .pot and that we merge the two,
-         - added support to instanciate POFile objects using data instead of 
file path (thanks to Diego Búrigo Zacarão),
+         - added support to instantiate POFile objects using data instead of 
file path (thanks to Diego Búrigo Zacarão),
          - fixed issue #9: POFile.merge drop fuzzy attributes from 
translations (thanks to Tim Gerundt),
          - fixed issue #10: Finding entries with the same msgid and different 
context (msgctxt).
         
@@ -192,7 +201,7 @@
         --------------------------
          - fixed issue #0006: plural msgstrs were saved unsorted,
          - fixed issue #0008: long comment lines broke 'save()' method,
-         - removed performance shortcuts: they were in fact inefficient, I was 
misleaded by the python profile module, kudos to Thomas for making me realise 
that,
+         - removed performance shortcuts: they were in fact inefficient, I was 
mislead by the python profile module, kudos to Thomas for making me realise 
that,
          - fixed issue #0010: wrong polib version number,
          - fixed issue #0011: occurrences parsing is now more robust and can 
handle weird references formats (like in eToys OLPC po files),
          - fixed issue #0012: improved merge() method.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/polib-1.0.6/README.rst new/polib-1.0.7/README.rst
--- old/polib-1.0.6/README.rst  2014-12-05 10:19:35.000000000 +0100
+++ new/polib-1.0.7/README.rst  2015-07-07 14:39:38.000000000 +0200
@@ -2,19 +2,19 @@
 polib
 =====
 
-.. image:: https://pypip.in/download/polib/badge.png
+.. image:: https://img.shields.io/pypi/dm/polib.svg
     :alt: Downloads
 
 
-.. image:: https://pypip.in/py_versions/polib/badge.png
+.. image:: https://img.shields.io/pypi/pyversions/polib.svg
     :alt: Supported Python versions
 
 
-.. image:: https://pypip.in/status/polib/badge.png
+.. image:: https://img.shields.io/pypi/status/polib.svg
     :alt: Development Status
 
 
-.. image:: https://pypip.in/license/polib/badge.png
+.. image:: https://img.shields.io/pypi/l/polib.svg
     :alt: License
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/polib-1.0.6/docs/quickstart.rst 
new/polib-1.0.7/docs/quickstart.rst
--- old/polib-1.0.6/docs/quickstart.rst 2014-12-05 10:19:35.000000000 +0100
+++ new/polib-1.0.7/docs/quickstart.rst 2015-07-07 14:27:59.000000000 +0200
@@ -69,7 +69,7 @@
 Loading a catalog and specifying explicitly the encoding
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-For some reason you may want to specify the file encoding explicitely (because
+For some reason you may want to specify the file encoding explicitly (because
 the charset is not specified in the po file header for example), to do so::
 
     import polib
@@ -88,14 +88,14 @@
     mo = polib.mofile('path/to/catalog.mo')
     print mo
 
-As for po files, mofile also allows to specify the encoding explicitely.
+As for po files, mofile also allows specifying the encoding explicitly.
 
 
 Creating po catalogs from scratch
 ---------------------------------
 
 polib allows you to create catalog from scratch, this can be done with the
-POFile class, for exemple to create a simple catalog you could do::
+POFile class, for example to create a simple catalog you could do::
 
     import polib
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/polib-1.0.6/polib.egg-info/PKG-INFO 
new/polib-1.0.7/polib.egg-info/PKG-INFO
--- old/polib-1.0.6/polib.egg-info/PKG-INFO     2015-01-04 12:33:25.000000000 
+0100
+++ new/polib-1.0.7/polib.egg-info/PKG-INFO     2015-07-08 08:23:06.000000000 
+0200
@@ -1,30 +1,30 @@
 Metadata-Version: 1.1
 Name: polib
-Version: 1.0.6
+Version: 1.0.7
 Summary: A library to manipulate gettext files (po and mo files).
 Home-page: http://bitbucket.org/izi/polib/
 Author: David Jean Louis
 Author-email: [email protected]
 License: MIT
-Download-URL: 
https://pypi.python.org/packages/source/p/polib/polib-1.0.6.tar.gz
+Download-URL: 
https://pypi.python.org/packages/source/p/polib/polib-1.0.7.tar.gz
 Description: 
         =====
         polib
         =====
         
-        .. image:: https://pypip.in/download/polib/badge.png
+        .. image:: https://img.shields.io/pypi/dm/polib.svg
             :alt: Downloads
         
         
-        .. image:: https://pypip.in/py_versions/polib/badge.png
+        .. image:: https://img.shields.io/pypi/pyversions/polib.svg
             :alt: Supported Python versions
         
         
-        .. image:: https://pypip.in/status/polib/badge.png
+        .. image:: https://img.shields.io/pypi/status/polib.svg
             :alt: Development Status
         
         
-        .. image:: https://pypip.in/license/polib/badge.png
+        .. image:: https://img.shields.io/pypi/l/polib.svg
             :alt: License
         
         
@@ -52,6 +52,15 @@
         Changelog
         =========
         
+        Version 1.0.7 (2015/07/08)
+        --------------------------
+         - Fixed bad parsing of indented msgstr_plural
+         - Fixed ordering of "Language" metadata entry
+         - Removed space after "#" in header if comment line is empty (like 
gettext tools)
+         - Fixed typos / grammar errors (thanks Jakub Wilk)
+         - Take into account msgid_plural if needed when comparing entries 
(thanks Leonardo Constantino Oliveira)
+         - Fixed issue #63 (str() on a bytes instance when using python3) 
(thanks Jakub Wilk)
+        
         Version 1.0.6 (2015/01/04)
         --------------------------
          - Wheel support
@@ -62,14 +71,14 @@
         --------------------------
          - Fixed issue #59: tokens variable referenced before assignment
          - Implemented feature request #56: line number information in PO 
entries
-         - Fixed issue #61: polib does not handle previous msgid on multines 
properly
+         - Fixed issue #61: polib does not handle previous msgid on multilines 
properly
         
         Version 1.0.4 (2014/02/19)
         --------------------------
          - Fixed issue #43: improved check that determine if polib is dealing 
with a filepath or unicode content
          - Fixed issue #44: polib now checks MO files revision number and 
throws an error if the number is unexpected
          - Fixed issue #45: parse properly mo files with no header entry
-         - Fixed issue #47: added flags attribute for MOEntry to be consistant 
with POEntry
+         - Fixed issue #47: added flags attribute for MOEntry to be consistent 
with POEntry
          - Fixed issue #49: use integers rather than strings for msgstr_plural 
keys
          - Fixed issue #51: if a PO file ends with a comment, polib adds a 
spurious empty entry at the end
          - Fixed issue #52: bad magic number written on big endian platforms
@@ -77,7 +86,7 @@
          - Fixed issue #54: use lowercase for state identifiers. This fixes 
issues with certain locales and string.lower()
          - Fixed issue #58: use io.open() instead of codecs.open() because the 
latter doesn't handle very well universal line endings
          - Make sure the mo file is closed at garbage collection, this 
prevents warnings on unclosed file when running tests with python >= 3.2
-         - Better way to test indianness
+         - Better way to test endianness
          - polib download URL is now on Pypi
         
         Version 1.0.3 (2013/02/09)
@@ -86,11 +95,11 @@
          - Fixed issue #39: Added __init__.py file for convenience
          - Fixed issue #41: UnicodeDecodeError when running setup.py build on 
python3 with C locale
          - polib is now fully PEP8 compliant
-         - Small improvements: remove unused "typ" var (thanks Rodrigo Silva), 
mproved Makefile, Make sure _BaseFile.__contains__ returns a boolean value
+         - Small improvements: remove unused "typ" var (thanks Rodrigo Silva), 
improved Makefile, Make sure _BaseFile.__contains__ returns a boolean value
         
         Version 1.0.2 (2012/10/23)
         --------------------------
-         - allow empty comments, flags or occurences lines
+         - allow empty comments, flags or occurrences lines
         
         Version 1.0.1 (2012/09/11)
         --------------------------
@@ -114,7 +123,7 @@
         
         Version 0.6.4 (2011/07/13)
         --------------------------
-         - Better api, autodetected_encoding is no longer required to 
explicitely set the encoding (fixes issue #23),
+         - Better api, autodetected_encoding is no longer required to 
explicitly set the encoding (fixes issue #23),
          - Fixed issue #24 Support indented PO files (thanks to François 
Poirotte).
         
         Version 0.6.3 (2011/02/19)
@@ -153,7 +162,7 @@
          - correctly unescape lines containing both \\\\n and \\n (thanks to 
Martin Geisler),
          - fixed issue #6: __str__() methods are returning unicode instead of 
str,
          - fixed issue #8: POFile.merge error when an entry is obsolete in a 
.po, that this entry reappears in the .pot and that we merge the two,
-         - added support to instanciate POFile objects using data instead of 
file path (thanks to Diego Búrigo Zacarão),
+         - added support to instantiate POFile objects using data instead of 
file path (thanks to Diego Búrigo Zacarão),
          - fixed issue #9: POFile.merge drop fuzzy attributes from 
translations (thanks to Tim Gerundt),
          - fixed issue #10: Finding entries with the same msgid and different 
context (msgctxt).
         
@@ -192,7 +201,7 @@
         --------------------------
          - fixed issue #0006: plural msgstrs were saved unsorted,
          - fixed issue #0008: long comment lines broke 'save()' method,
-         - removed performance shortcuts: they were in fact inefficient, I was 
misleaded by the python profile module, kudos to Thomas for making me realise 
that,
+         - removed performance shortcuts: they were in fact inefficient, I was 
mislead by the python profile module, kudos to Thomas for making me realise 
that,
          - fixed issue #0010: wrong polib version number,
          - fixed issue #0011: occurrences parsing is now more robust and can 
handle weird references formats (like in eToys OLPC po files),
          - fixed issue #0012: improved merge() method.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/polib-1.0.6/polib.py new/polib-1.0.7/polib.py
--- old/polib-1.0.6/polib.py    2015-01-04 12:24:23.000000000 +0100
+++ new/polib-1.0.7/polib.py    2015-07-08 08:14:47.000000000 +0200
@@ -13,7 +13,7 @@
 """
 
 __author__ = 'David Jean Louis <[email protected]>'
-__version__ = '1.0.6'
+__version__ = '1.0.7'
 __all__ = ['pofile', 'POFile', 'POEntry', 'mofile', 'MOFile', 'MOEntry',
            'default_encoding', 'escape', 'unescape', 'detect_encoding', ]
 
@@ -339,7 +339,7 @@
 
     def __contains__(self, entry):
         """
-        Overriden ``list`` method to implement the membership test (in and
+        Overridden ``list`` method to implement the membership test (in and
         not in).
         The method considers that an entry is in the file if it finds an entry
         that has the same msgid (the test is **case sensitive**) and the same
@@ -358,7 +358,7 @@
 
     def append(self, entry):
         """
-        Overriden method to check for duplicates entries, if a user tries to
+        Overridden method to check for duplicates entries, if a user tries to
         add an entry that is already in the file, the method will raise a
         ``ValueError`` exception.
 
@@ -373,7 +373,7 @@
 
     def insert(self, index, entry):
         """
-        Overriden method to check for duplicates entries, if a user tries to
+        Overridden method to check for duplicates entries, if a user tries to
         add an entry that is already in the file, the method will raise a
         ``ValueError`` exception.
 
@@ -454,7 +454,7 @@
             boolean, whether to also search in entries that are obsolete.
 
         ``msgctxt``
-            string, allows to specify a specific message context for the
+            string, allows specifying a specific message context for the
             search.
         """
         if include_obsolete_entries:
@@ -483,10 +483,10 @@
             'PO-Revision-Date',
             'Last-Translator',
             'Language-Team',
-            'Language',
             'MIME-Version',
             'Content-Type',
             'Content-Transfer-Encoding',
+            'Language',
             'Plural-Forms'
         ]
         ordered_data = []
@@ -611,7 +611,9 @@
         """
         ret, headers = '', self.header.split('\n')
         for header in headers:
-            if header[:1] in [',', ':']:
+            if not len(header):
+                ret += "#\n"
+            elif header[:1] in [',', ':']:
                 ret += '#%s\n' % header
             else:
                 ret += '# %s\n' % header
@@ -897,9 +899,8 @@
 
         ret = ['%s%s%s "%s"' % (delflag, fieldname, plural_index,
                                 escape(lines.pop(0)))]
-        for mstr in lines:
-            #import pdb; pdb.set_trace()
-            ret.append('%s"%s"' % (delflag, escape(mstr)))
+        for line in lines:
+            ret.append('%s"%s"' % (delflag, escape(line)))
         return ret
 # }}}
 # class POEntry {{{
@@ -1048,6 +1049,17 @@
                     return 1
                 else:
                     return -1
+        # Compare msgid_plural if set
+        if self.msgid_plural:
+            if not other.msgid_plural:
+                return 1
+            for pos in self.msgid_plural:
+                if pos not in other.msgid_plural:
+                    return 1
+                if self.msgid_plural[pos] > other.msgid_plural[pos]:
+                    return 1
+                if self.msgid_plural[pos] < other.msgid_plural[pos]:
+                    return -1
         # Finally: Compare message ID
         if self.msgid > other.msgid:
             return 1
@@ -1212,7 +1224,7 @@
         #     * HE: Header
         #     * TC: a translation comment
         #     * GC: a generated comment
-        #     * OC: a file/line occurence
+        #     * OC: a file/line occurrence
         #     * FL: a flags line
         #     * CT: a message context
         #     * PC: a previous msgctxt
@@ -1470,7 +1482,7 @@
         return True
 
     def handle_oc(self):
-        """Handle a file:num occurence."""
+        """Handle a file:num occurrence."""
         if self.current_state in ['mc', 'ms', 'mx']:
             self.instance.append(self.current_entry)
             self.current_entry = POEntry(linenum=self.current_line)
@@ -1552,7 +1564,8 @@
 
     def handle_mx(self):
         """Handle a msgstr plural."""
-        index, value = self.current_token[7], self.current_token[11:-1]
+        index = self.current_token[7]
+        value = self.current_token[self.current_token.find('"') + 1:-1]
         self.current_entry.msgstr_plural[int(index)] = unescape(value)
         self.msgstr_index = int(index)
         return True
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/polib-1.0.6/setup.py new/polib-1.0.7/setup.py
--- old/polib-1.0.6/setup.py    2014-12-05 10:19:35.000000000 +0100
+++ new/polib-1.0.7/setup.py    2015-07-08 08:11:01.000000000 +0200
@@ -23,16 +23,16 @@
 desc = 'A library to manipulate gettext files (po and mo files).'
 
 if polib.PY3:
-    mode = 'rb'
+    enc = {'encoding': 'UTF-8'}
 else:
-    mode = 'r'
+    enc = {}
 
 long_desc = r'''
 %s
 
 %s
 
-''' % (open('README.rst', mode).read(), open('CHANGELOG', mode).read())
+''' % (open('README.rst', **enc).read(), open('CHANGELOG', **enc).read())
 
 if __name__ == '__main__':
     setup(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/polib-1.0.6/tests/test_merge_after.po 
new/polib-1.0.7/tests/test_merge_after.po
--- old/polib-1.0.6/tests/test_merge_after.po   2014-12-05 10:19:35.000000000 
+0100
+++ new/polib-1.0.7/tests/test_merge_after.po   2015-01-30 11:07:20.000000000 
+0100
@@ -1,7 +1,7 @@
 # translation of django.po to Castellano
 # This file is distributed under the same license as the PACKAGE package.
 # Copyright (C) 2007 THE PACKAGE'S COPYRIGHT HOLDER.
-# 
+#
 msgid ""
 msgstr ""
 "Project-Id-Version: django\n"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/polib-1.0.6/tests/tests.py 
new/polib-1.0.7/tests/tests.py
--- old/polib-1.0.6/tests/tests.py      2014-12-05 10:20:19.000000000 +0100
+++ new/polib-1.0.7/tests/tests.py      2015-07-07 14:27:59.000000000 +0200
@@ -78,7 +78,7 @@
 
     def test_pofile_and_mofile7(self):
         """
-        Test that encoding is ok when encoding is explicitely given.
+        Test that encoding is ok when encoding is explicitly given.
         """
         po = polib.pofile('tests/test_iso-8859-15.po', encoding='iso-8859-15')
         self.assertTrue(po.encoding == 'iso-8859-15')
@@ -300,7 +300,7 @@
 
     def test_empty(self):
         po = polib.pofile('')
-        self.assertEqual(po.__unicode__(), '# \nmsgid ""\nmsgstr ""\n')
+        self.assertEqual(po.__unicode__(), '#\nmsgid ""\nmsgstr ""\n')
 
     def test_linenum_1(self):
         po = polib.pofile('tests/test_utf8.po')
@@ -481,7 +481,7 @@
         pofile.append(c1)
         pofile.append(c2)
         pofile.sort()
-        expected = u('''# 
+        expected = u('''#
 msgid ""
 msgstr ""
 
@@ -515,7 +515,7 @@
 
     def test_trailing_comment(self):
         pofile  = polib.pofile('tests/test_trailing_comment.po')
-        expected = r'''# 
+        expected = r'''#
 msgid ""
 msgstr "Content-Type: text/plain; charset=UTF-8\n"
 


Reply via email to