sch-lang-zh_CN.js 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. /**
  2. * English translations for the Scheduler component
  3. *
  4. * NOTE: To change locale for month/day names you have to use the Ext JS language pack.
  5. */
  6. Localize = function() {
  7. if (Sch.plugin) {
  8. if (Sch.plugin.SummaryColumn) {
  9. Ext.override(Sch.plugin.SummaryColumn, {
  10. dayText : 'd',
  11. hourText : 'h',
  12. minuteText : 'min'
  13. });
  14. }
  15. if (Sch.plugin.CurrentTimeLine) {
  16. Sch.plugin.CurrentTimeLine.prototype.tooltipText = '当前时间';
  17. }
  18. }
  19. var M = Sch.preset.Manager,
  20. vp = M.getPreset("hourAndDay");
  21. if (vp) {
  22. vp.displayDateFormat = 'g:i A';
  23. vp.headerConfig.middle.dateFormat = 'g A';
  24. vp.headerConfig.top.dateFormat = 'Y年m月d日';
  25. }
  26. vp = M.getPreset("dayAndWeek");
  27. if (vp) {
  28. vp.displayDateFormat = 'm/d h:i A';
  29. vp.headerConfig.middle.dateFormat = 'Y年m月d日';
  30. vp.headerConfig.top.renderer = function(start, end, cfg) {
  31. var w = start.getWeekOfYear();
  32. return 'w.' + ((w < 10) ? '0' : '') + w + ' ' + Sch.util.Date.getShortMonthName(start.getMonth()) + ' ' + start.getFullYear();
  33. };
  34. }
  35. vp = M.getPreset("weekAndDay");
  36. if (vp) {
  37. vp.displayDateFormat = 'm月d日';
  38. vp.headerConfig.bottom.dateFormat = 'm月d日';
  39. vp.headerConfig.middle.dateFormat = 'Y年m月d日';
  40. }
  41. vp = M.getPreset("weekAndDayLetter");
  42. if (vp) {
  43. vp.displayDateFormat = 'm月d日';
  44. vp.headerConfig.bottom.dateFormat = 'M月d日';
  45. vp.headerConfig.middle.dateFormat = 'Y年m月d日';
  46. }
  47. vp = M.getPreset("weekAndMonth");
  48. if (vp) {
  49. vp.displayDateFormat = 'Y年m月d日';
  50. vp.headerConfig.middle.dateFormat = 'm月d日';
  51. vp.headerConfig.top.dateFormat = 'Y年m月d日';
  52. }
  53. vp = M.getPreset("monthAndYear");
  54. if (vp) {
  55. vp.displayDateFormat = 'Y年m月d日';
  56. vp.headerConfig.middle.dateFormat = 'Y年m月';
  57. vp.headerConfig.top.dateFormat = 'Y年';
  58. }
  59. vp = M.getPreset("year");
  60. if (vp.year) {
  61. vp.displayDateFormat = 'Y年m月d日';
  62. vp.headerConfig.bottom.renderer = function(start, end, cfg) {
  63. return Ext.String.format('{0}季度', Math.floor(start.getMonth() / 3) + 1);
  64. };
  65. vp.headerConfig.middle.dateFormat = 'Y年';
  66. }
  67. };