From 3dfd14e1b59f3a3fc34c7872115c5c58d854fd3b Mon Sep 17 00:00:00 2001 From: Max Roeleveld Date: Thu, 29 Oct 2015 22:27:20 +0100 Subject: [PATCH] Add Dutch Oxford translations. --- spec/Coduo/PHPHumanizer/CollectionSpec.php | 15 +++++++++++++++ .../Resources/translations/oxford.nl.yml | 3 +++ 2 files changed, 18 insertions(+) create mode 100644 src/Coduo/PHPHumanizer/Resources/translations/oxford.nl.yml diff --git a/spec/Coduo/PHPHumanizer/CollectionSpec.php b/spec/Coduo/PHPHumanizer/CollectionSpec.php index 709b137..8e9a6fa 100644 --- a/spec/Coduo/PHPHumanizer/CollectionSpec.php +++ b/spec/Coduo/PHPHumanizer/CollectionSpec.php @@ -35,4 +35,19 @@ function it_humanizes_collections_for_polish_locale() $this->oxford($example[0], $example[1], 'pl')->shouldReturn($example[2]); } } + + function it_humanizes_collections_for_dutch_locale() + { + $examples = array( + array(array("Michal"), null, 'Michal'), + array(array("Michal", "Norbert"), null, 'Michal en Norbert'), + array(array("Michal", "Norbert", "Lukasz"), 2, 'Michal, Norbert, en 1 andere'), + array(array("Michal", "Norbert", "Lukasz", "Pawel"), 2, 'Michal, Norbert, en 2 andere'), + array(array("Michal", "Norbert", "Lukasz", "Pawel"), null, 'Michal, Norbert, Lukasz, en Pawel'), + ); + + foreach ($examples as $example) { + $this->oxford($example[0], $example[1], 'nl')->shouldReturn($example[2]); + } + } } diff --git a/src/Coduo/PHPHumanizer/Resources/translations/oxford.nl.yml b/src/Coduo/PHPHumanizer/Resources/translations/oxford.nl.yml new file mode 100644 index 0000000..0ba299b --- /dev/null +++ b/src/Coduo/PHPHumanizer/Resources/translations/oxford.nl.yml @@ -0,0 +1,3 @@ +only_two: "%first% en %second%" +comma_separated: "%list%, en %last%" +comma_separated_with_limit: "{1} %list%, en 1 andere|[2,Inf] %list%, en %count% andere"