[pve-devel] [PATCH manager v2] replica: improve schedule format example
Thomas Lamprecht
t.lamprecht at proxmox.com
Wed Jun 28 10:24:39 CEST 2017
Add one more to show that also weekdays + intervals are possible
Further improve wording + reduce translation needs for others entries.
Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
---
changes v1 -> v2:
* generalize 'Every XY minutes' to reduce translation need
www/manager6/form/CalendarEvent.js | 9 +++++----
www/manager6/grid/Replication.js | 2 +-
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/www/manager6/form/CalendarEvent.js b/www/manager6/form/CalendarEvent.js
index 5661bf92..c3b9ecab 100644
--- a/www/manager6/form/CalendarEvent.js
+++ b/www/manager6/form/CalendarEvent.js
@@ -11,11 +11,12 @@ Ext.define('PVE.form.CalendarEvent', {
store: {
field: [ 'value', 'text'],
data: [
- { value: '*/30', text: gettext("Every 30 minutes")},
+ { value: '*/30', text: Ext.String.format(gettext("Every {0} minutes"), 30) },
{ value: '*/2:00', text: gettext("Every two hours")},
- { value: '2,22:30', text: gettext("02:30, 22:30")},
- { value: 'mon..fri', text: gettext("Monday to Friday 00:00")},
- { value: 'sun 01:00', text: gettext("Sunday 01:00")}
+ { value: '2,22:30', text: gettext("Every day") + " 02:30, 22:30"},
+ { value: 'mon..fri', text: gettext("Monday to Friday") + " 00:00"},
+ { value: 'mon..fri */1:00', text: gettext("Monday to Friday") + ': ' + gettext("hourly")},
+ { value: 'sun 01:00', text: gettext("Sunday") + " 01:00"}
]
},
diff --git a/www/manager6/grid/Replication.js b/www/manager6/grid/Replication.js
index 6bd9aa03..2fd6fb75 100644
--- a/www/manager6/grid/Replication.js
+++ b/www/manager6/grid/Replication.js
@@ -35,7 +35,7 @@ Ext.define('PVE.window.ReplicaEdit', {
{
xtype: 'pveCalendarEvent',
fieldLabel: gettext('Schedule'),
- emptyText: '*/15 - ' + gettext('Every 15 minutes'),
+ emptyText: '*/15 - ' + Ext.String.format(gettext('Every {0} minutes'), 15),
name: 'schedule'
},
{
--
2.11.0
More information about the pve-devel
mailing list