Skip to content

Commit

Permalink
Merge pull request #43 from cdfre/master
Browse files Browse the repository at this point in the history
Keep empty strings, Yml line breaks
  • Loading branch information
schmittjoh committed May 31, 2012
2 parents a08ff9d + ebb7d4d commit 019f103
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Model/Message.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ public function isNew()

public function getLocaleString()
{
return $this->localeString ?: ($this->desc ?: $this->id);
return $this->localeString !== null ? $this->localeString : ($this->desc !== null ? $this->desc : $this->id);
}

/**
Expand Down
1 change: 1 addition & 0 deletions Translation/Dumper/YamlDumper.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ private function dumpStructureRecursively(array $structure)
}

if ($desc) {
$desc = str_replace(array("\r\n", "\n", "\r", "\t"), array('\r\n', '\n', '\r', '\t'), $desc);
$this->writer->writeln('# Desc: '.$desc);
}
if ($meaning) {
Expand Down

0 comments on commit 019f103

Please sign in to comment.