Skip to main content
Release file added late

1 file was added to this release more than 14 days after its initial publication. Inspect the release files before installing.

polib

polib is a library to manipulate, create, modify gettext files (pot, po and mo files). You can load existing files, iterate through it’s entries, add, modify entries, comments or metadata, etc… or create new po files from scratch.

polib is pretty stable now and is used by many opensource projects.

The project code and bugtracker is hosted on Bitbucket.

polib is generously documented, you can browse the documentation online, a good start is to read the quickstart guide.

Thanks for downloading polib !

Changelog

Version 0.6.1 (2011/02/09)

  • fixed regression that prevented POFile initialization from data to work (issue #17).

Version 0.6.0 (2011/02/07)

  • polib is now fully documented,

  • switched from doctests to unit tests to keep the polib.py file clean,

  • fixed issue #7 (wrapping issues, thanks @jezdez),

  • added a __eq__ method to _BaseFile (thanks @kost BebiX),

  • handle msgctxt correctly when compiling mo files,

  • compiled mo files are now exactly the same as those compiled by msgfmt without using hash tables.

Version 0.5.5 (2010/10/30)

  • Removed multiline handling code, it was a mess and was the source of potential bugs like issue #11,

  • Fixed typo in README and CHANGELOG, fixes issue #13.

Version 0.5.4 (2010/10/02)

  • fixed an issue with detect_encoding(), in some cases it could return an invalid charset.

Version 0.5.3 (2010/08/29)

  • 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),

  • 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).

Version 0.5.2 (2010/06/09)

  • fixed issue #1: untranslated_entries() also show fuzzy message,

  • write back the fuzzy header if present in the pofile,

  • added support for previous msgctxt, previous msgid and previous msgid_plural comments (fixes issue #5),

  • better handling of lines wrapping.

Version 0.5.1 (2009/12/14)

  • fixed issue #0025: setup.py requires CHANGELOG but it’s not present in polib-0.5.0-tar.gz

Version 0.5.0 (2009/12/13)

  • fixed issue #0017: UnicodeDecodeError while writing a mo-file,

  • fixed issue #0018: implemented support for msgctxt,

  • fixed bug when compiling plural msgids/strs,

  • API docs are no longer included, hopefully next release will ship with sphinx documentation,

  • parse msg plural entries correctly when reading mo files,

  • fixed issue #0020 and #0021: added ability to check for duplicate when adding entries to po/mo files, this is optional and not enabled by default because it slows down considerably the library,

  • fixed issue #0022: unescaping code is insufficient,

  • fixed issue #0023: encoding error when saving mo file as po file (thanks to sebastien.sable for the patch !).

Version 0.4.2 (2009/06/05)

  • fixed issue #0007: use the codecs module to open files,

  • fixed issue #0014: plural forms are not saved correctly in the mo file (thanks lorenzo.gil.sanchez for the patch),

  • fixed issue #0015: no LICENSE file included in tarball,

  • removed Version/Date from README,

  • added test pot files to MANIFEST.in,

  • performance improvment in find() method (thanks Thomas !).

Version 0.4.1 (2009/03/04)

  • 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,

  • 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.

Version 0.4.0 (2008/11/26)

  • fixed bug #0005: percent_translated divide by 0 on empty po files,

  • fixed bug #0004: occurrences that have hiphens are wrapped when they should not,

  • changes in how encoding is handled,

  • remove deprecation warnings for typo on “occurrences”,

  • added POEntry.__cmp__() method to sort entries like gettext does,

  • fixed POEntry.transalated(),

  • added a merge() method to POFile class, that behaves like the gettext msgmerge utility,

  • obsolete entries are now written at the end of the file and with only msgid/msgstr like gettext does,

  • fixed some bugs in mo files parsing,

  • renamed quote/unquote functions to escape/unescape,

  • various cosmetic changes.

Version 0.3.1 (2007/12/13)

  • fixed bug #0002: typo on “occurrences”,

  • fixed bug #0003: mismatch in exception instance names,

  • removed deprecation warnings,

  • removed unused charset() method in POFile/MOFile objects,

  • fixed bug in multibytes string length (added regression tests),

  • fixed a bug in detect_encoding(),

  • added a find() method to _BaseFile class,

  • proper handling of quoting and unquoting,

  • proper handling of multiline strings in metadata

Version 0.3.0 (2007/10/17)

  • speed improvements,

  • polib can now compile mo files,

  • unicode support,

  • fixed bug #0001: global name ‘sorted’ is not defined” on python 2.3.

Version 0.1.0 (2006-08-08)

Initial release

Metadata

Release files for polib 0.6.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

File added late

1 file was uploaded more than 14 days after the first file in this release.

While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.

We recommend inspecting the release files before installing.

Source distribution (sdist)

Source distribution for polib 0.6.1
File Size Uploaded Provenance Actions
polib-0.6.1.tar.gz 146.3 kB File added late: Without provenance Details for polib-0.6.1.tar.gz

Release files / polib-0.6.1.tar.gz

File added late

This file was uploaded more than 14 days after the first file in this release.

While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.

We recommend inspecting the release file before installing.

Download URL polib-0.6.1.tar.gz
Size 146.3 kB
Tags Source
SHA-256 checksum
How to use checksums
d6f64ad1125cb6cfa97acf74ad1bbdace9b191c4cff5170caab88c2ffebe1bf2
BLAKE2b-256 checksum
How to use checksums
7425cf1c70f8c1d18b80ca7a26c6785db393a1d016c5b966308a6a44e8359b12
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for polib 0.6.1

Upload timing

Release file added late

1 file was uploaded more than 14 days after the first file in this release.

While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.


Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page