Skip to content

Make timezoneList translatable. #337

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 30 additions & 3 deletions jquery-ui-timepicker-addon.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,34 @@ function Timepicker() {
minuteText: 'Minute',
secondText: 'Second',
millisecText: 'Millisecond',
timezoneText: 'Time Zone'
timezoneText: 'Time Zone',
timezoneLabels: {
'-1100': '-11h NUT: Niue Time',
'-1000': '-10h HST: Hawaii Standard Time',
'-0900': '-09h HDT: Hawaii Summer Time',
'-0800': '-08h PST: Pacific Standard Time',
'-0700': '-07h PDT: Pacific Summer Time',
'-0600': '-06h CST: Central Standard Time (America)',
'-0500': '-05h EST: Eastern Standard Time (America)',
'-0400': '-04h EDT: Eastern Summer Time (America)',
'-0300': '-03h BRT: Brasilia Standard Time',
'-0200': '-02h BRST: Brasilia Summer Time',
'-0100': '-01h CVT: Cape Verde Time',
'+0000': '±00h UTC: Universal Coordinated Time (Greenwich)',
'+0100': '+01h CET: Central European Standard Time',
'+0200': '+02h CEST: Central European Summer Time',
'+0300': '+03h AST: Arabia Time',
'+0400': '+04h MSK: Moscow Time',
'+0500': '+05h PKT: Pakistan Time',
'+0600': '+06h BST: Bangladesh Time',
'+0700': '+07h ICT: Indochina Time',
'+0800': '+08h CST: China Standard Time',
'+0900': '+09h JST: Japan Time',
'+1000': '+10h AEST: Australian Eastern Standard Time',
'+1100': '+11h AEDT: Australian Eastern Summer Time',
'+1200': '+12h NZST: New Zealand Standard Time',
'+1300': '+13h NZDT: New Zealand Summer Time'
}
};
this._defaults = { // Global defaults for all the datetime picker instances
showButtonPanel: true,
Expand Down Expand Up @@ -440,8 +467,8 @@ $.extend(Timepicker.prototype, {
$.fn.append.apply(this.timezone_select,
$.map(o.timezoneList, function(val, idx) {
return $("<option />")
.val(typeof val == "object" ? val.value : val)
.text(typeof val == "object" ? val.label : val);
.val(val)
.text(o.timezoneLabels[val]);
})
);
this.timezone_select.val((typeof this.timezone != "undefined" && this.timezone != null && this.timezone != "") ? this.timezone : o.timezone);
Expand Down
29 changes: 28 additions & 1 deletion localization/jquery-ui-timepicker-de.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,34 @@
timeFormat: 'hh:mm tt',
amNames: ['vorm.', 'AM', 'A'],
pmNames: ['nachm.', 'PM', 'P'],
ampm: false
ampm: false,
timezoneLabels: {
'-1100': '-11h NUT: Niue Zeit',
'-1000': '-10h HST: Hawaiianische Standardzeit',
'-0900': '-09h HDT: Hawaiianische Sommerzeit',
'-0800': '-08h PST: Pazifische Standardzeit',
'-0700': '-07h PDT: Pazifische Sommerzeit',
'-0600': '-06h CST: Zentrale Standardzeit (Amerika)',
'-0500': '-05h EST: Östliche Standardzeit (Amerika)',
'-0400': '-04h EDT: Östliche Sommerzeit (Amerika)',
'-0300': '-03h BRT: Brasilianische Standardzeit',
'-0200': '-02h BRST: Brasilianische Sommerzeit',
'-0100': '-01h CVT: Kap Verde Zeit',
'+0000': '±00h UTC: Koordinierte Weltzeit (Greenwich)',
'+0100': '+01h CET: Mitteleuropäische Standardzeit (MEZ)',
'+0200': '+02h CEST: Mitteleuropäische Sommerzeit (MESZ)',
'+0300': '+03h AST: Arabische Zeit',
'+0400': '+04h MSK: Moskauer Zeit',
'+0500': '+05h PKT: Pakistanische Zeit',
'+0600': '+06h BST: Bangladesch Zeit',
'+0700': '+07h ICT: Indochinesische Zeit',
'+0800': '+08h CST: Chinesische Standardzeit',
'+0900': '+09h JST: Japanische Zeit',
'+1000': '+10h AEST: Ost-Australische Standardzeit',
'+1100': '+11h AEDT: Ost-Australische Sommerzeit',
'+1200': '+12h NZST: Neuseeländische Standardzeit',
'+1300': '+13h NZDT: Neuseeländische Sommerzeit'
}
};
$.timepicker.setDefaults($.timepicker.regional['de']);
})(jQuery);