diff --git a/locales/jquery.timeago.cs.js b/locales/jquery.timeago.cs.js index b713738..1d9fb80 100644 --- a/locales/jquery.timeago.cs.js +++ b/locales/jquery.timeago.cs.js @@ -1,18 +1,24 @@ // Czech -jQuery.timeago.settings.strings = { - prefixAgo: "před", - prefixFromNow: null, - suffixAgo: null, - suffixFromNow: null, - seconds: "méně než minutou", - minute: "minutou", - minutes: "%d minutami", - hour: "hodinou", - hours: "%d hodinami", - day: "1 dnem", - days: "%d dny", - month: "1 měsícem", - months: "%d měsíci", - year: "1 rokem", - years: "%d roky" -}; \ No newline at end of file +(function() { + function f(n, d, a) { + return a[d>=0 ? 0 : a.length==2 || n<5 ? 1 : 2]; + } + + jQuery.timeago.settings.strings = { + prefixAgo: 'před', + prefixFromNow: 'za', + suffixAgo: null, + suffixFromNow: null, + seconds: function(n, d) {return f(n, d, ['méně než minutou', 'méně než minutu'])}, + minute: function(n, d) {return f(n, d, ['minutou', 'minutu'])}, + minutes: function(n, d) {return f(n, d, ['%d minutami', '%d minuty', '%d minut'])}, + hour: function(n, d) {return f(n, d, ['hodinou', 'hodinu'])}, + hours: function(n, d) {return f(n, d, ['%d hodinami', '%d hodiny', '%d hodin'])}, + day: function(n, d) {return f(n, d, ['%d dnem', '%d den'])}, + days: function(n, d) {return f(n, d, ['%d dny', '%d dny', '%d dní'])}, + month: function(n, d) {return f(n, d, ['%d měsícem', '%d měsíc'])}, + months: function(n, d) {return f(n, d, ['%d měsící', '%d měsíce', '%d měsíců'])}, + year: function(n, d) {return f(n, d, ['%d rokem', '%d rok'])}, + years: function(n, d) {return f(n, d, ['%d lety', '%d roky', '%d let'])} + }; +})();