diff options
author | Vincent Petry <pvince81@owncloud.com> | 2015-08-21 10:48:10 +0200 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2015-08-21 10:48:10 +0200 |
commit | a930fe586419f4aa8088edbfa3dda6502d06363d (patch) | |
tree | 5f1895ef830a634ae78c1ed4fe5343c708df8d53 | |
parent | ac086a11c118df19cef15239bd4ec9722d8478bb (diff) | |
parent | acc5a7d6cc14f43051e327b5964f5c17b3c26412 (diff) | |
download | nextcloud-server-a930fe586419f4aa8088edbfa3dda6502d06363d.tar.gz nextcloud-server-a930fe586419f4aa8088edbfa3dda6502d06363d.zip |
Merge pull request #18471 from hasso/shorts-fix
Make short versions of weekday/month names translatable
-rw-r--r-- | core/js/config.php | 38 | ||||
-rw-r--r-- | core/js/share.js | 6 | ||||
-rw-r--r-- | core/js/tests/specHelper.js | 32 |
3 files changed, 73 insertions, 3 deletions
diff --git a/core/js/config.php b/core/js/config.php index cecbf27e4b2..95dd7330287 100644 --- a/core/js/config.php +++ b/core/js/config.php @@ -78,6 +78,28 @@ $array = array( (string)$l->t('Saturday') ) ), + "dayNamesShort" => json_encode( + array( + (string)$l->t('Sun.'), + (string)$l->t('Mon.'), + (string)$l->t('Tue.'), + (string)$l->t('Wed.'), + (string)$l->t('Thu.'), + (string)$l->t('Fri.'), + (string)$l->t('Sat.') + ) + ), + "dayNamesMin" => json_encode( + array( + (string)$l->t('Su'), + (string)$l->t('Mo'), + (string)$l->t('Tu'), + (string)$l->t('We'), + (string)$l->t('Th'), + (string)$l->t('Fr'), + (string)$l->t('Sa') + ) + ), "monthNames" => json_encode( array( (string)$l->t('January'), @@ -94,6 +116,22 @@ $array = array( (string)$l->t('December') ) ), + "monthNamesShort" => json_encode( + array( + (string)$l->t('Jan.'), + (string)$l->t('Feb.'), + (string)$l->t('Mar.'), + (string)$l->t('Apr.'), + (string)$l->t('May.'), + (string)$l->t('Jun.'), + (string)$l->t('Jul.'), + (string)$l->t('Aug.'), + (string)$l->t('Sep.'), + (string)$l->t('Oct.'), + (string)$l->t('Nov.'), + (string)$l->t('Dec.') + ) + ), "firstDay" => json_encode($l->getFirstWeekDay()) , "oc_config" => json_encode( array( diff --git a/core/js/share.js b/core/js/share.js index 57dd0dd6553..bf9250b3c3a 100644 --- a/core/js/share.js +++ b/core/js/share.js @@ -905,10 +905,10 @@ $(document).ready(function() { minDate.setDate(minDate.getDate()+1); $.datepicker.setDefaults({ monthNames: monthNames, - monthNamesShort: $.map(monthNames, function(v) { return v.slice(0,3)+'.'; }), + monthNamesShort: monthNamesShort, dayNames: dayNames, - dayNamesMin: $.map(dayNames, function(v) { return v.slice(0,2); }), - dayNamesShort: $.map(dayNames, function(v) { return v.slice(0,3)+'.'; }), + dayNamesMin: dayNamesMin, + dayNamesShort: dayNamesShort, firstDay: firstDay, minDate : minDate }); diff --git a/core/js/tests/specHelper.js b/core/js/tests/specHelper.js index dbe005ba2e9..cd387d76ce8 100644 --- a/core/js/tests/specHelper.js +++ b/core/js/tests/specHelper.js @@ -35,6 +35,24 @@ window.dayNames = [ 'Friday', 'Saturday' ]; +window.dayNamesShort = [ + 'Sun.', + 'Mon.', + 'Tue.', + 'Wed.', + 'Thu.', + 'Fri.', + 'Sat.' +]; +window.dayNamesMin = [ + 'Su', + 'Mo', + 'Tu', + 'We', + 'Th', + 'Fr', + 'Sa' +]; window.monthNames = [ 'January', 'February', @@ -49,6 +67,20 @@ window.monthNames = [ 'November', 'December' ]; +window.monthNamesShort = [ + 'Jan.', + 'Feb.', + 'Mar.', + 'Apr.', + 'May.', + 'Jun.', + 'Jul.', + 'Aug.', + 'Sep.', + 'Oct.', + 'Nov.', + 'Dec.' +]; window.firstDay = 0; // setup dummy webroots |