]> git.proxmox.com Git - pve-manager.git/commitdiff
translate weekdays in backupgrid
authorDominik Csapak <d.csapak@proxmox.com>
Wed, 6 Apr 2016 12:34:57 +0000 (14:34 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Wed, 6 Apr 2016 14:36:54 +0000 (16:36 +0200)
previously we displayed always something like: "mon,tue,wed"
now we use the full name of the day and the correct translation
making it (eg in german):
"Montag, Dienstag, Mittwoch"

i did not to choose the first 3 letters, because we cannot be
sure they are unique for all workdays in every language

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
www/manager6/dc/Backup.js

index 32abc89a88d77bf085386cde9ddee1861458a5c8..11e9584ad2a2c7367bd1823e0468c060ab8395fe 100644 (file)
@@ -430,7 +430,15 @@ Ext.define('PVE.dc.BackupView', {
                    header: gettext('Day of week'),
                    width: 200,
                    sortable: false,
-                   dataIndex: 'dow'
+                   dataIndex: 'dow',
+                   renderer: function(val) {
+                       var dows = ['sun', 'mon', 'tue', 'wed', 'thu', 'fri', 'sat'];
+                       var selected = [];
+                       val.split(',').forEach(function(day){
+                           selected.push(Ext.Date.dayNames[dows.indexOf(day)]);
+                       });
+                       return selected.join(', ');
+                   }
                },
                {
                    header: gettext('Start Time'),