Skip to content

Commit

Permalink
Merge pull request vegas-cmf#6 from krzysztof-kabala/patch-7
Browse files Browse the repository at this point in the history
Update I18nTask.php
  • Loading branch information
sanderborgman committed Aug 2, 2016
2 parents 1f93f43 + c92018a commit aa23843
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/Task/I18nTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,11 @@ class I18nTask extends TaskAbstract
protected $langs;
protected $textKeywords;
protected $templateKeywords;
protected $poHeader = 'msgid ""'."\n".'msgstr "Content-Type: text/plain; charset=utf-8\n"'."\n";

private $parser = '{xgettext} --omit-header --no-wrap --language="{lang}" --from-code="{encoding}" -k"{keys}" -j -o"{out}" {in}';
private $templateParser = '{xgettextTemplate} --force-po=false --language="{lang}" --from-code="{encoding}" --keyword="{keys}" --output="{out}" {in}';
private $mergePoCmd = '{msgcat} --force-po --no-wrap --use-first {extra} {base} -o {base} 2>/dev/null';
private $mergePoCmd = '{msgcat} --force-po --no-wrap --use-first {extra} {base} -o {base}';

public function __construct()
{
Expand Down Expand Up @@ -127,8 +128,6 @@ public function generateAction()

$lines = count( file( $tmpPo ));
if ($lines > 2) {
$this->removeTopLines($tmpPo, 2);

$this->addPo($voltTmpPo, $tmpPo);
} else {
unlink($tmpPo);
Expand Down Expand Up @@ -169,7 +168,7 @@ protected function addToFinalPo($tmpPo)
*/
protected function generatePoContent(array $items)
{
$poText = '';
$poText = $this->poHeader;

foreach ($items as $item) {
if (is_array($item) && isset($item['msgid'])) {
Expand Down

0 comments on commit aa23843

Please sign in to comment.