Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add kurdish (sorani) language #2571

Merged
merged 5 commits into from
Apr 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
89 changes: 89 additions & 0 deletions src/Carbon/Lang/ckb.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
<?php

/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

/*
* Authors:
* - Swara Mohammed
*/
$months = [
'ڕێبەندان',
'ڕەشەمە',
'نەورۆز',
'گوڵان',
'جۆزەردان',
'پوشپەڕ',
'گەلاوێژ',
'خەرمانان',
'ڕەزبەر',
'گەڵاڕێزان',
'سەرماوەرز',
'بەفرانبار',
];

return [
'year' => implode('|', ['{0}:count ساڵێک', '{1}ساڵ', '{2}ساڵ', ']2,11[:count ساڵ', ']10,Inf[:count ساڵ']),
'a_year' => implode('|', ['{0}:count ساڵێک', '{1}ساڵ', '{2}ساڵ', ']2,11[:count ساڵ', ']10,Inf[:count ساڵ']),
'month' => implode('|', ['{0}:count مانگێک', '{1}مانگ', '{2}مانگين', ']2,11[:count مانگ', ']10,Inf[:count مانگ']),
'a_month' => implode('|', ['{0}:count مانگێک', '{1}مانگ', '{2}مانگين', ']2,11[:count مانگ', ']10,Inf[:count مانگ']),
'week' => implode('|', ['{0}:count هەفتەیەک', '{1}هەفتە', '{2}هەفتە', ']2,11[:count هەفتە', ']10,Inf[:count هەفتە']),
'a_week' => implode('|', ['{0}:count هەفتەیەک', '{1}هەفتە', '{2}هەفتە', ']2,11[:count هەفتە', ']10,Inf[:count هەفتە']),
'day' => implode('|', ['{0}:count ڕۆژێک', '{1}ڕۆژ', '{2}ڕۆژ', ']2,11[:count ڕۆژ', ']10,Inf[:count ڕۆژ']),
'a_day' => implode('|', ['{0}:count ڕۆژێک', '{1}ڕۆژ', '{2}ڕۆژ', ']2,11[:count ڕۆژ', ']10,Inf[:count ڕۆژ']),
'hour' => implode('|', ['{0}:count کاتژمێرێک', '{1}کاتژمێر', '{2}کاتژمێر', ']2,11[:count کاتژمێر', ']10,Inf[:count کاتژمێر']),
'a_hour' => implode('|', ['{0}:count کاتژمێرێک', '{1}کاتژمێر', '{2}کاتژمێر', ']2,11[:count کاتژمێر', ']10,Inf[:count کاتژمێر']),
'minute' => implode('|', ['{0}:count خولەکێک', '{1}خولەک', '{2}خولەک', ']2,11[:count خولەک', ']10,Inf[:count خولەک']),
'a_minute' => implode('|', ['{0}:count خولەکێک', '{1}خولەک', '{2}خولەک', ']2,11[:count خولەک', ']10,Inf[:count خولەک']),
'second' => implode('|', ['{0}:count چرکەیەک', '{1}چرکە', '{2}چرکە', ']2,11[:count چرکە', ']10,Inf[:count چرکە']),
'a_second' => implode('|', ['{0}:count چرکەیەک', '{1}چرکە', '{2}چرکە', ']2,11[:count چرکە', ']10,Inf[:count چرکە']),
kylekatarnls marked this conversation as resolved.
Show resolved Hide resolved
'ago' => 'پێشتر :time',
'from_now' => ':time لە ئێستاوە',
'after' => 'دوای :time',
'before' => 'پێش :time',
'diff_now' => 'ئێستا',
'diff_today' => 'ئەمڕۆ',
'diff_today_regexp' => 'ڕۆژ(?:\\s+لە)?(?:\\s+کاتژمێر)?',
'diff_yesterday' => 'دوێنێ',
'diff_yesterday_regexp' => 'دوێنێ(?:\\s+لە)?(?:\\s+کاتژمێر)?',
'diff_tomorrow' => 'سبەینێ',
'diff_tomorrow_regexp' => 'سبەینێ(?:\\s+لە)?(?:\\s+کاتژمێر)?',
'diff_before_yesterday' => 'پێش دوێنێ',
'diff_after_tomorrow' => 'دوای سبەینێ',
'period_recurrences' => implode('|', ['{0}جار', '{1}جار', '{2}:count دووجار', ']2,11[:count جار', ']10,Inf[:count جار']),
'period_interval' => 'هەموو :interval',
'period_start_date' => 'لە :date',
'period_end_date' => 'بۆ :date',
'months' => $months,
'months_short' => $months,
'weekdays' => ['یەکشەممە', 'دووشەممە', 'سێشەممە', 'چوارشەممە', 'پێنجشەممە', 'هەینی', 'شەممە'],
'weekdays_short' => ['یەکشەممە', 'دووشەممە', 'سێشەممە', 'چوارشەممە', 'پێنجشەممە', 'هەینی', 'شەممە'],
'weekdays_min' => ['یەکشەممە', 'دووشەممە', 'سێشەممە', 'چوارشەممە', 'پێنجشەممە', 'هەینی', 'شەممە'],
'list' => ['، ', ' و '],
'first_day_of_week' => 6,
'day_of_first_week_of_year' => 1,
'formats' => [
'LT' => 'HH:mm',
'LTS' => 'HH:mm:ss',
'L' => 'D/M/YYYY',
'LL' => 'D MMMM YYYY',
'LLL' => 'D MMMM YYYY HH:mm',
'LLLL' => 'dddd D MMMM YYYY HH:mm',
],
'calendar' => [
'sameDay' => '[ئەمڕۆ لە کاتژمێر] LT',
'nextDay' => '[سبەینێ لە کاتژمێر] LT',
'nextWeek' => 'dddd [لە کاتژمێر] LT',
'lastDay' => '[دوێنێ لە کاتژمێر] LT',
'lastWeek' => 'dddd [لە کاتژمێر] LT',
'sameElse' => 'L',
],
'meridiem' => ['پ.ن', 'د.ن'],
'weekend' => [5, 6],
];
231 changes: 231 additions & 0 deletions tests/Localization/CkbTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,231 @@
<?php

