]> git.ipfire.org Git - thirdparty/babel.git/commit
Read locale from .po if it has Language header 420/head
authorKenny Root <kenny@the-b.org>
Fri, 17 Jun 2016 06:11:56 +0000 (23:11 -0700)
committerKenny Root <kenny@the-b.org>
Sat, 18 Jun 2016 00:12:31 +0000 (17:12 -0700)
commit08b9c5e76e19ae610f28759a5cf37621ac2fb734
tree0e9fe51c2e3117b4f5db58c15b180eb2a5aba8dd
parent5fe694b57ef730c4154f77a78c5dbe819c6298a5
Read locale from .po if it has Language header

When a .po file was written out it would write the "Language"
header, but it wouldn't subsequently read that header back in. This
change makes that symmetric so you can write out a file and get back the
same Catalog by reading it in again.

Additionally other values like charset get overridden when the header is
read, so codify the behavior that the read "Language" header gets set as
the locale of the Catalog object.
babel/messages/catalog.py
tests/messages/test_pofile.py