Skip to content

Commit

Permalink
Fixed typo in TR translations and added spec
Browse files Browse the repository at this point in the history
  • Loading branch information
norberttech committed Oct 26, 2015
1 parent e007dbc commit 38bc223
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
19 changes: 19 additions & 0 deletions spec/Coduo/PHPHumanizer/DateTimeSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,4 +117,23 @@ function it_humanizes_precise_difference_between_dates_for_de_locale()
$this->preciseDifference(new \DateTime($example[0]), new \DateTime($example[1]), 'de')->shouldReturn($example[2]);
}
}


function it_humanizes_precise_difference_between_dates_for_tr_locale()
{
$examples = array(
array("2014-04-26 13:00:00", "2014-04-26 12:58:15", '1 dakika, 45 saniye önce'),
array("2014-04-26 13:00:00", "2014-04-26 11:20:00", '1 saat, 40 dakika önce'),
array("2014-04-26 13:00:00", "2014-04-27 13:15:00", '1 gün, 15 dakika sonra'),
array("2014-04-26 13:00:00", "2014-05-03 15:00:00", '7 gün, 2 saat sonra'),
array("2014-04-26 13:00:00", "2015-04-28 17:00:00", '1 yıl, 2 gün, 4 saat sonra'),
array("2014-04-26 13:00:00", "2014-04-28 23:00:00", '2 gün, 10 saat sonra'),
array("2014-04-26 13:00:00", "2014-04-25 11:20:00", '1 gün, 1 saat, 40 dakika önce'),
array("2014-04-26 13:00:00", "2016-04-27 13:00:00", '2 yıl, 1 gün sonra'),
);

foreach ($examples as $example) {
$this->preciseDifference(new \DateTime($example[0]), new \DateTime($example[1]), 'tr')->shouldReturn($example[2]);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ second:
future: "{1} %count% saniye sonra|[2,Inf] %count% saniye sonra"
minute:
past: "{1} %count% dakika önce|[2,Inf] %count% dakika önce"
future: "{1} %count% dakika sonra|[2,Inf] %count% minutes dakika sonra"
future: "{1} %count% dakika sonra|[2,Inf] %count% dakika sonra"
hour:
past: "{1} %count% saat önce|[2,Inf] %count% saat önce"
future: "{1} %count% saat sonra|[2,Inf] %count% saat sonra"
Expand Down

0 comments on commit 38bc223

Please sign in to comment.