diff options
author | scambra <sergio@entrecables.com> | 2012-09-21 08:11:11 +0200 |
---|---|---|
committer | scambra <sergio@entrecables.com> | 2012-10-19 13:56:19 +0200 |
commit | a24d8db4b25e99f92ebb2cb65a97672f39a2f85f (patch) | |
tree | 36592e6017512655d099fc2005614e12090e9674 | |
parent | 8a03abec0d8a44d24cc8ad63acb8faf6932a1b5e (diff) | |
download | nextcloud-server-a24d8db4b25e99f92ebb2cb65a97672f39a2f85f.tar.gz nextcloud-server-a24d8db4b25e99f92ebb2cb65a97672f39a2f85f.zip |
translate datepicker
-rw-r--r-- | core/js/share.js | 8 | ||||
-rw-r--r-- | core/l10n/l10n-de.php | 3 | ||||
-rw-r--r-- | core/l10n/l10n-en.php | 3 | ||||
-rw-r--r-- | core/l10n/l10n-es.php | 3 | ||||
-rw-r--r-- | core/templates/layout.user.php | 3 | ||||
-rw-r--r-- | lib/l10n.php | 5 |
6 files changed, 21 insertions, 4 deletions
diff --git a/core/js/share.js b/core/js/share.js index de50e53a441..1bc8f555680 100644 --- a/core/js/share.js +++ b/core/js/share.js @@ -343,6 +343,14 @@ OC.Share={ } $(document).ready(function() { + $.datepicker.setDefaults({ + monthNames: monthNames, + monthNamesShort: $.map(monthNames, function(v) { return v.slice(0,3)+'.'; }), + dayNames: dayNames, + dayNamesMin: $.map(dayNames, function(v) { return v.slice(0,2); }), + dayNamesShort: $.map(dayNames, function(v) { return v.slice(0,3)+'.'; }), + firstDay: firstDay + }); $('a.share').live('click', function(event) { event.stopPropagation(); diff --git a/core/l10n/l10n-de.php b/core/l10n/l10n-de.php index 976f8ce3c51..d80c3beb2ba 100644 --- a/core/l10n/l10n-de.php +++ b/core/l10n/l10n-de.php @@ -2,4 +2,5 @@ $LOCALIZATIONS = array( 'date' => '%d.%m.%Y', 'datetime' => '%d.%m.%Y %H:%M:%S', - 'time' => '%H:%M:%S' ); + 'time' => '%H:%M:%S', + 'firstday' => 0 ); diff --git a/core/l10n/l10n-en.php b/core/l10n/l10n-en.php index 3a050d477ce..6268214b503 100644 --- a/core/l10n/l10n-en.php +++ b/core/l10n/l10n-en.php @@ -2,4 +2,5 @@ $LOCALIZATIONS = array( 'date' => '%B %e, %Y', 'datetime' => '%B %e, %Y %H:%M', - 'time' => '%H:%M:%S' ); + 'time' => '%H:%M:%S', + 'firstday' => 0 ); diff --git a/core/l10n/l10n-es.php b/core/l10n/l10n-es.php index b81464b491a..8798b24d62f 100644 --- a/core/l10n/l10n-es.php +++ b/core/l10n/l10n-es.php @@ -2,4 +2,5 @@ $LOCALIZATIONS = array( 'date' => '%e de %B de %Y', 'datetime' => '%e de %B de %Y %H:%M', - 'time' => '%H:%M:%S' ); + 'time' => '%H:%M:%S', + 'firstday' => 1 ); diff --git a/core/templates/layout.user.php b/core/templates/layout.user.php index b6d8a7604a2..92d47cc51f8 100644 --- a/core/templates/layout.user.php +++ b/core/templates/layout.user.php @@ -13,6 +13,9 @@ var oc_current_user = '<?php echo OC_User::getUser() ?>'; var oc_requesttoken = '<?php echo $_['requesttoken']; ?>'; var oc_requestlifespan = '<?php echo $_['requestlifespan']; ?>'; + var dayNames = <?php echo json_encode(array((string)$l->t('Sunday'), (string)$l->t('Monday'), (string)$l->t('Tuesday'), (string)$l->t('Wednesday'), (string)$l->t('Thursday'), (string)$l->t('Friday'), (string)$l->t('Saturday'))) ?>; + var monthNames = <?php echo json_encode(array((string)$l->t('January'), (string)$l->t('February'), (string)$l->t('March'), (string)$l->t('April'), (string)$l->t('May'), (string)$l->t('June'), (string)$l->t('July'), (string)$l->t('August'), (string)$l->t('September'), (string)$l->t('October'), (string)$l->t('November'), (string)$l->t('December'))) ?>; + var firstDay = <?php echo json_encode($l->l('firstday')) ?>; </script> <?php foreach($_['jsfiles'] as $jsfile): ?> <script type="text/javascript" src="<?php echo $jsfile; ?>"></script> diff --git a/lib/l10n.php b/lib/l10n.php index 26611537175..72ac9e353d8 100644 --- a/lib/l10n.php +++ b/lib/l10n.php @@ -60,7 +60,8 @@ class OC_L10N{ private $localizations = array( 'date' => '%d.%m.%Y', 'datetime' => '%d.%m.%Y %H:%M:%S', - 'time' => '%H:%M:%S'); + 'time' => '%H:%M:%S', + 'firstday' => 0); /** * get an L10N instance @@ -221,6 +222,8 @@ class OC_L10N{ setlocale(LC_TIME, $locales); return strftime($this->localizations[$type], $data); break; + case 'firstday': + return $this->localizations[$type]; default: return false; } |