Skip to content

Commit

Permalink
Merge pull request #1936 from kylekatarnls/feature/fix-1929-id-from-n…
Browse files Browse the repository at this point in the history
…ow-translation

Fix #1929 Indonesian from now translation
  • Loading branch information
kylekatarnls authored Nov 16, 2019
2 parents 13a7776 + 3135941 commit ad958e4
Show file tree
Hide file tree
Showing 11 changed files with 125 additions and 167 deletions.
4 changes: 3 additions & 1 deletion src/Carbon/Lang/id.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
* - JD Isaacks
* - Nafies Luthfi
* - Raymundus Jati Primanda (mundusjp)
* - diankur313
* - a-wip0
*/
return [
'year' => ':count tahun',
Expand All @@ -40,7 +42,7 @@
'a_second' => '{1}beberapa detik|]1,Inf[:count detik',
's' => ':countdt',
'ago' => ':time yang lalu',
'from_now' => 'dalam :time',
'from_now' => ':time dari sekarang',
'after' => ':time setelahnya',
'before' => ':time sebelumnya',
'formats' => [
Expand Down
47 changes: 1 addition & 46 deletions src/Carbon/Lang/in.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,49 +8,4 @@
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
return array_replace_recursive(require __DIR__.'/en.php', [
'months' => ['Januari', 'Februari', 'Maret', 'April', 'Mei', 'Juni', 'Juli', 'Agustus', 'September', 'Oktober', 'November', 'Desember'],
'months_short' => ['Jan', 'Feb', 'Mar', 'Apr', 'Mei', 'Jun', 'Jul', 'Agu', 'Sep', 'Okt', 'Nov', 'Des'],
'weekdays' => ['Minggu', 'Senin', 'Selasa', 'Rabu', 'Kamis', 'Jumat', 'Sabtu'],
'weekdays_short' => ['Min', 'Sen', 'Sel', 'Rab', 'Kam', 'Jum', 'Sab'],
'weekdays_min' => ['M', 'S', 'S', 'R', 'K', 'J', 'S'],
'formats' => [
'LT' => 'HH.mm',
'LTS' => 'HH.mm.ss',
'L' => 'DD/MM/YYYY',
'LL' => 'D MMM YYYY',
'LLL' => 'D MMMM YYYY HH.mm',
'LLLL' => 'dddd, DD MMMM YYYY HH.mm',
],

'year' => 'tahun :count',
'y' => 'tahun :count',
'a_year' => 'tahun :count',

'month' => ':count bulan',
'm' => ':count bulan',
'a_month' => ':count bulan',

'week' => ':count minggu',
'w' => ':count minggu',
'a_week' => ':count minggu',

'day' => ':count hari',
'd' => ':count hari',
'a_day' => ':count hari',

'hour' => ':count jam',
'h' => ':count jam',
'a_hour' => ':count jam',

'minute' => ':count menit',
'min' => ':count menit',
'a_minute' => ':count menit',

'second' => ':count detik',
's' => ':count detik',
'a_second' => ':count detik',

'ago' => ':time yang lalu',
'from_now' => 'dalam :time',
]);
return require __DIR__.'/id.php';
2 changes: 1 addition & 1 deletion src/Carbon/Lang/ms.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
'second' => '{1}beberapa saat|]1,Inf[:count saat',
's' => ':count saat',
'ago' => ':time yang lepas',
'from_now' => 'dalam :time',
'from_now' => ':time dari sekarang',
'after' => ':time selepas',
'before' => ':time sebelum',
'formats' => [
Expand Down
1 change: 1 addition & 0 deletions src/Carbon/Lang/ru.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
* - Pavel Skripkin (psxx)
* - AlexWalkerson
* - Vladislav UnsealedOne
* - dima-bzz
*/
$transformDiff = function ($input) {
return strtr($input, [
Expand Down
12 changes: 6 additions & 6 deletions tests/Localization/IdIdTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -175,9 +175,9 @@ class IdIdTest extends LocalizationTestCase
// Carbon::now()->subYears(2)->diffForHumans(null, false, true)
'2thn yang lalu',
// Carbon::now()->addSecond()->diffForHumans()
'dalam 1 detik',
'1 detik dari sekarang',
// Carbon::now()->addSecond()->diffForHumans(null, false, true)
'dalam 1dt',
'1dt dari sekarang',
// Carbon::now()->addSecond()->diffForHumans(Carbon::now())
'1 detik setelahnya',
// Carbon::now()->addSecond()->diffForHumans(Carbon::now(), false, true)
Expand All @@ -195,13 +195,13 @@ class IdIdTest extends LocalizationTestCase
// Carbon::now()->diffForHumans(Carbon::now()->addSecond()->addSecond(), true, true)
'2dt',
// Carbon::now()->addSecond()->diffForHumans(null, false, true, 1)
'dalam 1dt',
'1dt dari sekarang',
// Carbon::now()->addMinute()->addSecond()->diffForHumans(null, true, false, 2)
'1 menit 1 detik',
// Carbon::now()->addYears(2)->addMonths(3)->addDay()->addSecond()->diffForHumans(null, true, true, 4)
'2thn 3bln 1hr 1dt',
// Carbon::now()->addYears(3)->diffForHumans(null, null, false, 4)
'dalam 3 tahun',
'3 tahun dari sekarang',
// Carbon::now()->subMonths(5)->diffForHumans(null, null, true, 4)
'5bln yang lalu',
// Carbon::now()->subYears(2)->subMonths(3)->subDay()->subSecond()->diffForHumans(null, null, true, 4)
Expand All @@ -213,11 +213,11 @@ class IdIdTest extends LocalizationTestCase
// Carbon::now()->addWeek()->addDays(6)->diffForHumans(null, true, false, 2)
'1 minggu 6 hari',
// Carbon::now()->addWeek()->addDays(6)->diffForHumans(["join" => true, "parts" => 2])
'dalam 1 minggu dan 6 hari',
'1 minggu dan 6 hari dari sekarang',
// Carbon::now()->addWeeks(2)->addHour()->diffForHumans(null, true, false, 2)
'2 minggu 1 jam',
// Carbon::now()->addHour()->diffForHumans(["aUnit" => true])
'dalam sejam',
'sejam dari sekarang',
// CarbonInterval::days(2)->forHumans()
'2 hari',
// CarbonInterval::create('P1DT3H')->forHumans(true)
Expand Down
12 changes: 6 additions & 6 deletions tests/Localization/IdTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -175,9 +175,9 @@ class IdTest extends LocalizationTestCase
// Carbon::now()->subYears(2)->diffForHumans(null, false, true)
'2thn yang lalu',
// Carbon::now()->addSecond()->diffForHumans()
'dalam 1 detik',
'1 detik dari sekarang',
// Carbon::now()->addSecond()->diffForHumans(null, false, true)
'dalam 1dt',
'1dt dari sekarang',
// Carbon::now()->addSecond()->diffForHumans(Carbon::now())
'1 detik setelahnya',
// Carbon::now()->addSecond()->diffForHumans(Carbon::now(), false, true)
Expand All @@ -195,13 +195,13 @@ class IdTest extends LocalizationTestCase
// Carbon::now()->diffForHumans(Carbon::now()->addSecond()->addSecond(), true, true)
'2dt',
// Carbon::now()->addSecond()->diffForHumans(null, false, true, 1)
'dalam 1dt',
'1dt dari sekarang',
// Carbon::now()->addMinute()->addSecond()->diffForHumans(null, true, false, 2)
'1 menit 1 detik',
// Carbon::now()->addYears(2)->addMonths(3)->addDay()->addSecond()->diffForHumans(null, true, true, 4)
'2thn 3bln 1hr 1dt',
// Carbon::now()->addYears(3)->diffForHumans(null, null, false, 4)
'dalam 3 tahun',
'3 tahun dari sekarang',
// Carbon::now()->subMonths(5)->diffForHumans(null, null, true, 4)
'5bln yang lalu',
// Carbon::now()->subYears(2)->subMonths(3)->subDay()->subSecond()->diffForHumans(null, null, true, 4)
Expand All @@ -213,11 +213,11 @@ class IdTest extends LocalizationTestCase
// Carbon::now()->addWeek()->addDays(6)->diffForHumans(null, true, false, 2)
'1 minggu 6 hari',
// Carbon::now()->addWeek()->addDays(6)->diffForHumans(["join" => true, "parts" => 2])
'dalam 1 minggu dan 6 hari',
'1 minggu dan 6 hari dari sekarang',
// Carbon::now()->addWeeks(2)->addHour()->diffForHumans(null, true, false, 2)
'2 minggu 1 jam',
// Carbon::now()->addHour()->diffForHumans(["aUnit" => true])
'dalam sejam',
'sejam dari sekarang',
// CarbonInterval::days(2)->forHumans()
'2 hari',
// CarbonInterval::create('P1DT3H')->forHumans(true)
Expand Down
Loading

0 comments on commit ad958e4

Please sign in to comment.