-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
117 changed files
with
5,736 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
Version 1.6.0 | ||
============= | ||
**Date:** 12-Jan-2015 | ||
|
||
- (enh #22): Estonian translation for kvdrp.php | ||
- (enh #23): Russian translations updated. | ||
- Code formatting updates as per Yii2 standards. | ||
- Revamp to use new Krajee base InputWidget and TranslationTrait. | ||
|
||
Version 1.5.0 | ||
============= | ||
**Date:** 29-Nov-2014 | ||
|
||
- (enh #20): Enhance language locale file parsing and registering | ||
- Remove `_localeLang` property | ||
- Rename `locale` folder to `locales` to be consistent with `datepicker` and `datetimepicker` plugins | ||
- Utilize enhancements in krajee base [enh #9](https://github.com/kartik-v/yii2-krajee-base/issues/9) and [enh #10 ](https://github.com/kartik-v/yii2-krajee-base/issues/10) | ||
- Update `LanguageAsset` for new path | ||
|
||
Version 1.4.0 | ||
============= | ||
**Date:** 25-Nov-2014 | ||
|
||
- (enh #17): Updated Russian translations | ||
- (bug #18): Plugin data attributes not set because of input rendering sequence. | ||
- (enh #19): Enhance widget to use updated plugin registration from Krajee base | ||
|
||
Version 1.3.0 | ||
============= | ||
**Date:** 21-Nov-2014 | ||
|
||
- (enh #7): Added Russian Translations | ||
- (enh #12): Added Spanish Translations | ||
- (enh #13): Update moment.js related range initializations. | ||
- (enh #14): Update moment library to latest release. | ||
- (enh #15): Revamp widget to remove dependency on custom locale JS files enhancement | ||
- (enh #16): Update Lithunian translations and create German translations. | ||
|
||
Version 1.2.0 | ||
============= | ||
**Date:** 20-Nov-2014 | ||
|
||
- (bug #11): Fix bug in daterangepicker.js for duplicate dates in Dec 2013. | ||
- Upgrade to latest plugin release 1.3.16 dated 12-Nov-2014. | ||
|
||
Version 1.1.0 | ||
============= | ||
**Date:** 10-Nov-2014 | ||
|
||
- PSR4 alias change | ||
- Set dependency on Krajee base components | ||
- Set release to stable | ||
|
||
Version 1.0.0 | ||
============= | ||
**Date:** 09-May-2014 | ||
|
||
- Initial release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,139 @@ | ||
// moment.js locale configuration | ||
// locale : Luxembourgish (lb) | ||
// author : mweimerskirch : https://github.com/mweimerskirch, David Raison : https://github.com/kwisatz | ||
|
||
// Note: Luxembourgish has a very particular phonological rule ('Eifeler Regel') that causes the | ||
// deletion of the final 'n' in certain contexts. That's what the 'eifelerRegelAppliesToWeekday' | ||
// and 'eifelerRegelAppliesToNumber' methods are meant for | ||
|
||
(function (factory) { | ||
if (typeof define === 'function' && define.amd) { | ||
define(['moment'], factory); // AMD | ||
} else if (typeof exports === 'object') { | ||
module.exports = factory(require('../moment')); // Node | ||
} else { | ||
factory((typeof global !== 'undefined' ? global : this).moment); // node or other global | ||
} | ||
}(function (moment) { | ||
function processRelativeTime(number, withoutSuffix, key, isFuture) { | ||
var format = { | ||
'm': ['eng Minutt', 'enger Minutt'], | ||
'h': ['eng Stonn', 'enger Stonn'], | ||
'd': ['een Dag', 'engem Dag'], | ||
'M': ['ee Mount', 'engem Mount'], | ||
'y': ['ee Joer', 'engem Joer'] | ||
}; | ||
return withoutSuffix ? format[key][0] : format[key][1]; | ||
} | ||
|
||
function processFutureTime(string) { | ||
var number = string.substr(0, string.indexOf(' ')); | ||
if (eifelerRegelAppliesToNumber(number)) { | ||
return 'a ' + string; | ||
} | ||
return 'an ' + string; | ||
} | ||
|
||
function processPastTime(string) { | ||
var number = string.substr(0, string.indexOf(' ')); | ||
if (eifelerRegelAppliesToNumber(number)) { | ||
return 'viru ' + string; | ||
} | ||
return 'virun ' + string; | ||
} | ||
|
||
/** | ||
* Returns true if the word before the given number loses the '-n' ending. | ||
* e.g. 'an 10 Deeg' but 'a 5 Deeg' | ||
* | ||
* @param number {integer} | ||
* @returns {boolean} | ||
*/ | ||
function eifelerRegelAppliesToNumber(number) { | ||
number = parseInt(number, 10); | ||
if (isNaN(number)) { | ||
return false; | ||
} | ||
if (number < 0) { | ||
// Negative Number --> always true | ||
return true; | ||
} else if (number < 10) { | ||
// Only 1 digit | ||
if (4 <= number && number <= 7) { | ||
return true; | ||
} | ||
return false; | ||
} else if (number < 100) { | ||
// 2 digits | ||
var lastDigit = number % 10, firstDigit = number / 10; | ||
if (lastDigit === 0) { | ||
return eifelerRegelAppliesToNumber(firstDigit); | ||
} | ||
return eifelerRegelAppliesToNumber(lastDigit); | ||
} else if (number < 10000) { | ||
// 3 or 4 digits --> recursively check first digit | ||
while (number >= 10) { | ||
number = number / 10; | ||
} | ||
return eifelerRegelAppliesToNumber(number); | ||
} else { | ||
// Anything larger than 4 digits: recursively check first n-3 digits | ||
number = number / 1000; | ||
return eifelerRegelAppliesToNumber(number); | ||
} | ||
} | ||
|
||
return moment.defineLocale('lb', { | ||
months: 'Januar_Februar_Mäerz_Abrëll_Mee_Juni_Juli_August_September_Oktober_November_Dezember'.split('_'), | ||
monthsShort: 'Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.'.split('_'), | ||
weekdays: 'Sonndeg_Méindeg_Dënschdeg_Mëttwoch_Donneschdeg_Freideg_Samschdeg'.split('_'), | ||
weekdaysShort: 'So._Mé._Dë._Më._Do._Fr._Sa.'.split('_'), | ||
weekdaysMin: 'So_Mé_Dë_Më_Do_Fr_Sa'.split('_'), | ||
longDateFormat: { | ||
LT: 'H:mm [Auer]', | ||
LTS: 'H:mm:ss [Auer]', | ||
L: 'DD.MM.YYYY', | ||
LL: 'D. MMMM YYYY', | ||
LLL: 'D. MMMM YYYY LT', | ||
LLLL: 'dddd, D. MMMM YYYY LT' | ||
}, | ||
calendar: { | ||
sameDay: '[Haut um] LT', | ||
sameElse: 'L', | ||
nextDay: '[Muer um] LT', | ||
nextWeek: 'dddd [um] LT', | ||
lastDay: '[Gëschter um] LT', | ||
lastWeek: function () { | ||
// Different date string for 'Dënschdeg' (Tuesday) and 'Donneschdeg' (Thursday) due to phonological rule | ||
switch (this.day()) { | ||
case 2: | ||
case 4: | ||
return '[Leschten] dddd [um] LT'; | ||
default: | ||
return '[Leschte] dddd [um] LT'; | ||
} | ||
} | ||
}, | ||
relativeTime : { | ||
future : processFutureTime, | ||
past : processPastTime, | ||
s : 'e puer Sekonnen', | ||
m : processRelativeTime, | ||
mm : '%d Minutten', | ||
h : processRelativeTime, | ||
hh : '%d Stonnen', | ||
d : processRelativeTime, | ||
dd : '%d Deeg', | ||
M : processRelativeTime, | ||
MM : '%d Méint', | ||
y : processRelativeTime, | ||
yy : '%d Joer' | ||
}, | ||
ordinalParse: /\d{1,2}\./, | ||
ordinal: '%d.', | ||
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. | ||
} | ||
}); | ||
})); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
// moment.js locale configuration | ||
// locale : Lithuanian (lt) | ||
// author : Mindaugas Mozūras : https://github.com/mmozuras | ||
|
||
(function (factory) { | ||
if (typeof define === 'function' && define.amd) { | ||
define(['moment'], factory); // AMD | ||
} else if (typeof exports === 'object') { | ||
module.exports = factory(require('../moment')); // Node | ||
} else { | ||
factory((typeof global !== 'undefined' ? global : this).moment); // node or other global | ||
} | ||
}(function (moment) { | ||
var units = { | ||
'm' : 'minutė_minutės_minutę', | ||
'mm': 'minutės_minučių_minutes', | ||
'h' : 'valanda_valandos_valandą', | ||
'hh': 'valandos_valandų_valandas', | ||
'd' : 'diena_dienos_dieną', | ||
'dd': 'dienos_dienų_dienas', | ||
'M' : 'mėnuo_mėnesio_mėnesį', | ||
'MM': 'mėnesiai_mėnesių_mėnesius', | ||
'y' : 'metai_metų_metus', | ||
'yy': 'metai_metų_metus' | ||
}, | ||
weekDays = 'sekmadienis_pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis'.split('_'); | ||
|
||
function translateSeconds(number, withoutSuffix, key, isFuture) { | ||
if (withoutSuffix) { | ||
return 'kelios sekundės'; | ||
} else { | ||
return isFuture ? 'kelių sekundžių' : 'kelias sekundes'; | ||
} | ||
} | ||
|
||
function translateSingular(number, withoutSuffix, key, isFuture) { | ||
return withoutSuffix ? forms(key)[0] : (isFuture ? forms(key)[1] : forms(key)[2]); | ||
} | ||
|
||
function special(number) { | ||
return number % 10 === 0 || (number > 10 && number < 20); | ||
} | ||
|
||
function forms(key) { | ||
return units[key].split('_'); | ||
} | ||
|
||
function translate(number, withoutSuffix, key, isFuture) { | ||
var result = number + ' '; | ||
if (number === 1) { | ||
return result + translateSingular(number, withoutSuffix, key[0], isFuture); | ||
} else if (withoutSuffix) { | ||
return result + (special(number) ? forms(key)[1] : forms(key)[0]); | ||
} else { | ||
if (isFuture) { | ||
return result + forms(key)[1]; | ||
} else { | ||
return result + (special(number) ? forms(key)[1] : forms(key)[2]); | ||
} | ||
} | ||
} | ||
|
||
function relativeWeekDay(moment, format) { | ||
var nominative = format.indexOf('dddd HH:mm') === -1, | ||
weekDay = weekDays[moment.day()]; | ||
|
||
return nominative ? weekDay : weekDay.substring(0, weekDay.length - 2) + 'į'; | ||
} | ||
|
||
return moment.defineLocale('lt', { | ||
months : 'sausio_vasario_kovo_balandžio_gegužės_birželio_liepos_rugpjūčio_rugsėjo_spalio_lapkričio_gruodžio'.split('_'), | ||
monthsShort : 'sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd'.split('_'), | ||
weekdays : relativeWeekDay, | ||
weekdaysShort : 'Sek_Pir_Ant_Tre_Ket_Pen_Šeš'.split('_'), | ||
weekdaysMin : 'S_P_A_T_K_Pn_Š'.split('_'), | ||
longDateFormat : { | ||
LT : 'HH:mm', | ||
LTS : 'LT:ss', | ||
L : 'YYYY-MM-DD', | ||
LL : 'YYYY [m.] MMMM D [d.]', | ||
LLL : 'YYYY [m.] MMMM D [d.], LT [val.]', | ||
LLLL : 'YYYY [m.] MMMM D [d.], dddd, LT [val.]', | ||
l : 'YYYY-MM-DD', | ||
ll : 'YYYY [m.] MMMM D [d.]', | ||
lll : 'YYYY [m.] MMMM D [d.], LT [val.]', | ||
llll : 'YYYY [m.] MMMM D [d.], ddd, LT [val.]' | ||
}, | ||
calendar : { | ||
sameDay : '[Šiandien] LT', | ||
nextDay : '[Rytoj] LT', | ||
nextWeek : 'dddd LT', | ||
lastDay : '[Vakar] LT', | ||
lastWeek : '[Praėjusį] dddd LT', | ||
sameElse : 'L' | ||
}, | ||
relativeTime : { | ||
future : 'po %s', | ||
past : 'prieš %s', | ||
s : translateSeconds, | ||
m : translateSingular, | ||
mm : translate, | ||
h : translateSingular, | ||
hh : translate, | ||
d : translateSingular, | ||
dd : translate, | ||
M : translateSingular, | ||
MM : translate, | ||
y : translateSingular, | ||
yy : translate | ||
}, | ||
ordinalParse: /\d{1,2}-oji/, | ||
ordinal : function (number) { | ||
return number + '-oji'; | ||
}, | ||
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. | ||
} | ||
}); | ||
})); |
Oops, something went wrong.