Page MenuHomePhorge

D25016.1734648141.diff
No OneTemporary

D25016.1734648141.diff

diff --git a/resources/celerity/map.php b/resources/celerity/map.php
--- a/resources/celerity/map.php
+++ b/resources/celerity/map.php
@@ -481,7 +481,7 @@
'rsrc/js/core/behavior-detect-timezone.js' => '78bc5d94',
'rsrc/js/core/behavior-device.js' => 'ac2b1e01',
'rsrc/js/core/behavior-drag-and-drop-textarea.js' => '7ad020a5',
- 'rsrc/js/core/behavior-fancy-datepicker.js' => '956f3eeb',
+ 'rsrc/js/core/behavior-fancy-datepicker.js' => 'e77fcc9d',
'rsrc/js/core/behavior-form.js' => '55d7b788',
'rsrc/js/core/behavior-gesture.js' => 'b58d1a2a',
'rsrc/js/core/behavior-global-drag-and-drop.js' => '1cab0e9a',
@@ -635,7 +635,7 @@
'javelin-behavior-editengine-reorder-configs' => '4842f137',
'javelin-behavior-editengine-reorder-fields' => '0ad8d31f',
'javelin-behavior-event-all-day' => '0b1bc990',
- 'javelin-behavior-fancy-datepicker' => '956f3eeb',
+ 'javelin-behavior-fancy-datepicker' => 'e77fcc9d',
'javelin-behavior-global-drag-and-drop' => '1cab0e9a',
'javelin-behavior-harbormaster-log' => 'b347a301',
'javelin-behavior-herald-rule-editor' => '0922e81d',
@@ -1781,13 +1781,6 @@
'javelin-vector',
'javelin-stratcom',
),
- '956f3eeb' => array(
- 'javelin-behavior',
- 'javelin-util',
- 'javelin-dom',
- 'javelin-stratcom',
- 'javelin-vector',
- ),
'9623adc1' => array(
'javelin-behavior',
'javelin-stratcom',
@@ -2174,6 +2167,13 @@
'javelin-dom',
'phabricator-draggable-list',
),
+ 'e77fcc9d' => array(
+ 'javelin-behavior',
+ 'javelin-util',
+ 'javelin-dom',
+ 'javelin-stratcom',
+ 'javelin-vector',
+ ),
'e8240b50' => array(
'javelin-behavior',
'javelin-stratcom',
diff --git a/src/view/form/control/AphrontFormDateControl.php b/src/view/form/control/AphrontFormDateControl.php
--- a/src/view/form/control/AphrontFormDateControl.php
+++ b/src/view/form/control/AphrontFormDateControl.php
@@ -267,9 +267,25 @@
$week_key = PhabricatorWeekStartDaySetting::SETTINGKEY;
$week_start = $viewer->getUserSetting($week_key);
+ $date_pht = array(
+ 'S|M|T|W|T|F|S' => pht('S|M|T|W|T|F|S'),
+ 'January' => pht('January'),
+ 'February' => pht('February'),
+ 'March' => pht('March'),
+ 'April' => pht('April'),
+ 'May' => pht('May'),
+ 'June' => pht('June'),
+ 'July' => pht('July'),
+ 'August' => pht('August'),
+ 'September' => pht('September'),
+ 'October' => pht('October'),
+ 'November' => pht('November'),
+ 'December' => pht('December'),
+ );
Javelin::initBehavior('fancy-datepicker', array(
'format' => $this->getDateFormat(),
'weekStart' => $week_start,
+ 'pht' => $date_pht,
));
$classes = array();
diff --git a/webroot/rsrc/js/core/behavior-fancy-datepicker.js b/webroot/rsrc/js/core/behavior-fancy-datepicker.js
--- a/webroot/rsrc/js/core/behavior-fancy-datepicker.js
+++ b/webroot/rsrc/js/core/behavior-fancy-datepicker.js
@@ -13,6 +13,7 @@
}
statics.initialized = true;
+ var pht = JX.phtize(config.pht);
var picker;
var anchor_node;
var root;
@@ -262,18 +263,18 @@
var year = valid_date.getYear() + 1900;
var months = [
- 'January',
- 'February',
- 'March',
- 'April',
- 'May',
- 'June',
- 'July',
- 'August',
- 'September',
- 'October',
- 'November',
- 'December'];
+ pht('January'),
+ pht('February'),
+ pht('March'),
+ pht('April'),
+ pht('May'),
+ pht('June'),
+ pht('July'),
+ pht('August'),
+ pht('September'),
+ pht('October'),
+ pht('November'),
+ pht('December')];
var buttons = [
cell('\u25C0', 'm:-1', false, 'lrbutton'),
@@ -330,14 +331,14 @@
var weeks = [];
// First, render the weekday names.
- var weekdays = 'SMTWTFS';
+ var weekdays = pht('S|M|T|W|T|F|S').split('|');
var weekday_names = [];
var week_start = parseInt(get_week_start(), 10);
var week_end = weekdays.length + week_start;
for (var ii = week_start; ii < week_end; ii++) {
var index = ii%7;
- weekday_names.push(cell(weekdays.charAt(index), null, false, 'day-name'));
+ weekday_names.push(cell(weekdays[index], null, false, 'day-name'));
}
weeks.push(JX.$N('tr', {}, weekday_names));

File Metadata

Mime Type
text/plain
Expires
Thu, Dec 19, 22:42 (20 h, 24 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1015479
Default Alt Text
D25016.1734648141.diff (4 KB)

Event Timeline