Skip to content

Commit

Permalink
allow .po files with no headers
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Petty committed Aug 29, 2016
1 parent 77f5dcd commit 2ba0779
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/parse.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ module.exports = function(buffer, options) {

Object.keys(contexts).forEach(function (context) {
var translations = parsed.translations[context];
var pluralForms = parsed.headers['plural-forms'];
var pluralForms = parsed.headers ? parsed.headers['plural-forms'] : '';

Object.keys(translations).forEach(function (key, i) {
var t = translations[key],
Expand Down
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "po2json",
"description": "Convert PO files to JSON",
"version": "0.4.3",
"version": "0.4.4",
"homepage": "https://github.com/mikeedwards/po2json",
"author": {
"name": "Joshua I. Miller",
Expand Down Expand Up @@ -33,6 +33,10 @@
},
{
"name": "rafalt-iRonin"
},
{
"name": "Alex Petty",
"email": "[email protected]"
}
],
"repository": {
Expand Down

0 comments on commit 2ba0779

Please sign in to comment.