GithubHelp home page GithubHelp logo

python-gettext's People

Contributors

hannosch avatar sallner avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

python-gettext's Issues

License clarification?

Hello,

I've seen it listed in a few places that python-gettext is "BSD" licensed but there are 4 BSD licenses and the ISCL which is equivalient to BSD 2 Clause. I'm trying to label it correctly in FreeBSD ports.

Thanks!

Please fix error while compiling 2

Error while compiling /usr/local/Plone504/buildout-cache/eggs/python_gettext-3.0-py2.7.egg/pythongettext/tests/test_escape.po

msgid "msgid3"
-msgstr "Hellø "bar""
+msgstr "Hellø "bar""

Test fail on big-endian (s390x)

Example from Alpine Linux edge: https://gitlab.alpinelinux.org/ptrcnull/aports/-/jobs/783199#L149

======================================================================
FAIL: test_empty (pythongettext.tests.test_compile.TestWriter)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builds/ptrcnull/aports/community/py3-gettext/src/python-gettext-4.0/pythongettext/tests/test_compile.py", line 30, in test_empty
    self.compare_po_mo('test_empty.po', 'test_empty.mo')
  File "/builds/ptrcnull/aports/community/py3-gettext/src/python-gettext-4.0/pythongettext/tests/test_compile.py", line 27, in compare_po_mo
    self.assertEqual(mo, po)
AssertionError: b'\xde\x12\x04\x95\x00\x00\x00\x00\x00\x00\x0[65 chars]\x00' != b'\x95\x04\x12\xde\x00\x00\x00\x00\x00\x00\x0[65 chars]\x1c'

Test failures on ppc64

Packaging at https://build.opensuse.org/package/show/home:jayvdb:zope/python-python-gettext and surprisingly ran into a failure on ppc64

