Skip to content
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.

Commit

Permalink
Merge branch 'hotfix/4207' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Translator/TextDomain.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public function setPluralRule(PluralRule $rule)
public function getPluralRule()
{
if ($this->pluralRule === null) {
$this->setPluralRule(PluralRule::fromString('nplurals=2; plural=n==1'));
$this->setPluralRule(PluralRule::fromString('nplurals=2; plural=n != 1;'));
}

return $this->pluralRule;
Expand Down
6 changes: 3 additions & 3 deletions test/Translator/TextDomainTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ public function testPluralRuleSetter()
public function testPluralRuleDefault()
{
$domain = new TextDomain();
$this->assertEquals(0, $domain->getPluralRule()->evaluate(0));
$this->assertEquals(1, $domain->getPluralRule()->evaluate(1));
$this->assertEquals(0, $domain->getPluralRule()->evaluate(2));
$this->assertEquals(1, $domain->getPluralRule()->evaluate(0));
$this->assertEquals(0, $domain->getPluralRule()->evaluate(1));
$this->assertEquals(1, $domain->getPluralRule()->evaluate(2));
}

public function testMerging()
Expand Down

0 comments on commit 041fc63

Please sign in to comment.