declare(strict_types=1);

/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Tests\Localization;

/**
* @group localization
*/
class CkbTest extends LocalizationTestCase
{
public const LOCALE = 'ckb'; // ckb

public const CASES = [
// Carbon::parse('2018-01-04 00:00:00')->addDays(1)->calendar(Carbon::parse('2018-01-04 00:00:00'))
'سبەینێ لە کاتژمێر 00:00',
// Carbon::parse('2018-01-04 00:00:00')->addDays(2)->calendar(Carbon::parse('2018-01-04 00:00:00'))
'شەممە لە کاتژمێر 00:00',
// Carbon::parse('2018-01-04 00:00:00')->addDays(3)->calendar(Carbon::parse('2018-01-04 00:00:00'))
'یەکشەممە لە کاتژمێر 00:00',
// Carbon::parse('2018-01-04 00:00:00')->addDays(4)->calendar(Carbon::parse('2018-01-04 00:00:00'))
'دووشەممە لە کاتژمێر 00:00',
// Carbon::parse('2018-01-04 00:00:00')->addDays(5)->calendar(Carbon::parse('2018-01-04 00:00:00'))
'سێشەممە لە کاتژمێر 00:00',
// Carbon::parse('2018-01-04 00:00:00')->addDays(6)->calendar(Carbon::parse('2018-01-04 00:00:00'))
'چوارشەممە لە کاتژمێر 00:00',
// Carbon::parse('2018-01-05 00:00:00')->addDays(6)->calendar(Carbon::parse('2018-01-05 00:00:00'))
'پێنجشەممە لە کاتژمێر 00:00',
// Carbon::parse('2018-01-06 00:00:00')->addDays(6)->calendar(Carbon::parse('2018-01-06 00:00:00'))
'هەینی لە کاتژمێر 00:00',
// Carbon::parse('2018-01-07 00:00:00')->addDays(2)->calendar(Carbon::parse('2018-01-07 00:00:00'))
'سێشەممە لە کاتژمێر 00:00',
// Carbon::parse('2018-01-07 00:00:00')->addDays(3)->calendar(Carbon::parse('2018-01-07 00:00:00'))
'چوارشەممە لە کاتژمێر 00:00',
// Carbon::parse('2018-01-07 00:00:00')->addDays(4)->calendar(Carbon::parse('2018-01-07 00:00:00'))
'پێنجشەممە لە کاتژمێر 00:00',
// Carbon::parse('2018-01-07 00:00:00')->addDays(5)->calendar(Carbon::parse('2018-01-07 00:00:00'))
'هەینی لە کاتژمێر 00:00',
// Carbon::parse('2018-01-07 00:00:00')->addDays(6)->calendar(Carbon::parse('2018-01-07 00:00:00'))
'شەممە لە کاتژمێر 00:00',
// Carbon::now()->subDays(2)->calendar()
'یەکشەممە لە کاتژمێر 20:49',
// Carbon::parse('2018-01-04 00:00:00')->subHours(2)->calendar(Carbon::parse('2018-01-04 00:00:00'))
'دوێنێ لە کاتژمێر 22:00',
// Carbon::parse('2018-01-04 12:00:00')->subHours(2)->calendar(Carbon::parse('2018-01-04 12:00:00'))
'ئەمڕۆ لە کاتژمێر 10:00',
// Carbon::parse('2018-01-04 00:00:00')->addHours(2)->calendar(Carbon::parse('2018-01-04 00:00:00'))
'ئەمڕۆ لە کاتژمێر 02:00',
// Carbon::parse('2018-01-04 23:00:00')->addHours(2)->calendar(Carbon::parse('2018-01-04 23:00:00'))
'سبەینێ لە کاتژمێر 01:00',
// Carbon::parse('2018-01-07 00:00:00')->addDays(2)->calendar(Carbon::parse('2018-01-07 00:00:00'))
'سێشەممە لە کاتژمێر 00:00',
// Carbon::parse('2018-01-08 00:00:00')->subDay()->calendar(Carbon::parse('2018-01-08 00:00:00'))
'دوێنێ لە کاتژمێر 00:00',
// Carbon::parse('2018-01-04 00:00:00')->subDays(1)->calendar(Carbon::parse('2018-01-04 00:00:00'))
'دوێنێ لە کاتژمێر 00:00',
// Carbon::parse('2018-01-04 00:00:00')->subDays(2)->calendar(Carbon::parse('2018-01-04 00:00:00'))
'سێشەممە لە کاتژمێر 00:00',
// Carbon::parse('2018-01-04 00:00:00')->subDays(3)->calendar(Carbon::parse('2018-01-04 00:00:00'))
'دووشەممە لە کاتژمێر 00:00',
// Carbon::parse('2018-01-04 00:00:00')->subDays(4)->calendar(Carbon::parse('2018-01-04 00:00:00'))
'یەکشەممە لە کاتژمێر 00:00',
// Carbon::parse('2018-01-04 00:00:00')->subDays(5)->calendar(Carbon::parse('2018-01-04 00:00:00'))
'شەممە لە کاتژمێر 00:00',
// Carbon::parse('2018-01-04 00:00:00')->subDays(6)->calendar(Carbon::parse('2018-01-04 00:00:00'))
'هەینی لە کاتژمێر 00:00',
// Carbon::parse('2018-01-03 00:00:00')->subDays(6)->calendar(Carbon::parse('2018-01-03 00:00:00'))
'پێنجشەممە لە کاتژمێر 00:00',
// Carbon::parse('2018-01-02 00:00:00')->subDays(6)->calendar(Carbon::parse('2018-01-02 00:00:00'))
'چوارشەممە لە کاتژمێر 00:00',
// Carbon::parse('2018-01-07 00:00:00')->subDays(2)->calendar(Carbon::parse('2018-01-07 00:00:00'))
'هەینی لە کاتژمێر 00:00',
// Carbon::parse('2018-01-01 00:00:00')->isoFormat('Qo Mo Do Wo wo')
'1 1 1 1 1',
// Carbon::parse('2018-01-02 00:00:00')->isoFormat('Do wo')
'2 1',
// Carbon::parse('2018-01-03 00:00:00')->isoFormat('Do wo')
'3 1',
// Carbon::parse('2018-01-04 00:00:00')->isoFormat('Do wo')
'4 1',
// Carbon::parse('2018-01-05 00:00:00')->isoFormat('Do wo')
'5 1',
// Carbon::parse('2018-01-06 00:00:00')->isoFormat('Do wo')
'6 2',
// Carbon::parse('2018-01-07 00:00:00')->isoFormat('Do wo')
'7 2',
// Carbon::parse('2018-01-11 00:00:00')->isoFormat('Do wo')
'11 2',
// Carbon::parse('2018-02-09 00:00:00')->isoFormat('DDDo')
'40',
// Carbon::parse('2018-02-10 00:00:00')->isoFormat('DDDo')
'41',
// Carbon::parse('2018-04-10 00:00:00')->isoFormat('DDDo')
'100',
// Carbon::parse('2018-02-10 00:00:00', 'Europe/Paris')->isoFormat('h:mm a z')
'12:00 پ.ن CET',
// Carbon::parse('2018-02-10 00:00:00')->isoFormat('h:mm A, h:mm a')
'12:00 پ.ن, 12:00 پ.ن',
// Carbon::parse('2018-02-10 01:30:00')->isoFormat('h:mm A, h:mm a')
'1:30 پ.ن, 1:30 پ.ن',
// Carbon::parse('2018-02-10 02:00:00')->isoFormat('h:mm A, h:mm a')
'2:00 پ.ن, 2:00 پ.ن',
// Carbon::parse('2018-02-10 06:00:00')->isoFormat('h:mm A, h:mm a')
'6:00 پ.ن, 6:00 پ.ن',
// Carbon::parse('2018-02-10 10:00:00')->isoFormat('h:mm A, h:mm a')
'10:00 پ.ن, 10:00 پ.ن',
// Carbon::parse('2018-02-10 12:00:00')->isoFormat('h:mm A, h:mm a')
'12:00 د.ن, 12:00 د.ن',
// Carbon::parse('2018-02-10 17:00:00')->isoFormat('h:mm A, h:mm a')
'5:00 د.ن, 5:00 د.ن',
// Carbon::parse('2018-02-10 21:30:00')->isoFormat('h:mm A, h:mm a')
'9:30 د.ن, 9:30 د.ن',
// Carbon::parse('2018-02-10 23:00:00')->isoFormat('h:mm A, h:mm a')
'11:00 د.ن, 11:00 د.ن',
// Carbon::parse('2018-01-01 00:00:00')->ordinal('hour')
'0',
// Carbon::now()->subSeconds(1)->diffForHumans()
'پێشتر چرکە',
// Carbon::now()->subSeconds(1)->diffForHumans(null, false, true)
'پێشتر چرکە',
// Carbon::now()->subSeconds(2)->diffForHumans()
'پێشتر چرکە',
// Carbon::now()->subSeconds(2)->diffForHumans(null, false, true)
'پێشتر چرکە',
// Carbon::now()->subMinutes(1)->diffForHumans()
'پێشتر خولەک',
// Carbon::now()->subMinutes(1)->diffForHumans(null, false, true)
'پێشتر خولەک',
// Carbon::now()->subMinutes(2)->diffForHumans()
'پێشتر خولەک',
// Carbon::now()->subMinutes(2)->diffForHumans(null, false, true)
'پێشتر خولەک',
// Carbon::now()->subHours(1)->diffForHumans()
'پێشتر کاتژمێر',
// Carbon::now()->subHours(1)->diffForHumans(null, false, true)
'پێشتر کاتژمێر',
// Carbon::now()->subHours(2)->diffForHumans()
'پێشتر کاتژمێر',
// Carbon::now()->subHours(2)->diffForHumans(null, false, true)
'پێشتر کاتژمێر',
// Carbon::now()->subDays(1)->diffForHumans()
'پێشتر ڕۆژ',
// Carbon::now()->subDays(1)->diffForHumans(null, false, true)
'پێشتر ڕۆژ',
// Carbon::now()->subDays(2)->diffForHumans()
'پێشتر ڕۆژ',
// Carbon::now()->subDays(2)->diffForHumans(null, false, true)
'پێشتر ڕۆژ',
// Carbon::now()->subWeeks(1)->diffForHumans()
'پێشتر هەفتە',
// Carbon::now()->subWeeks(1)->diffForHumans(null, false, true)
'پێشتر هەفتە',
// Carbon::now()->subWeeks(2)->diffForHumans()
'پێشتر هەفتە',
// Carbon::now()->subWeeks(2)->diffForHumans(null, false, true)
'پێشتر هەفتە',
// Carbon::now()->subMonths(1)->diffForHumans()
'پێشتر مانگ',
// Carbon::now()->subMonths(1)->diffForHumans(null, false, true)
'پێشتر مانگ',
// Carbon::now()->subMonths(2)->diffForHumans()
'پێشتر مانگين',
// Carbon::now()->subMonths(2)->diffForHumans(null, false, true)
'پێشتر مانگين',
// Carbon::now()->subYears(1)->diffForHumans()
'پێشتر ساڵ',
// Carbon::now()->subYears(1)->diffForHumans(null, false, true)
'پێشتر ساڵ',
// Carbon::now()->subYears(2)->diffForHumans()
'پێشتر ساڵ',
// Carbon::now()->subYears(2)->diffForHumans(null, false, true)
'پێشتر ساڵ',
// Carbon::now()->addSecond()->diffForHumans()
'چرکە لە ئێستاوە',
// Carbon::now()->addSecond()->diffForHumans(null, false, true)
'چرکە لە ئێستاوە',
// Carbon::now()->addSecond()->diffForHumans(Carbon::now())
'دوای چرکە',
// Carbon::now()->addSecond()->diffForHumans(Carbon::now(), false, true)
'دوای چرکە',
// Carbon::now()->diffForHumans(Carbon::now()->addSecond())
'پێش چرکە',
// Carbon::now()->diffForHumans(Carbon::now()->addSecond(), false, true)
'پێش چرکە',
// Carbon::now()->addSecond()->diffForHumans(Carbon::now(), true)
'چرکە',
// Carbon::now()->addSecond()->diffForHumans(Carbon::now(), true, true)
'چرکە',
// Carbon::now()->diffForHumans(Carbon::now()->addSecond()->addSecond(), true)
'چرکە',
// Carbon::now()->diffForHumans(Carbon::now()->addSecond()->addSecond(), true, true)
'چرکە',
// Carbon::now()->addSecond()->diffForHumans(null, false, true, 1)
'چرکە لە ئێستاوە',
// Carbon::now()->addMinute()->addSecond()->diffForHumans(null, true, false, 2)
'خولەک چرکە',
// Carbon::now()->addYears(2)->addMonths(3)->addDay()->addSecond()->diffForHumans(null, true, true, 4)
'ساڵ 3 مانگ ڕۆژ چرکە',
// Carbon::now()->addYears(3)->diffForHumans(null, null, false, 4)
'3 ساڵ لە ئێستاوە',
// Carbon::now()->subMonths(5)->diffForHumans(null, null, true, 4)
'پێشتر 5 مانگ',
// Carbon::now()->subYears(2)->subMonths(3)->subDay()->subSecond()->diffForHumans(null, null, true, 4)
'پێشتر ساڵ 3 مانگ ڕۆژ چرکە',
// Carbon::now()->addWeek()->addHours(10)->diffForHumans(null, true, false, 2)
'هەفتە 10 کاتژمێر',
// Carbon::now()->addWeek()->addDays(6)->diffForHumans(null, true, false, 2)
'هەفتە 6 ڕۆژ',
// Carbon::now()->addWeek()->addDays(6)->diffForHumans(null, true, false, 2)
'هەفتە 6 ڕۆژ',
// Carbon::now()->addWeek()->addDays(6)->diffForHumans(["join" => true, "parts" => 2])
'هەفتە و 6 ڕۆژ لە ئێستاوە',
// Carbon::now()->addWeeks(2)->addHour()->diffForHumans(null, true, false, 2)
'هەفتە کاتژمێر',
// Carbon::now()->addHour()->diffForHumans(["aUnit" => true])
'کاتژمێر لە ئێستاوە',
// CarbonInterval::days(2)->forHumans()
'ڕۆژ',
// CarbonInterval::create('P1DT3H')->forHumans(true)
'ڕۆژ 3 کاتژمێر',
];
}