Skip to content

Commit 38bc223

Browse files
committed
Fixed typo in TR translations and added spec
1 parent e007dbc commit 38bc223

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

spec/Coduo/PHPHumanizer/DateTimeSpec.php

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,4 +117,23 @@ function it_humanizes_precise_difference_between_dates_for_de_locale()
117117
$this->preciseDifference(new \DateTime($example[0]), new \DateTime($example[1]), 'de')->shouldReturn($example[2]);
118118
}
119119
}
120+
121+
122+
function it_humanizes_precise_difference_between_dates_for_tr_locale()
123+
{
124+
$examples = array(
125+
array("2014-04-26 13:00:00", "2014-04-26 12:58:15", '1 dakika, 45 saniye önce'),
126+
array("2014-04-26 13:00:00", "2014-04-26 11:20:00", '1 saat, 40 dakika önce'),
127+
array("2014-04-26 13:00:00", "2014-04-27 13:15:00", '1 gün, 15 dakika sonra'),
128+
array("2014-04-26 13:00:00", "2014-05-03 15:00:00", '7 gün, 2 saat sonra'),
129+
array("2014-04-26 13:00:00", "2015-04-28 17:00:00", '1 yıl, 2 gün, 4 saat sonra'),
130+
array("2014-04-26 13:00:00", "2014-04-28 23:00:00", '2 gün, 10 saat sonra'),
131+
array("2014-04-26 13:00:00", "2014-04-25 11:20:00", '1 gün, 1 saat, 40 dakika önce'),
132+
array("2014-04-26 13:00:00", "2016-04-27 13:00:00", '2 yıl, 1 gün sonra'),
133+
);
134+
135+
foreach ($examples as $example) {
136+
$this->preciseDifference(new \DateTime($example[0]), new \DateTime($example[1]), 'tr')->shouldReturn($example[2]);
137+
}
138+
}
120139
}

src/Coduo/PHPHumanizer/Resources/translations/difference.tr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ second:
66
future: "{1} %count% saniye sonra|[2,Inf] %count% saniye sonra"
77
minute:
88
past: "{1} %count% dakika önce|[2,Inf] %count% dakika önce"
9-
future: "{1} %count% dakika sonra|[2,Inf] %count% minutes dakika sonra"
9+
future: "{1} %count% dakika sonra|[2,Inf] %count% dakika sonra"
1010
hour:
1111
past: "{1} %count% saat önce|[2,Inf] %count% saat önce"
1212
future: "{1} %count% saat sonra|[2,Inf] %count% saat sonra"

0 commit comments

Comments
 (0)