Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Read locale from .po if it has Language header #420

Merged
merged 1 commit into from
Jul 8, 2016
Merged

Read locale from .po if it has Language header #420

merged 1 commit into from
Jul 8, 2016

Conversation

kruton
Copy link
Contributor

@kruton kruton commented Jun 18, 2016

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.

Fixes #422

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.
@codecov-io
Copy link

Current coverage is 90.15%

Merging #420 into master will increase coverage by <.01%

@@             master       #420   diff @@
==========================================
  Files            24         24          
  Lines          3951       3953     +2   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits           3562       3564     +2   
  Misses          389        389          
  Partials          0          0          

Powered by Codecov. Last updated by 5fe694b...08b9c5e

@akx
Copy link
Member

akx commented Jul 8, 2016

Seems sensible. Thank you for the patch, @kruton!

@akx akx merged commit 95a8632 into python-babel:master Jul 8, 2016
akx added a commit that referenced this pull request Apr 6, 2017
@kruton kruton deleted the read-locale branch January 26, 2021 17:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants