diff --git a/jquery.timeago.js b/jquery.timeago.js index ec80c323..d54aefaf 100644 --- a/jquery.timeago.js +++ b/jquery.timeago.js @@ -46,34 +46,37 @@ localeTitle: false, cutoff: 0, autoDispose: true, + lang: "en", strings: { - prefixAgo: null, - prefixFromNow: null, - suffixAgo: "ago", - suffixFromNow: "from now", - inPast: "any moment now", - seconds: "less than a minute", - minute: "about a minute", - minutes: "%d minutes", - hour: "about an hour", - hours: "about %d hours", - day: "a day", - days: "%d days", - month: "about a month", - months: "%d months", - year: "about a year", - years: "%d years", - wordSeparator: " ", - numbers: [] + en: { + prefixAgo: null, + prefixFromNow: null, + suffixAgo: "ago", + suffixFromNow: "from now", + inPast: "any moment now", + seconds: "less than a minute", + minute: "about a minute", + minutes: "%d minutes", + hour: "about an hour", + hours: "about %d hours", + day: "a day", + days: "%d days", + month: "about a month", + months: "%d months", + year: "about a year", + years: "%d years", + wordSeparator: " ", + numbers: [] + } } }, - inWords: function(distanceMillis) { + inWords: function(distanceMillis, lang) { if (!this.settings.allowPast && ! this.settings.allowFuture) { throw 'timeago allowPast and allowFuture settings can not both be set to false.'; } - var $l = this.settings.strings; + var $l = this.settings.strings[lang] || this.settings.strings[this.settings.lang] || this.settings.strings["en"] || this.settings.strings; var prefix = $l.prefixAgo; var suffix = $l.suffixAgo; if (this.settings.allowFuture) { @@ -84,7 +87,7 @@ } if (!this.settings.allowPast && distanceMillis >= 0) { - return this.settings.strings.inPast; + return $l.inPast; } var seconds = Math.abs(distanceMillis) / 1000; @@ -194,7 +197,7 @@ if (!isNaN(data.datetime)) { if ( $s.cutoff === 0 || Math.abs(distance(data.datetime)) < $s.cutoff) { - $(this).text(inWords(data.datetime)); + $(this).text(inWords(data.datetime, ($(this).attr('lang') ? $(this).attr('lang') : $t.settings.lang))); } else { if ($(this).attr('title').length > 0) { $(this).text($(this).attr('title')); @@ -218,8 +221,8 @@ return element.data("timeago"); } - function inWords(date) { - return $t.inWords(distance(date)); + function inWords(date, lang) { + return $t.inWords(distance(date), lang); } function distance(date) { diff --git a/locales/jquery.timeago.af.js b/locales/jquery.timeago.af.js index 817a7fa5..d908549e 100644 --- a/locales/jquery.timeago.af.js +++ b/locales/jquery.timeago.af.js @@ -8,7 +8,7 @@ } }(function (jQuery) { // Afrikaans - jQuery.timeago.settings.strings = { + jQuery.timeago.settings.strings["af"] = { prefixAgo: null, prefixFromNow: null, suffixAgo: "gelede", diff --git a/locales/jquery.timeago.am.js b/locales/jquery.timeago.am.js index 65502c39..b933a9ff 100644 --- a/locales/jquery.timeago.am.js +++ b/locales/jquery.timeago.am.js @@ -8,7 +8,7 @@ } }(function (jQuery) { // Amharic - jQuery.timeago.settings.strings = { + jQuery.timeago.settings.strings["am"] = { prefixAgo: null, prefixFromNow: null, suffixAgo: "በፊት", diff --git a/locales/jquery.timeago.ar.js b/locales/jquery.timeago.ar.js index 14cd18f2..41fe9eb2 100644 --- a/locales/jquery.timeago.ar.js +++ b/locales/jquery.timeago.ar.js @@ -11,7 +11,7 @@ return a[plural=n===0 ? 0 : n===1 ? 1 : n===2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 ? 4 : 5]; } - jQuery.timeago.settings.strings = { + jQuery.timeago.settings.strings["ar"] = { prefixAgo: "منذ", prefixFromNow: "بعد", suffixAgo: null, diff --git a/locales/jquery.timeago.az-short.js b/locales/jquery.timeago.az-short.js index a1d5740e..81022bb1 100644 --- a/locales/jquery.timeago.az-short.js +++ b/locales/jquery.timeago.az-short.js @@ -8,7 +8,7 @@ } }(function (jQuery) { // Azerbaijani shortened - jQuery.timeago.settings.strings = { + jQuery.timeago.settings.strings["az-short"] = { prefixAgo: null, prefixFromNow: null, suffixAgo: "", diff --git a/locales/jquery.timeago.az.js b/locales/jquery.timeago.az.js index 8332c41c..6a1f4098 100644 --- a/locales/jquery.timeago.az.js +++ b/locales/jquery.timeago.az.js @@ -8,7 +8,7 @@ } }(function (jQuery) { // Azerbaijani - jQuery.timeago.settings.strings = { + jQuery.timeago.settings.strings["az"] = { prefixAgo: null, prefixFromNow: null, suffixAgo: 'əvvəl', diff --git a/locales/jquery.timeago.be.js b/locales/jquery.timeago.be.js index 50efb8cd..24cc988c 100644 --- a/locales/jquery.timeago.be.js +++ b/locales/jquery.timeago.be.js @@ -23,7 +23,7 @@ } } - jQuery.timeago.settings.strings = { + jQuery.timeago.settings.strings["be"] = { prefixAgo: null, prefixFromNow: "праз", suffixAgo: "таму", diff --git a/locales/jquery.timeago.bg.js b/locales/jquery.timeago.bg.js index a3bd343a..4052d832 100644 --- a/locales/jquery.timeago.bg.js +++ b/locales/jquery.timeago.bg.js @@ -8,7 +8,7 @@ } }(function (jQuery) { // Bulgarian - jQuery.timeago.settings.strings = { + jQuery.timeago.settings.strings["bg"] = { prefixAgo: "преди", prefixFromNow: "след", suffixAgo: null, diff --git a/locales/jquery.timeago.bs.js b/locales/jquery.timeago.bs.js index cbb17806..a6e2a89a 100644 --- a/locales/jquery.timeago.bs.js +++ b/locales/jquery.timeago.bs.js @@ -20,7 +20,7 @@ } }; - jQuery.timeago.settings.strings = { + jQuery.timeago.settings.strings["bs"] = { prefixAgo: "prije", prefixFromNow: "za", suffixAgo: null, diff --git a/locales/jquery.timeago.ca.js b/locales/jquery.timeago.ca.js index e4cb5cab..9e3e850e 100644 --- a/locales/jquery.timeago.ca.js +++ b/locales/jquery.timeago.ca.js @@ -8,7 +8,7 @@ } }(function (jQuery) { // Catalan - jQuery.timeago.settings.strings = { + jQuery.timeago.settings.strings["ca"] = { prefixAgo: "fa", prefixFromNow: "d'aquí", suffixAgo: null, diff --git a/locales/jquery.timeago.cs.js b/locales/jquery.timeago.cs.js index b940f694..d0d76d1d 100644 --- a/locales/jquery.timeago.cs.js +++ b/locales/jquery.timeago.cs.js @@ -13,7 +13,7 @@ return a[d>=0 ? 0 : a.length===2 || n<5 ? 1 : 2]; } - jQuery.timeago.settings.strings = { + jQuery.timeago.settings.strings["cs"] = { prefixAgo: 'před', prefixFromNow: 'za', suffixAgo: null, diff --git a/locales/jquery.timeago.cy.js b/locales/jquery.timeago.cy.js index 4c514a8d..fa7fc713 100644 --- a/locales/jquery.timeago.cy.js +++ b/locales/jquery.timeago.cy.js @@ -8,7 +8,7 @@ } }(function (jQuery) { // Welsh - jQuery.timeago.settings.strings = { + jQuery.timeago.settings.strings["cy"] = { prefixAgo: null, prefixFromNow: null, suffixAgo: "yn ôl", diff --git a/locales/jquery.timeago.da.js b/locales/jquery.timeago.da.js index 236c34c4..85a6d716 100644 --- a/locales/jquery.timeago.da.js +++ b/locales/jquery.timeago.da.js @@ -8,7 +8,7 @@ } }(function (jQuery) { // Danish - jQuery.timeago.settings.strings = { + jQuery.timeago.settings.strings["da"] = { prefixAgo: "for", prefixFromNow: "om", suffixAgo: "siden", diff --git a/locales/jquery.timeago.de-short.js b/locales/jquery.timeago.de-short.js index 15b446e3..bdf8c80e 100644 --- a/locales/jquery.timeago.de-short.js +++ b/locales/jquery.timeago.de-short.js @@ -8,7 +8,7 @@ } }(function (jQuery) { // German shortened - jQuery.timeago.settings.strings = { + jQuery.timeago.settings.strings["de-short"] = { prefixAgo: null, prefixFromNow: null, suffixAgo: "", diff --git a/locales/jquery.timeago.de.js b/locales/jquery.timeago.de.js index 9cdde887..12fca0bf 100644 --- a/locales/jquery.timeago.de.js +++ b/locales/jquery.timeago.de.js @@ -8,7 +8,7 @@ } }(function (jQuery) { // German - jQuery.timeago.settings.strings = { + jQuery.timeago.settings.strings["de"] = { prefixAgo: "vor", prefixFromNow: "in", suffixAgo: "", diff --git a/locales/jquery.timeago.dv.js b/locales/jquery.timeago.dv.js index 0d70a493..68ff6582 100644 --- a/locales/jquery.timeago.dv.js +++ b/locales/jquery.timeago.dv.js @@ -10,7 +10,7 @@ /** * Dhivehi time in Thaana for timeago.js **/ - jQuery.timeago.settings.strings = { + jQuery.timeago.settings.strings["dv"] = { prefixAgo: null, prefixFromNow: null, suffixAgo: "ކުރިން", diff --git a/locales/jquery.timeago.el.js b/locales/jquery.timeago.el.js index 2db9ebea..cdb5778f 100644 --- a/locales/jquery.timeago.el.js +++ b/locales/jquery.timeago.el.js @@ -8,7 +8,7 @@ } }(function (jQuery) { // Greek - jQuery.timeago.settings.strings = { + jQuery.timeago.settings.strings["el"] = { prefixAgo: "πριν", prefixFromNow: "σε", suffixAgo: "", diff --git a/locales/jquery.timeago.en-short.js b/locales/jquery.timeago.en-short.js index 157aaa48..14468eea 100644 --- a/locales/jquery.timeago.en-short.js +++ b/locales/jquery.timeago.en-short.js @@ -8,7 +8,7 @@ } }(function (jQuery) { // English shortened - jQuery.timeago.settings.strings = { + jQuery.timeago.settings.strings["en-short"] = { prefixAgo: null, prefixFromNow: null, suffixAgo: "", diff --git a/locales/jquery.timeago.en.js b/locales/jquery.timeago.en.js index 8ca50aff..4271fb31 100644 --- a/locales/jquery.timeago.en.js +++ b/locales/jquery.timeago.en.js @@ -8,7 +8,7 @@ } }(function (jQuery) { // English (Template) - jQuery.timeago.settings.strings = { + jQuery.timeago.settings.strings["en"] = { prefixAgo: null, prefixFromNow: null, suffixAgo: "ago", diff --git a/locales/jquery.timeago.eo.js b/locales/jquery.timeago.eo.js index 76ecd7c7..b0bf4ff4 100644 --- a/locales/jquery.timeago.eo.js +++ b/locales/jquery.timeago.eo.js @@ -8,7 +8,7 @@ } }(function (jQuery) { // English (Template) -> Esperanto - jQuery.timeago.settings.strings = { + jQuery.timeago.settings.strings["eo"] = { prefixAgo: "antaŭ", prefixFromNow: null, suffixAgo: null, diff --git a/locales/jquery.timeago.es-short.js b/locales/jquery.timeago.es-short.js index f762a06d..deb62570 100644 --- a/locales/jquery.timeago.es-short.js +++ b/locales/jquery.timeago.es-short.js @@ -8,7 +8,7 @@ } }(function (jQuery) { // Spanish shortened - jQuery.timeago.settings.strings = { + jQuery.timeago.settings.strings["es-short"] = { prefixAgo: null, prefixFromNow: null, suffixAgo: "", diff --git a/locales/jquery.timeago.es.js b/locales/jquery.timeago.es.js index 0785b3f4..c7fb1d16 100644 --- a/locales/jquery.timeago.es.js +++ b/locales/jquery.timeago.es.js @@ -8,7 +8,7 @@ } }(function (jQuery) { // Spanish - jQuery.timeago.settings.strings = { + jQuery.timeago.settings.strings["es"] = { prefixAgo: "hace", prefixFromNow: "dentro de", suffixAgo: "", diff --git a/locales/jquery.timeago.et.js b/locales/jquery.timeago.et.js index ac2461ec..bf0444d8 100644 --- a/locales/jquery.timeago.et.js +++ b/locales/jquery.timeago.et.js @@ -8,7 +8,7 @@ } }(function (jQuery) { // Estonian - jQuery.timeago.settings.strings = { + jQuery.timeago.settings.strings["et"] = { prefixAgo: null, prefixFromNow: null, suffixAgo: "tagasi", diff --git a/locales/jquery.timeago.eu.js b/locales/jquery.timeago.eu.js index 5c2c32c7..352b2428 100644 --- a/locales/jquery.timeago.eu.js +++ b/locales/jquery.timeago.eu.js @@ -7,7 +7,7 @@ factory(jQuery); } }(function (jQuery) { - jQuery.timeago.settings.strings = { + jQuery.timeago.settings.strings["eu"] = { prefixAgo: "duela", prefixFromNow: "hemendik", suffixAgo: "", diff --git a/locales/jquery.timeago.fa-short.js b/locales/jquery.timeago.fa-short.js index c8b5fc4e..bd2e1f44 100644 --- a/locales/jquery.timeago.fa-short.js +++ b/locales/jquery.timeago.fa-short.js @@ -8,7 +8,7 @@ } }(function (jQuery) { // persian shortened - jQuery.timeago.settings.strings = { + jQuery.timeago.settings.strings["fa-short"] = { prefixAgo: null, prefixFromNow: null, suffixAgo: "", diff --git a/locales/jquery.timeago.fa.js b/locales/jquery.timeago.fa.js index d3495aa3..5d08cdf5 100644 --- a/locales/jquery.timeago.fa.js +++ b/locales/jquery.timeago.fa.js @@ -10,7 +10,7 @@ // Persian // Use DIR attribute for RTL text in Persian Language for ABBR tag . // By MB.seifollahi@gmail.com - jQuery.timeago.settings.strings = { + jQuery.timeago.settings.strings["fa"] = { prefixAgo: null, prefixFromNow: null, suffixAgo: "پیش", diff --git a/locales/jquery.timeago.fi.js b/locales/jquery.timeago.fi.js index b5f7e696..1eb436bc 100644 --- a/locales/jquery.timeago.fi.js +++ b/locales/jquery.timeago.fi.js @@ -8,7 +8,7 @@ } }(function (jQuery) { // Finnish - jQuery.timeago.settings.strings = { + jQuery.timeago.settings.strings["fi"] = { prefixAgo: null, prefixFromNow: null, suffixAgo: "sitten", diff --git a/locales/jquery.timeago.fr-short.js b/locales/jquery.timeago.fr-short.js index a116eada..fa1d5cbb 100644 --- a/locales/jquery.timeago.fr-short.js +++ b/locales/jquery.timeago.fr-short.js @@ -8,7 +8,7 @@ } }(function (jQuery) { // French shortened - jQuery.timeago.settings.strings = { + jQuery.timeago.settings.strings["fr-short"] = { prefixAgo: "il y a", prefixFromNow: "d'ici", seconds: "moins d'une minute", diff --git a/locales/jquery.timeago.fr.js b/locales/jquery.timeago.fr.js index 1bb052aa..1617d855 100644 --- a/locales/jquery.timeago.fr.js +++ b/locales/jquery.timeago.fr.js @@ -8,7 +8,7 @@ } }(function (jQuery) { // French - jQuery.timeago.settings.strings = { + jQuery.timeago.settings.strings["fr"] = { // environ ~= about, it's optional prefixAgo: "il y a", prefixFromNow: "d'ici", diff --git a/locales/jquery.timeago.gl.js b/locales/jquery.timeago.gl.js index 277bbf70..6f05b1fa 100644 --- a/locales/jquery.timeago.gl.js +++ b/locales/jquery.timeago.gl.js @@ -8,7 +8,7 @@ } }(function (jQuery) { // Galician - jQuery.timeago.settings.strings = { + jQuery.timeago.settings.strings["gl"] = { prefixAgo: "hai", prefixFromNow: "dentro de", suffixAgo: "", diff --git a/locales/jquery.timeago.he.js b/locales/jquery.timeago.he.js index 2cd31ab6..7574450e 100644 --- a/locales/jquery.timeago.he.js +++ b/locales/jquery.timeago.he.js @@ -8,7 +8,7 @@ } }(function (jQuery) { // Hebrew - jQuery.timeago.settings.strings = { + jQuery.timeago.settings.strings["he"] = { prefixAgo: "לפני", prefixFromNow: "עוד", seconds: "פחות מדקה", diff --git a/locales/jquery.timeago.hr.js b/locales/jquery.timeago.hr.js index bd142979..da904eaa 100644 --- a/locales/jquery.timeago.hr.js +++ b/locales/jquery.timeago.hr.js @@ -20,7 +20,7 @@ } }; - jQuery.timeago.settings.strings = { + jQuery.timeago.settings.strings["hr"] = { prefixAgo: "prije", prefixFromNow: "za", suffixAgo: null, diff --git a/locales/jquery.timeago.hu.js b/locales/jquery.timeago.hu.js index 0009de9e..63a41459 100644 --- a/locales/jquery.timeago.hu.js +++ b/locales/jquery.timeago.hu.js @@ -8,7 +8,7 @@ } }(function (jQuery) { // Hungarian - jQuery.timeago.settings.strings = { + jQuery.timeago.settings.strings["hu"] = { prefixAgo: null, prefixFromNow: null, suffixAgo: null, diff --git a/locales/jquery.timeago.hy.js b/locales/jquery.timeago.hy.js index 3f0de6e7..680f24b3 100644 --- a/locales/jquery.timeago.hy.js +++ b/locales/jquery.timeago.hy.js @@ -8,7 +8,7 @@ } }(function (jQuery) { // Armenian - jQuery.timeago.settings.strings = { + jQuery.timeago.settings.strings["hy"] = { prefixAgo: null, prefixFromNow: null, suffixAgo: "առաջ", diff --git a/locales/jquery.timeago.id.js b/locales/jquery.timeago.id.js index ca530ccf..6d8db877 100644 --- a/locales/jquery.timeago.id.js +++ b/locales/jquery.timeago.id.js @@ -8,7 +8,7 @@ } }(function (jQuery) { // Indonesian - jQuery.timeago.settings.strings = { + jQuery.timeago.settings.strings["id"] = { prefixAgo: null, prefixFromNow: null, suffixAgo: "yang lalu", diff --git a/locales/jquery.timeago.is.js b/locales/jquery.timeago.is.js index e3d4b1fd..adb75b2c 100644 --- a/locales/jquery.timeago.is.js +++ b/locales/jquery.timeago.is.js @@ -7,7 +7,7 @@ factory(jQuery); } }(function (jQuery) { - jQuery.timeago.settings.strings = { + jQuery.timeago.settings.strings["is"] = { prefixAgo: "fyrir", prefixFromNow: "eftir", suffixAgo: "síðan", diff --git a/locales/jquery.timeago.it-short.js b/locales/jquery.timeago.it-short.js index f1da0cc1..03f4b036 100644 --- a/locales/jquery.timeago.it-short.js +++ b/locales/jquery.timeago.it-short.js @@ -8,7 +8,7 @@ } }(function (jQuery) { // Italian shortened - jQuery.timeago.settings.strings = { + jQuery.timeago.settings.strings["it-short"] = { prefixAgo: null, prefixFromNow: null, suffixAgo: "", diff --git a/locales/jquery.timeago.it.js b/locales/jquery.timeago.it.js index 32ee9438..32cb2016 100644 --- a/locales/jquery.timeago.it.js +++ b/locales/jquery.timeago.it.js @@ -8,7 +8,7 @@ } }(function (jQuery) { // Italian - jQuery.timeago.settings.strings = { + jQuery.timeago.settings.strings["it"] = { prefixAgo: null, prefixFromNow: "fra", suffixAgo: "fa", diff --git a/locales/jquery.timeago.ja.js b/locales/jquery.timeago.ja.js index 30f3308c..631bef70 100644 --- a/locales/jquery.timeago.ja.js +++ b/locales/jquery.timeago.ja.js @@ -8,7 +8,7 @@ } }(function (jQuery) { // Japanese - jQuery.timeago.settings.strings = { + jQuery.timeago.settings.strings["ja"] = { prefixAgo: "", prefixFromNow: "今から", suffixAgo: "前", diff --git a/locales/jquery.timeago.jv.js b/locales/jquery.timeago.jv.js index 0344053d..d2a19f5c 100644 --- a/locales/jquery.timeago.jv.js +++ b/locales/jquery.timeago.jv.js @@ -8,7 +8,7 @@ } }(function (jQuery) { // Javanesse (Boso Jowo) - jQuery.timeago.settings.strings = { + jQuery.timeago.settings.strings["jv"] = { prefixAgo: null, prefixFromNow: null, suffixAgo: "kepungkur", diff --git a/locales/jquery.timeago.ka.js b/locales/jquery.timeago.ka.js index ff97dd77..10cc684f 100644 --- a/locales/jquery.timeago.ka.js +++ b/locales/jquery.timeago.ka.js @@ -8,7 +8,7 @@ } }(function (jQuery) { // English (Template) - jQuery.timeago.settings.strings = { + jQuery.timeago.settings.strings["ka"] = { prefixAgo: null, prefixFromNow: null, suffixAgo: "ის წინ", diff --git a/locales/jquery.timeago.ko.js b/locales/jquery.timeago.ko.js index 23d1d378..056dab07 100644 --- a/locales/jquery.timeago.ko.js +++ b/locales/jquery.timeago.ko.js @@ -8,7 +8,7 @@ } }(function (jQuery) { // Korean - jQuery.timeago.settings.strings = { + jQuery.timeago.settings.strings["ko"] = { prefixAgo: null, prefixFromNow: null, suffixAgo: "전", diff --git a/locales/jquery.timeago.ky.js b/locales/jquery.timeago.ky.js index 58dba293..da3d521e 100644 --- a/locales/jquery.timeago.ky.js +++ b/locales/jquery.timeago.ky.js @@ -22,7 +22,7 @@ } } - jQuery.timeago.settings.strings = { + jQuery.timeago.settings.strings["ky"] = { prefixAgo: null, prefixFromNow: "через", suffixAgo: "мурун", diff --git a/locales/jquery.timeago.lt.js b/locales/jquery.timeago.lt.js index 2079fccd..a359c8ff 100644 --- a/locales/jquery.timeago.lt.js +++ b/locales/jquery.timeago.lt.js @@ -8,7 +8,7 @@ } }(function (jQuery) { //Lithuanian - jQuery.timeago.settings.strings = { + jQuery.timeago.settings.strings["lt"] = { prefixAgo: "prieš", prefixFromNow: null, suffixAgo: null, diff --git a/locales/jquery.timeago.lv.js b/locales/jquery.timeago.lv.js index 855d1a4d..b980e57d 100644 --- a/locales/jquery.timeago.lv.js +++ b/locales/jquery.timeago.lv.js @@ -8,7 +8,7 @@ } }(function (jQuery) { //Latvian - jQuery.timeago.settings.strings = { + jQuery.timeago.settings.strings["lv"] = { prefixAgo: "pirms", prefixFromNow: null, suffixAgo: null, diff --git a/locales/jquery.timeago.mk.js b/locales/jquery.timeago.mk.js index 301a5da8..22180e09 100644 --- a/locales/jquery.timeago.mk.js +++ b/locales/jquery.timeago.mk.js @@ -9,7 +9,7 @@ }(function (jQuery) { // Macedonian (function() { - jQuery.timeago.settings.strings={ + jQuery.timeago.settings.strings["mk"]={ prefixAgo: "пред", prefixFromNow: "за", suffixAgo: null, diff --git a/locales/jquery.timeago.nl.js b/locales/jquery.timeago.nl.js index 2c5de89c..b1210dd6 100644 --- a/locales/jquery.timeago.nl.js +++ b/locales/jquery.timeago.nl.js @@ -8,7 +8,7 @@ } }(function (jQuery) { // Dutch - jQuery.timeago.settings.strings = { + jQuery.timeago.settings.strings["nl"] = { prefixAgo: null, prefixFromNow: "over", suffixAgo: "geleden", diff --git a/locales/jquery.timeago.no.js b/locales/jquery.timeago.no.js index c896337c..63035a50 100644 --- a/locales/jquery.timeago.no.js +++ b/locales/jquery.timeago.no.js @@ -8,7 +8,7 @@ } }(function (jQuery) { // Norwegian - jQuery.timeago.settings.strings = { + jQuery.timeago.settings.strings["no"] = { prefixAgo: "for", prefixFromNow: "om", suffixAgo: "siden", diff --git a/locales/jquery.timeago.pl.js b/locales/jquery.timeago.pl.js index 48427846..d2034057 100644 --- a/locales/jquery.timeago.pl.js +++ b/locales/jquery.timeago.pl.js @@ -19,7 +19,7 @@ } } - jQuery.timeago.settings.strings = { + jQuery.timeago.settings.strings["pl"] = { prefixAgo: null, prefixFromNow: "za", suffixAgo: "temu", diff --git a/locales/jquery.timeago.pt-br-short.js b/locales/jquery.timeago.pt-br-short.js index f7cd7e8d..9da7b600 100644 --- a/locales/jquery.timeago.pt-br-short.js +++ b/locales/jquery.timeago.pt-br-short.js @@ -8,7 +8,7 @@ } }(function (jQuery) { // Portuguese Brasil shortened - jQuery.timeago.settings.strings = { + jQuery.timeago.settings.strings["pt-br-short"] = { prefixAgo: null, prefixFromNow: null, suffixAgo: "", diff --git a/locales/jquery.timeago.pt-br.js b/locales/jquery.timeago.pt-br.js index a8701a88..586f55d1 100644 --- a/locales/jquery.timeago.pt-br.js +++ b/locales/jquery.timeago.pt-br.js @@ -8,7 +8,7 @@ } }(function (jQuery) { // Brazilian Portuguese - jQuery.timeago.settings.strings = { + jQuery.timeago.settings.strings["pt-br"] = { prefixAgo: "há", prefixFromNow: "em", suffixAgo: null, diff --git a/locales/jquery.timeago.pt-short.js b/locales/jquery.timeago.pt-short.js index 0b146a79..043bac89 100644 --- a/locales/jquery.timeago.pt-short.js +++ b/locales/jquery.timeago.pt-short.js @@ -8,7 +8,7 @@ } }(function (jQuery) { // Portuguese shortened - jQuery.timeago.settings.strings = { + jQuery.timeago.settings.strings["pt-short"] = { prefixAgo: null, prefixFromNow: null, suffixAgo: "", diff --git a/locales/jquery.timeago.pt.js b/locales/jquery.timeago.pt.js index e060bbfb..043725a1 100644 --- a/locales/jquery.timeago.pt.js +++ b/locales/jquery.timeago.pt.js @@ -8,7 +8,7 @@ } }(function (jQuery) { // Portuguese - jQuery.timeago.settings.strings = { + jQuery.timeago.settings.strings["pt"] = { prefixAgo: "há", prefixFromNow: "daqui a", seconds: "menos de um minuto", diff --git a/locales/jquery.timeago.ro.js b/locales/jquery.timeago.ro.js index feda3aad..ad715209 100644 --- a/locales/jquery.timeago.ro.js +++ b/locales/jquery.timeago.ro.js @@ -8,7 +8,7 @@ } }(function (jQuery) { // Romanian - jQuery.timeago.settings.strings = { + jQuery.timeago.settings.strings["ro"] = { prefixAgo: "acum", prefixFromNow: "peste", suffixAgo: "", diff --git a/locales/jquery.timeago.rs.js b/locales/jquery.timeago.rs.js index b9e51882..b81d4282 100644 --- a/locales/jquery.timeago.rs.js +++ b/locales/jquery.timeago.rs.js @@ -20,7 +20,7 @@ } }; - jQuery.timeago.settings.strings = { + jQuery.timeago.settings.strings["rs"] = { prefixAgo: "pre", prefixFromNow: "za", suffixAgo: null, diff --git a/locales/jquery.timeago.ru.js b/locales/jquery.timeago.ru.js index 4ff3f8d3..62a2eb8c 100644 --- a/locales/jquery.timeago.ru.js +++ b/locales/jquery.timeago.ru.js @@ -23,7 +23,7 @@ } } - jQuery.timeago.settings.strings = { + jQuery.timeago.settings.strings["ru"] = { prefixAgo: null, prefixFromNow: "через", suffixAgo: "назад", diff --git a/locales/jquery.timeago.rw.js b/locales/jquery.timeago.rw.js index 50119e1e..eb31452d 100644 --- a/locales/jquery.timeago.rw.js +++ b/locales/jquery.timeago.rw.js @@ -8,7 +8,7 @@ } }(function (jQuery) { // Kinyarwanda - jQuery.timeago.settings.strings = { + jQuery.timeago.settings.strings["rw"] = { prefixAgo: "hashize", prefixFromNow: "mu", suffixAgo: null, diff --git a/locales/jquery.timeago.si.js b/locales/jquery.timeago.si.js index 6fa215e9..c99edeff 100644 --- a/locales/jquery.timeago.si.js +++ b/locales/jquery.timeago.si.js @@ -8,7 +8,7 @@ } }(function (jQuery) { // Sinhalese (SI) - jQuery.timeago.settings.strings = { + jQuery.timeago.settings.strings["si"] = { prefixAgo: null, prefixFromNow: null, suffixAgo: "පෙර", diff --git a/locales/jquery.timeago.sk.js b/locales/jquery.timeago.sk.js index e28ab7c9..67d5212f 100644 --- a/locales/jquery.timeago.sk.js +++ b/locales/jquery.timeago.sk.js @@ -13,7 +13,7 @@ return a[d>=0 ? 0 : a.length===2 || n<5 ? 1 : 2]; } - jQuery.timeago.settings.strings = { + jQuery.timeago.settings.strings["sk"] = { prefixAgo: 'pred', prefixFromNow: 'o', suffixAgo: null, diff --git a/locales/jquery.timeago.sl.js b/locales/jquery.timeago.sl.js index 9f0329ac..61664af4 100644 --- a/locales/jquery.timeago.sl.js +++ b/locales/jquery.timeago.sl.js @@ -12,7 +12,7 @@ return a[n%100===1 ? 1 : n%100===2 ? 2 : n%100===3 || n%100===4 ? 3 : 0]; }; - jQuery.timeago.settings.strings = { + jQuery.timeago.settings.strings["sl"] = { prefixAgo: null, prefixFromNow: "čez", suffixAgo: "nazaj", diff --git a/locales/jquery.timeago.sq.js b/locales/jquery.timeago.sq.js index cb8ae703..a1b779ed 100644 --- a/locales/jquery.timeago.sq.js +++ b/locales/jquery.timeago.sq.js @@ -8,7 +8,7 @@ } }(function (jQuery) { // Albanian SQ - jQuery.timeago.settings.strings = { + jQuery.timeago.settings.strings["sq"] = { suffixAgo: "më parë", suffixFromNow: "tani", seconds: "më pak se një minutë", diff --git a/locales/jquery.timeago.sr.js b/locales/jquery.timeago.sr.js index bd1efe79..7684f842 100644 --- a/locales/jquery.timeago.sr.js +++ b/locales/jquery.timeago.sr.js @@ -20,7 +20,7 @@ } }; - jQuery.timeago.settings.strings = { + jQuery.timeago.settings.strings["sr"] = { prefixAgo: "пре", prefixFromNow: "за", suffixAgo: null, diff --git a/locales/jquery.timeago.sv.js b/locales/jquery.timeago.sv.js index caf09dbb..91ab5a6d 100644 --- a/locales/jquery.timeago.sv.js +++ b/locales/jquery.timeago.sv.js @@ -8,7 +8,7 @@ } }(function (jQuery) { // Swedish - jQuery.timeago.settings.strings = { + jQuery.timeago.settings.strings["sv"] = { prefixAgo: "för", prefixFromNow: "om", suffixAgo: "sedan", diff --git a/locales/jquery.timeago.th.js b/locales/jquery.timeago.th.js index 23d59d48..5bf5981b 100644 --- a/locales/jquery.timeago.th.js +++ b/locales/jquery.timeago.th.js @@ -8,7 +8,7 @@ } }(function (jQuery) { // Thai - jQuery.timeago.settings.strings = { + jQuery.timeago.settings.strings["th"] = { prefixAgo: null, prefixFromNow: null, suffixAgo: "ที่แล้ว", diff --git a/locales/jquery.timeago.tr-short.js b/locales/jquery.timeago.tr-short.js index ba290dd3..690f3193 100644 --- a/locales/jquery.timeago.tr-short.js +++ b/locales/jquery.timeago.tr-short.js @@ -8,7 +8,7 @@ } }(function (jQuery) { // Turkish shortened - jQuery.timeago.settings.strings = { + jQuery.timeago.settings.strings["tr-short"] = { prefixAgo: null, prefixFromNow: null, suffixAgo: "", diff --git a/locales/jquery.timeago.tr.js b/locales/jquery.timeago.tr.js index 8e0d2d4e..1fb897e8 100644 --- a/locales/jquery.timeago.tr.js +++ b/locales/jquery.timeago.tr.js @@ -8,7 +8,7 @@ } }(function (jQuery) { // Turkish - jQuery.timeago.settings.strings = { + jQuery.timeago.settings.strings["tr"] = { suffixAgo: 'önce', suffixFromNow: null, seconds: 'birkaç saniye', diff --git a/locales/jquery.timeago.uk.js b/locales/jquery.timeago.uk.js index 489963b5..f48a093b 100644 --- a/locales/jquery.timeago.uk.js +++ b/locales/jquery.timeago.uk.js @@ -22,7 +22,7 @@ } } - jQuery.timeago.settings.strings = { + jQuery.timeago.settings.strings["uk"] = { prefixAgo: null, prefixFromNow: "через", suffixAgo: "тому", diff --git a/locales/jquery.timeago.ur.js b/locales/jquery.timeago.ur.js index 9d0cd402..770c530c 100644 --- a/locales/jquery.timeago.ur.js +++ b/locales/jquery.timeago.ur.js @@ -8,7 +8,7 @@ } }(function (jQuery) { // Urdu - jQuery.timeago.settings.strings = { + jQuery.timeago.settings.strings["ur"] = { prefixAgo: null, prefixFromNow: null, suffixAgo: "پہلے", diff --git a/locales/jquery.timeago.uz.js b/locales/jquery.timeago.uz.js index f4ce8b33..c065045d 100755 --- a/locales/jquery.timeago.uz.js +++ b/locales/jquery.timeago.uz.js @@ -8,7 +8,7 @@ } }(function (jQuery) { //Uzbek - jQuery.timeago.settings.strings = { + jQuery.timeago.settings.strings["uz"] = { prefixAgo: null, prefixFromNow: "keyin", suffixAgo: "avval", diff --git a/locales/jquery.timeago.vi.js b/locales/jquery.timeago.vi.js index 1230b1e9..72f5f849 100644 --- a/locales/jquery.timeago.vi.js +++ b/locales/jquery.timeago.vi.js @@ -8,7 +8,7 @@ } }(function (jQuery) { // Vietnamese - jQuery.timeago.settings.strings = { + jQuery.timeago.settings.strings["vi"] = { prefixAgo: 'cách đây', prefixFromNow: null, suffixAgo: "trước", diff --git a/locales/jquery.timeago.zh-CN.js b/locales/jquery.timeago.zh-CN.js index c21a2874..3de316ba 100644 --- a/locales/jquery.timeago.zh-CN.js +++ b/locales/jquery.timeago.zh-CN.js @@ -8,7 +8,7 @@ } }(function (jQuery) { // Simplified Chinese - jQuery.timeago.settings.strings = { + jQuery.timeago.settings.strings["zh-CN"] = { prefixAgo: null, prefixFromNow: null, suffixAgo: "之前", diff --git a/locales/jquery.timeago.zh-TW.js b/locales/jquery.timeago.zh-TW.js index 15f56269..19ffb235 100644 --- a/locales/jquery.timeago.zh-TW.js +++ b/locales/jquery.timeago.zh-TW.js @@ -8,7 +8,7 @@ } }(function (jQuery) { // Traditional Chinese, zh-tw - jQuery.timeago.settings.strings = { + jQuery.timeago.settings.strings["zh-TW"] = { prefixAgo: null, prefixFromNow: null, suffixAgo: "之前", diff --git a/test/index.html b/test/index.html index 17d15dd9..813c8cc0 100644 --- a/test/index.html +++ b/test/index.html @@ -251,6 +251,14 @@