[   64s] ======================================================================
[   64s] FAIL: test_empty (pythongettext.tests.test_compile.TestWriter)
[   64s] ----------------------------------------------------------------------
[   64s] Traceback (most recent call last):
[   64s]   File "/home/abuild/rpmbuild/BUILD/python-gettext-4.0/pythongettext/tests/test_compile.py", line 30, in test_empty
[   64s]     self.compare_po_mo('test_empty.po', 'test_empty.mo')
[   64s]   File "/home/abuild/rpmbuild/BUILD/python-gettext-4.0/pythongettext/tests/test_compile.py", line 27, in compare_po_mo
[   64s]     self.assertEqual(mo, po)
[   64s] AssertionError: '\xde\x12\x04\x95\x00\x00\x00\x00\x00\x00\x00\x00\x1c\x00\x00\x00\x1c\x00\x00\x00\x00\x00\x00\x00\x1c\x00\x00\x00' != '\x95\x04\x12\xde\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1c\x00\x00\x00\x1c\x00\x00\x00\x00\x00\x00\x00\x1c'
[   64s] 
[   64s] ======================================================================
[   64s] FAIL: test_msgctxt (pythongettext.tests.test_compile.TestWriter)
[   64s] ----------------------------------------------------------------------
[   64s] Traceback (most recent call last):
[   64s]   File "/home/abuild/rpmbuild/BUILD/python-gettext-4.0/pythongettext/tests/test_compile.py", line 39, in test_msgctxt
[   64s]     self.compare_po_mo('test3.po', 'test3.mo')
[   64s]   File "/home/abuild/rpmbuild/BUILD/python-gettext-4.0/pythongettext/tests/test_compile.py", line 27, in compare_po_mo
[   64s]     self.assertEqual(mo, po)
[   64s] AssertionError: '\xde\x12\x04\x95\x00\x00\x00\x00\x04\x00\x00\x00\x1c\x00\x00\x00<\x00\x00\x00\x00\x00\x00\x00\\\x00\x00\x00\x00\x00\x00\x00\\\x00\x00\x00\x10\x00\x00\x00]\x00\x00\x00\x10\x00\x00\x00n\x00\x00\x00\x06\x00\x00\x00\x7f\x00\x00\x00\r\x01\x00\x00\x86\x00\x00\x00\x07\x00\x00\x00\x94\x01\x00\x00\x07\x00\x00\x00\x9c\x01\x00\x00\x07\x00\x00\x00\xa4\x01\x00\x00\x00msgctext3\x04msgid3\x00msgctext4\x04msgid4\x00msgid1\x00Project-Id-Version: test3\nPOT-Creation-Date: 2007-05-31 22:15+0100\nLast-Translator: Hanno C. Schlichting <[email protected]>\nLanguage-Team: <>\nMIME-Version: 1.0\nContent-Type: text/plain; charset=utf-8\nContent-Transfer-Encoding: 8bit\nPlural-Forms: nplurals=1; plural=0;\n\x00msgstr3\x00msgstr4\x00msgstr1\x00' != '\x95\x04\x12\xde\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x1c\x00\x00\x00<\x00\x00\x00\x00\x00\x00\x00\\\x00\x00\x00\x00\x00\x00\x00\\\x00\x00\x00\x10\x00\x00\x00]\x00\x00\x00\x10\x00\x00\x00n\x00\x00\x00\x06\x00\x00\x00\x7f\x00\x00\x01\r\x00\x00\x00\x86\x00\x00\x00\x07\x00\x00\x01\x94\x00\x00\x00\x07\x00\x00\x01\x9c\x00\x00\x00\x07\x00\x00\x01\xa4\x00msgctext3\x04msgid3\x00msgctext4\x04msgid4\x00msgid1\x00Project-Id-Version: test3\nPOT-Creation-Date: 2007-05-31 22:15+0100\nLast-Translator: Hanno C. Schlichting <[email protected]>\nLanguage-Team: <>\nMIME-Version: 1.0\nContent-Type: text/plain; charset=utf-8\nContent-Transfer-Encoding: 8bit\nPlural-Forms: nplurals=1; plural=0;\n\x00msgstr3\x00msgstr4\x00msgstr1\x00'
[   64s] 
[   64s] ======================================================================
[   64s] FAIL: test_test (pythongettext.tests.test_compile.TestWriter)
[   64s] ----------------------------------------------------------------------
[   64s] Traceback (most recent call last):
[   64s]   File "/home/abuild/rpmbuild/BUILD/python-gettext-4.0/pythongettext/tests/test_compile.py", line 33, in test_test
[   64s]     self.compare_po_mo('test.po', 'test.mo')
[   64s]   File "/home/abuild/rpmbuild/BUILD/python-gettext-4.0/pythongettext/tests/test_compile.py", line 27, in compare_po_mo
[   64s]     self.assertEqual(mo, po)
[   64s] AssertionError: '\xde\x12\x04\x95\x00\x00\x00\x00\x06\x00\x00\x00\x1c\x00\x00\x00L\x00\x00\x00\x00\x00\x00\x00|\x00\x00\x00\x00\x00\x00\x00|\x00\x00\x00\x06\x00\x00\x00}\x00\x00\x00\x06\x00\x00\x00\x84\x00\x00\x00\x06\x00\x00\x00\x8b\x00\x00\x00\x06\x00\x00\x00\x92\x00\x00\x00\x06\x00\x00\x00\x99\x00\x00\x00\r\x01\x00\x00\xa0\x00\x00\x00\x07\x00\x00\x00\xae\x01\x00\x00\x07\x00\x00\x00\xb6\x01\x00\x00\x07\x00\x00\x00\xbe\x01\x00\x00\x07\x00\x00\x00\xc6\x01\x00\x00\x07\x00\x00\x00\xce\x01\x00\x00\x00msgid1\x00msgid2\x00msgid3\x00msgid4\x00msgid5\x00Project-Id-Version: test\nPOT-Creation-Date: 2007-05-31 19:30+0100\nLast-Translator: Hanno C. Schlichting <[email protected]>\nLanguage-Team:  <>\nMIME-Version: 1.0\nContent-Type: text/plain; charset=utf-8\nContent-Transfer-Encoding: 8bit\nPlural-Forms: nplurals=1; plural=0;\n\x00msgstr1\x00msgstr2\x00msgstr3\x00msgstr4\x00msgstr5\x00' != '\x95\x04\x12\xde\x00\x00\x00\x00\x00\x00\x00\x06\x00\x00\x00\x1c\x00\x00\x00L\x00\x00\x00\x00\x00\x00\x00|\x00\x00\x00\x00\x00\x00\x00|\x00\x00\x00\x06\x00\x00\x00}\x00\x00\x00\x06\x00\x00\x00\x84\x00\x00\x00\x06\x00\x00\x00\x8b\x00\x00\x00\x06\x00\x00\x00\x92\x00\x00\x00\x06\x00\x00\x00\x99\x00\x00\x01\r\x00\x00\x00\xa0\x00\x00\x00\x07\x00\x00\x01\xae\x00\x00\x00\x07\x00\x00\x01\xb6\x00\x00\x00\x07\x00\x00\x01\xbe\x00\x00\x00\x07\x00\x00\x01\xc6\x00\x00\x00\x07\x00\x00\x01\xce\x00msgid1\x00msgid2\x00msgid3\x00msgid4\x00msgid5\x00Project-Id-Version: test\nPOT-Creation-Date: 2007-05-31 19:30+0100\nLast-Translator: Hanno C. Schlichting <[email protected]>\nLanguage-Team:  <>\nMIME-Version: 1.0\nContent-Type: text/plain; charset=utf-8\nContent-Transfer-Encoding: 8bit\nPlural-Forms: nplurals=1; plural=0;\n\x00msgstr1\x00msgstr2\x00msgstr3\x00msgstr4\x00msgstr5\x00'
[   64s] 
[   64s] ======================================================================
[   64s] FAIL: test_test2 (pythongettext.tests.test_compile.TestWriter)
[   64s] ----------------------------------------------------------------------
[   64s] Traceback (most recent call last):
[   64s]   File "/home/abuild/rpmbuild/BUILD/python-gettext-4.0/pythongettext/tests/test_compile.py", line 36, in test_test2
[   64s]     self.compare_po_mo('test2.po', 'test2.mo')
[   64s]   File "/home/abuild/rpmbuild/BUILD/python-gettext-4.0/pythongettext/tests/test_compile.py", line 27, in compare_po_mo
[   64s]     self.assertEqual(mo, po)
[   64s] AssertionError: '\xde\x12\x04\x95\x00\x00\x00\x00\x02\x00\x00\x00\x1c\x00\x00\x00,\x00\x00\x00\x00\x00\x00\x00<\x00\x00\x00\x00\x00\x00\x00<\x00\x00\x00\x06\x00\x00\x00=\x00\x00\x00\r\x01\x00\x00D\x00\x00\x00\x07\x00\x00\x00R\x01\x00\x00\x00msgid1\x00Project-Id-Version: test2\nPOT-Creation-Date: 2007-05-31 22:15+0100\nLast-Translator: Hanno C. Schlichting <[email protected]>\nLanguage-Team: <>\nMIME-Version: 1.0\nContent-Type: text/plain; charset=utf-8\nContent-Transfer-Encoding: 8bit\nPlural-Forms: nplurals=1; plural=0;\n\x00msgstr1\x00' != '\x95\x04\x12\xde\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x1c\x00\x00\x00,\x00\x00\x00\x00\x00\x00\x00<\x00\x00\x00\x00\x00\x00\x00<\x00\x00\x00\x06\x00\x00\x00=\x00\x00\x01\r\x00\x00\x00D\x00\x00\x00\x07\x00\x00\x01R\x00msgid1\x00Project-Id-Version: test2\nPOT-Creation-Date: 2007-05-31 22:15+0100\nLast-Translator: Hanno C. Schlichting <[email protected]>\nLanguage-Team: <>\nMIME-Version: 1.0\nContent-Type: text/plain; charset=utf-8\nContent-Transfer-Encoding: 8bit\nPlural-Forms: nplurals=1; plural=0;\n\x00msgstr1\x00'
[   64s] 
[   64s] ======================================================================
[   64s] FAIL: test_test6 (pythongettext.tests.test_compile.TestWriter)
[   64s] ----------------------------------------------------------------------
[   64s] Traceback (most recent call last):
[   64s]   File "/home/abuild/rpmbuild/BUILD/python-gettext-4.0/pythongettext/tests/test_compile.py", line 71, in test_test6
[   64s]     self.compare_po_mo('test6.po', 'test6.mo')
[   64s]   File "/home/abuild/rpmbuild/BUILD/python-gettext-4.0/pythongettext/tests/test_compile.py", line 27, in compare_po_mo
[   64s]     self.assertEqual(mo, po)
[   64s] AssertionError: '\xde\x12\x04\x95\x00\x00\x00\x00\x02\x00\x00\x00\x1c\x00\x00\x00,\x00\x00\x00\x00\x00\x00\x00<\x00\x00\x00\x00\x00\x00\x00<\x00\x00\x00\x06\x00\x00\x00=\x00\x00\x00*\x01\x00\x00D\x00\x00\x00\x05\x00\x00\x00o\x01\x00\x00\x00msgid1\x00Project-Id-Version: T\xc3\xb8st 1.0\nPOT-Creation-Date: 2007-05-31 19:30+0100\nPO-Revision-Date: 2007-05-31 19:30+0100\nLast-Translator: F\xc3\xb6\xc3\xb8 B\xc3\xa5r <[email protected]>\nLanguage-Team:  <>\nMIME-Version: 1.0\nContent-Type: text/plain; charset=utf-8\nContent-Transfer-Encoding: 8bit\nPlural-Forms: nplurals=1; plural=0;\n\x00f\xc3\xb8\xc3\xb8\x00' != '\x95\x04\x12\xde\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x1c\x00\x00\x00,\x00\x00\x00\x00\x00\x00\x00<\x00\x00\x00\x00\x00\x00\x00<\x00\x00\x00\x06\x00\x00\x00=\x00\x00\x01*\x00\x00\x00D\x00\x00\x00\x05\x00\x00\x01o\x00msgid1\x00Project-Id-Version: T\xc3\xb8st 1.0\nPOT-Creation-Date: 2007-05-31 19:30+0100\nPO-Revision-Date: 2007-05-31 19:30+0100\nLast-Translator: F\xc3\xb6\xc3\xb8 B\xc3\xa5r <[email protected]>\nLanguage-Team:  <>\nMIME-Version: 1.0\nContent-Type: text/plain; charset=utf-8\nContent-Transfer-Encoding: 8bit\nPlural-Forms: nplurals=1; plural=0;\n\x00f\xc3\xb8\xc3\xb8\x00'
[   64s] 
[   64s] ======================================================================
[   64s] FAIL: test_unicode_bom (pythongettext.tests.test_compile.TestWriter)
[   64s] ----------------------------------------------------------------------
[   64s] Traceback (most recent call last):
[   64s]   File "/home/abuild/rpmbuild/BUILD/python-gettext-4.0/pythongettext/tests/test_compile.py", line 94, in test_unicode_bom
[   64s]     self.compare_po_mo('test_unicode_bom.po', 'test_unicode_bom.mo')
[   64s]   File "/home/abuild/rpmbuild/BUILD/python-gettext-4.0/pythongettext/tests/test_compile.py", line 27, in compare_po_mo
[   64s]     self.assertEqual(mo, po)
[   64s] AssertionError: '\xde\x12\x04\x95\x00\x00\x00\x00\x02\x00\x00\x00\x1c\x00\x00\x00,\x00\x00\x00\x00\x00\x00\x00<\x00\x00\x00\x00\x00\x00\x00<\x00\x00\x00\x06\x00\x00\x00=\x00\x00\x00\r\x01\x00\x00D\x00\x00\x00\x05\x00\x00\x00R\x01\x00\x00\x00msgid1\x00Project-Id-Version: test\nPOT-Creation-Date: 2007-05-31 19:30+0100\nLast-Translator: Hanno C. Schlichting <[email protected]>\nLanguage-Team:  <>\nMIME-Version: 1.0\nContent-Type: text/plain; charset=utf-8\nContent-Transfer-Encoding: 8bit\nPlural-Forms: nplurals=1; plural=0;\n\x00f\xc3\xb8\xc3\xb8\x00' != '\x95\x04\x12\xde\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x1c\x00\x00\x00,\x00\x00\x00\x00\x00\x00\x00<\x00\x00\x00\x00\x00\x00\x00<\x00\x00\x00\x06\x00\x00\x00=\x00\x00\x01\r\x00\x00\x00D\x00\x00\x00\x05\x00\x00\x01R\x00msgid1\x00Project-Id-Version: test\nPOT-Creation-Date: 2007-05-31 19:30+0100\nLast-Translator: Hanno C. Schlichting <[email protected]>\nLanguage-Team:  <>\nMIME-Version: 1.0\nContent-Type: text/plain; charset=utf-8\nContent-Transfer-Encoding: 8bit\nPlural-Forms: nplurals=1; plural=0;\n\x00f\xc3\xb8\xc3\xb8\x00'
[   64s] 
[   64s] ----------------------------------------------------------------------
[   64s] Ran 12 tests in 0.017s
[   64s] 
[   64s] FAILED (failures=6)

Failure with plural forms on python 3

Working great on python 2, but in python 3 I get:

  File "/Users/jinty/src/mp-3/lib/python3.4/site-packages/van.potomo-2.1-py3.4.egg/van/potomo/__init__.py", line 80, in _compile
  File "/Users/jinty/src/mp-3/lib/python3.4/site-packages/python_gettext-2.1-py3.4.egg/pythongettext/msgfmt.py", line 182, in get
    self.read()
  File "/Users/jinty/src/mp-3/lib/python3.4/site-packages/python_gettext-2.1-py3.4.egg/pythongettext/msgfmt.py", line 238, in read
    msgid += b('\0')  # separator of singular and plural
TypeError: Can't convert 'bytes' object to str implicitly

Please fix error while compiling

Please fix error while compiling /usr/local/Plone504/buildout-cache/eggs/python_gettext-3.0-py2.7.egg/pythongettext/tests/test5.po

-msgstr "føø
-bår"
+msgstr "føø bår"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.