| 148 |
lars |
1 |
<?php
|
|
|
2 |
|
|
|
3 |
/**
|
|
|
4 |
* This file is part of the Carbon package.
|
|
|
5 |
*
|
|
|
6 |
* (c) Brian Nesbitt <brian@nesbot.com>
|
|
|
7 |
*
|
|
|
8 |
* For the full copyright and license information, please view the LICENSE
|
|
|
9 |
* file that was distributed with this source code.
|
|
|
10 |
*/
|
|
|
11 |
|
|
|
12 |
/*
|
|
|
13 |
* Authors:
|
|
|
14 |
* - Quentí
|
|
|
15 |
*/
|
|
|
16 |
// @codeCoverageIgnoreStart
|
|
|
17 |
use Symfony\Component\Translation\PluralizationRules;
|
|
|
18 |
|
|
|
19 |
if (class_exists('Symfony\\Component\\Translation\\PluralizationRules')) {
|
|
|
20 |
PluralizationRules::set(static function ($number) {
|
|
|
21 |
return $number == 1 ? 0 : 1;
|
|
|
22 |
}, 'oc');
|
|
|
23 |
}
|
|
|
24 |
// @codeCoverageIgnoreEnd
|
|
|
25 |
|
|
|
26 |
return [
|
|
|
27 |
'year' => ':count an|:count ans',
|
|
|
28 |
'a_year' => 'un an|:count ans',
|
|
|
29 |
'y' => ':count an|:count ans',
|
|
|
30 |
'month' => ':count mes|:count meses',
|
|
|
31 |
'a_month' => 'un mes|:count meses',
|
|
|
32 |
'm' => ':count mes|:count meses',
|
|
|
33 |
'week' => ':count setmana|:count setmanas',
|
|
|
34 |
'a_week' => 'una setmana|:count setmanas',
|
|
|
35 |
'w' => ':count setmana|:count setmanas',
|
|
|
36 |
'day' => ':count jorn|:count jorns',
|
|
|
37 |
'a_day' => 'un jorn|:count jorns',
|
|
|
38 |
'd' => ':count jorn|:count jorns',
|
|
|
39 |
'hour' => ':count ora|:count oras',
|
|
|
40 |
'a_hour' => 'una ora|:count oras',
|
|
|
41 |
'h' => ':count ora|:count oras',
|
|
|
42 |
'minute' => ':count minuta|:count minutas',
|
|
|
43 |
'a_minute' => 'una minuta|:count minutas',
|
|
|
44 |
'min' => ':count minuta|:count minutas',
|
|
|
45 |
'second' => ':count segonda|:count segondas',
|
|
|
46 |
'a_second' => 'una segonda|:count segondas',
|
|
|
47 |
's' => ':count segonda|:count segondas',
|
|
|
48 |
'ago' => 'fa :time',
|
|
|
49 |
'from_now' => 'd\'aquí :time',
|
|
|
50 |
'after' => ':time aprèp',
|
|
|
51 |
'before' => ':time abans',
|
|
|
52 |
'diff_now' => 'ara meteis',
|
|
|
53 |
'diff_today' => 'Uèi',
|
|
|
54 |
'diff_today_regexp' => 'Uèi(?:\\s+a)?',
|
|
|
55 |
'diff_yesterday' => 'ièr',
|
|
|
56 |
'diff_yesterday_regexp' => 'Ièr(?:\\s+a)?',
|
|
|
57 |
'diff_tomorrow' => 'deman',
|
|
|
58 |
'diff_tomorrow_regexp' => 'Deman(?:\\s+a)?',
|
|
|
59 |
'diff_before_yesterday' => 'ièr delà',
|
|
|
60 |
'diff_after_tomorrow' => 'deman passat',
|
|
|
61 |
'period_recurrences' => ':count còp|:count còps',
|
|
|
62 |
'period_interval' => 'cada :interval',
|
|
|
63 |
'period_start_date' => 'de :date',
|
|
|
64 |
'period_end_date' => 'fins a :date',
|
|
|
65 |
'formats' => [
|
|
|
66 |
'LT' => 'H:mm',
|
|
|
67 |
'LTS' => 'H:mm:ss',
|
|
|
68 |
'L' => 'DD/MM/YYYY',
|
|
|
69 |
'LL' => 'D MMMM [de] YYYY',
|
|
|
70 |
'LLL' => 'D MMMM [de] YYYY [a] H:mm',
|
|
|
71 |
'LLLL' => 'dddd D MMMM [de] YYYY [a] H:mm',
|
|
|
72 |
],
|
|
|
73 |
'calendar' => [
|
|
|
74 |
'sameDay' => '[Uèi a] LT',
|
|
|
75 |
'nextDay' => '[Deman a] LT',
|
|
|
76 |
'nextWeek' => 'dddd [a] LT',
|
|
|
77 |
'lastDay' => '[Ièr a] LT',
|
|
|
78 |
'lastWeek' => 'dddd [passat a] LT',
|
|
|
79 |
'sameElse' => 'L',
|
|
|
80 |
],
|
|
|
81 |
'months' => ['de genièr', 'de febrièr', 'de març', 'd\'abrial', 'de mai', 'de junh', 'de julhet', 'd\'agost', 'de setembre', 'd’octòbre', 'de novembre', 'de decembre'],
|
|
|
82 |
'months_standalone' => ['genièr', 'febrièr', 'març', 'abrial', 'mai', 'junh', 'julh', 'agost', 'setembre', 'octòbre', 'novembre', 'decembre'],
|
|
|
83 |
'months_short' => ['gen.', 'feb.', 'març', 'abr.', 'mai', 'junh', 'julh', 'ago.', 'sep.', 'oct.', 'nov.', 'dec.'],
|
|
|
84 |
'weekdays' => ['dimenge', 'diluns', 'dimars', 'dimècres', 'dijòus', 'divendres', 'dissabte'],
|
|
|
85 |
'weekdays_short' => ['dg', 'dl', 'dm', 'dc', 'dj', 'dv', 'ds'],
|
|
|
86 |
'weekdays_min' => ['dg', 'dl', 'dm', 'dc', 'dj', 'dv', 'ds'],
|
|
|
87 |
'ordinal' => function ($number, string $period = '') {
|
|
|
88 |
$ordinal = [1 => 'èr', 2 => 'nd'][(int) $number] ?? 'en';
|
|
|
89 |
|
|
|
90 |
// feminine for year, week, hour, minute, second
|
|
|
91 |
if (preg_match('/^[yYwWhHgGis]$/', $period)) {
|
|
|
92 |
$ordinal .= 'a';
|
|
|
93 |
}
|
|
|
94 |
|
|
|
95 |
return $number.$ordinal;
|
|
|
96 |
},
|
|
|
97 |
'first_day_of_week' => 1,
|
|
|
98 |
'day_of_first_week_of_year' => 4,
|
|
|
99 |
'list' => [', ', ' e '],
|
|
|
100 |
];
|