Merge "Run the ImagePageShowTOC hook before adding the 'metadata' link"
[lhc/web/wiklou.git] / resources / lib / moment / locale / pl.js
1 // moment.js locale configuration
2 // locale : polish (pl)
3 // author : Rafal Hirsz : https://github.com/evoL
4
5 (function (factory) {
6 if (typeof define === 'function' && define.amd) {
7 define(['moment'], factory); // AMD
8 } else if (typeof exports === 'object') {
9 module.exports = factory(require('../moment')); // Node
10 } else {
11 factory((typeof global !== 'undefined' ? global : this).moment); // node or other global
12 }
13 }(function (moment) {
14 var monthsNominative = 'styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień'.split('_'),
15 monthsSubjective = 'stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia'.split('_');
16
17 function plural(n) {
18 return (n % 10 < 5) && (n % 10 > 1) && ((~~(n / 10) % 10) !== 1);
19 }
20
21 function translate(number, withoutSuffix, key) {
22 var result = number + ' ';
23 switch (key) {
24 case 'm':
25 return withoutSuffix ? 'minuta' : 'minutę';
26 case 'mm':
27 return result + (plural(number) ? 'minuty' : 'minut');
28 case 'h':
29 return withoutSuffix ? 'godzina' : 'godzinę';
30 case 'hh':
31 return result + (plural(number) ? 'godziny' : 'godzin');
32 case 'MM':
33 return result + (plural(number) ? 'miesiące' : 'miesięcy');
34 case 'yy':
35 return result + (plural(number) ? 'lata' : 'lat');
36 }
37 }
38
39 return moment.defineLocale('pl', {
40 months : function (momentToFormat, format) {
41 if (/D MMMM/.test(format)) {
42 return monthsSubjective[momentToFormat.month()];
43 } else {
44 return monthsNominative[momentToFormat.month()];
45 }
46 },
47 monthsShort : 'sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru'.split('_'),
48 weekdays : 'niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota'.split('_'),
49 weekdaysShort : 'nie_pon_wt_śr_czw_pt_sb'.split('_'),
50 weekdaysMin : 'N_Pn_Wt_Śr_Cz_Pt_So'.split('_'),
51 longDateFormat : {
52 LT : 'HH:mm',
53 LTS : 'LT:ss',
54 L : 'DD.MM.YYYY',
55 LL : 'D MMMM YYYY',
56 LLL : 'D MMMM YYYY LT',
57 LLLL : 'dddd, D MMMM YYYY LT'
58 },
59 calendar : {
60 sameDay: '[Dziś o] LT',
61 nextDay: '[Jutro o] LT',
62 nextWeek: '[W] dddd [o] LT',
63 lastDay: '[Wczoraj o] LT',
64 lastWeek: function () {
65 switch (this.day()) {
66 case 0:
67 return '[W zeszłą niedzielę o] LT';
68 case 3:
69 return '[W zeszłą środę o] LT';
70 case 6:
71 return '[W zeszłą sobotę o] LT';
72 default:
73 return '[W zeszły] dddd [o] LT';
74 }
75 },
76 sameElse: 'L'
77 },
78 relativeTime : {
79 future : 'za %s',
80 past : '%s temu',
81 s : 'kilka sekund',
82 m : translate,
83 mm : translate,
84 h : translate,
85 hh : translate,
86 d : '1 dzień',
87 dd : '%d dni',
88 M : 'miesiąc',
89 MM : translate,
90 y : 'rok',
91 yy : translate
92 },
93 ordinalParse: /\d{1,2}\./,
94 ordinal : '%d.',
95 week : {
96 dow : 1, // Monday is the first day of the week.
97 doy : 4 // The week that contains Jan 4th is the first week of the year.
98 }
99 });
100 }));