Skip to content

Commit

Permalink
Fix #1697 Implement Turkish short units
Browse files Browse the repository at this point in the history
  • Loading branch information
kylekatarnls committed Apr 17, 2019
1 parent 3c4f96b commit 9b49d63
Show file tree
Hide file tree
Showing 4 changed files with 80 additions and 79 deletions.
15 changes: 8 additions & 7 deletions src/Carbon/Lang/tr.php
Expand Up @@ -18,29 +18,30 @@
* - JD Isaacks
* - Murat Yüksel
* - Baran Şengül
* - Selami (selamialtin)
*/
return [
'year' => ':count yıl',
'a_year' => '{1}bir yıl|]1,Inf[:count yıl',
'y' => ':count yıl',
'y' => ':countyıl',
'month' => ':count ay',
'a_month' => '{1}bir ay|]1,Inf[:count ay',
'm' => ':count ay',
'm' => ':countay',
'week' => ':count hafta',
'a_week' => '{1}bir hafta|]1,Inf[:count hafta',
'w' => ':count hafta',
'w' => ':counth',
'day' => ':count gün',
'a_day' => '{1}bir gün|]1,Inf[:count gün',
'd' => ':count gün',
'd' => ':countg',
'hour' => ':count saat',
'a_hour' => '{1}bir saat|]1,Inf[:count saat',
'h' => ':count saat',
'h' => ':countsa',
'minute' => ':count dakika',
'a_minute' => '{1}bir dakika|]1,Inf[:count dakika',
'min' => ':count dakika',
'min' => ':countdk',
'second' => ':count saniye',
'a_second' => '{1}birkaç saniye|]1,Inf[:count saniye',
's' => ':count saniye',
's' => ':countsn',
'ago' => ':time önce',
'from_now' => ':time sonra',
'after' => ':time sonra',
Expand Down
48 changes: 24 additions & 24 deletions tests/Localization/TrCyTest.php
Expand Up @@ -120,91 +120,91 @@ class TrCyTest extends LocalizationTestCase
// Carbon::now()->subSeconds(1)->diffForHumans()
'1 saniye önce',
// Carbon::now()->subSeconds(1)->diffForHumans(null, false, true)
'1 saniye önce',
'1sn önce',
// Carbon::now()->subSeconds(2)->diffForHumans()
'2 saniye önce',
// Carbon::now()->subSeconds(2)->diffForHumans(null, false, true)
'2 saniye önce',
'2sn önce',
// Carbon::now()->subMinutes(1)->diffForHumans()
'1 dakika önce',
// Carbon::now()->subMinutes(1)->diffForHumans(null, false, true)
'1 dakika önce',
'1dk önce',
// Carbon::now()->subMinutes(2)->diffForHumans()
'2 dakika önce',
// Carbon::now()->subMinutes(2)->diffForHumans(null, false, true)
'2 dakika önce',
'2dk önce',
// Carbon::now()->subHours(1)->diffForHumans()
'1 saat önce',
// Carbon::now()->subHours(1)->diffForHumans(null, false, true)
'1 saat önce',
'1sa önce',
// Carbon::now()->subHours(2)->diffForHumans()
'2 saat önce',
// Carbon::now()->subHours(2)->diffForHumans(null, false, true)
'2 saat önce',
'2sa önce',
// Carbon::now()->subDays(1)->diffForHumans()
'1 gün önce',
// Carbon::now()->subDays(1)->diffForHumans(null, false, true)
'1 gün önce',
'1g önce',
// Carbon::now()->subDays(2)->diffForHumans()
'2 gün önce',
// Carbon::now()->subDays(2)->diffForHumans(null, false, true)
'2 gün önce',
'2g önce',
// Carbon::now()->subWeeks(1)->diffForHumans()
'1 hafta önce',
// Carbon::now()->subWeeks(1)->diffForHumans(null, false, true)
'1 hafta önce',
'1h önce',
// Carbon::now()->subWeeks(2)->diffForHumans()
'2 hafta önce',
// Carbon::now()->subWeeks(2)->diffForHumans(null, false, true)
'2 hafta önce',
'2h önce',
// Carbon::now()->subMonths(1)->diffForHumans()
'1 ay önce',
// Carbon::now()->subMonths(1)->diffForHumans(null, false, true)
'1 ay önce',
'1ay önce',
// Carbon::now()->subMonths(2)->diffForHumans()
'2 ay önce',
// Carbon::now()->subMonths(2)->diffForHumans(null, false, true)
'2 ay önce',
'2ay önce',
// Carbon::now()->subYears(1)->diffForHumans()
'1 yıl önce',
// Carbon::now()->subYears(1)->diffForHumans(null, false, true)
'1 yıl önce',
'1yıl önce',
// Carbon::now()->subYears(2)->diffForHumans()
'2 yıl önce',
// Carbon::now()->subYears(2)->diffForHumans(null, false, true)
'2 yıl önce',
'2yıl önce',
// Carbon::now()->addSecond()->diffForHumans()
'1 saniye sonra',
// Carbon::now()->addSecond()->diffForHumans(null, false, true)
'1 saniye sonra',
'1sn sonra',
// Carbon::now()->addSecond()->diffForHumans(Carbon::now())
'1 saniye sonra',
// Carbon::now()->addSecond()->diffForHumans(Carbon::now(), false, true)
'1 saniye sonra',
'1sn sonra',
// Carbon::now()->diffForHumans(Carbon::now()->addSecond())
'1 saniye önce',
// Carbon::now()->diffForHumans(Carbon::now()->addSecond(), false, true)
'1 saniye önce',
'1sn önce',
// Carbon::now()->addSecond()->diffForHumans(Carbon::now(), true)
'1 saniye',
// Carbon::now()->addSecond()->diffForHumans(Carbon::now(), true, true)
'1 saniye',
'1sn',
// Carbon::now()->diffForHumans(Carbon::now()->addSecond()->addSecond(), true)
'2 saniye',
// Carbon::now()->diffForHumans(Carbon::now()->addSecond()->addSecond(), true, true)
'2 saniye',
'2sn',
// Carbon::now()->addSecond()->diffForHumans(null, false, true, 1)
'1 saniye sonra',
'1sn sonra',
// Carbon::now()->addMinute()->addSecond()->diffForHumans(null, true, false, 2)
'1 dakika 1 saniye',
// Carbon::now()->addYears(2)->addMonths(3)->addDay()->addSecond()->diffForHumans(null, true, true, 4)
'2 yıl 3 ay 1 gün 1 saniye',
'2yıl 3ay 1g 1sn',
// Carbon::now()->addYears(3)->diffForHumans(null, null, false, 4)
'3 yıl sonra',
// Carbon::now()->subMonths(5)->diffForHumans(null, null, true, 4)
'5 ay önce',
'5ay önce',
// Carbon::now()->subYears(2)->subMonths(3)->subDay()->subSecond()->diffForHumans(null, null, true, 4)
'2 yıl 3 ay 1 gün 1 saniye önce',
'2yıl 3ay 1g 1sn önce',
// Carbon::now()->addWeek()->addHours(10)->diffForHumans(null, true, false, 2)
'1 hafta 10 saat',
// Carbon::now()->addWeek()->addDays(6)->diffForHumans(null, true, false, 2)
Expand All @@ -220,6 +220,6 @@ class TrCyTest extends LocalizationTestCase
// CarbonInterval::days(2)->forHumans()
'2 gün',
// CarbonInterval::create('P1DT3H')->forHumans(true)
'1 gün 3 saat',
'1g 3sa',
];
}
48 changes: 24 additions & 24 deletions tests/Localization/TrTest.php
Expand Up @@ -120,91 +120,91 @@ class TrTest extends LocalizationTestCase
// Carbon::now()->subSeconds(1)->diffForHumans()
'1 saniye önce',
// Carbon::now()->subSeconds(1)->diffForHumans(null, false, true)
'1 saniye önce',
'1sn önce',
// Carbon::now()->subSeconds(2)->diffForHumans()
'2 saniye önce',
// Carbon::now()->subSeconds(2)->diffForHumans(null, false, true)
'2 saniye önce',
'2sn önce',
// Carbon::now()->subMinutes(1)->diffForHumans()
'1 dakika önce',
// Carbon::now()->subMinutes(1)->diffForHumans(null, false, true)
'1 dakika önce',
'1dk önce',
// Carbon::now()->subMinutes(2)->diffForHumans()
'2 dakika önce',
// Carbon::now()->subMinutes(2)->diffForHumans(null, false, true)
'2 dakika önce',
'2dk önce',
// Carbon::now()->subHours(1)->diffForHumans()
'1 saat önce',
// Carbon::now()->subHours(1)->diffForHumans(null, false, true)
'1 saat önce',
'1sa önce',
// Carbon::now()->subHours(2)->diffForHumans()
'2 saat önce',
// Carbon::now()->subHours(2)->diffForHumans(null, false, true)
'2 saat önce',
'2sa önce',
// Carbon::now()->subDays(1)->diffForHumans()
'1 gün önce',
// Carbon::now()->subDays(1)->diffForHumans(null, false, true)
'1 gün önce',
'1g önce',
// Carbon::now()->subDays(2)->diffForHumans()
'2 gün önce',
// Carbon::now()->subDays(2)->diffForHumans(null, false, true)
'2 gün önce',
'2g önce',
// Carbon::now()->subWeeks(1)->diffForHumans()
'1 hafta önce',
// Carbon::now()->subWeeks(1)->diffForHumans(null, false, true)
'1 hafta önce',
'1h önce',
// Carbon::now()->subWeeks(2)->diffForHumans()
'2 hafta önce',
// Carbon::now()->subWeeks(2)->diffForHumans(null, false, true)
'2 hafta önce',
'2h önce',
// Carbon::now()->subMonths(1)->diffForHumans()
'1 ay önce',
// Carbon::now()->subMonths(1)->diffForHumans(null, false, true)
'1 ay önce',
'1ay önce',
// Carbon::now()->subMonths(2)->diffForHumans()
'2 ay önce',
// Carbon::now()->subMonths(2)->diffForHumans(null, false, true)
'2 ay önce',
'2ay önce',
// Carbon::now()->subYears(1)->diffForHumans()
'1 yıl önce',
// Carbon::now()->subYears(1)->diffForHumans(null, false, true)
'1 yıl önce',
'1yıl önce',
// Carbon::now()->subYears(2)->diffForHumans()
'2 yıl önce',
// Carbon::now()->subYears(2)->diffForHumans(null, false, true)
'2 yıl önce',
'2yıl önce',
// Carbon::now()->addSecond()->diffForHumans()
'1 saniye sonra',
// Carbon::now()->addSecond()->diffForHumans(null, false, true)
'1 saniye sonra',
'1sn sonra',
// Carbon::now()->addSecond()->diffForHumans(Carbon::now())
'1 saniye sonra',
// Carbon::now()->addSecond()->diffForHumans(Carbon::now(), false, true)
'1 saniye sonra',
'1sn sonra',
// Carbon::now()->diffForHumans(Carbon::now()->addSecond())
'1 saniye önce',
// Carbon::now()->diffForHumans(Carbon::now()->addSecond(), false, true)
'1 saniye önce',
'1sn önce',
// Carbon::now()->addSecond()->diffForHumans(Carbon::now(), true)
'1 saniye',
// Carbon::now()->addSecond()->diffForHumans(Carbon::now(), true, true)
'1 saniye',
'1sn',
// Carbon::now()->diffForHumans(Carbon::now()->addSecond()->addSecond(), true)
'2 saniye',
// Carbon::now()->diffForHumans(Carbon::now()->addSecond()->addSecond(), true, true)
'2 saniye',
'2sn',
// Carbon::now()->addSecond()->diffForHumans(null, false, true, 1)
'1 saniye sonra',
'1sn sonra',
// Carbon::now()->addMinute()->addSecond()->diffForHumans(null, true, false, 2)
'1 dakika 1 saniye',
// Carbon::now()->addYears(2)->addMonths(3)->addDay()->addSecond()->diffForHumans(null, true, true, 4)
'2 yıl 3 ay 1 gün 1 saniye',
'2yıl 3ay 1g 1sn',
// Carbon::now()->addYears(3)->diffForHumans(null, null, false, 4)
'3 yıl sonra',
// Carbon::now()->subMonths(5)->diffForHumans(null, null, true, 4)
'5 ay önce',
'5ay önce',
// Carbon::now()->subYears(2)->subMonths(3)->subDay()->subSecond()->diffForHumans(null, null, true, 4)
'2 yıl 3 ay 1 gün 1 saniye önce',
'2yıl 3ay 1g 1sn önce',
// Carbon::now()->addWeek()->addHours(10)->diffForHumans(null, true, false, 2)
'1 hafta 10 saat',
// Carbon::now()->addWeek()->addDays(6)->diffForHumans(null, true, false, 2)
Expand All @@ -220,6 +220,6 @@ class TrTest extends LocalizationTestCase
// CarbonInterval::days(2)->forHumans()
'2 gün',
// CarbonInterval::create('P1DT3H')->forHumans(true)
'1 gün 3 saat',
'1g 3sa',
];
}

0 comments on commit 9b49d63

Please sign in to comment.