]> git.ipfire.org Git - thirdparty/moment.git/commitdiff
Merging in develop and fixing conflicts 503/head
authorTim Wood <washwithcare@gmail.com>
Mon, 26 Nov 2012 18:17:44 +0000 (10:17 -0800)
committerTim Wood <washwithcare@gmail.com>
Mon, 26 Nov 2012 18:17:44 +0000 (10:17 -0800)
1  2 
lang/pl.js
moment.js
test/lang/bg.js
test/lang/ca.js
test/lang/cs.js
test/lang/de.js
test/lang/en-ca.js
test/lang/fr-ca.js
test/lang/pl.js
test/lang/tr.js

diff --cc lang/pl.js
index d2010a3cd423a71728d8132b08c0804ab109f5e9,a5dd134ef13a2409aee2bb7727581fa13d489f4d..fe28e90dfc031a169afe1673b0bbe11f7d0615e5
@@@ -2,72 -2,79 +2,83 @@@
  // language : polish (pl)
  // author : Rafal Hirsz : https://github.com/evoL
  (function () {
--    var plural = function (n) {
++    function plural(n) {
          return (n % 10 < 5) && (n % 10 > 1) && (~~(n / 10) !== 1);
--    },
++    }
  
-     translate = function (number, withoutSuffix, key) {
 -        translate = function (number, withoutSuffix, key) {
 -            var result = number + " ";
 -            switch (key) {
 -            case 'm':
 -                return withoutSuffix ? 'minuta' : 'minutę';
 -            case 'mm':
 -                return result + (plural(number) ? 'minuty' : 'minut');
 -            case 'h':
 -                return withoutSuffix  ? 'godzina'  : 'godzinę';
 -            case 'hh':
 -                return result + (plural(number) ? 'godziny' : 'godzin');
 -            case 'MM':
 -                return result + (plural(number) ? 'miesiące' : 'miesięcy');
 -            case 'yy':
 -                return result + (plural(number) ? 'lata' : 'lat');
 -            }
 -        },
++    function translate(number, withoutSuffix, key) {
 +        var result = number + " ";
 +        switch (key) {
 +        case 'm':
 +            return withoutSuffix ? 'minuta' : 'minutę';
 +        case 'mm':
 +            return result + (plural(number) ? 'minuty' : 'minut');
 +        case 'h':
 +            return withoutSuffix  ? 'godzina'  : 'godzinę';
 +        case 'hh':
 +            return result + (plural(number) ? 'godziny' : 'godzin');
 +        case 'MM':
 +            return result + (plural(number) ? 'miesiące' : 'miesięcy');
 +        case 'yy':
 +            return result + (plural(number) ? 'lata' : 'lat');
 +        }
-     },
++    }
  
-     lang = {
 -        lang = {
 -            months : "styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień".split("_"),
 -            monthsShort : "sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru".split("_"),
 -            weekdays : "niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota".split("_"),
 -            weekdaysShort : "nie_pon_wt_śr_czw_pt_sb".split("_"),
 -            weekdaysMin : "N_Pn_Wt_Śr_Cz_Pt_So".split("_"),
 -            longDateFormat : {
 -                LT : "HH:mm",
 -                L : "DD-MM-YYYY",
 -                LL : "D MMMM YYYY",
 -                LLL : "D MMMM YYYY LT",
 -                LLLL : "dddd, D MMMM YYYY LT"
 -            },
 -            calendar : {
 -                sameDay: '[Dziś o] LT',
 -                nextDay: '[Jutro o] LT',
 -                nextWeek: '[W] dddd [o] LT',
 -                lastDay: '[Wczoraj o] LT',
 -                lastWeek: function () {
 -                    switch (this.day()) {
 -                    case 0:
 -                        return '[W zeszłą niedzielę o] LT';
 -                    case 3:
 -                        return '[W zeszłą środę o] LT';
 -                    case 6:
 -                        return '[W zeszłą sobotę o] LT';
 -                    default:
 -                        return '[W zeszły] dddd [o] LT';
 -                    }
 -                },
 -                sameElse: 'L'
 -            },
 -            relativeTime : {
 -                future : "za %s",
 -                past : "%s temu",
 -                s : "kilka sekund",
 -                m : translate,
 -                mm : translate,
 -                h : translate,
 -                hh : translate,
 -                d : "1 dzień",
 -                dd : '%d dni',
 -                M : "miesiąc",
 -                MM : translate,
 -                y : "rok",
 -                yy : translate
++    var lang = {
 +        months : "styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień".split("_"),
 +        monthsShort : "sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru".split("_"),
 +        weekdays : "niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota".split("_"),
 +        weekdaysShort : "nie_pon_wt_śr_czw_pt_sb".split("_"),
 +        weekdaysMin : "N_Pn_Wt_Śr_Cz_Pt_So".split("_"),
 +        longDateFormat : {
 +            LT : "HH:mm",
 +            L : "DD-MM-YYYY",
 +            LL : "D MMMM YYYY",
 +            LLL : "D MMMM YYYY LT",
 +            LLLL : "dddd, D MMMM YYYY LT"
 +        },
 +        calendar : {
 +            sameDay: '[Dziś o] LT',
 +            nextDay: '[Jutro o] LT',
 +            nextWeek: '[W] dddd [o] LT',
 +            lastDay: '[Wczoraj o] LT',
-             lastWeek: '[W zeszły/łą] dddd [o] LT',
++            lastWeek: function () {
++                switch (this.day()) {
++                case 0:
++                    return '[W zeszłą niedzielę o] LT';
++                case 3:
++                    return '[W zeszłą środę o] LT';
++                case 6:
++                    return '[W zeszłą sobotę o] LT';
++                default:
++                    return '[W zeszły] dddd [o] LT';
++                }
+             },
 -            ordinal : function (number) {
 -                return '.';
 -            }
 -        };
 +            sameElse: 'L'
 +        },
 +        relativeTime : {
 +            future : "za %s",
 +            past : "%s temu",
 +            s : "kilka sekund",
 +            m : translate,
 +            mm : translate,
 +            h : translate,
 +            hh : translate,
 +            d : "1 dzień",
 +            dd : '%d dni',
 +            M : "miesiąc",
 +            MM : translate,
 +            y : "rok",
 +            yy : translate
 +        },
 +        ordinal : function (number) {
 +            return '.';
 +        },
 +        week : {
 +            dow : 1, // Monday is the first day of the week.
 +            doy : 4  // The week that contains Jan 4th is the first week of the year.
 +        }
 +    };
  
      // Node
      if (typeof module !== 'undefined' && module.exports) {
diff --cc moment.js
Simple merge
diff --cc test/lang/bg.js
Simple merge
diff --cc test/lang/ca.js
Simple merge
diff --cc test/lang/cs.js
Simple merge
diff --cc test/lang/de.js
Simple merge
index 4422f3765d114d4b88d79022f0fcb4d62ee4b5f4,3d00053d050e42a99f075f6045ffed4e9c4f23e0..a79556484550dbcc0366386e88373faf052bc17c
@@@ -106,8 -101,8 +108,9 @@@ exports["lang:en-ca"] = 
          test.equal(moment([2011, 0, 28]).format('DDDo'), '28th', '28th');
          test.equal(moment([2011, 0, 29]).format('DDDo'), '29th', '29th');
          test.equal(moment([2011, 0, 30]).format('DDDo'), '30th', '30th');
          test.equal(moment([2011, 0, 31]).format('DDDo'), '31st', '31st');
 +
          test.done();
      },
  
index 29ca28da7237fc08b02865632e6573baf53247ff,b5ee8579258d7e128059430ee00e5dd3434c374e..6bccdbaec456566cbeeb8752c890b916e6406f46
@@@ -106,8 -101,8 +108,9 @@@ exports["lang:fr-ca"] = 
          test.equal(moment([2011, 0, 28]).format('DDDo'), '28ème', '28ème');
          test.equal(moment([2011, 0, 29]).format('DDDo'), '29ème', '29ème');
          test.equal(moment([2011, 0, 30]).format('DDDo'), '30ème', '30ème');
          test.equal(moment([2011, 0, 31]).format('DDDo'), '31ème', '31ème');
 +
          test.done();
      },
  
diff --cc test/lang/pl.js
Simple merge
diff --cc test/lang/tr.js
Simple merge