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

Fix the po-parser dep to 4.1.1 & update repo url #2

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Po2Json.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ static public function parseVariable(
// Parse po contents
$poparser = new \Sepia\PoParser();
$translations = $poparser->readVariable($contents);
$_headers = self::parseHeaders($poparser->headers());
$_headers = self::parseHeaders($poparser->getHeaders());
return self::convertToJson($_headers, $translations, $fuzzy, $format, $domain);

}
Expand All @@ -29,8 +29,8 @@ static public function parseFile(

// Parse po file
$poparser = new \Sepia\PoParser();
$translations = $poparser->read($path);
$_headers = self::parseHeaders($poparser->headers());
$translations = $poparser->parseFile($path);
$_headers = self::parseHeaders($poparser->getHeaders());
return self::convertToJson($_headers, $translations, $fuzzy, $format, $domain);

}
Expand Down Expand Up @@ -173,4 +173,4 @@ static protected function parse_http_headers($raw_headers)
return $headers;
}

}
}
8 changes: 1 addition & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,12 @@
"email": "[email protected]"
}
],
"repositories": [
{
"type":"vcs",
"url":"https://github.com/Gapminder/PHP-po-parser.git"
}
],
"autoload": {
"classmap": ["."]
},
"require": {
"php": ">=5.3.0",
"sepia/po-parser": "dev-master"
"sepia/po-parser": "4.1.1"
},
"require-dev": {
"codeception/codeception": "~1.8.3"
Expand Down
Loading