[pve-devel] [PATCH] i18n
Koichi MATSUMOTO
mzch at me.com
Mon Dec 5 04:07:20 CET 2011
From: Koichi MATSUMOTO <mzch at mac.com>
i18n modifications
Signed-off-by: Koichi MATSUMOTO <mzch at mac.com>
---
PVE/API2/Backup.pm | 18 ++--
PVE/API2/Cluster.pm | 16 ++--
PVE/API2/Network.pm | 32 +++---
PVE/API2/Nodes.pm | 84 +++++++-------
PVE/API2/OpenVZ.pm | 72 ++++++------
PVE/API2/Services.pm | 44 ++++----
PVE/API2/Tasks.pm | 16 ++--
PVE/API2/VZDump.pm | 12 +-
PVE/API2Client.pm | 4 +-
PVE/APIDaemon.pm | 2 +-
PVE/APLInfo.pm | 12 +-
PVE/OpenVZ.pm | 32 +++---
PVE/REST.pm | 18 ++--
PVE/VZDump.pm | 79 +++++++-------
PVE/VZDump/OpenVZ.pm | 6 +-
PVE/VZDump/Plugin.pm | 26 +++---
www/manager/StateProvider.js | 2 +-
www/manager/Utils.js | 181 ++++++++++++++++---------------
www/manager/VNCConsole.js | 14 ++--
www/manager/Workspace.js | 6 +-
www/manager/data/DiffStore.js | 4 +-
www/manager/data/ResourceStore.js | 6 +-
www/manager/data/TimezoneStore.js | 2 +-
www/manager/data/UpdateQueue.js | 2 +-
www/manager/data/UpdateStore.js | 2 +-
www/manager/data/reader/JsonObject.js | 2 +-
www/manager/dc/ACLView.js | 8 +-
www/manager/dc/AuthEdit.js | 28 +++---
www/manager/dc/AuthView.js | 20 ++--
www/manager/dc/Backup.js | 72 ++++++------
www/manager/dc/GroupEdit.js | 6 +-
www/manager/dc/GroupView.js | 12 +-
www/manager/dc/Log.js | 2 +-
www/manager/dc/OptionView.js | 4 +-
www/manager/dc/RoleView.js | 4 +-
www/manager/dc/StorageView.js | 12 +-
www/manager/dc/UserEdit.js | 20 ++--
www/manager/dc/UserView.js | 24 ++--
www/manager/form/BackupModeSelector.js | 6 +-
www/manager/form/BondModeSelector.js | 14 ++--
www/manager/form/Boolean.js | 6 +-
www/manager/form/BridgeSelector.js | 4 +-
www/manager/form/BusTypeSelector.js | 6 +-
www/manager/form/CPUModelSelector.js | 28 +++---
www/manager/form/CacheTypeSelector.js | 10 +-
www/manager/form/ControllerSelector.js | 4 +-
www/manager/form/DayOfWeekSelector.js | 14 ++--
www/manager/form/DiskFormatSelector.js | 6 +-
www/manager/form/FileSelector.js | 6 +-
www/manager/form/NetworkCardSelector.js | 6 +-
www/manager/form/NodeSelector.js | 8 +-
www/manager/form/RRDTypeSelector.js | 20 ++--
www/manager/form/RealmComboBox.js | 2 +-
www/manager/form/StorageSelector.js | 8 +-
www/manager/form/VMIDSelector.js | 6 +-
www/manager/grid/BackupView.js | 27 +++---
www/manager/grid/ObjectGrid.js | 6 +-
www/manager/node/BCFailCnt.js | 6 +-
www/manager/node/Config.js | 4 +-
www/manager/node/DNSEdit.js | 10 +-
www/manager/node/DNSView.js | 12 +-
www/manager/node/NetworkEdit.js | 30 +++---
www/manager/node/NetworkView.js | 28 +++---
www/manager/node/ServiceView.js | 16 ++--
www/manager/node/StatusView.js | 26 +++---
www/manager/node/Summary.js | 14 ++--
www/manager/node/TimeEdit.js | 6 +-
www/manager/node/TimeView.js | 8 +-
www/manager/openvz/BeanCounterGrid.js | 12 +-
www/manager/openvz/CmdMenu.js | 4 +-
www/manager/openvz/CreateWizard.js | 48 ++++----
www/manager/openvz/DNS.js | 22 ++--
www/manager/openvz/Network.js | 70 ++++++------
www/manager/openvz/Options.js | 34 +++---
www/manager/openvz/RessourceEdit.js | 10 +-
www/manager/openvz/RessourceView.js | 12 +-
www/manager/openvz/StatusView.js | 26 +++---
www/manager/openvz/Summary.js | 18 ++--
www/manager/panel/InputPanel.js | 2 +-
www/manager/panel/LogView.js | 2 +-
www/manager/panel/NotesView.js | 10 +-
www/manager/panel/RRDView.js | 4 +-
www/manager/qemu/BootOrderEdit.js | 18 ++--
www/manager/qemu/CDEdit.js | 18 ++--
www/manager/qemu/CmdMenu.js | 4 +-
www/manager/qemu/Config.js | 6 +-
www/manager/qemu/CreateWizard.js | 26 +++---
www/manager/qemu/DisplayEdit.js | 4 +-
www/manager/qemu/HDEdit.js | 24 ++--
www/manager/qemu/HardwareView.js | 47 ++++-----
www/manager/qemu/KeyboardEdit.js | 4 +-
www/manager/qemu/MemoryEdit.js | 4 +-
www/manager/qemu/Monitor.js | 8 +-
www/manager/qemu/NetworkEdit.js | 22 ++--
www/manager/qemu/OSTypeEdit.js | 6 +-
www/manager/qemu/Options.js | 62 ++++++------
www/manager/qemu/ProcessorEdit.js | 10 +-
www/manager/qemu/SendKeyMenu.js | 36 +++---
www/manager/qemu/StatusView.js | 20 ++--
www/manager/qemu/Summary.js | 18 ++--
www/manager/storage/Browser.js | 4 +-
www/manager/storage/ContentView.js | 52 +++++-----
www/manager/storage/DirEdit.js | 2 +-
www/manager/storage/IScsiEdit.js | 8 +-
www/manager/storage/LVMEdit.js | 4 +-
www/manager/storage/NFSEdit.js | 4 +-
www/manager/storage/StatusView.js | 20 ++--
www/manager/storage/Summary.js | 8 +-
www/manager/tree/ResourceTree.js | 2 +-
www/manager/window/Backup.js | 14 ++--
www/manager/window/Edit.js | 2 +-
www/manager/window/Migrate.js | 16 ++--
www/manager/window/NotesEdit.js | 2 +-
www/manager/window/Restore.js | 16 ++--
www/manager/window/TaskViewer.js | 28 +++---
www/manager/window/Wizard.js | 8 +-
116 files changed, 1025 insertions(+), 1029 deletions(-)
diff --git a/PVE/API2/Backup.pm b/PVE/API2/Backup.pm
index d9cbd91..c65ebf0 100644
--- a/PVE/API2/Backup.pm
+++ b/PVE/API2/Backup.pm
@@ -190,7 +190,7 @@ __PACKAGE__->register_method({
name => 'index',
path => '',
method => 'GET',
- description => "List vzdump backup schedule.",
+ description => __("List vzdump backup schedule."),
parameters => {
additionalProperties => 0,
properties => {},
@@ -223,7 +223,7 @@ __PACKAGE__->register_method({
path => '',
method => 'POST',
protected => 1,
- description => "Create new vzdump backup job.",
+ description => __("Create new vzdump backup job."),
parameters => {
additionalProperties => 0,
properties => PVE::VZDump::json_config_properties({
@@ -265,7 +265,7 @@ __PACKAGE__->register_method({
name => 'read_job',
path => '{id}',
method => 'GET',
- description => "Read vzdump backup job definition.",
+ description => __("Read vzdump backup job definition."),
parameters => {
additionalProperties => 0,
properties => {
@@ -301,7 +301,7 @@ __PACKAGE__->register_method({
name => 'delete_job',
path => '{id}',
method => 'DELETE',
- description => "Delete vzdump backup job definition.",
+ description => __("Delete vzdump backup job definition."),
protected => 1,
parameters => {
additionalProperties => 0,
@@ -348,29 +348,29 @@ __PACKAGE__->register_method({
path => '{id}',
method => 'PUT',
protected => 1,
- description => "Update vzdump backup job definition.",
+ description => __("Update vzdump backup job definition."),
parameters => {
additionalProperties => 0,
properties => PVE::VZDump::json_config_properties({
id => {
type => 'string',
- description => "The job ID.",
+ description => __("The job ID."),
maxLength => 50,
},
starttime => {
type => 'string',
- description => "Job Start time.",
+ description => __("Job Start time."),
pattern => '\d{1,2}:\d{1,2}',
typetext => 'HH:MM',
},
dow => {
type => 'string', format => 'pve-day-of-week-list',
optional => 1,
- description => "Day of week selection.",
+ description => __("Day of week selection."),
},
delete => {
type => 'string', format => 'pve-configid-list',
- description => "A list of settings you want to delete.",
+ description => __("A list of settings you want to delete."),
optional => 1,
},
}),
diff --git a/PVE/API2/Cluster.pm b/PVE/API2/Cluster.pm
index 702bc24..1fe94d0 100644
--- a/PVE/API2/Cluster.pm
+++ b/PVE/API2/Cluster.pm
@@ -23,7 +23,7 @@ my $dc_schema = PVE::Cluster::get_datacenter_schema();
my $dc_properties = {
delete => {
type => 'string', format => 'pve-configid-list',
- description => "A list of settings you want to delete.",
+ description => __("A list of settings you want to delete."),
optional => 1,
}
};
@@ -35,7 +35,7 @@ __PACKAGE__->register_method ({
name => 'index',
path => '',
method => 'GET',
- description => "Cluster index.",
+ description => __("Cluster index."),
permissions => { user => 'all' },
parameters => {
additionalProperties => 0,
@@ -67,14 +67,14 @@ __PACKAGE__->register_method({
name => 'log',
path => 'log',
method => 'GET',
- description => "Read cluster log",
+ description => __("Read cluster log"),
permissions => { user => 'all' },
parameters => {
additionalProperties => 0,
properties => {
max => {
type => 'integer',
- description => "Maximum number of entries.",
+ description => __("Maximum number of entries."),
optional => 1,
minimum => 1,
}
@@ -108,7 +108,7 @@ __PACKAGE__->register_method({
name => 'resources',
path => 'resources',
method => 'GET',
- description => "Resources index (cluster wide).",
+ description => __("Resources index (cluster wide)."),
permissions => { user => 'all' },
parameters => {
additionalProperties => 0,
@@ -238,7 +238,7 @@ __PACKAGE__->register_method({
name => 'tasks',
path => 'tasks',
method => 'GET',
- description => "List recent tasks (cluster wide).",
+ description => __("List recent tasks (cluster wide)."),
permissions => { user => 'all' },
parameters => {
additionalProperties => 0,
@@ -278,7 +278,7 @@ __PACKAGE__->register_method({
name => 'get_options',
path => 'options',
method => 'GET',
- description => "Get datacenter options.",
+ description => __("Get datacenter options."),
permissions => {
path => '/',
privs => [ 'Sys.Audit' ],
@@ -300,7 +300,7 @@ __PACKAGE__->register_method({
name => 'set_options',
path => 'options',
method => 'PUT',
- description => "Set datacenter options.",
+ description => __("Set datacenter options."),
permissions => {
path => '/',
privs => [ 'Sys.Modify' ],
diff --git a/PVE/API2/Network.pm b/PVE/API2/Network.pm
index b29132a..993ffe4 100644
--- a/PVE/API2/Network.pm
+++ b/PVE/API2/Network.pm
@@ -29,37 +29,37 @@ my $bond_mode_enum = [
my $confdesc = {
autostart => {
- description => "Automatically start interface on boot.",
+ description => __("Automatically start interface on boot."),
type => 'boolean',
optional => 1,
},
bridge_ports => {
- description => "Specify the iterfaces you want to add to your bridge.",
+ description => __("Specify the iterfaces you want to add to your bridge."),
optional => 1,
type => 'string', format => 'pve-iface-list',
},
slaves => {
- description => "Specify the interfaces used by the bonding device.",
+ description => __("Specify the interfaces used by the bonding device."),
optional => 1,
type => 'string', format => 'pve-iface-list',
},
bond_mode => {
- description => "Bonding mode.",
+ description => __("Bonding mode."),
optional => 1,
type => 'string', enum => $bond_mode_enum,
},
gateway => {
- description => 'Default gateway address.',
+ description => __('Default gateway address.'),
type => 'string', format => 'ipv4',
optional => 1,
},
netmask => {
- description => 'Network mask.',
+ description => __('Network mask.'),
type => 'string', format => 'ipv4mask',
optional => 1,
},
address => {
- description => 'IP address.',
+ description => __('IP address.'),
type => 'string', format => 'ipv4',
optional => 1,
requires => 'netmask',
@@ -88,7 +88,7 @@ __PACKAGE__->register_method({
properties => {
node => get_standard_option('pve-node'),
type => {
- description => "Only list specific interface types.",
+ description => __("Only list specific interface types."),
type => 'string',
enum => ['bond', 'bridge', 'alias', 'eth'],
optional => 1,
@@ -124,7 +124,7 @@ my $check_duplicate_gateway = sub {
my ($config, $newiface) = @_;
foreach my $iface (keys %$config) {
- raise_param_exc({ gateway => "Default gateway already exists on interface '$iface'." })
+ raise_param_exc({ gateway => sprintf(__("Default gateway already exists on interface '%s'."), $iface) })
if ($newiface ne $iface) && $config->{$iface}->{gateway};
}
};
@@ -138,7 +138,7 @@ __PACKAGE__->register_method({
path => '/nodes/{node}',
privs => [ 'Sys.Modify' ],
},
- description => "Create network device configuration",
+ description => __("Create network device configuration"),
protected => 1,
proxyto => 'node',
parameters => {
@@ -184,7 +184,7 @@ __PACKAGE__->register_method({
path => '/nodes/{node}',
privs => [ 'Sys.Modify' ],
},
- description => "Update network device configuration",
+ description => __("Update network device configuration"),
protected => 1,
proxyto => 'node',
parameters => {
@@ -194,7 +194,7 @@ __PACKAGE__->register_method({
iface => get_standard_option('pve-iface'),
delete => {
type => 'string', format => 'pve-configid-list',
- description => "A list of settings you want to delete.",
+ description => __("A list of settings you want to delete."),
optional => 1,
}}),
},
@@ -242,7 +242,7 @@ __PACKAGE__->register_method({
path => '/nodes/{node}',
privs => [ 'Sys.Audit' ],
},
- description => "Read network device configuration",
+ description => __("Read network device configuration"),
proxyto => 'node',
parameters => {
additionalProperties => 0,
@@ -267,7 +267,7 @@ __PACKAGE__->register_method({
my $config = PVE::INotify::read_file('interfaces');
- raise_param_exc({ iface => "interface does not exist" })
+ raise_param_exc({ iface => __("interface does not exist") })
if !$config->{$param->{iface}};
return $config->{$param->{iface}};
@@ -281,7 +281,7 @@ __PACKAGE__->register_method({
path => '/nodes/{node}',
privs => [ 'Sys.Modify' ],
},
- description => "Delete network device configuration",
+ description => __("Delete network device configuration"),
protected => 1,
proxyto => 'node',
parameters => {
@@ -298,7 +298,7 @@ __PACKAGE__->register_method({
my $code = sub {
my $config = PVE::INotify::read_file('interfaces');
- raise_param_exc({ iface => "interface does not exist" })
+ raise_param_exc({ iface => __("interface does not exist") })
if !$config->{$param->{iface}};
delete $config->{$param->{iface}};
diff --git a/PVE/API2/Nodes.pm b/PVE/API2/Nodes.pm
index d2be863..83cacf0 100644
--- a/PVE/API2/Nodes.pm
+++ b/PVE/API2/Nodes.pm
@@ -73,7 +73,7 @@ __PACKAGE__->register_method ({
path => '',
method => 'GET',
permissions => { user => 'all' },
- description => "Node index.",
+ description => __("Node index."),
parameters => {
additionalProperties => 0,
properties => {
@@ -125,7 +125,7 @@ __PACKAGE__->register_method({
method => 'GET',
proxyto => 'node',
protected => 1, # openvz /proc entries are only readable by root
- description => "Get user_beancounters failcnt for all active containers.",
+ description => __("Get user_beancounters failcnt for all active containers."),
parameters => {
additionalProperties => 0,
properties => {
@@ -164,7 +164,7 @@ __PACKAGE__->register_method({
path => '/nodes/{node}',
privs => [ 'Sys.Audit' ],
},
- description => "Get network configuration changes (diff) since last boot.",
+ description => __("Get network configuration changes (diff) since last boot."),
proxyto => 'node',
parameters => {
additionalProperties => 0,
@@ -190,7 +190,7 @@ __PACKAGE__->register_method({
privs => [ 'Sys.Modify' ],
},
protected => 1,
- description => "Revert network configuration changes.",
+ description => __("Revert network configuration changes."),
proxyto => 'node',
parameters => {
additionalProperties => 0,
@@ -215,7 +215,7 @@ __PACKAGE__->register_method({
path => '/nodes/{node}',
privs => [ 'Sys.Audit' ],
},
- description => "Read node status",
+ description => __("Read node status"),
proxyto => 'node',
parameters => {
additionalProperties => 0,
@@ -290,14 +290,14 @@ __PACKAGE__->register_method({
privs => [ 'Sys.PowerMgmt' ],
},
protected => 1,
- description => "Reboot or shutdown a node.",
+ description => __("Reboot or shutdown a node."),
proxyto => 'node',
parameters => {
additionalProperties => 0,
properties => {
node => get_standard_option('pve-node'),
command => {
- description => "Specify the command.",
+ description => __("Specify the command."),
type => 'string',
enum => [qw(reboot shutdown)],
},
@@ -326,22 +326,22 @@ __PACKAGE__->register_method({
path => '/nodes/{node}',
privs => [ 'Sys.Audit' ],
},
- description => "Read node RRD statistics (returns PNG)",
+ description => __("Read node RRD statistics (returns PNG)"),
parameters => {
additionalProperties => 0,
properties => {
node => get_standard_option('pve-node'),
timeframe => {
- description => "Specify the time frame you are interested in.",
+ description => __("Specify the time frame you are interested in."),
type => 'string',
enum => [ 'hour', 'day', 'week', 'month', 'year' ],
},
ds => {
- description => "The list of datasources you want to display.",
+ description => __("The list of datasources you want to display."),
type => 'string', format => 'pve-configid-list',
},
cf => {
- description => "The RRD consolidation function",
+ description => __("The RRD consolidation function"),
type => 'string',
enum => [ 'AVERAGE', 'MAX' ],
optional => 1,
@@ -372,18 +372,18 @@ __PACKAGE__->register_method({
path => '/nodes/{node}',
privs => [ 'Sys.Audit' ],
},
- description => "Read node RRD statistics",
+ description => __("Read node RRD statistics"),
parameters => {
additionalProperties => 0,
properties => {
node => get_standard_option('pve-node'),
timeframe => {
- description => "Specify the time frame you are interested in.",
+ description => __("Specify the time frame you are interested in."),
type => 'string',
enum => [ 'hour', 'day', 'week', 'month', 'year' ],
},
cf => {
- description => "The RRD consolidation function",
+ description => __("The RRD consolidation function"),
type => 'string',
enum => [ 'AVERAGE', 'MAX' ],
optional => 1,
@@ -408,7 +408,7 @@ __PACKAGE__->register_method({
name => 'syslog',
path => 'syslog',
method => 'GET',
- description => "Read system log",
+ description => __("Read system log"),
proxyto => 'node',
permissions => {
path => '/nodes/{node}',
@@ -437,11 +437,11 @@ __PACKAGE__->register_method({
type => "object",
properties => {
n => {
- description=> "Line number",
+ description=> __("Line number"),
type=> 'integer',
},
t => {
- description=> "Line text",
+ description=> __("Line text"),
type => 'string',
}
}
@@ -472,7 +472,7 @@ __PACKAGE__->register_method ({
path => '/nodes/{node}',
privs => [ 'Sys.Console' ],
},
- description => "Creates a VNC Shell proxy.",
+ description => __("Creates a VNC Shell proxy."),
parameters => {
additionalProperties => 0,
properties => {
@@ -562,7 +562,7 @@ __PACKAGE__->register_method({
path => '/nodes/{node}',
privs => [ 'Sys.Audit' ],
},
- description => "Read DNS settings.",
+ description => __("Read DNS settings."),
proxyto => 'node',
parameters => {
additionalProperties => 0,
@@ -575,22 +575,22 @@ __PACKAGE__->register_method({
additionalProperties => 0,
properties => {
search => {
- description => "Search domain for host-name lookup.",
+ description => __("Search domain for host-name lookup."),
type => 'string',
optional => 1,
},
dns1 => {
- description => 'First name server IP address.',
+ description => __('First name server IP address.'),
type => 'string',
optional => 1,
},
dns2 => {
- description => 'Second name server IP address.',
+ description => __('Second name server IP address.'),
type => 'string',
optional => 1,
},
dns3 => {
- description => 'Third name server IP address.',
+ description => __('Third name server IP address.'),
type => 'string',
optional => 1,
},
@@ -608,7 +608,7 @@ __PACKAGE__->register_method({
name => 'update_dns',
path => 'dns',
method => 'PUT',
- description => "Write DNS settings.",
+ description => __("Write DNS settings."),
proxyto => 'node',
protected => 1,
parameters => {
@@ -616,21 +616,21 @@ __PACKAGE__->register_method({
properties => {
node => get_standard_option('pve-node'),
search => {
- description => "Search domain for host-name lookup.",
+ description => __("Search domain for host-name lookup."),
type => 'string',
},
dns1 => {
- description => 'First name server IP address.',
+ description => __('First name server IP address.'),
type => 'string', format => 'ipv4',
optional => 1,
},
dns2 => {
- description => 'Second name server IP address.',
+ description => __('Second name server IP address.'),
type => 'string', format => 'ipv4',
optional => 1,
},
dns3 => {
- description => 'Third name server IP address.',
+ description => __('Third name server IP address.'),
type => 'string', format => 'ipv4',
optional => 1,
},
@@ -653,7 +653,7 @@ __PACKAGE__->register_method({
path => '/nodes/{node}',
privs => [ 'Sys.Audit' ],
},
- description => "Read server time and time zone settings.",
+ description => __("Read server time and time zone settings."),
proxyto => 'node',
parameters => {
additionalProperties => 0,
@@ -666,16 +666,16 @@ __PACKAGE__->register_method({
additionalProperties => 0,
properties => {
timezone => {
- description => "Time zone",
+ description => __("Time zone"),
type => 'string',
},
time => {
- description => "Seconds since 1970-01-01 00:00:00 UTC.",
+ description => __("Seconds since 1970-01-01 00:00:00 UTC."),
type => 'integer',
minimum => 1297163644,
},
localtime => {
- description => "Seconds since 1970-01-01 00:00:00 (local time)",
+ description => __("Seconds since 1970-01-01 00:00:00 (local time)"),
type => 'integer',
minimum => 1297163644,
},
@@ -699,7 +699,7 @@ __PACKAGE__->register_method({
name => 'set_timezone',
path => 'time',
method => 'PUT',
- description => "Set time zone.",
+ description => __("Set time zone."),
proxyto => 'node',
protected => 1,
parameters => {
@@ -707,7 +707,7 @@ __PACKAGE__->register_method({
properties => {
node => get_standard_option('pve-node'),
timezone => {
- description => "Time zone. The file '/usr/share/zoneinfo/zone.tab' contains the list of valid names.",
+ description => __("Time zone. The file '/usr/share/zoneinfo/zone.tab' contains the list of valid names."),
type => 'string',
},
},
@@ -729,14 +729,14 @@ __PACKAGE__->register_method ({
path => '/storage/{storage}',
privs => [ 'Datastore.AllocateSpace' ],
},
- description => "Upload content.",
+ description => __("Upload content."),
parameters => {
additionalProperties => 0,
properties => {
node => get_standard_option('pve-node'),
storage => get_standard_option('pve-storage-id'),
filename => {
- description => "The name of the file to create/upload.",
+ description => __("The name of the file to create/upload."),
type => 'string',
},
vmid => get_standard_option
@@ -747,7 +747,7 @@ __PACKAGE__->register_method ({
},
},
returns => {
- description => "Volume identifier",
+ description => __("Volume identifier"),
type => 'string',
},
code => sub {
@@ -755,19 +755,19 @@ __PACKAGE__->register_method ({
# todo: can we proxy file uploads to remote nodes?
if ($param->{node} ne PVE::INotify::nodename()) {
- raise_param_exc({ node => "can't upload content to remote node" });
+ raise_param_exc({ node => __("can't upload content to remote node") });
}
my $node = $param->{node};
my $storeid = $param->{storage};
my $name = $param->{filename};
- my $fh = CGI::upload('filename') || die "unable to get file handle\n";
+ my $fh = CGI::upload('filename') || die __("unable to get file handle\n");
syslog ('info', "UPLOAD $name to $node $storeid");
# fixme:
- die "upload not implemented\n";
+ die __("upload not implemented\n");
my $buffer = "";
my $tmpname = "/tmp/proxmox_upload-$$.bin";
@@ -777,7 +777,7 @@ __PACKAGE__->register_method ({
while (read($fh, $buffer, 32768)) {
die "write failed - $!" unless print FILE $buffer;
}
- close FILE || die " can't close temporary file '$tmpname' - $!\n";
+ close FILE || die sprintf(__("can't close temporary file '%s' - %s\n"), $tmpname, $!);
};
my $err = $@;
@@ -816,7 +816,7 @@ __PACKAGE__->register_method ({
path => '',
method => 'GET',
permissions => { user => 'all' },
- description => "Cluster node index.",
+ description => __("Cluster node index."),
parameters => {
additionalProperties => 0,
properties => {},
diff --git a/PVE/API2/OpenVZ.pm b/PVE/API2/OpenVZ.pm
index 6ef6317..1f1b7cb 100644
--- a/PVE/API2/OpenVZ.pm
+++ b/PVE/API2/OpenVZ.pm
@@ -62,7 +62,7 @@ __PACKAGE__->register_method({
name => 'vmlist',
path => '',
method => 'GET',
- description => "OpenVZ container index (per node).",
+ description => __("OpenVZ container index (per node)."),
proxyto => 'node',
protected => 1, # openvz proc files are only readable by root
parameters => {
@@ -98,15 +98,15 @@ my $restore_openvz = sub {
my $root = $vzconf->{rootdir};
$root =~ s/\$VEID/$vmid/;
- print "you choose to force overwriting VPS config file, private and root directories.\n" if $force;
+ print __("you choose to force overwriting VPS config file, private and root directories.\n") if $force;
- die "unable to create CT $vmid - container already exists\n"
+ die sprintf(__("unable to create CT %s - container already exists\n"), $vmid)
if !$force && -f $conffile;
- die "unable to create CT $vmid - directory '$private' already exists\n"
+ die sprintf(__("unable to create CT %s - directory '%s' already exists\n"), $vmid, $private)
if !$force && -d $private;
- die "unable to create CT $vmid - directory '$root' already exists\n"
+ die sprintf(__("unable to create CT %s - directory '%s' already exists\n"), $vmid, $root)
if !$force && -d $root;
my $conf;
@@ -180,7 +180,7 @@ __PACKAGE__->register_method({
name => 'create_vm',
path => '',
method => 'POST',
- description => "Create or restore a container.",
+ description => __("Create or restore a container."),
protected => 1,
proxyto => 'node',
parameters => {
@@ -189,14 +189,14 @@ __PACKAGE__->register_method({
node => get_standard_option('pve-node'),
vmid => get_standard_option('pve-vmid'),
ostemplate => {
- description => "The OS template or backup file.",
+ description => __("The OS template or backup file."),
type => 'string',
maxLength => 255,
},
password => {
optional => 1,
type => 'string',
- description => "Sets root password inside container.",
+ description => __("Sets root password inside container."),
},
storage => get_standard_option('pve-storage-id', {
description => "Target storage.",
@@ -206,12 +206,12 @@ __PACKAGE__->register_method({
force => {
optional => 1,
type => 'boolean',
- description => "Allow to overwrite existing container.",
+ description => __("Allow to overwrite existing container."),
},
restore => {
optional => 1,
type => 'boolean',
- description => "Mark this as restore task.",
+ description => __("Mark this as restore task."),
},
}),
},
@@ -261,9 +261,9 @@ __PACKAGE__->register_method({
my $archive;
if ($ostemplate eq '-') {
- die "pipe requires cli environment\n"
+ die __("pipe requires cli environment\n")
if $rpcenv->{type} ne 'cli';
- die "pipe can only be used with restore tasks\n"
+ die __("pipe can only be used with restore tasks\n")
if !$param->{restore};
$archive = '-';
} else {
@@ -275,7 +275,7 @@ __PACKAGE__->register_method({
$archive = abs_path($ostemplate);
}
- die "can't find file '$archive'\n" if ! -f $archive;
+ die sprintf(__("can't find file '%s'\n"), $archive) if ! -f $archive;
}
if (!defined($param->{searchdomain}) &&
@@ -329,7 +329,7 @@ __PACKAGE__->register_method({
method => 'PUT',
protected => 1,
proxyto => 'node',
- description => "Set virtual machine options.",
+ description => __("Set virtual machine options."),
parameters => {
additionalProperties => 0,
properties => PVE::OpenVZ::json_config_properties(
@@ -338,7 +338,7 @@ __PACKAGE__->register_method({
vmid => get_standard_option('pve-vmid'),
digest => {
type => 'string',
- description => 'Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.',
+ description => __('Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.'),
maxLength => 40,
optional => 1,
}
@@ -387,7 +387,7 @@ __PACKAGE__->register_method({
path => '{vmid}',
method => 'GET',
proxyto => 'node',
- description => "Directory index",
+ description => __("Directory index"),
parameters => {
additionalProperties => 0,
properties => {
@@ -433,23 +433,23 @@ __PACKAGE__->register_method({
path => '/vms/{vmid}',
privs => [ 'VM.Audit' ],
},
- description => "Read VM RRD statistics (returns PNG)",
+ description => __("Read VM RRD statistics (returns PNG)"),
parameters => {
additionalProperties => 0,
properties => {
node => get_standard_option('pve-node'),
vmid => get_standard_option('pve-vmid'),
timeframe => {
- description => "Specify the time frame you are interested in.",
+ description => __("Specify the time frame you are interested in."),
type => 'string',
enum => [ 'hour', 'day', 'week', 'month', 'year' ],
},
ds => {
- description => "The list of datasources you want to display.",
+ description => __("The list of datasources you want to display."),
type => 'string', format => 'pve-configid-list',
},
cf => {
- description => "The RRD consolidation function",
+ description => __("The RRD consolidation function"),
type => 'string',
enum => [ 'AVERAGE', 'MAX' ],
optional => 1,
@@ -480,19 +480,19 @@ __PACKAGE__->register_method({
path => '/vms/{vmid}',
privs => [ 'VM.Audit' ],
},
- description => "Read VM RRD statistics",
+ description => __("Read VM RRD statistics"),
parameters => {
additionalProperties => 0,
properties => {
node => get_standard_option('pve-node'),
vmid => get_standard_option('pve-vmid'),
timeframe => {
- description => "Specify the time frame you are interested in.",
+ description => __("Specify the time frame you are interested in."),
type => 'string',
enum => [ 'hour', 'day', 'week', 'month', 'year' ],
},
cf => {
- description => "The RRD consolidation function",
+ description => __("The RRD consolidation function"),
type => 'string',
enum => [ 'AVERAGE', 'MAX' ],
optional => 1,
@@ -523,7 +523,7 @@ __PACKAGE__->register_method({
path => '/vms/{vmid}',
privs => [ 'VM.Audit' ],
},
- description => "Read init log.",
+ description => __("Read init log."),
parameters => {
additionalProperties => 0,
properties => {
@@ -547,11 +547,11 @@ __PACKAGE__->register_method({
type => "object",
properties => {
n => {
- description=> "Line number",
+ description=> __("Line number"),
type=> 'integer',
},
t => {
- description=> "Line text",
+ description=> __("Line text"),
type => 'string',
}
}
@@ -583,7 +583,7 @@ __PACKAGE__->register_method({
path => '{vmid}/config',
method => 'GET',
proxyto => 'node',
- description => "Get container configuration.",
+ description => __("Get container configuration."),
parameters => {
additionalProperties => 0,
properties => {
@@ -596,7 +596,7 @@ __PACKAGE__->register_method({
properties => {
digest => {
type => 'string',
- description => 'SHA1 digest of configuration file. This can be used to prevent concurrent modifications.',
+ description => __('SHA1 digest of configuration file. This can be used to prevent concurrent modifications.'),
}
},
},
@@ -658,7 +658,7 @@ __PACKAGE__->register_method({
method => 'DELETE',
protected => 1,
proxyto => 'node',
- description => "Destroy the container (also delete all uses files).",
+ description => __("Destroy the container (also delete all uses files)."),
parameters => {
additionalProperties => 0,
properties => {
@@ -701,7 +701,7 @@ __PACKAGE__->register_method ({
path => '/vms/{vmid}',
privs => [ 'VM.Console' ],
},
- description => "Creates a TCP VNC proxy connections.",
+ description => __("Creates a TCP VNC proxy connections."),
parameters => {
additionalProperties => 0,
properties => {
@@ -780,7 +780,7 @@ __PACKAGE__->register_method({
path => '{vmid}/status',
method => 'GET',
proxyto => 'node',
- description => "Directory index",
+ description => __("Directory index"),
parameters => {
additionalProperties => 0,
properties => {
@@ -820,7 +820,7 @@ __PACKAGE__->register_method({
method => 'GET',
proxyto => 'node',
protected => 1, # openvz /proc entries are only readable by root
- description => "Get virtual machine status.",
+ description => __("Get virtual machine status."),
parameters => {
additionalProperties => 0,
properties => {
@@ -846,7 +846,7 @@ __PACKAGE__->register_method({
method => 'GET',
proxyto => 'node',
protected => 1, # openvz /proc entries are only readable by root
- description => "Get container user_beancounters.",
+ description => __("Get container user_beancounters."),
parameters => {
additionalProperties => 0,
properties => {
@@ -887,7 +887,7 @@ __PACKAGE__->register_method({
method => 'POST',
protected => 1,
proxyto => 'node',
- description => "Start the container.",
+ description => __("Start the container."),
parameters => {
additionalProperties => 0,
properties => {
@@ -930,7 +930,7 @@ __PACKAGE__->register_method({
method => 'POST',
protected => 1,
proxyto => 'node',
- description => "Stop the container.",
+ description => __("Stop the container."),
parameters => {
additionalProperties => 0,
properties => {
@@ -982,7 +982,7 @@ __PACKAGE__->register_method({
method => 'POST',
protected => 1,
proxyto => 'node',
- description => "Migrate the container to another node. Creates a new migration task.",
+ description => __("Migrate the container to another node. Creates a new migration task."),
parameters => {
additionalProperties => 0,
properties => {
diff --git a/PVE/API2/Services.pm b/PVE/API2/Services.pm
index ac2bfb1..9237df1 100644
--- a/PVE/API2/Services.pm
+++ b/PVE/API2/Services.pm
@@ -17,20 +17,20 @@ use IO::File;
use base qw(PVE::RESTHandler);
my $service_list = {
- apache => { name => 'WWW', desc => 'Web/API server' },
- postfix => { name => 'SMTP', desc => 'Simple Mail Tranfer Protocol' },
- ntpd => { name => 'NTP', desc => 'Network time protocol' },
- sshd => { name => 'SSH', desc => 'Secure shell daemon' },
- syslog => { name => 'Syslog', desc => 'Syslog daemon' },
- cron => { name => 'CRON', desc => 'Daemon to execute scheduled commands' },
- pvedaemon => { name => 'NodeManager', desc => 'PVE node manager daemon' },
- corosync => { name => 'CMan', desc => 'CMan/Corosync cluster daemon' },
- clvm => { name => 'CLVM', desc => 'LVM cluster locking daemon' },
- pvecluster => { name => 'PVECluster', desc => 'Proxmox VE cluster file system' },
+ apache => { name => 'WWW', desc => __('Web/API server') },
+ postfix => { name => 'SMTP', desc => __('Simple Mail Tranfer Protocol') },
+ ntpd => { name => 'NTP', desc => __('Network time protocol') },
+ sshd => { name => 'SSH', desc => __('Secure shell daemon') },
+ syslog => { name => 'Syslog', desc => __('Syslog daemon') },
+ cron => { name => 'CRON', desc => __('Daemon to execute scheduled commands') },
+ pvedaemon => { name => 'NodeManager', desc => __('PVE node manager daemon') },
+ corosync => { name => 'CMan', desc => __('CMan/Corosync cluster daemon') },
+ clvm => { name => 'CLVM', desc => __('LVM cluster locking daemon') },
+ pvecluster => { name => 'PVECluster', desc => __('Proxmox VE cluster file system') },
};
my $service_prop_desc = {
- description => "Service ID",
+ description => __("Service ID"),
type => 'string',
enum => [ keys %{$service_list} ],
};
@@ -40,7 +40,7 @@ my $service_cmd = sub {
my $initd_cmd;
- die "unknown service command '$cmd'\n"
+ die sprintf(__("unknown service command '%s'\n"), $cmd)
if $cmd !~ m/^(start|stop|restart|reload)$/;
if ($service eq 'postfix') {
@@ -49,21 +49,21 @@ my $service_cmd = sub {
if ($cmd eq 'restart') {
$initd_cmd = '/etc/init.d/pve-cluster';
} else {
- die "invalid service cmd 'pve-cluster $cmd': ERROR";
+ die sprintf(__("invalid service cmd 'pve-cluster %s': ERROR"), $cmd);
}
} elsif ($service eq 'pvedaemon') {
if ($cmd eq 'restart') {
$initd_cmd = '/etc/init.d/pvedaemon';
} else {
- die "invalid service cmd '$service $cmd': ERROR";
+ die sprintf(__("invalid service cmd '%s %s': ERROR"), $service, $cmd);
}
} elsif ($service eq 'apache') {
if ($cmd eq 'restart') {
- print "graceful apache restart\n";
+ print __("graceful apache restart\n");
$initd_cmd = '/usr/sbin/apache2ctl';
$cmd = 'graceful';
} else {
- die "invalid service cmd '$service $cmd': ERROR";
+ die sprintf(__("invalid service cmd '%s %s': ERROR"), $service, $cmd);
}
} elsif ($service eq 'ntpd') {
# debian start/stop scripts does not work for us
@@ -125,7 +125,7 @@ my $service_state = sub {
} elsif ($service eq 'syslog') {
$pid_file = '/var/run/rsyslogd.pid';
} else {
- die "unknown service '$service': ERROR";
+ die ssprintf(__("unknown service '%s': ERROR"), $service);
}
my $pid;
@@ -229,7 +229,7 @@ __PACKAGE__->register_method ({
path => '/nodes/{node}',
privs => [ 'Sys.Audit' ],
},
- description => "Read service properties",
+ description => __("Read service properties"),
proxyto => 'node',
protected => 1,
parameters => {
@@ -259,7 +259,7 @@ __PACKAGE__->register_method ({
name => 'service_start',
path => '{service}/start',
method => 'POST',
- description => "Start service.",
+ description => __("Start service."),
proxyto => 'node',
protected => 1,
parameters => {
@@ -297,7 +297,7 @@ __PACKAGE__->register_method ({
name => 'service_stop',
path => '{service}/stop',
method => 'POST',
- description => "Stop service.",
+ description => __("Stop service."),
proxyto => 'node',
protected => 1,
parameters => {
@@ -335,7 +335,7 @@ __PACKAGE__->register_method ({
name => 'service_restart',
path => '{service}/restart',
method => 'POST',
- description => "Restart service.",
+ description => __("Restart service."),
proxyto => 'node',
protected => 1,
parameters => {
@@ -373,7 +373,7 @@ __PACKAGE__->register_method ({
name => 'service_reload',
path => '{service}/reload',
method => 'POST',
- description => "Reload service.",
+ description => __("Reload service."),
proxyto => 'node',
protected => 1,
parameters => {
diff --git a/PVE/API2/Tasks.pm b/PVE/API2/Tasks.pm
index 1b83f2c..18b5a60 100644
--- a/PVE/API2/Tasks.pm
+++ b/PVE/API2/Tasks.pm
@@ -20,7 +20,7 @@ __PACKAGE__->register_method({
path => '',
method => 'GET',
permissions => { user => 'all' },
- description => "Read task list for one node (finished tasks).",
+ description => __("Read task list for one node (finished tasks)."),
proxyto => 'node',
parameters => {
additionalProperties => 0,
@@ -215,11 +215,11 @@ __PACKAGE__->register_method({
type => "object",
properties => {
n => {
- description=> "Line number",
+ description=> __("Line number"),
type=> 'integer',
},
t => {
- description=> "Line text",
+ description=> __("Line text"),
type => 'string',
}
}
@@ -229,7 +229,7 @@ __PACKAGE__->register_method({
my ($param) = @_;
my ($task, $filename) = PVE::Tools::upid_decode($param->{upid}, 1);
- raise_param_exc({ upid => "unable to parse worker upid" }) if !$task;
+ raise_param_exc({ upid => __("unable to parse worker upid") }) if !$task;
my $lines = [];
@@ -242,7 +242,7 @@ __PACKAGE__->register_method({
if !($auditor || $user eq $task->{user});
my $fh = IO::File->new($filename, "r");
- raise_param_exc({ upid => "no such task - unable to open file - $!" }) if !$fh;
+ raise_param_exc({ upid => sprintf(__("no such task - unable to open file - %s"), $!) }) if !$fh;
my $start = $param->{start} || 0;
my $limit = $param->{limit} || 50;
@@ -262,7 +262,7 @@ __PACKAGE__->register_method({
# so we add a line
if (!$count) {
$count++;
- push @$lines, { n => $count, t => "no content"};
+ push @$lines, { n => $count, t => __("no content)"};
}
$rpcenv->set_result_count($count);
@@ -300,8 +300,8 @@ __PACKAGE__->register_method({
my ($param) = @_;
my ($task, $filename) = PVE::Tools::upid_decode($param->{upid}, 1);
- raise_param_exc({ upid => "unable to parse worker upid" }) if !$task;
- raise_param_exc({ upid => "no such task" }) if ! -f $filename;
+ raise_param_exc({ upid => __("unable to parse worker upid") }) if !$task;
+ raise_param_exc({ upid => __("no such task") }) if ! -f $filename;
my $lines = [];
diff --git a/PVE/API2/VZDump.pm b/PVE/API2/VZDump.pm
index 66e84df..0cb37ac 100644
--- a/PVE/API2/VZDump.pm
+++ b/PVE/API2/VZDump.pm
@@ -21,7 +21,7 @@ __PACKAGE__->register_method ({
name => 'vzdump',
path => '',
method => 'POST',
- description => "Create backup.",
+ description => __("Create backup."),
protected => 1,
proxyto => 'node',
parameters => {
@@ -29,7 +29,7 @@ __PACKAGE__->register_method ({
properties => PVE::VZDump::json_config_properties({
stdout => {
type => 'boolean',
- description => "Write tar to stdout, not to a file.",
+ description => __("Write tar to stdout, not to a file."),
optional => 1,
},
}),
@@ -45,10 +45,10 @@ __PACKAGE__->register_method ({
my $nodename = PVE::INotify::nodename();
if ($rpcenv->{type} ne 'cli') {
- raise_param_exc({ node => "option is only allowed on the command line interface."})
+ raise_param_exc({ node => __("option is only allowed on the command line interface.")})
if $param->{node} && $param->{node} ne $nodename;
- raise_param_exc({ stdout => "option is only allowed on the command line interface."})
+ raise_param_exc({ stdout => __("option is only allowed on the command line interface.")})
if $param->{stdout};
}
@@ -105,10 +105,10 @@ __PACKAGE__->register_method ({
if ($param->{stdout}) {
open my $saved_stdout, ">&STDOUT"
- || die "can't dup STDOUT: $!\n";
+ || die sprintf(__("can't dup STDOUT: %s\n"), $!);
open STDOUT, '>&STDERR' ||
- die "unable to redirect STDOUT: $!\n";
+ die sprintf(__("unable to redirect STDOUT: %s\n"), $!);
$param->{stdout} = $saved_stdout;
}
diff --git a/PVE/API2Client.pm b/PVE/API2Client.pm
index cf998f7..6ce1803 100755
--- a/PVE/API2Client.pm
+++ b/PVE/API2Client.pm
@@ -87,7 +87,7 @@ sub call {
} elsif ($method eq 'DELETE') {
$response = $ua->request(HTTP::Request::Common::DELETE($uri));
} else {
- die "method $method not implemented\n";
+ die sprintf(__("method %s not implemented\n"), $method);
}
#print "RESP: " . Dumper($response) . "\n";
@@ -95,7 +95,7 @@ sub call {
if ($response->is_success) {
my $ct = $response->header('Content-Type');
- die "got unexpected content type" if $ct ne 'application/json';
+ die __("got unexpected content type") if $ct ne 'application/json';
return from_json($response->decoded_content, {utf8 => 1, allow_nonref => 1});
diff --git a/PVE/APIDaemon.pm b/PVE/APIDaemon.pm
index 17dd38d..aa88520 100755
--- a/PVE/APIDaemon.pm
+++ b/PVE/APIDaemon.pm
@@ -153,7 +153,7 @@ sub new {
my $class = shift;
my $self = $class->SUPER::new(@_) ||
- die "unable to create socket - $@\n";
+ die sprintf(__("unable to create socket - %s\n"), $@);
return $self;
}
diff --git a/PVE/APLInfo.pm b/PVE/APLInfo.pm
index 26fd791..c44c4a8 100644
--- a/PVE/APLInfo.pm
+++ b/PVE/APLInfo.pm
@@ -93,15 +93,15 @@ sub update {
eval {
if (url_get ($ua, $aplsigurl, $sigfn, $logfd) != 0) {
- die "update failed - no signature\n";
+ die __("update failed - no signature\n");
}
if (url_get ($ua, $aplsrcurl, $tmpgz, $logfd) != 0) {
- die "update failed - no data\n";
+ die __("update failed - no data\n");
}
if (system ("zcat -f $tmpgz >$tmp 2>/dev/null") != 0) {
- die "update failed: unable to unpack '$tmpgz'\n";
+ die sprintf(__("update failed: unable to unpack '%s'\n"), $tmpgz);
}
# verify signature
@@ -110,7 +110,7 @@ sub update {
"--logger-fd=1 $sigfn $tmp";
open (CMD, "$cmd|") ||
- die "unable to execute '$cmd': $!\n";
+ die ssprintf(__("unable to execute '%s': %s\n"), $cmd, $!);
my $line;
my $signer = '';
@@ -132,7 +132,7 @@ sub update {
close (CMD);
- die "unable to verify signature\n" if !$signer;
+ die __("unable to verify signature\n") if !$signer;
logmsg ($logfd, "signature valid: $signer");
@@ -146,7 +146,7 @@ sub update {
die "update failed: $@" if $@;
if (system ("mv $tmp /var/lib/pve-manager/apl-available 2>/dev/null") != 0) {
- die "update failed: unable to store data\n";
+ die __("update failed: unable to store data\n");
}
logmsg ($logfd, "update sucessful");
diff --git a/PVE/OpenVZ.pm b/PVE/OpenVZ.pm
index dbb6ace..a14f680 100644
--- a/PVE/OpenVZ.pm
+++ b/PVE/OpenVZ.pm
@@ -324,20 +324,20 @@ my $confdesc = {
onboot => {
optional => 1,
type => 'boolean',
- description => "Specifies whether a VM will be started during system bootup.",
+ description => _("Specifies whether a VM will be started during system bootup."),
default => 0,
},
cpus => {
optional => 1,
type => 'integer',
- description => "The number of CPUs for this container.",
+ description => _("The number of CPUs for this container."),
minimum => 1,
default => 1,
},
cpuunits => {
optional => 1,
type => 'integer',
- description => "CPU weight for a VM. Argument is used in the kernel fair scheduler. The larger the number is, the more CPU time this VM gets. Number is relative to weights of all the other running VMs.\n\nNOTE: You can disable fair-scheduler configuration by setting this to 0.",
+ description => _("CPU weight for a VM. Argument is used in the kernel fair scheduler. The larger the number is, the more CPU time this VM gets. Number is relative to weights of all the other running VMs.\n\nNOTE: You can disable fair-scheduler configuration by setting this to 0."),
minimum => 0,
maximum => 500000,
default => 1000,
@@ -345,68 +345,68 @@ my $confdesc = {
memory => {
optional => 1,
type => 'integer',
- description => "Amount of RAM for the VM in MB.",
+ description => _("Amount of RAM for the VM in MB."),
minimum => 16,
default => 512,
},
swap => {
optional => 1,
type => 'integer',
- description => "Amount of SWAP for the VM in MB.",
+ description => _("Amount of SWAP for the VM in MB."),
minimum => 16,
default => 512,
},
disk => {
optional => 1,
type => 'number',
- description => "Amount of disk space for the VM in GB. A zero indicates no limits.",
+ description => _("Amount of disk space for the VM in GB. A zero indicates no limits."),
minimum => 0,
default => 2,
},
quotatime => {
optional => 1,
type => 'integer',
- description => "Set quota grace period (seconds).",
+ description => _("Set quota grace period (seconds)."),
minimum => 0,
default => 0,
},
quotaugidlimit => {
optional => 1,
type => 'integer',
- description => "Set maximum number of user/group IDs in a container for which disk quota inside the container will be accounted. If this value is set to 0, user and group quotas inside the container will not.",
+ description => _("Set maximum number of user/group IDs in a container for which disk quota inside the container will be accounted. If this value is set to 0, user and group quotas inside the container will not."),
minimum => 0,
default => 0,
},
hostname => {
optional => 1,
- description => "Set a host name for the container.",
+ description => _("Set a host name for the container."),
type => 'string',
maxLength => 255,
},
description => {
optional => 1,
type => 'string',
- description => "Container description. Only used on the configuration web interface.",
+ description => _("Container description. Only used on the configuration web interface."),
},
searchdomain => {
optional => 1,
type => 'string',
- description => "Sets DNS search domains for a container. Create will automatically use the setting from the host if you neither set searchdomain or nameserver.",
+ description => _("Sets DNS search domains for a container. Create will automatically use the setting from the host if you neither set searchdomain or nameserver."),
},
nameserver => {
optional => 1,
type => 'string',
- description => "Sets DNS server IP address for a container. Create will automatically use the setting from the host if you neither set searchdomain or nameserver.",
+ description => _("Sets DNS server IP address for a container. Create will automatically use the setting from the host if you neither set searchdomain or nameserver."),
},
ip_address => {
optional => 1,
type => 'string',
- description => "Specifies the address the container will be assigned.",
+ description => _("Specifies the address the container will be assigned."),
},
netif => {
optional => 1,
type => 'string', format => 'pve-openvz-netif',
- description => "Specifies network interfaces for the container.",
+ description => _("Specifies network interfaces for the container."),
},
};
@@ -1167,13 +1167,13 @@ sub replacepw {
eval {
open (SRC, "<$file") ||
- die "unable to open file '$file' - $!";
+ die sprintf(__("unable to open file '%s' - %s"), $file, $!);
my $st = File::stat::stat(\*SRC) ||
die "unable to stat file - $!";
open (DST, ">$tmpfile") ||
- die "unable to open file '$tmpfile' - $!";
+ die sprintf(__("unable to open file '%s' - %s"), $tmpfile, $!);
# copy owner and permissions
chmod $st->mode, \*DST;
diff --git a/PVE/REST.pm b/PVE/REST.pm
index 1d68594..834d89d 100644
--- a/PVE/REST.pm
+++ b/PVE/REST.pm
@@ -69,7 +69,7 @@ sub format_response_data {
$raw = "<html><body>";
if (!is_success($res->{status})) {
my $msg = $res->{message} || '';
- $raw .= "<h1>ERROR $res->{status} $msg</h1>";
+ $raw .= "<h1>" . __("ERROR") . " $res->{status} $msg</h1>";
}
my $lnk = PVE::JSONSchema::method_get_child_link($info);
if ($lnk && $data && $data->{data} && is_success($res->{status})) {
@@ -186,7 +186,7 @@ sub create_http_request {
return $req;
}
- die "unknown method '$method'";
+ die __("unknown method") . "'$method'";
}
sub proxy_handler {
@@ -282,7 +282,7 @@ my $check_permissions = sub {
return 1;
}
- die "Permission check failed\n";
+ die __("Permission check failed\n");
};
sub rest_handler {
@@ -310,7 +310,7 @@ sub rest_handler {
if ($require_auth) {
eval {
- die "No ticket\n" if !$ticket;
+ die __("No ticket\n") if !$ticket;
($username, $age) = PVE::AccessControl::verify_ticket($ticket);
@@ -347,7 +347,7 @@ sub rest_handler {
if (!$handler || !$info) {
return {
status => HTTP_NOT_IMPLEMENTED,
- message => "Method '$method $abs_uri' not implemented",
+ message => sprintf(__("Method '%s %s' not implemented"), $method, $abs_uri);
};
}
@@ -359,7 +359,7 @@ sub rest_handler {
if (my $err = $@) {
return {
status => HTTP_BAD_REQUEST,
- message => "parameter parser failed: $err",
+ message => __("parameter parser failed") . ": $err",
};
}
@@ -369,7 +369,7 @@ sub rest_handler {
if (defined($uri_param->{$p})) {
return {
status => HTTP_BAD_REQUEST,
- message => "Parameter verification failed - duplicate parameter '$p'",
+ message => __("Parameter verification failed - duplicate parameter") . " '$p'",
};
}
$uri_param->{$p} = $params->{$p};
@@ -389,10 +389,10 @@ sub rest_handler {
eval {
my $pn = $info->{proxyto};
my $node = $uri_param->{$pn};
- die "proxy parameter '$pn' does not exists" if !$node;
+ die sprintf(__("proxy parameter '%s' does not exists"), $pn) if !$node;
if ($node ne 'localhost' && $node ne PVE::INotify::nodename()) {
- die "unable to proxy file uploads" if $isUpload;
+ die __("unable to proxy file uploads") if $isUpload;
$remip = PVE::Cluster::remote_node_ip($node);
}
};
diff --git a/PVE/VZDump.pm b/PVE/VZDump.pm
index bab7eb7..7ca7487 100644
--- a/PVE/VZDump.pm
+++ b/PVE/VZDump.pm
@@ -152,7 +152,7 @@ sub check_bin {
}
}
- die "unable to find command '$bin'\n";
+ die sprintf(__("unable to find command '%s'\n"), $bin);
}
sub check_vmids {
@@ -160,7 +160,7 @@ sub check_vmids {
my $res = [];
foreach my $vmid (@vmids) {
- die "ERROR: strange VM ID '${vmid}'\n" if $vmid !~ m/^\d+$/;
+ die sprintf(__("ERROR: strange VM ID %s\n"), ${vmid}) if $vmid !~ m/^\d+$/;
$vmid = int ($vmid); # remove leading zeros
next if !$vmid;
push @$res, $vmid;
@@ -266,7 +266,7 @@ my $sendmail = sub {
}
}
- my $stat = $ecount ? 'backup failed' : 'backup successful';
+ my $stat = $ecount ? __('backup failed') : __('backup successful');
my $hostname = `hostname -f` || PVE::INotify::nodename();
chomp $hostname;
@@ -319,7 +319,7 @@ my $sendmail = sub {
}
}
print MAIL "${fill}\n";
- print MAIL "${fill}Detailed backup logs:\n";
+ print MAIL "${fill}" . __("Detailed backup logs:\n");
print MAIL "${fill}\n";
print MAIL "$fill$cmdline\n";
print MAIL "${fill}\n";
@@ -328,7 +328,7 @@ my $sendmail = sub {
my $vmid = $task->{vmid};
my $log = $task->{tmplog};
if (!$log) {
- print MAIL "${fill}$vmid: no log available\n\n";
+ print MAIL "${fill}$vmid: " . __("no log available") . "\n\n";
next;
}
open (TMP, "$log");
@@ -351,7 +351,7 @@ my $sendmail = sub {
print MAIL "<table border=1 cellpadding=3>\n";
- print MAIL "<tr><td>VMID<td>NAME<td>STATUS<td>TIME<td>SIZE<td>FILENAME</tr>\n";
+ print MAIL __("<tr><td>VMID<td>NAME<td>STATUS<td>TIME<td>SIZE<td>FILENAME</tr>") "\n";
my $ssize = 0;
@@ -363,24 +363,23 @@ my $sendmail = sub {
$ssize += $task->{size};
- print MAIL sprintf ("<tr><td>%s<td>%s<td>OK<td>%s<td align=right>%s<td>%s</tr>\n",
- $vmid, $name,
+ print MAIL sprintf ("<tr><td>%s<td>%s<td>%s<td>%s<td align=right>%s<td>%s</tr>\n",
+ $vmid, $name, __("OK"),
format_time($task->{backuptime}),
format_size ($task->{size}),
escape_html ($task->{tarfile}));
} else {
- print MAIL sprintf ("<tr><td>%s<td>%s<td><font color=red>FAILED<td>%s<td colspan=2>%s</tr>\n",
+ print MAIL sprintf ("<tr><td>%s<td>%s<td><font color=red>%s<td>%s<td colspan=2>%s</tr>\n",
- $vmid, $name, format_time($task->{backuptime}),
+ $vmid, $name, __("FAILED"), format_time($task->{backuptime}),
escape_html ($task->{msg}));
}
}
- print MAIL sprintf ("<tr><td align=left colspan=3>TOTAL<td>%s<td>%s<td></tr>",
- format_time ($totaltime), format_size ($ssize));
+ print MAIL sprintf ("<tr><td align=left colspan=3>%s<td>%s<td>%s<td></tr>", __("TOTAL"), format_time ($totaltime), format_size ($ssize));
print MAIL "</table><br><br>\n";
- print MAIL "Detailed backup logs:<br>\n";
+ print MAIL __("Detailed backup logs:") . "<br>\n";
print MAIL "<br>\n";
print MAIL "<pre>\n";
print MAIL escape_html($cmdline) . "\n";
@@ -390,7 +389,7 @@ my $sendmail = sub {
my $vmid = $task->{vmid};
my $log = $task->{tmplog};
if (!$log) {
- print MAIL "$vmid: no log available\n\n";
+ print MAIL "$vmid: " . __("no log available") . "\n\n";
next;
}
open (TMP, "$log");
@@ -597,7 +596,7 @@ sub getlock {
eval {
alarm ($maxwait * 60);
- local $SIG{ALRM} = sub { alarm (0); die "got timeout\n"; };
+ local $SIG{ALRM} = sub { alarm (0); die __("got timeout\n"); };
if (!flock (SERVER_FLCK, LOCK_EX)) {
my $err = $!;
@@ -824,7 +823,7 @@ sub exec_backup_task {
}
} else {
- die "internal error - unknown mode '$mode'\n";
+ die sprintf(__("internal error - unknown mode '%s'\n"), $mode);
}
# assemble archive image
@@ -843,7 +842,7 @@ sub exec_backup_task {
$plugin->archive ($task, $vmid, $task->{tmptar});
rename ($task->{tmptar}, $task->{tarfile}) ||
- die "unable to rename '$task->{tmptar}' to '$task->{tarfile}'\n";
+ die sprintf(__("unable to rename '%s' to '%s'\n"), $task->{tmptar}, $task->{tarfile});
# determine size
$task->{size} = (-s $task->{tarfile}) || 0;
@@ -1016,58 +1015,58 @@ sub exec_backup {
die $err if $err;
- die "job errors\n" if $errcount;
+ die __("job errors\n") if $errcount;
}
my $confdesc = {
vmid => {
type => 'string', format => 'pve-vmid-list',
- description => "The ID of the VM you want to backup.",
+ description => __("The ID of the VM you want to backup."),
optional => 1,
},
node => get_standard_option('pve-node', {
- description => "Only run if executed on this node.",
+ description => __("Only run if executed on this node."),
optional => 1,
}),
all => {
type => 'boolean',
- description => "Backup all known VMs on this host.",
+ description => __("Backup all known VMs on this host."),
optional => 1,
default => 0,
},
stdexcludes => {
type => 'boolean',
- description => "Exclude temorary files and logs.",
+ description => __("Exclude temorary files and logs."),
optional => 1,
default => 1,
},
compress => {
type => 'boolean',
- description => "Compress dump file (gzip).",
+ description => __("Compress dump file (gzip)."),
optional => 1,
default => 0,
},
quiet => {
type => 'boolean',
- description => "Be quiet.",
+ description => __("Be quiet."),
optional => 1,
default => 0,
},
mode => {
type => 'string',
- description => "Backup mode.",
+ description => __("Backup mode."),
optional => 1,
default => 'stop',
enum => [ 'snapshot', 'suspend', 'stop' ],
},
exclude => {
type => 'string', format => 'pve-vmid-list',
- description => "exclude specified VMs (assumes --all)",
+ description => __("exclude specified VMs (assumes --all)"),
optional => 1,
},
'exclude-path' => {
type => 'string', format => 'string-alist',
- description => "exclude certain files/directories (regex).",
+ description => __("exclude certain files/directories (regex)."),
optional => 1,
},
mailto => {
@@ -1077,57 +1076,57 @@ my $confdesc = {
},
tmpdir => {
type => 'string',
- description => "Store temporary files to specified directory.",
+ description => __("Store temporary files to specified directory."),
optional => 1,
},
dumpdir => {
type => 'string',
- description => "Store resulting files to specified directory.",
+ description => __("Store resulting files to specified directory."),
optional => 1,
},
script => {
type => 'string',
- description => "Use specified hook script.",
+ description => __("Use specified hook script."),
optional => 1,
},
storage => get_standard_option('pve-storage-id', {
- description => "Store resulting file to this storage.",
+ description => __("Store resulting file to this storage."),
optional => 1,
}),
size => {
type => 'integer',
- description => "LVM snapshot size im MB.",
+ description => __("LVM snapshot size im MB."),
optional => 1,
minimum => 500,
},
bwlimit => {
type => 'integer',
- description => "Limit I/O bandwidth (KBytes per second).",
+ description => __("Limit I/O bandwidth (KBytes per second)."),
optional => 1,
minimum => 0,
},
ionice => {
type => 'integer',
- description => "Set CFQ ionice priority.",
+ description => __("Set CFQ ionice priority."),
optional => 1,
minimum => 0,
maximum => 8,
},
lockwait => {
type => 'integer',
- description => "Maximal time to wait for the global lock (minutes).",
+ description => __("Maximal time to wait for the global lock (minutes)."),
optional => 1,
minimum => 0,
},
stopwait => {
type => 'integer',
- description => "Maximal time to wait until a VM is stopped (minutes).",
+ description => __("Maximal time to wait until a VM is stopped (minutes)."),
optional => 1,
minimum => 0,
},
maxfiles => {
type => 'integer',
- description => "Maximal number of backup files per VM.",
+ description => __("Maximal number of backup files per VM."),
optional => 1,
minimum => 1,
},
@@ -1152,17 +1151,17 @@ sub json_config_properties {
sub verify_vzdump_parameters {
my ($param, $check_missing) = @_;
- raise_param_exc({ all => "option conflicts with option 'vmid'"})
+ raise_param_exc({ all => _("option conflicts with option 'vmid'")})
if $param->{all} && $param->{vmid};
- raise_param_exc({ exclude => "option conflicts with option 'vmid'"})
+ raise_param_exc({ exclude => _("option conflicts with option 'vmid'")})
if $param->{exclude} && $param->{vmid};
$param->{all} = 1 if defined($param->{exclude});
return if !$check_missing;
- raise_param_exc({ vmid => "property is missing"})
+ raise_param_exc({ vmid => _("property is missing")})
if !$param->{all} && !$param->{vmid};
}
diff --git a/PVE/VZDump/OpenVZ.pm b/PVE/VZDump/OpenVZ.pm
index 549e338..fdd0454 100644
--- a/PVE/VZDump/OpenVZ.pm
+++ b/PVE/VZDump/OpenVZ.pm
@@ -102,9 +102,9 @@ sub prepare {
my $targetdev = PVE::VZDump::get_lvm_device ($task->{dumpdir}, $lvmmap);
- die ("mode failure - unable to detect lvm volume group\n") if !$lvmvg;
- die ("mode failure - wrong lvm mount point '$lvmpath'\n") if $dir !~ m|/?$lvmpath/?|;
- die ("mode failure - unable to dump into snapshot (use option --dumpdir)\n")
+ die __("mode failure - unable to detect lvm volume group\n") if !$lvmvg;
+ die sprintf(__("mode failure - wrong lvm mount point '%s'\n"), $lvmpath) if $dir !~ m|/?$lvmpath/?|;
+ die __("mode failure - unable to dump into snapshot (use option --dumpdir)\n")
if $targetdev eq $srcdev;
$diskinfo->{snapname} = "vzsnap-$hostname-0";
diff --git a/PVE/VZDump/Plugin.pm b/PVE/VZDump/Plugin.pm
index b2329c1..d12cc46 100644
--- a/PVE/VZDump/Plugin.pm
+++ b/PVE/VZDump/Plugin.pm
@@ -52,79 +52,79 @@ sub vmlist {
sub vm_status {
my ($self, $vmid) = @_;
- die "internal error"; # implement in subclass
+ die __("internal error"); # implement in subclass
}
sub prepare {
my ($self, $task, $vmid, $mode) = @_;
- die "internal error"; # implement in subclass
+ die __("internal error"); # implement in subclass
}
sub lock_vm {
my ($self, $vmid) = @_;
- die "internal error"; # implement in subclass
+ die __("internal error"); # implement in subclass
}
sub unlock_vm {
my ($self, $vmid) = @_;
- die "internal error"; # implement in subclass
+ die __("internal error"); # implement in subclass
}
sub stop_vm {
my ($self, $task, $vmid) = @_;
- die "internal error"; # implement in subclass
+ die __("internal error"); # implement in subclass
}
sub start_vm {
my ($self, $task, $vmid) = @_;
- die "internal error"; # implement in subclass
+ die __("internal error"); # implement in subclass
}
sub suspend_vm {
my ($self, $task, $vmid) = @_;
- die "internal error"; # implement in subclass
+ die __("internal error"); # implement in subclass
}
sub resume_vm {
my ($self, $task, $vmid) = @_;
- die "internal error"; # implement in subclass
+ die __("internal error"); # implement in subclass
}
sub snapshot {
my ($self, $task, $vmid) = @_;
- die "internal error"; # implement in subclass
+ die __("internal error"); # implement in subclass
}
sub copy_data_phase2 {
my ($self, $task, $vmid) = @_;
- die "internal error"; # implement in subclass
+ die __("internal error"); # implement in subclass
}
sub assemble {
my ($self, $task, $vmid) = @_;
- die "internal error"; # implement in subclass
+ die __("internal error"); # implement in subclass
}
sub archive {
my ($self, $task, $vmid, $filename) = @_;
- die "internal error"; # implement in subclass
+ die __("internal error"); # implement in subclass
}
sub cleanup {
my ($self, $task, $vmid) = @_;
- die "internal error"; # implement in subclass
+ die __("internal error"); # implement in subclass
}
1;
diff --git a/www/manager/StateProvider.js b/www/manager/StateProvider.js
index ca34942..e917996 100644
--- a/www/manager/StateProvider.js
+++ b/www/manager/StateProvider.js
@@ -153,7 +153,7 @@ Ext.define('PVE.StateProvider', {
var history_change_cb = function(token) {
//console.log("HC " + token);
if (!token) {
- var res = window.confirm('Are you sure you want to navigate away from this page?');
+ var res = window.confirm(gettext('Are you sure you want to navigate away from this page?'));
if (res){
// process text value and close...
Ext.History.back();
diff --git a/www/manager/Utils.js b/www/manager/Utils.js
index 7a5fdc1..f460680 100644
--- a/www/manager/Utils.js
+++ b/www/manager/Utils.js
@@ -42,17 +42,17 @@ Ext.apply(Ext.form.field.VTypes, {
BridgeName: function(v) {
return (/^vmbr\d{1,4}$/).test(v);
},
- BridgeNameText: gettext('Format') + ': vmbr<b>N</b>, where 0 <= <b>N</b> <= 9999',
+ BridgeNameText: gettext('Format') + ': vmbr<b>N</b>, ' + gettext('where 0 <= <b>N</b> <= 9999'),
BondName: function(v) {
return (/^bond\d{1,4}$/).test(v);
},
- BondNameText: gettext('Format') + ': bond<b>N</b>, where 0 <= <b>N</b> <= 9999',
+ BondNameText: gettext('Format') + ': bond<b>N</b>, ' + gettext('where 0 <= <b>N</b> <= 9999'),
QemuStartDate: function(v) {
return (/^(now|\d{4}-\d{1,2}-\d{1,2}(T\d{1,2}:\d{1,2}:\d{1,2})?)$/).test(v);
},
- QemuStartDateText: gettext('Format') + ': "now" or "2006-06-17T16:01:21" or "2006-06-17"',
+ QemuStartDateText: gettext('Format') + ': ' + gettext('"now" or "2006-06-17T16:01:21" or "2006-06-17"'),
StorageId: function(v) {
return (/^[a-z][a-z0-9\-\_\.]*[a-z0-9]$/i).test(v);
@@ -96,18 +96,18 @@ Ext.define('PVE.Utils', { statics: {
},
kvm_ostypes: {
- other: 'Other',
- wxp: 'Microsoft Windows XP/2003',
- w2k: 'Microsoft Windows 2000',
- w2k8: 'Microsoft Windows Vista/2008',
- win7: 'Microsoft Windows 7/2008r2',
- l24: 'Linux 2.4 Kernel',
- l26: 'Linux 3.X/2.6 Kernel'
+ other: gettext('Other'),
+ wxp: gettext('Microsoft Windows XP/2003'),
+ w2k: gettext('Microsoft Windows 2000'),
+ w2k8: gettext('Microsoft Windows Vista/2008'),
+ win7: gettext('Microsoft Windows 7/2008r2'),
+ l24: gettext('Linux 2.4 Kernel'),
+ l26: gettext('Linux 3.X/2.6 Kernel')
},
render_kvm_ostype: function (value) {
if (!value) {
- return 'Other';
+ return gettext('Other');
}
var text = PVE.Utils.kvm_ostypes[value];
if (text) {
@@ -119,50 +119,50 @@ Ext.define('PVE.Utils', { statics: {
// fixme: auto-generate this
// for now, please keep in sync with PVE::Tools::kvmkeymaps
kvm_keymaps: {
- //ar: 'Arabic',
- dk: 'Danish',
- de: 'German',
- 'de-ch': 'German (Swiss)',
- 'en-gb': 'English (UK)',
- 'en-us': 'English (USA',
- es: 'Spanish',
- //et: 'Estonia',
- fi: 'Finnish',
- //fo: 'Faroe Islands',
- fr: 'French',
- 'fr-be': 'French (Belgium)',
- 'fr-ca': 'French (Canada)',
- 'fr-ch': 'French (Swiss)',
- //hr: 'Croatia',
- hu: 'Hungarian',
- is: 'Icelandic',
- it: 'Italian',
- ja: 'Japanese',
- lt: 'Lithuanian',
- //lv: 'Latvian',
- mk: 'Macedonian',
- nl: 'Dutch',
- //'nl-be': 'Dutch (Belgium)',
- no: 'Norwegian',
- pl: 'Polish',
- pt: 'Portuguese',
- 'pt-br': 'Portuguese (Brazil)',
- //ru: 'Russian',
- si: 'Slovenian'
- //sv: 'Swedish',
- //th: 'Thai',
- //tr: 'Turkish'
+ //ar: gettext('Arabic'),
+ dk: gettext('Danish'),
+ de: gettext('German'),
+ 'de-ch': gettext('German (Swiss)'),
+ 'en-gb': gettext('English (UK)'),
+ 'en-us': gettext('English (USA)'),
+ es: gettext('Spanish'),
+ //et: gettext('Estonia'),
+ fi: gettext('Finnish'),
+ //fo: gettext('Faroe Islands'),
+ fr: gettext('French'),
+ 'fr-be': gettext('French (Belgium)'),
+ 'fr-ca': gettext('French (Canada)'),
+ 'fr-ch': gettext('French (Swiss)'),
+ //hr: gettext('Croatia'),
+ hu: gettext('Hungarian'),
+ is: gettext('Icelandic'),
+ it: gettext('Italian'),
+ ja: gettext('Japanese'),
+ lt: gettext('Lithuanian'),
+ //lv: gettext('Latvian'),
+ mk: gettext('Macedonian'),
+ nl: gettext('Dutch'),
+ //'nl-be': gettext('Dutch (Belgium)'),
+ no: gettext('Norwegian'),
+ pl: gettext('Polish'),
+ pt: gettext('Portuguese'),
+ 'pt-br': gettext('Portuguese (Brazil)'),
+ //ru: gettext('Russian'),
+ si: gettext('Slovenian')
+ //sv: gettext('Swedish'),
+ //th: gettext('Thai'),
+ //tr: gettext('Turkish')
},
kvm_vga_drivers: {
- std: 'Standard VGA',
- vmware: 'VMWare compatible',
- cirrus: 'Cirrus Logic GD5446'
+ std: gettext('Standard VGA'),
+ vmware: gettext('VMWare compatible'),
+ cirrus: gettext('Cirrus Logic GD5446')
},
render_kvm_language: function (value) {
if (!value) {
- return 'Default';
+ return gettext('Default');
}
var text = PVE.Utils.kvm_keymaps[value];
if (text) {
@@ -181,14 +181,15 @@ Ext.define('PVE.Utils', { statics: {
},
language_map: {
- en: 'English',
- de: 'German',
- fr: 'French'
+ en: gettext('English'),
+ de: gettext('German'),
+ fr: gettext('French'),
+ ja: gettext('Japanese')
},
render_language: function (value) {
if (!value) {
- return 'Default (English)';
+ return gettext('Default (English)');
}
var text = PVE.Utils.language_map[value];
if (text) {
@@ -208,7 +209,7 @@ Ext.define('PVE.Utils', { statics: {
render_kvm_vga_driver: function (value) {
if (!value) {
- return 'OS default';
+ return gettext('OS default');
}
var text = PVE.Utils.kvm_vga_drivers[value];
if (text) {
@@ -324,11 +325,11 @@ Ext.define('PVE.Utils', { statics: {
try {
response.result = Ext.decode(response.responseText);
} catch(e) {}
- var msg = gettext('Connection error') + ' - server offline?';
+ var msg = gettext('Connection error') + ' - ' + gettext('server offline?)';
if (response.aborted) {
- msg = gettext('Connection error') + ' - aborted.';
+ msg = gettext('Connection error') + ' - ' + gettext('aborted.');
} else if (response.timedout) {
- msg = gettext('Connection error') + ' - Timeout.';
+ msg = gettext('Connection error') + ' - ' + gettext('Timeout.');
} else if (response.status && response.statusText) {
msg = gettext('Connection error') + ' ' + response.status + ': ' + response.statusText;
}
@@ -370,28 +371,28 @@ Ext.define('PVE.Utils', { statics: {
},
task_desc_table: {
- vncproxy: 'VNC connection to VM/CT {0}',
- vncshell: 'VNC shell',
- qmcreate: 'Create VM {0}',
- qmrestore: 'Restore VM {0}',
- qmdestroy: 'Destroy VM {0}',
- qmigrate: 'Migrate VM {0}',
- qmstart: 'Start VM {0}',
- qmstop: 'Stop VM {0}',
- qmreset: 'Reset VM {0}',
- qmshutdown: 'Shutdown VM {0}',
- qmsuspend: 'Suspend VM {0}',
- qmresume: 'Resume VM {0}',
- vzcreate: 'Create CT {0}',
- vzrestore: 'Restore CT {0}',
- vzdestroy: 'Destroy CT {0}',
- vzstart: 'Start CT {0}',
- vzstop: 'Stop CT {0}',
- srvstart: 'Start service {0}',
- srvstop: 'Stop service {0}',
- srvrestart: 'Restart service {0}',
- srvreload: 'Reload service {0}',
- vzdump: 'Backup'
+ vncproxy: gettext('VNC connection to VM/CT {0}'),
+ vncshell: gettext('VNC shell'),
+ qmcreate: gettext('Create VM {0}'),
+ qmrestore: gettext('Restore VM {0}'),
+ qmdestroy: gettext('Destroy VM {0}'),
+ qmigrate: gettext('Migrate VM {0}'),
+ qmstart: gettext('Start VM {0}'),
+ qmstop: gettext('Stop VM {0}'),
+ qmreset: gettext('Reset VM {0}'),
+ qmshutdown: gettext('Shutdown VM {0}'),
+ qmsuspend: gettext('Suspend VM {0}'),
+ qmresume: gettext('Resume VM {0}'),
+ vzcreate: gettext('Create CT {0}'),
+ vzrestore: gettext('Restore CT {0}'),
+ vzdestroy: gettext('Destroy CT {0}'),
+ vzstart: gettext('Start CT {0}'),
+ vzstop: gettext('Stop CT {0}'),
+ srvstart: gettext('Start service {0}'),
+ srvstop: gettext('Stop service {0}'),
+ srvrestart: gettext('Restart service {0}'),
+ srvreload: gettext('Reload service {0}'),
+ vzdump: gettext('Backup')
},
format_task_description: function(type, id) {
@@ -407,7 +408,7 @@ Ext.define('PVE.Utils', { statics: {
var res = upid.match(/^UPID:(\S+):([0-9A-Fa-f]{8}):([0-9A-Fa-f]{8}):([0-9A-Fa-f]{8}):([^:\s]+):([^:\s]*):([^:\s]+):$/);
if (!res) {
- throw "unable to parse upid '" + upid + "'";
+ throw Ext.String.format(gettext("unable to parse upid '{0}'"), upid);
}
task.node = res[1];
task.pid = parseInt(res[2], 16);
@@ -529,15 +530,15 @@ Ext.define('PVE.Utils', { statics: {
format_storage_type: function(value) {
if (value === 'dir') {
- return 'Directory';
+ return gettext('Directory');
} else if (value === 'nfs') {
- return 'NFS';
+ return gettext('NFS');
} else if (value === 'lvm') {
- return 'LVM';
+ return gettext('LVM');
} else if (value === 'iscsi') {
- return 'iSCSI';
+ return gettext('iSCSI');
} else {
- return 'unknown';
+ return gettext('unknown');
}
},
@@ -565,15 +566,15 @@ Ext.define('PVE.Utils', { statics: {
Ext.each(value.split(',').sort(), function(ct) {
if (ct === 'images') {
- cta.push('Images');
+ cta.push(gettext('Images'));
} else if (ct === 'backup') {
- cta.push('Backups');
+ cta.push(gettext('Backups'));
} else if (ct === 'vztmpl') {
- cta.push('Templates');
+ cta.push(gettext('Templates');
} else if (ct === 'iso') {
- cta.push('ISO');
+ cta.push(gettext('ISO'));
} else if (ct === 'rootdir') {
- cta.push('Containers');
+ cta.push(gettext('Containers'));
}
});
@@ -610,7 +611,7 @@ Ext.define('PVE.Utils', { statics: {
var per = value * 100;
- return per.toFixed(1) + '% of ' + maxcpu.toString() + (maxcpu > 1 ? 'CPUs' : 'CPU');
+ return Ext.String.format('{0}% of {1} {2}', per.toFixed(1), maxcpu.toString(), (maxcpu > 1 ? 'CPUs' : 'CPU');
},
render_size: function(value, metaData, record, rowIndex, colIndex, store) {
diff --git a/www/manager/VNCConsole.js b/www/manager/VNCConsole.js
index 08d0fa2..bdfb36f 100644
--- a/www/manager/VNCConsole.js
+++ b/www/manager/VNCConsole.js
@@ -202,11 +202,11 @@ Ext.define('PVE.KVMConsole', {
var me = this;
if (!me.nodename) {
- throw "no node name specified";
+ throw gettext("no node name specified");
}
if (!me.vmid) {
- throw "no VM ID specified";
+ throw gettext("no VM ID specified");
}
var vm_command = function(cmd, params, reload_applet) {
@@ -216,7 +216,7 @@ Ext.define('PVE.KVMConsole', {
method: 'POST',
waitMsgTarget: me,
failure: function(response, opts) {
- Ext.Msg.alert('Error', response.htmlStatus);
+ Ext.Msg.alert(gettext('Error'), response.htmlStatus);
},
success: function() {
if (reload_applet) {
@@ -349,11 +349,11 @@ Ext.define('PVE.OpenVZConsole', {
var me = this;
if (!me.nodename) {
- throw "no node name specified";
+ throw gettext("no node name specified");
}
if (!me.vmid) {
- throw "no VM ID specified";
+ throw gettext("no VM ID specified");
}
var vm_command = function(cmd, params, reload_applet) {
@@ -363,7 +363,7 @@ Ext.define('PVE.OpenVZConsole', {
waitMsgTarget: me,
method: 'POST',
failure: function(response, opts) {
- Ext.Msg.alert('Error', response.htmlStatus);
+ Ext.Msg.alert(gettext('Error'), response.htmlStatus);
},
success: function() {
if (reload_applet) {
@@ -450,7 +450,7 @@ Ext.define('PVE.Shell', {
var me = this;
if (!me.nodename) {
- throw "no node name specified";
+ throw gettext("no node name specified");
}
var tbar = [
diff --git a/www/manager/Workspace.js b/www/manager/Workspace.js
index 2c3e10b..906ca0c 100644
--- a/www/manager/Workspace.js
+++ b/www/manager/Workspace.js
@@ -14,7 +14,7 @@ Ext.define('PVE.Workspace', {
'PVE.window.LoginWindow'
],
- title: 'Proxmox Virtual Environment',
+ title: getext('Proxmox Virtual Environment'),
loginData: null, // Data from last login call
@@ -108,7 +108,7 @@ Ext.define('PVE.ConsoleWorkspace', {
alias: ['widget.pveConsoleWorkspace'],
- title: 'Proxmox Console',
+ title: getext('Proxmox Console'),
initComponent : function() {
var me = this;
@@ -144,7 +144,7 @@ Ext.define('PVE.ConsoleWorkspace', {
content = {
border: false,
bodyPadding: 10,
- html: 'Error: No such console type'
+ html: getext('Error: No such console type')
};
}
diff --git a/www/manager/data/DiffStore.js b/www/manager/data/DiffStore.js
index 2356995..bf2484a 100644
--- a/www/manager/data/DiffStore.js
+++ b/www/manager/data/DiffStore.js
@@ -11,11 +11,11 @@ Ext.define('PVE.data.DiffStore', {
config = config || {};
if (!config.rstore) {
- throw "no rstore specified";
+ throw gettext("no rstore specified");
}
if (!config.rstore.model) {
- throw "no rstore model specified";
+ throw gettext("no rstore model specified");
}
var rstore = config.rstore;
diff --git a/www/manager/data/ResourceStore.js b/www/manager/data/ResourceStore.js
index 82ac35d..8d2263b 100644
--- a/www/manager/data/ResourceStore.js
+++ b/www/manager/data/ResourceStore.js
@@ -38,7 +38,7 @@ Ext.define('PVE.data.ResourceStore', {
width: 80
},
id: {
- header: 'ID',
+ header: gettext('ID'),
type: 'text',
hidden: true,
sortable: true,
@@ -86,7 +86,7 @@ Ext.define('PVE.data.ResourceStore', {
}
},
vmid: {
- header: 'VMID',
+ header: gettext('VMID'),
type: 'integer',
hidden: true,
sortable: true,
@@ -136,7 +136,7 @@ Ext.define('PVE.data.ResourceStore', {
width: 100
},
maxcpu: {
- header: 'maxcpu',
+ header: gettext('maxcpu'),
type: 'integer',
hidden: true,
sortable: true,
diff --git a/www/manager/data/TimezoneStore.js b/www/manager/data/TimezoneStore.js
index f00cc2f..f2c906f 100644
--- a/www/manager/data/TimezoneStore.js
+++ b/www/manager/data/TimezoneStore.js
@@ -418,7 +418,7 @@ Ext.define('PVE.data.TimezoneStore', {
config = config || {};
- Ext.regModel('Timezone', {
+ Ext.regModel(gettext('Timezone'), {
fields: ['zone'],
proxy: {
type: 'memory',
diff --git a/www/manager/data/UpdateQueue.js b/www/manager/data/UpdateQueue.js
index 3cf2aa8..ac2945c 100644
--- a/www/manager/data/UpdateQueue.js
+++ b/www/manager/data/UpdateQueue.js
@@ -34,7 +34,7 @@ Ext.define('PVE.data.UpdateQueue', {
Ext.apply(me, {
queue: function(store) {
if (!store.storeid) {
- throw "unable to queue store without storeid";
+ throw gettext("unable to queue store without storeid");
}
if (!queue_idx[store.storeid]) {
queue_idx[store.storeid] = store;
diff --git a/www/manager/data/UpdateStore.js b/www/manager/data/UpdateStore.js
index 0079e43..470e3cd 100644
--- a/www/manager/data/UpdateStore.js
+++ b/www/manager/data/UpdateStore.js
@@ -16,7 +16,7 @@ Ext.define('PVE.data.UpdateStore', {
}
if (!config.storeid) {
- throw "no storeid specified";
+ throw gettext("no storeid specified");
}
var load_task = new Ext.util.DelayedTask();
diff --git a/www/manager/data/reader/JsonObject.js b/www/manager/data/reader/JsonObject.js
index d819c4b..3b45145 100644
--- a/www/manager/data/reader/JsonObject.js
+++ b/www/manager/data/reader/JsonObject.js
@@ -58,7 +58,7 @@ Ext.define('PVE.data.reader.JsonObject', {
response: response,
json: response.responseText,
parseError: ex,
- msg: 'Unable to parse the JSON returned by the server: ' + ex.toString()
+ msg: Ext.String.format(gettext('Unable to parse the JSON returned by the server: {0}', ex.toString())
});
}
diff --git a/www/manager/dc/ACLView.js b/www/manager/dc/ACLView.js
index b9514a8..2024057 100644
--- a/www/manager/dc/ACLView.js
+++ b/www/manager/dc/ACLView.js
@@ -34,26 +34,26 @@ Ext.define('PVE.dc.ACLView', {
},
columns: [
{
- header: 'Path',
+ header: gettext('Path'),
width: 200,
sortable: true,
dataIndex: 'path'
},
{
- header: 'User/Group',
+ header: gettext('User/Group'),
width: 200,
sortable: true,
renderer: render_ugid,
dataIndex: 'ugid'
},
{
- header: 'Role',
+ header: gettext('Role'),
width: 150,
sortable: true,
dataIndex: 'roleid'
},
{
- header: 'Propagate',
+ header: gettext('Propagate'),
width: 80,
sortable: true,
dataIndex: 'propagate'
diff --git a/www/manager/dc/AuthEdit.js b/www/manager/dc/AuthEdit.js
index b66c976..b0a723a 100644
--- a/www/manager/dc/AuthEdit.js
+++ b/www/manager/dc/AuthEdit.js
@@ -23,7 +23,7 @@ Ext.define('PVE.dc.AuthEdit', {
{
xtype: me.create ? 'textfield' : 'displayfield',
name: 'realm',
- fieldLabel: 'Realm',
+ fieldLabel: gettext('Realm'),
value: me.realm,
emptyText: 'company.net',
allowBlank: false
@@ -31,7 +31,7 @@ Ext.define('PVE.dc.AuthEdit', {
{
xtype: 'textfield',
name: 'base_dn',
- fieldLabel: 'Base Domain Name',
+ fieldLabel: gettext('Base Domain Name'),
emptyText: 'CN=Users,DC=Company,DC=net',
allowBlank: false
},
@@ -39,19 +39,19 @@ Ext.define('PVE.dc.AuthEdit', {
xtype: 'textfield',
name: 'user_attr',
emptyText: 'uid / sAMAccountName',
- fieldLabel: 'User Attribute Name',
+ fieldLabel: gettext('User Attribute Name'),
allowBlank: false
},
{
xtype: 'textfield',
name: 'comment',
- fieldLabel: 'Comment',
- emptyText: 'Enterprise Directory Server',
+ fieldLabel: gettext('Comment'),
+ emptyText: gettext('Enterprise Directory Server'),
allowBlank: false
},
{
xtype: 'pvecheckbox',
- fieldLabel: 'Default Realm',
+ fieldLabel: gettext('Default Realm'),
name: 'default',
uncheckedValue: 0
}
@@ -59,18 +59,18 @@ Ext.define('PVE.dc.AuthEdit', {
var column2 = [
Ext.create('PVE.form.KVComboBox', {
- fieldLabel: 'Server Type',
+ fieldLabel: gettext('Server Type'),
name: 'type',
data: [
- ['ad', 'Active Directory Server'],
- ['ldap', 'LDAP/LDAPs Server']
+ ['ad', gettext('Active Directory Server')],
+ ['ldap', gettext('LDAP/LDAPs Server')]
]
}),
{
xtype: 'textfield',
- fieldLabel: 'Server Address',
+ fieldLabel: gettext('Server Address'),
name: 'servers',
- emptyText: '192.168.2.23,ldap.company.net',
+ emptyText: gettext('192.168.2.23,ldap.company.net'),
listeners: {
change: function(combo, newValue){
serverlist = newValue.split(',');
@@ -82,14 +82,14 @@ Ext.define('PVE.dc.AuthEdit', {
{
xtype: 'numberfield',
name: 'port',
- fieldLabel: 'Server Port',
+ fieldLabel: gettext('Server Port'),
minValue: 1,
maxValue: 65535,
allowBlank: false
},
{
xtype: 'pvecheckbox',
- fieldLabel: 'SSL',
+ fieldLabel: gettext('SSL'),
name: 'secure',
uncheckedValue: 0
}
@@ -109,7 +109,7 @@ Ext.define('PVE.dc.AuthEdit', {
});
Ext.applyIf(me, {
- title: me.create ? "Create Auth" : "Edit Auth '" + me.realm + "'",
+ title: me.create ? gettext("Create Auth") : Ext.String.format(gettext("Edit Auth {0}", "'" + me.realm + "'"),
url: url,
method: method,
items: [ ipanel ]
diff --git a/www/manager/dc/AuthView.js b/www/manager/dc/AuthView.js
index 7452c2b..52c75aa 100644
--- a/www/manager/dc/AuthView.js
+++ b/www/manager/dc/AuthView.js
@@ -20,7 +20,7 @@ Ext.define('PVE.dc.AuthView', {
var tbar = [
{
- text: 'Create',
+ text: gettext('Create'),
handler: function() {
var win = Ext.create('PVE.dc.AuthEdit',{
});
@@ -29,7 +29,7 @@ Ext.define('PVE.dc.AuthView', {
}
},
{
- text: 'Modify',
+ text: gettext('Modify'),
handler: function() {
var sm = me.getSelectionModel();
var rec = sm.getSelection()[0];
@@ -47,7 +47,7 @@ Ext.define('PVE.dc.AuthView', {
}
},
{
- text: 'Delete',
+ text: gettext('Delete'),
handler: function() {
var msg;
var sm = me.getSelectionModel();
@@ -59,8 +59,8 @@ Ext.define('PVE.dc.AuthView', {
var realm = rec.data.realm;
if (realm !== 'pam' && realm != 'pve') {
- msg = 'Are you sure you want to permanently the authentication realm: ' + realm;
- Ext.Msg.confirm('Deletion Confirmation', msg, function(btn) {
+ msg = Ext.String.format(gettext('Are you sure you want to permanently the authentication realm: {0}'), realm);
+ Ext.Msg.confirm(gettext('Deletion Confirmation'), msg, function(btn) {
if (btn !== 'yes') {
return;
}
@@ -78,8 +78,8 @@ Ext.define('PVE.dc.AuthView', {
});
});
} else {
- msg = 'You are not permitted to delete the auth method: pam';
- Ext.Msg.alert('Error', msg);
+ msg = gettext('You are not permitted to delete the auth method: pam');
+ Ext.Msg.alert(gettext('Error'), msg);
}
}
}
@@ -94,20 +94,20 @@ Ext.define('PVE.dc.AuthView', {
},
columns: [
{
- header: 'Realm',
+ header: gettext('Realm'),
width: 100,
sortable: true,
dataIndex: 'realm'
},
{
- header: 'Type',
+ header: gettext('Type'),
width: 100,
sortable: true,
dataIndex: 'type'
},
{
id: 'comment',
- header: 'Comment',
+ header: gettext('Comment'),
sortable: false,
dataIndex: 'comment',
flex: 1
diff --git a/www/manager/dc/Backup.js b/www/manager/dc/Backup.js
index d6a4c36..6c1f93b 100644
--- a/www/manager/dc/Backup.js
+++ b/www/manager/dc/Backup.js
@@ -26,11 +26,11 @@ Ext.define('PVE.dc.BackupEdit', {
var selModeField = Ext.create('PVE.form.KVComboBox', {
xtype: 'pveKVComboBox',
data: [
- ['include', 'Include selected VMs'],
- ['all', 'All VMs'],
- ['exclude', 'Exclude selected VMs']
+ ['include', gettext('Include selected VMs')],
+ ['all', gettext('All VMs')],
+ ['exclude', gettext('Exclude selected VMs')]
],
- fieldLabel: 'Selection mode',
+ fieldLabel: gettext('Selection mode'),
name: 'selMode',
value: ''
});
@@ -54,7 +54,7 @@ Ext.define('PVE.dc.BackupEdit', {
});
var storagesel = Ext.create('PVE.form.StorageSelector', {
- fieldLabel: 'Storage',
+ fieldLabel: gettext('Storage'),
nodename: 'localhost',
storageContent: 'backup',
allowBlank: false,
@@ -77,32 +77,32 @@ Ext.define('PVE.dc.BackupEdit', {
disabled: true,
columns: [
{
- header: 'VMID',
+ header: gettext('VMID'),
dataIndex: 'vmid',
width: 60
},
{
- header: 'Node',
+ header: gettext('Node'),
dataIndex: 'node'
},
{
- header: 'Status',
+ header: gettext('Status'),
dataIndex: 'uptime',
renderer: function(value) {
if (value) {
- return 'running';
+ return gettext('running');
} else {
- return 'stopped';
+ return gettext('stopped');
}
}
},
{
- header: 'Name',
+ header: gettext('Name'),
dataIndex: 'name',
flex: 1
},
{
- header: 'VM Type',
+ header: gettext('VM Type'),
dataIndex: 'type'
}
]
@@ -110,11 +110,11 @@ Ext.define('PVE.dc.BackupEdit', {
var nodesel = Ext.create('PVE.form.NodeSelector', {
name: 'node',
- fieldLabel: 'Node',
+ fieldLabel: gettext('Node'),
allowBlank: true,
editable: true,
autoSelect: false,
- emptyText: '-- any --',
+ emptyText: gettext('-- any --'),
listeners: {
change: function(f, value) {
storagesel.setNodename(value || 'localhost');
@@ -136,14 +136,14 @@ Ext.define('PVE.dc.BackupEdit', {
{
xtype: 'pveDayOfWeekSelector',
name: 'dow',
- fieldLabel: 'Day of week',
+ fieldLabel: gettext('Day of week'),
multiSelect: true,
value: ['sat'],
allowBlank: false
},
{
xtype: 'timefield',
- fieldLabel: 'Start time',
+ fieldLabel: gettext('Start time'),
name: 'starttime',
format: 'H:i',
value: '00:00',
@@ -155,19 +155,19 @@ Ext.define('PVE.dc.BackupEdit', {
var column2 = [
{
xtype: 'textfield',
- fieldLabel: 'Send email to',
+ fieldLabel: gettext('Send email to'),
name: 'mailto'
},
{
xtype: 'pvecheckbox',
- fieldLabel: 'Compression',
+ fieldLabel: gettext('Compression'),
name: 'compress',
checked: true,
uncheckedValue: 0
},
{
xtype: 'numberfield',
- fieldLabel: 'Max files',
+ fieldLabel: gettext('Max files'),
name: 'maxfiles',
minValue: 1,
maxValue: 365,
@@ -176,7 +176,7 @@ Ext.define('PVE.dc.BackupEdit', {
},
{
xtype: 'pveBackupModeSelector',
- fieldLabel: 'Mode',
+ fieldLabel: gettext('Mode'),
value: 'snapshot',
name: 'mode'
},
@@ -270,7 +270,7 @@ Ext.define('PVE.dc.BackupEdit', {
};
Ext.applyIf(me, {
- title: me.create ? "Create Backup Job" : "Edit Backup Job",
+ title: me.create ? gettext("Create Backup Job") : gettext("Edit Backup Job"),
url: url,
method: method,
items: [ ipanel, vmgrid ]
@@ -344,13 +344,13 @@ Ext.define('PVE.dc.BackupView', {
};
var edit_btn = new Ext.Button({
- text: 'Edit',
+ text: gettext('Edit'),
disabled: true,
handler: run_editor
});
var remove_btn = new Ext.Button({
- text: 'Remove',
+ text: gettext('Remove'),
disabled: true,
handler: function(){
var sm = me.getSelectionModel();
@@ -360,9 +360,9 @@ Ext.define('PVE.dc.BackupView', {
return;
}
- var msg = "Are you sure you want to delete this backup job?";
+ var msg = gettext("Are you sure you want to delete this backup job?");
- Ext.Msg.confirm('Deletion Confirmation', msg, function(btn) {
+ Ext.Msg.confirm(gettext('Deletion Confirmation'), msg, function(btn) {
if (btn !== 'yes') {
return;
}
@@ -374,7 +374,7 @@ Ext.define('PVE.dc.BackupView', {
reload();
},
failure: function (response, opts) {
- Ext.Msg.alert('Error', response.htmlStatus);
+ Ext.Msg.alert(gettext('Error'), response.htmlStatus);
}
});
});
@@ -403,7 +403,7 @@ Ext.define('PVE.dc.BackupView', {
},
tbar: [
{
- text: 'Add',
+ text: gettext('Add'),
handler: function() {
var win = Ext.create('PVE.dc.BackupEdit',{});
win.on('destroy', reload);
@@ -415,7 +415,7 @@ Ext.define('PVE.dc.BackupView', {
],
columns: [
{
- header: 'Node',
+ header: gettext('Node'),
width: 100,
sortable: true,
dataIndex: 'node',
@@ -423,44 +423,44 @@ Ext.define('PVE.dc.BackupView', {
if (value) {
return value;
}
- return '-- all --';
+ return gettext('-- all --');
}
},
{
- header: 'Day of week',
+ header: gettext('Day of week'),
width: 200,
sortable: false,
dataIndex: 'dow'
},
{
- header: 'Start time',
+ header: gettext('Start time'),
width: 60,
sortable: true,
dataIndex: 'starttime'
},
{
- header: 'Storage ID',
+ header: gettext('Storage ID'),
width: 100,
sortable: true,
dataIndex: 'storage'
},
{
- header: 'Selection',
+ header: gettext('Selection'),
flex: 1,
sortable: false,
dataIndex: 'vmid',
renderer: function(value, metaData, record) {
if (record.data.all) {
if (record.data.exclude) {
- return "all except " + record.data.exclude;
+ return Ext.String.format(gettext("all except {0}", record.data.exclude);
}
- return "-- all --";
+ return gettext("-- all --");
}
if (record.data.vmid) {
return record.data.vmid;
}
- return "nothing selected";
+ return gettext("nothing selected");
}
}
],
diff --git a/www/manager/dc/GroupEdit.js b/www/manager/dc/GroupEdit.js
index aa0cadd..1b85bb9 100644
--- a/www/manager/dc/GroupEdit.js
+++ b/www/manager/dc/GroupEdit.js
@@ -19,20 +19,20 @@ Ext.define('PVE.dc.GroupEdit', {
}
Ext.applyIf(me, {
- title: me.create ? "Create Group" : "Edit Group '" + me.groupid + "'",
+ title: me.create ? gettext("Create Group") : Ext.String.format(gettext("Edit Group {0}"), "'" + me.groupid + "'"),
url: url,
method: method,
items: [
{
xtype: 'pvetextfield',
- fieldLabel: 'GroupID',
+ fieldLabel: gettext('GroupID'),
name: 'groupid',
value: me.groupid,
allowBlank: false
},
{
xtype: 'pvetextfield',
- fieldLabel: 'Comment',
+ fieldLabel: gettext('Comment'),
name: 'comment',
value: me.groupid,
allowBlank: false
diff --git a/www/manager/dc/GroupView.js b/www/manager/dc/GroupView.js
index b60f193..26e6e3b 100644
--- a/www/manager/dc/GroupView.js
+++ b/www/manager/dc/GroupView.js
@@ -23,7 +23,7 @@ Ext.define('PVE.dc.GroupView', {
};
var remove_btn = new Ext.Button({
- text: 'Delete',
+ text: gettext('Delete'),
disabled: true,
handler: function() {
var sm = me.getSelectionModel();
@@ -33,8 +33,8 @@ Ext.define('PVE.dc.GroupView', {
}
var groupid = rec.data.groupid;
- var msg = 'Are you sure you want to permanently delete the group: ' + groupid;
- Ext.Msg.confirm('Deletion Confirmation', msg, function(btn) {
+ var msg = Ext.String.format(gettext('Are you sure you want to permanently delete the group: {0}'), groupid);
+ Ext.Msg.confirm(gettext('Deletion Confirmation'), msg, function(btn) {
if (btn !== 'yes') {
return;
}
@@ -55,7 +55,7 @@ Ext.define('PVE.dc.GroupView', {
var tbar = [
{
- text: 'Create',
+ text: gettext('Create'),
handler: function() {
var win = Ext.create('PVE.dc.GroupEdit', {
});
@@ -81,13 +81,13 @@ Ext.define('PVE.dc.GroupView', {
},
columns: [
{
- header: 'Group name',
+ header: gettext('Group name'),
width: 200,
sortable: true,
dataIndex: 'groupid'
},
{
- header: 'Comment',
+ header: gettext('Comment'),
sortable: false,
dataIndex: 'comment',
flex: 1
diff --git a/www/manager/dc/Log.js b/www/manager/dc/Log.js
index f3db5d4..0dfd70e 100644
--- a/www/manager/dc/Log.js
+++ b/www/manager/dc/Log.js
@@ -57,7 +57,7 @@ Ext.define('PVE.dc.Log', {
width: 100
},
{
- header: "PID",
+ header: gettext("PID"),
dataIndex: 'pid',
width: 100
},
diff --git a/www/manager/dc/OptionView.js b/www/manager/dc/OptionView.js
index 5eba194..2de23e9 100644
--- a/www/manager/dc/OptionView.js
+++ b/www/manager/dc/OptionView.js
@@ -13,7 +13,7 @@ Ext.define('PVE.dc.HttpProxyEdit', {
emptyText: gettext('Do not use any proxy'),
deleteEmpty: true,
value: '',
- fieldLabel: 'HTTP proxy'
+ fieldLabel: gettext('HTTP proxy')
}
});
@@ -94,7 +94,7 @@ Ext.define('PVE.dc.OptionView', {
required: true
},
http_proxy: {
- header: 'HTTP proxy',
+ header: gettext('HTTP proxy'),
editor: 'PVE.dc.HttpProxyEdit',
required: true,
renderer: function(value) {
diff --git a/www/manager/dc/RoleView.js b/www/manager/dc/RoleView.js
index 31a1d7d..f583111 100644
--- a/www/manager/dc/RoleView.js
+++ b/www/manager/dc/RoleView.js
@@ -39,14 +39,14 @@ Ext.define('PVE.dc.RoleView', {
},
columns: [
{
- header: 'Role name',
+ header: gettext('Role name'),
width: 150,
sortable: true,
dataIndex: 'roleid'
},
{
id: 'privs',
- header: 'Privileges',
+ header: gettext('Privileges'),
sortable: false,
renderer: render_privs,
dataIndex: 'privs',
diff --git a/www/manager/dc/StorageView.js b/www/manager/dc/StorageView.js
index 2653c7f..9811179 100644
--- a/www/manager/dc/StorageView.js
+++ b/www/manager/dc/StorageView.js
@@ -115,7 +115,7 @@ Ext.define('PVE.dc.StorageView', {
menu: new Ext.menu.Menu({
items: [
{
- text: 'Directory',
+ text: gettext('Directory'),
iconCls: 'pve-itype-icon-itype',
handler: function() {
var win = Ext.create('PVE.storage.DirEdit', {});
@@ -125,7 +125,7 @@ Ext.define('PVE.dc.StorageView', {
},
{
- text: 'LVM group',
+ text: gettext('LVM group'),
handler: function() {
var win = Ext.create('PVE.storage.LVMEdit', {});
win.on('destroy', reload);
@@ -133,7 +133,7 @@ Ext.define('PVE.dc.StorageView', {
}
},
{
- text: 'NFS share',
+ text: gettext('NFS share'),
iconCls: 'pve-itype-icon-node',
handler: function() {
var win = Ext.create('PVE.storage.NFSEdit', {});
@@ -142,7 +142,7 @@ Ext.define('PVE.dc.StorageView', {
}
},
{
- text: 'iSCSI target',
+ text: gettext('iSCSI target'),
iconCls: 'pve-itype-icon-node',
handler: function() {
var win = Ext.create('PVE.storage.IScsiEdit', {});
@@ -158,7 +158,7 @@ Ext.define('PVE.dc.StorageView', {
],
columns: [
{
- header: 'ID',
+ header: gettext('ID'),
width: 100,
sortable: true,
dataIndex: 'storage'
@@ -178,7 +178,7 @@ Ext.define('PVE.dc.StorageView', {
renderer: PVE.Utils.format_content_types
},
{
- header: 'Path/Target',
+ header: gettext('Path/Target'),
flex: 1,
sortable: true,
dataIndex: 'path',
diff --git a/www/manager/dc/UserEdit.js b/www/manager/dc/UserEdit.js
index 3a807ce..2e30e84 100644
--- a/www/manager/dc/UserEdit.js
+++ b/www/manager/dc/UserEdit.js
@@ -23,13 +23,13 @@ Ext.define('PVE.dc.UserEdit', {
{
xtype: me.create ? 'textfield' : 'displayfield',
name: 'userid',
- fieldLabel: 'Userid',
+ fieldLabel: gettext('Userid'),
value: me.userid,
allowBlank: false,
submitValue: me.create ? true : false
},
new Ext.form.field.ComboBox({
- fieldLabel: 'Group',
+ fieldLabel: gettext('Group'),
name: 'groups',
multiSelect: true,
hiddenName: 'groupid',
@@ -50,7 +50,7 @@ Ext.define('PVE.dc.UserEdit', {
typeAhead: true,
queryMode: 'local',
triggerAction: 'all',
- emptyText: 'No Groups Selected',
+ emptyText: gettext('No Groups Selected'),
selectOnFocus: true
}),
{
@@ -63,7 +63,7 @@ Ext.define('PVE.dc.UserEdit', {
},
{
xtype: 'pvecheckbox',
- fieldLabel: 'Enable',
+ fieldLabel: gettext('Enable'),
name: 'enable',
uncheckedValue: 0,
defaultValue: 1
@@ -74,23 +74,23 @@ Ext.define('PVE.dc.UserEdit', {
{
xtype: 'textfield',
name: 'firstname',
- fieldLabel: 'First Name'
+ fieldLabel: gettext('First Name')
},
{
xtype: 'textfield',
name: 'lastname',
- fieldLabel: 'Last Name'
+ fieldLabel: gettext('Last Name')
},
{
xtype: 'textfield',
name: 'email',
- fieldLabel: 'Email',
+ fieldLabel: gettext('Email'),
vtype: 'email'
},
{
xtype: 'textfield',
name: 'comment',
- fieldLabel: 'Comment'
+ fieldLabel: gettext('Comment')
}
];
@@ -98,7 +98,7 @@ Ext.define('PVE.dc.UserEdit', {
column1.splice(1,0,{
xtype: 'pveRealmComboBox',
name: 'realm',
- fieldLabel: 'Realm',
+ fieldLabel: gettext('Realm'),
allowBlank: false,
listeners: {
change: function(combo, newValue){
@@ -128,7 +128,7 @@ Ext.define('PVE.dc.UserEdit', {
});
Ext.applyIf(me, {
- title: me.create ? "Create User" : "Edit User '" + me.userid + "'",
+ title: me.create ? gettext("Create User") : Ext.String.format(gettext("Edit User '{0}'", me.userid),
url: url,
method: method,
items: [ ipanel ]
diff --git a/www/manager/dc/UserView.js b/www/manager/dc/UserView.js
index 5fe484a..1ca278e 100644
--- a/www/manager/dc/UserView.js
+++ b/www/manager/dc/UserView.js
@@ -24,7 +24,7 @@ Ext.define('PVE.dc.UserView', {
};
var remove_btn = new Ext.Button({
- text: 'Delete',
+ text: gettext('Delete'),
disabled: true,
handler: function() {
var msg;
@@ -36,8 +36,8 @@ Ext.define('PVE.dc.UserView', {
var userid = rec.data.userid;
- msg = 'Are you sure you want to permanently delete the user: ' + userid;
- Ext.Msg.confirm('Deletion Confirmation', msg, function(btn) {
+ msg = Ext.String.format(gettext('Are you sure you want to permanently delete the user: {0}?'), userid);
+ Ext.Msg.confirm(gettext('Deletion Confirmation'), msg, function(btn) {
if (btn !== 'yes') {
return;
}
@@ -50,7 +50,7 @@ Ext.define('PVE.dc.UserView', {
reload();
},
failure: function (response, opts) {
- Ext.Msg.alert('Error',response.htmlStatus);
+ Ext.Msg.alert(gettext('Error'), response.htmlStatus);
}
});
});
@@ -72,7 +72,7 @@ Ext.define('PVE.dc.UserView', {
};
var edit_btn = new Ext.Button({
- text: 'Modify',
+ text: gettext('Modify'),
disabled: true,
handler: run_editor
});
@@ -94,7 +94,7 @@ Ext.define('PVE.dc.UserView', {
var tbar = [
{
- text: 'Create',
+ text: gettext('Create'),
handler: function() {
var win = Ext.create('PVE.dc.UserEdit',{
});
@@ -138,34 +138,34 @@ Ext.define('PVE.dc.UserView', {
columns: [
{
- header: 'User name',
+ header: gettext('User name'),
width: 200,
sortable: true,
renderer: render_username,
dataIndex: 'userid'
},
{
- header: 'Realm',
+ header: gettext('Realm'),
width: 100,
sortable: true,
renderer: render_realm,
dataIndex: 'userid'
},
{
- header: 'Enabled',
+ header: gettext('Enabled'),
width: 80,
sortable: true,
dataIndex: 'enable'
},
{
- header: 'Expire',
+ header: gettext('Expire'),
width: 80,
sortable: true,
renderer: render_expire,
dataIndex: 'expire'
},
{
- header: 'Name',
+ header: gettext('Name'),
width: 150,
sortable: true,
renderer: render_full_name,
@@ -173,7 +173,7 @@ Ext.define('PVE.dc.UserView', {
},
{
id: 'comment',
- header: 'Comment',
+ header: gettext('Comment'),
sortable: false,
dataIndex: 'comment',
flex: 1
diff --git a/www/manager/form/BackupModeSelector.js b/www/manager/form/BackupModeSelector.js
index 8e42bd7..715d9eb 100644
--- a/www/manager/form/BackupModeSelector.js
+++ b/www/manager/form/BackupModeSelector.js
@@ -6,9 +6,9 @@ Ext.define('PVE.form.BackupModeSelector', {
var me = this;
me.data = [
- ['snapshot', 'Snapshot'],
- ['suspend', 'Suspend'],
- ['stop', 'Stop']
+ ['snapshot', gettext('Snapshot')],
+ ['suspend', gettext('Suspend')],
+ ['stop', gettext('Stop')]
];
me.callParent();
diff --git a/www/manager/form/BondModeSelector.js b/www/manager/form/BondModeSelector.js
index 75a5be8..a83c7ed 100644
--- a/www/manager/form/BondModeSelector.js
+++ b/www/manager/form/BondModeSelector.js
@@ -6,13 +6,13 @@ Ext.define('PVE.form.BondModeSelector', {
var me = this;
me.data = [
- ['balance-rr', 'balance-rr'],
- ['active-backup', 'active-backup'],
- ['balance-xor', 'balance-xor'],
- ['broadcast', 'broadcast'],
- ['802.3ad', '802.3ad'],
- ['balance-tlb', 'balance-tlb'],
- ['balance-alb', 'balance-alb']
+ ['balance-rr', gettext('balance-rr')],
+ ['active-backup', gettext('active-backup')],
+ ['balance-xor', gettext('balance-xor')],
+ ['broadcast', gettext('broadcast')],
+ ['802.3ad', gettext('802.3ad')],
+ ['balance-tlb', gettext('balance-tlb')],
+ ['balance-alb', gettext('balance-alb')]
];
me.callParent();
diff --git a/www/manager/form/Boolean.js b/www/manager/form/Boolean.js
index de55553..1bcba95 100644
--- a/www/manager/form/Boolean.js
+++ b/www/manager/form/Boolean.js
@@ -7,9 +7,9 @@ Ext.define('PVE.form.Boolean', {
var me = this;
me.data = [
- ['', 'Default'],
- [1, 'Yes'],
- [0, 'No']
+ ['', gettext('Default')],
+ [1, gettext('Yes')],
+ [0, gettext('No')]
];
me.callParent();
diff --git a/www/manager/form/BridgeSelector.js b/www/manager/form/BridgeSelector.js
index 029c32d..0470459 100644
--- a/www/manager/form/BridgeSelector.js
+++ b/www/manager/form/BridgeSelector.js
@@ -41,13 +41,13 @@ Ext.define('PVE.form.BridgeSelector', {
listConfig: {
columns: [
{
- header: 'Bridge',
+ header: gettext('Bridge'),
dataIndex: 'iface',
hideable: false,
flex: 1
},
{
- header: 'Active',
+ header: gettext('Active'),
width: 60,
dataIndex: 'active',
renderer: PVE.Utils.format_boolean
diff --git a/www/manager/form/BusTypeSelector.js b/www/manager/form/BusTypeSelector.js
index b3b0cee..3e69102 100644
--- a/www/manager/form/BusTypeSelector.js
+++ b/www/manager/form/BusTypeSelector.js
@@ -9,14 +9,14 @@ Ext.define('PVE.form.BusTypeSelector', {
initComponent: function() {
var me = this;
- me.data = [['ide', 'IDE']];
+ me.data = [['ide', gettext('IDE')]];
if (!me.noVirtIO) {
- me.data.push(['virtio', 'VIRTIO']);
+ me.data.push(['virtio', gettext('VIRTIO')]);
}
if (!me.noScsi) {
- me.data.push(['scsi', 'SCSI']);
+ me.data.push(['scsi', gettext('SCSI')]);
}
me.callParent();
diff --git a/www/manager/form/CPUModelSelector.js b/www/manager/form/CPUModelSelector.js
index aad2cb1..d6b0759 100644
--- a/www/manager/form/CPUModelSelector.js
+++ b/www/manager/form/CPUModelSelector.js
@@ -6,20 +6,20 @@ Ext.define('PVE.form.CPUModelSelector', {
var me = this;
me.data = [
- ['', 'Default (qemu64)'],
- ['486', '486'],
- ['athlon', 'athlon'],
- ['core2duo', 'core2duo'],
- ['coreduo', 'coreduo'],
- ['kvm32', 'kvm32'],
- ['kvm64', 'kvm64'],
- ['pentium', 'pentium'],
- ['pentium2', 'pentium2'],
- ['pentium3', 'pentium3'],
- ['phenom', 'phenom'],
- ['qemu32', 'qemu32'],
- ['qemu64', 'qemu64'],
- ['host', 'host']
+ ['', gettext('Default (qemu64)')],
+ ['486', gettext('486')],
+ ['athlon', gettext('athlon')],
+ ['core2duo', gettext('core2duo')],
+ ['coreduo', gettext('coreduo')],
+ ['kvm32', gettext('kvm32')],
+ ['kvm64', gettext('kvm64')],
+ ['pentium', gettext('pentium')],
+ ['pentium2', gettext('pentium2')],
+ ['pentium3', gettext('pentium3')],
+ ['phenom', gettext('phenom')],
+ ['qemu32', gettext('qemu32')],
+ ['qemu64', gettext('qemu64')],
+ ['host', gettext('host')]
];
me.callParent();
diff --git a/www/manager/form/CacheTypeSelector.js b/www/manager/form/CacheTypeSelector.js
index d5b1164..10a64d9 100644
--- a/www/manager/form/CacheTypeSelector.js
+++ b/www/manager/form/CacheTypeSelector.js
@@ -6,11 +6,11 @@ Ext.define('PVE.form.CacheTypeSelector', {
var me = this;
me.data = [
- ['', 'Default (no cache)'],
- ['writethrough', 'Write through'],
- ['writeback', 'Write back'],
- ['unsafe', 'Write back (unsafe)'],
- ['none', 'No cache']
+ ['', gettext('Default (no cache)')],
+ ['writethrough', gettext('Write through')],
+ ['writeback', gettext('Write back')],
+ ['unsafe', gettext('Write back (unsafe)')],
+ ['none', gettext('No cache')]
];
me.callParent();
diff --git a/www/manager/form/ControllerSelector.js b/www/manager/form/ControllerSelector.js
index 028ec13..6edd637 100644
--- a/www/manager/form/ControllerSelector.js
+++ b/www/manager/form/ControllerSelector.js
@@ -56,7 +56,7 @@ Ext.define('PVE.form.ControllerSelector', {
var me = this;
Ext.apply(me, {
- fieldLabel: 'Bus/Device',
+ fieldLabel: gettext('Bus/Device'),
layout: 'hbox',
height: 22, // hack: set to same height as other fields
defaults: {
@@ -96,7 +96,7 @@ Ext.define('PVE.form.ControllerSelector', {
var controller = field.getValue();
var confid = controller + value;
if (Ext.isDefined(me.vmconfig[confid])) {
- return "This device is already in use.";
+ return gettext("This device is already in use.");
}
return true;
}
diff --git a/www/manager/form/DayOfWeekSelector.js b/www/manager/form/DayOfWeekSelector.js
index 678609f..dc7d789 100644
--- a/www/manager/form/DayOfWeekSelector.js
+++ b/www/manager/form/DayOfWeekSelector.js
@@ -6,13 +6,13 @@ Ext.define('PVE.form.DayOfWeekSelector', {
var me = this;
me.data = [
- ['mon', 'Monday'],
- ['tue', 'Tuesday'],
- ['wed', 'Wednesday'],
- ['thu', 'Thursday'],
- ['fri', 'Friday'],
- ['sat', 'Saturday'],
- ['sun', 'Sunday']
+ ['mon', gettext('Monday')],
+ ['tue', gettext('Tuesday')],
+ ['wed', gettext('Wednesday')],
+ ['thu', gettext('Thursday')],
+ ['fri', gettext('Friday')],
+ ['sat', gettext('Saturday')],
+ ['sun', gettext('Sunday')]
];
me.callParent();
diff --git a/www/manager/form/DiskFormatSelector.js b/www/manager/form/DiskFormatSelector.js
index ce6c2d7..a6cfb56 100644
--- a/www/manager/form/DiskFormatSelector.js
+++ b/www/manager/form/DiskFormatSelector.js
@@ -6,9 +6,9 @@ Ext.define('PVE.form.DiskFormatSelector', {
var me = this;
me.data = [
- ['raw', 'Raw disk image (raw)'],
- ['qcow2', 'QEMU image format (qcow2)'],
- ['vmdk', 'VMware image format (vmdk)']
+ ['raw', gettext('Raw disk image (raw)')],
+ ['qcow2', gettext('QEMU image format (qcow2)')],
+ ['vmdk', gettext('VMware image format (vmdk)')]
];
me.callParent();
diff --git a/www/manager/form/FileSelector.js b/www/manager/form/FileSelector.js
index 1044db2..1c1bb2f 100644
--- a/www/manager/form/FileSelector.js
+++ b/www/manager/form/FileSelector.js
@@ -53,18 +53,18 @@ Ext.define('PVE.form.FileSelector', {
listConfig: {
columns: [
{
- header: 'Name',
+ header: gettext('Name'),
dataIndex: 'text',
hideable: false,
flex: 1
},
{
- header: 'Format',
+ header: gettext('Format'),
width: 60,
dataIndex: 'format'
},
{
- header: 'Size',
+ header: gettext('Size'),
width: 60,
dataIndex: 'size',
renderer: PVE.Utils.format_size
diff --git a/www/manager/form/NetworkCardSelector.js b/www/manager/form/NetworkCardSelector.js
index 616b3f8..faa0216 100644
--- a/www/manager/form/NetworkCardSelector.js
+++ b/www/manager/form/NetworkCardSelector.js
@@ -6,9 +6,9 @@ Ext.define('PVE.form.NetworkCardSelector', {
var me = this;
me.data = [
- ['rtl8139', 'Realtec RTL8139'],
- ['e1000', 'Intel E1000'],
- ['virtio', 'VirtIO (paravirtualized)']
+ ['rtl8139', gettext('Realtec RTL8139')],
+ ['e1000', gettext('Intel E1000')],
+ ['virtio', gettext('VirtIO (paravirtualized)')]
];
me.callParent();
diff --git a/www/manager/form/NodeSelector.js b/www/manager/form/NodeSelector.js
index 9e446f5..10925e6 100644
--- a/www/manager/form/NodeSelector.js
+++ b/www/manager/form/NodeSelector.js
@@ -39,19 +39,19 @@ Ext.define('PVE.form.NodeSelector', {
listConfig: {
columns: [
{
- header: 'Node',
+ header: gettext('Node'),
dataIndex: 'name',
hideable: false,
flex: 1
},
{
- header: 'Memory usage',
+ header: gettext('Memory usage'),
renderer: PVE.Utils.render_mem_usage,
width: 100,
dataIndex: 'mem'
},
{
- header: 'CPU usage',
+ header: gettext('CPU usage'),
renderer: PVE.Utils.render_cpu,
sortable: true,
width: 100,
@@ -77,7 +77,7 @@ Ext.define('PVE.form.NodeSelector', {
return true;
}
- return "Node " + offline.join(', ') + " seems to be offline!";
+ return Ext.String.format(gettext("Node {0} seems to be offline!"), offline.join(', '));
}
});
diff --git a/www/manager/form/RRDTypeSelector.js b/www/manager/form/RRDTypeSelector.js
index 061484d..5af2add 100644
--- a/www/manager/form/RRDTypeSelector.js
+++ b/www/manager/form/RRDTypeSelector.js
@@ -12,16 +12,16 @@ Ext.define('PVE.form.RRDTypeSelector', {
var store = new Ext.data.ArrayStore({
fields: [ 'id', 'timeframe', 'cf', 'text' ],
data : [
- [ 'hour', 'hour', 'AVERAGE', "Hour (average)" ],
- [ 'hourmax', 'hour', 'MAX', "Hour (max)" ],
- [ 'day', 'day', 'AVERAGE', "Day (average)" ],
- [ 'daymax', 'day', 'MAX', "Day (max)" ],
- [ 'week', 'week', 'AVERAGE', "Week (average)" ],
- [ 'weekmax', 'week', 'MAX', "Week (max)" ],
- [ 'month', 'month', 'AVERAGE', "Month (average)" ],
- [ 'monthmax', 'month', 'MAX', "Month (max)" ],
- [ 'year', 'year', 'AVERAGE', "Year (average)" ],
- [ 'yearmax', 'year', 'MAX', "Year (max)" ]
+ [ 'hour', 'hour', 'AVERAGE', gettext("Hour (average)") ],
+ [ 'hourmax', 'hour', 'MAX', gettext("Hour (max)") ],
+ [ 'day', 'day', 'AVERAGE', gettext("Day (average)") ],
+ [ 'daymax', 'day', 'MAX', gettext("Day (max)") ],
+ [ 'week', 'week', 'AVERAGE', gettext("Week (average)") ],
+ [ 'weekmax', 'week', 'MAX', gettext("Week (max)") ],
+ [ 'month', 'month', 'AVERAGE', gettext("Month (average)") ],
+ [ 'monthmax', 'month', 'MAX', gettext("Month (max)") ],
+ [ 'year', 'year', 'AVERAGE', gettext("Year (average)") ],
+ [ 'yearmax', 'year', 'MAX', gettext("Year (max)") ]
]
});
diff --git a/www/manager/form/RealmComboBox.js b/www/manager/form/RealmComboBox.js
index a25b503..c96c6eb 100644
--- a/www/manager/form/RealmComboBox.js
+++ b/www/manager/form/RealmComboBox.js
@@ -14,7 +14,7 @@ Ext.define('PVE.form.RealmComboBox', {
});
Ext.apply(me, {
- fieldLabel: 'Realm',
+ fieldLabel: gettext('Realm'),
name: 'realm',
store: realmstore,
queryMode: 'local',
diff --git a/www/manager/form/StorageSelector.js b/www/manager/form/StorageSelector.js
index cadbd4f..98f554b 100644
--- a/www/manager/form/StorageSelector.js
+++ b/www/manager/form/StorageSelector.js
@@ -50,24 +50,24 @@ Ext.define('PVE.form.StorageSelector', {
listConfig: {
columns: [
{
- header: 'Name',
+ header: gettext('Name'),
dataIndex: 'storage',
hideable: false,
flex: 1
},
{
- header: 'Type',
+ header: gettext('Type'),
width: 60,
dataIndex: 'type'
},
{
- header: 'Avail',
+ header: gettext('Avail'),
width: 80,
dataIndex: 'avail',
renderer: PVE.Utils.format_size
},
{
- header: 'Capacity',
+ header: gettext('Capacity'),
width: 80,
dataIndex: 'total',
renderer: PVE.Utils.format_size
diff --git a/www/manager/form/VMIDSelector.js b/www/manager/form/VMIDSelector.js
index 181ada8..cd0580f 100644
--- a/www/manager/form/VMIDSelector.js
+++ b/www/manager/form/VMIDSelector.js
@@ -21,12 +21,12 @@ Ext.define('PVE.form.VMIDSelector', {
if (me.validateExists === true) {
return true;
}
- return "This VM ID is already in use.";
+ return gettext("This VM ID is already in use.");
} else {
if (me.validateExists === false) {
return true;
}
- return "This VM ID does not exists.";
+ return gettext("This VM ID does not exists.");
}
},
@@ -34,7 +34,7 @@ Ext.define('PVE.form.VMIDSelector', {
var me = this;
Ext.applyIf(me, {
- fieldLabel: 'VM ID'
+ fieldLabel: gettext('VM ID')
});
me.callParent();
diff --git a/www/manager/grid/BackupView.js b/www/manager/grid/BackupView.js
index f6f0422..950c970 100644
--- a/www/manager/grid/BackupView.js
+++ b/www/manager/grid/BackupView.js
@@ -9,17 +9,17 @@ Ext.define('PVE.grid.BackupView', {
var nodename = me.pveSelNode.data.node;
if (!nodename) {
- throw "no node name specified";
+ throw gettext("no node name specified");
}
var vmid = me.pveSelNode.data.vmid;
if (!vmid) {
- throw "no VM ID specified";
+ throw gettext("no VM ID specified");
}
var vmtype = me.pveSelNode.data.type;
if (!vmtype) {
- throw "no VM type specified";
+ throw gettext("no VM type specified");
}
var filterFn;
@@ -32,7 +32,7 @@ Ext.define('PVE.grid.BackupView', {
return item.data.volid.match(':backup/vzdump-qemu-');
};
} else {
- throw "unsupported VM type '" + vmtype + "'";
+ throw Ext.String.format(gettext("unsupported VM type '{0}'"), vmtype);
}
me.store = Ext.create('Ext.data.Store', {
@@ -64,7 +64,7 @@ Ext.define('PVE.grid.BackupView', {
var storagesel = Ext.create('PVE.form.StorageSelector', {
nodename: nodename,
- fieldLabel: 'Storage',
+ fieldLabel: gettext('Storage'),
labelAlign: 'right',
storageContent: 'backup',
allowBlank: false,
@@ -78,7 +78,7 @@ Ext.define('PVE.grid.BackupView', {
var sm = Ext.create('Ext.selection.RowModel', {});
var backup_btn = Ext.create('Ext.button.Button', {
- text: 'Backup now',
+ text: gettext('Backup now'),
handler: function() {
var win = Ext.create('PVE.window.Backup', {
nodename: nodename,
@@ -91,7 +91,7 @@ Ext.define('PVE.grid.BackupView', {
});
var restore_btn = Ext.create('PVE.button.Button', {
- text: 'Restore',
+ text: gettext('Restore'),
disabled: true,
selModel: sm,
enableFn: function(rec) {
@@ -113,12 +113,11 @@ Ext.define('PVE.grid.BackupView', {
});
var delete_btn = Ext.create('PVE.button.Button', {
- text: 'Delete',
+ text: gettext('Delete'),
disabled: true,
selModel: sm,
confirmMsg: function(rec) {
- return 'Are you sure you want to delete "' + rec.data.volid + '"? ' +
- 'This will permanently erase all data.';
+ return Ext.String.format('Are you sure you want to delete "{0}"? This will permanently erase all data.', rec.data.volid);
},
enableFn: function(rec) {
return !!rec;
@@ -135,7 +134,7 @@ Ext.define('PVE.grid.BackupView', {
method: 'DELETE',
waitMsgTarget: me,
failure: function(response, opts) {
- Ext.Msg.alert('Error', response.htmlStatus);
+ Ext.Msg.alert(gettext('Error'), response.htmlStatus);
},
success: function(response, options) {
reload();
@@ -150,19 +149,19 @@ Ext.define('PVE.grid.BackupView', {
tbar: [ backup_btn, restore_btn, delete_btn, '->', storagesel ],
columns: [
{
- header: 'Name',
+ header: gettext('Name'),
flex: 1,
sortable: true,
renderer: PVE.Utils.render_storage_content,
dataIndex: 'volid'
},
{
- header: 'Format',
+ header: gettext('Format'),
width: 100,
dataIndex: 'format'
},
{
- header: 'Size',
+ header: gettext('Size'),
width: 100,
renderer: PVE.Utils.format_size,
dataIndex: 'size'
diff --git a/www/manager/grid/ObjectGrid.js b/www/manager/grid/ObjectGrid.js
index 349b24b..4703b71 100644
--- a/www/manager/grid/ObjectGrid.js
+++ b/www/manager/grid/ObjectGrid.js
@@ -101,7 +101,7 @@ Ext.define('PVE.grid.ObjectGrid', {
me.setLoading(false);
if (!success) {
- me.setLoading("Data load error");
+ me.setLoading(gettext("Data load error"));
return;
}
});
@@ -112,14 +112,14 @@ Ext.define('PVE.grid.ObjectGrid', {
stateful: false,
columns: [
{
- header: 'Name',
+ header: gettext('Name'),
width: me.cwidth1 || 100,
dataIndex: 'key',
renderer: me.renderKey
},
{
flex: 1,
- header: 'Value',
+ header: gettext('Value'),
dataIndex: 'value',
renderer: me.renderValue
}
diff --git a/www/manager/node/BCFailCnt.js b/www/manager/node/BCFailCnt.js
index 4c80d45..faf0c84 100644
--- a/www/manager/node/BCFailCnt.js
+++ b/www/manager/node/BCFailCnt.js
@@ -8,7 +8,7 @@ Ext.define('PVE.node.BCFailCnt', {
var nodename = me.pveSelNode.data.node;
if (!nodename) {
- throw "no node name specified";
+ throw gettext("no node name specified");
}
var store = new Ext.data.Store({
@@ -34,12 +34,12 @@ Ext.define('PVE.node.BCFailCnt', {
stateful: false,
columns: [
{
- header: 'Container',
+ header: gettext('Container'),
width: 100,
dataIndex: 'id'
},
{
- header: 'failcnt',
+ header: gettext('failcnt'),
flex: 1,
dataIndex: 'failcnt'
}
diff --git a/www/manager/node/Config.js b/www/manager/node/Config.js
index 92af527..fd0034b 100644
--- a/www/manager/node/Config.js
+++ b/www/manager/node/Config.js
@@ -7,7 +7,7 @@ Ext.define('PVE.node.Config', {
var nodename = me.pveSelNode.data.node;
if (!nodename) {
- throw "no node name specified";
+ throw gettext("no node name specified");
}
me.statusStore = Ext.create('PVE.data.ObjectStore', {
@@ -22,7 +22,7 @@ Ext.define('PVE.node.Config', {
method: 'POST',
waitMsgTarget: me,
failure: function(response, opts) {
- Ext.Msg.alert('Error', response.htmlStatus);
+ Ext.Msg.alert(gettext('Error'), response.htmlStatus);
}
});
};
diff --git a/www/manager/node/DNSEdit.js b/www/manager/node/DNSEdit.js
index 84428d1..df375e5 100644
--- a/www/manager/node/DNSEdit.js
+++ b/www/manager/node/DNSEdit.js
@@ -11,33 +11,33 @@ Ext.define('PVE.node.DNSEdit', {
var nodename = me.pveSelNode.data.node;
if (!nodename) {
- throw "no node name specified";
+ throw gettext("no node name specified");
}
me.items = [
{
xtype: 'textfield',
- fieldLabel: 'Search domain',
+ fieldLabel: gettext('Search domain'),
name: 'search',
allowBlank: false
},
{
xtype: 'pvetextfield',
- fieldLabel: 'First DNS server',
+ fieldLabel: gettext('First DNS server'),
vtype: 'IPAddress',
skipEmptyText: true,
name: 'dns1'
},
{
xtype: 'pvetextfield',
- fieldLabel: 'Second DNS server',
+ fieldLabel: gettext('Second DNS server'),
vtype: 'IPAddress',
skipEmptyText: true,
name: 'dns2'
},
{
xtype: 'pvetextfield',
- fieldLabel: 'Third DNS server',
+ fieldLabel: gettext('Third DNS server'),
vtype: 'IPAddress',
skipEmptyText: true,
name: 'dns3'
diff --git a/www/manager/node/DNSView.js b/www/manager/node/DNSView.js
index 18cff6e..e445a16 100644
--- a/www/manager/node/DNSView.js
+++ b/www/manager/node/DNSView.js
@@ -7,7 +7,7 @@ Ext.define('PVE.node.DNSView', {
var nodename = me.pveSelNode.data.node;
if (!nodename) {
- throw "no node name specified";
+ throw gettext("no node name specified");
}
var run_editor = function() {
@@ -22,14 +22,14 @@ Ext.define('PVE.node.DNSView', {
cwidth1: 130,
interval: 1000,
rows: {
- search: { header: 'Search domain', required: true },
- dns1: { header: 'First DNS server', required: true },
- dns2: { header: 'Second DNS server' },
- dns3: { header: 'Third DNS server' }
+ search: { header: gettext('Search domain'), required: true },
+ dns1: { header: gettext('First DNS server'), required: true },
+ dns2: { header: gettext('Second DNS server') },
+ dns3: { header: gettext('Third DNS server') }
},
tbar: [
{
- text: "Edit",
+ text: gettext("Edit"),
handler: run_editor
}
],
diff --git a/www/manager/node/NetworkEdit.js b/www/manager/node/NetworkEdit.js
index 33a35c8..697d14c 100644
--- a/www/manager/node/NetworkEdit.js
+++ b/www/manager/node/NetworkEdit.js
@@ -7,11 +7,11 @@ Ext.define('PVE.node.NetworkEdit', {
var nodename = me.pveSelNode.data.node;
if (!nodename) {
- throw "no node name specified";
+ throw gettext("no node name specified");
}
if (!me.iftype) {
- throw "no network device type specified";
+ throw gettext("no network device type specified");
}
me.create = !me.iface;
@@ -27,10 +27,10 @@ Ext.define('PVE.node.NetworkEdit', {
title = "Create Bond";
iface_vtype = 'BondName';
} else {
- throw "can't create unknown device type";
+ throw gettext("can't create unknown device type");
}
} else {
- title = "Edit network device '" + me.iface + "'";
+ title = Ext.String.format(gettext("Edit network device '{0}'"), me.iface);
}
var column2 = [
@@ -46,18 +46,18 @@ Ext.define('PVE.node.NetworkEdit', {
if (me.iftype === 'bridge') {
column2.push({
xtype: 'textfield',
- fieldLabel: 'Bridge ports',
+ fieldLabel: gettext('Bridge ports'),
name: 'bridge_ports'
});
} else if (me.iftype === 'bond') {
column2.push({
xtype: 'textfield',
- fieldLabel: 'Slaves',
+ fieldLabel: gettext('Slaves'),
name: 'slaves'
});
column2.push({
xtype: 'bondModeSelector',
- fieldLabel: 'Mode',
+ fieldLabel: gettext('Mode'),
name: 'bond_mode',
value: me.create ? 'balance-rr' : undefined,
allowBlank: false
@@ -78,7 +78,7 @@ Ext.define('PVE.node.NetworkEdit', {
var column1 = [
{
xtype: me.create ? 'textfield' : 'displayfield',
- fieldLabel: 'Name',
+ fieldLabel: gettext('Name'),
height: 22, // hack: set same height as text fields
name: 'iface',
value: me.iface,
@@ -88,14 +88,14 @@ Ext.define('PVE.node.NetworkEdit', {
{
xtype: 'pvetextfield',
deleteEmpty: !me.create,
- fieldLabel: 'IP address',
+ fieldLabel: gettext('IP address'),
vtype: 'IPAddress',
name: 'address'
},
{
xtype: 'pvetextfield',
deleteEmpty: !me.create,
- fieldLabel: 'Subnet mask',
+ fieldLabel: gettext('Subnet mask'),
vtype: 'IPAddress',
name: 'netmask',
validator: function(value) {
@@ -106,11 +106,11 @@ Ext.define('PVE.node.NetworkEdit', {
var address = me.down('field[name=address]').getValue();
if (value !== '') {
if (address === '') {
- return "Subnet mask requires option 'IP address'";
+ return gettext("Subnet mask requires option 'IP address'");
}
} else {
if (address !== '') {
- return "Option 'IP address' requires a subnet mask";
+ return gettext("Option 'IP address' requires a subnet mask");
}
}
@@ -120,7 +120,7 @@ Ext.define('PVE.node.NetworkEdit', {
{
xtype: 'pvetextfield',
deleteEmpty: !me.create,
- fieldLabel: 'Gateway',
+ fieldLabel: gettext('Gateway'),
vtype: 'IPAddress',
name: 'gateway'
}
@@ -146,8 +146,8 @@ Ext.define('PVE.node.NetworkEdit', {
success: function(response, options) {
var data = response.result.data;
if (data.type !== me.iftype) {
- var msg = "Got unexpected device type";
- Ext.Msg.alert("Load failed", msg, function() {
+ var msg = gettext("Got unexpected device type");
+ Ext.Msg.alert(gettext("Load failed"), msg, function() {
me.close();
});
return;
diff --git a/www/manager/node/NetworkView.js b/www/manager/node/NetworkView.js
index 3db0e43..68d2fab 100644
--- a/www/manager/node/NetworkView.js
+++ b/www/manager/node/NetworkView.js
@@ -8,7 +8,7 @@ Ext.define('PVE.node.NetworkView', {
var nodename = me.pveSelNode.data.node;
if (!nodename) {
- throw "no node name specified";
+ throw gettext("no node name specified");
}
var rstore = Ext.create('PVE.data.UpdateStore', {
@@ -132,11 +132,11 @@ Ext.define('PVE.node.NetworkView', {
layout: 'border',
tbar: [
{
- text: 'Create',
+ text: gettext('Create'),
menu: new Ext.menu.Menu({
items: [
{
- text: 'Bridge',
+ text: gettext('Bridge'),
handler: function() {
var next;
for (next = 0; next <= 9999; next++) {
@@ -155,7 +155,7 @@ Ext.define('PVE.node.NetworkView', {
}
},
{
- text: 'Bond',
+ text: gettext('Bond'),
handler: function() {
var next;
for (next = 0; next <= 9999; next++) {
@@ -176,7 +176,7 @@ Ext.define('PVE.node.NetworkView', {
})
}, ' ',
{
- text: 'Revert changes',
+ text: gettext('Revert changes'),
handler: function() {
PVE.Utils.API2Request({
url: '/nodes/' + nodename + '/network_changes',
@@ -203,14 +203,14 @@ Ext.define('PVE.node.NetworkView', {
border: false,
columns: [
{
- header: 'Interface Name',
+ header: gettext('Interface Name'),
width: 100,
sortable: true,
dataIndex: 'iface'
},
{
xtype: 'booleancolumn',
- header: 'Active',
+ header: gettext('Active'),
width: 80,
sortable: true,
dataIndex: 'active',
@@ -220,7 +220,7 @@ Ext.define('PVE.node.NetworkView', {
},
{
xtype: 'booleancolumn',
- header: 'Autostart',
+ header: gettext('Autostart'),
width: 80,
sortable: true,
dataIndex: 'autostart',
@@ -229,22 +229,22 @@ Ext.define('PVE.node.NetworkView', {
undefinedText: 'No'
},
{
- header: 'Ports/Slaves',
+ header: gettext('Ports/Slaves'),
dataIndex: 'type',
renderer: render_ports
},
{
- header: 'IP address',
+ header: gettext('IP address'),
sortable: true,
dataIndex: 'address'
},
{
- header: 'Subnet mask',
+ header: gettext('Subnet mask'),
sortable: true,
dataIndex: 'netmask'
},
{
- header: 'Gateway',
+ header: gettext('Gateway'),
sortable: true,
dataIndex: 'gateway'
}
@@ -260,12 +260,12 @@ Ext.define('PVE.node.NetworkView', {
autoScroll: true,
itemId: 'changes',
tbar: [
- 'Pending changes (please reboot to activate changes)'
+ gettext('Pending changes (please reboot to activate changes)')
],
split: true,
bodyPadding: 5,
flex: 0.6,
- html: "no changes"
+ html: gettext("no changes")
}
],
listeners: {
diff --git a/www/manager/node/ServiceView.js b/www/manager/node/ServiceView.js
index eaa5840..fbd9fdf 100644
--- a/www/manager/node/ServiceView.js
+++ b/www/manager/node/ServiceView.js
@@ -8,7 +8,7 @@ Ext.define('PVE.node.ServiceView', {
var nodename = me.pveSelNode.data.node;
if (!nodename) {
- throw "no node name specified";
+ throw gettext("no node name specified");
}
var rstore = Ext.create('PVE.data.UpdateStore', {
@@ -46,7 +46,7 @@ Ext.define('PVE.node.ServiceView', {
};
var start_btn = new Ext.Button({
- text: 'Start',
+ text: gettext('Start'),
disabled: true,
handler: function(){
service_cmd("start");
@@ -54,7 +54,7 @@ Ext.define('PVE.node.ServiceView', {
});
var stop_btn = new Ext.Button({
- text: 'Stop',
+ text: gettext('Stop'),
disabled: true,
handler: function(){
service_cmd("stop");
@@ -62,7 +62,7 @@ Ext.define('PVE.node.ServiceView', {
});
var restart_btn = new Ext.Button({
- text: 'Restart',
+ text: gettext('Restart'),
disabled: true,
handler: function(){
service_cmd("restart");
@@ -109,7 +109,7 @@ Ext.define('PVE.node.ServiceView', {
me.mon(rstore, 'load', function(s, records, success) {
if (!success) {
- me.setLoading("Data load error");
+ me.setLoading(gettext("Data load error");
return;
} else {
me.setLoading(false);
@@ -122,19 +122,19 @@ Ext.define('PVE.node.ServiceView', {
tbar: [ start_btn, stop_btn, restart_btn ],
columns: [
{
- header: 'Name',
+ header: gettext('Name'),
width: 100,
sortable: true,
dataIndex: 'name'
},
{
- header: 'State',
+ header: gettext('State'),
width: 100,
sortable: true,
dataIndex: 'state'
},
{
- header: 'Description',
+ header: gettext('Description'),
dataIndex: 'desc',
flex: 1
}
diff --git a/www/manager/node/StatusView.js b/www/manager/node/StatusView.js
index 34a805f..4934e92 100644
--- a/www/manager/node/StatusView.js
+++ b/www/manager/node/StatusView.js
@@ -7,7 +7,7 @@ Ext.define('PVE.node.StatusView', {
var nodename = me.pveSelNode.data.node;
if (!nodename) {
- throw "no node name specified";
+ throw gettext("no node name specified");
}
var render_cpuinfo = function(value) {
@@ -25,22 +25,22 @@ Ext.define('PVE.node.StatusView', {
var render_meminfo = function(value) {
var per = (value.used / value.total)*100;
- var text = "<div>Total: " + PVE.Utils.format_size(value.total) + "</div>" +
- "<div>Used: " + PVE.Utils.format_size(value.used) + "</div>";
+ var text = "<div>" + gettext("Total") + ": " + PVE.Utils.format_size(value.total) + "</div>" +
+ "<div>" + gettext("Used") + ": " + PVE.Utils.format_size(value.used) + "</div>";
return text;
};
var rows = {
- uptime: { header: 'Uptime', required: true, renderer: PVE.Utils.format_duration_long },
- loadavg: { header: 'Load average', required: true, renderer: render_loadavg },
- cpuinfo: { header: 'CPUs', required: true, renderer: render_cpuinfo },
- cpu: { header: 'CPU usage',required: true, renderer: render_cpu },
- wait: { header: 'IO delay', required: true, renderer: render_cpu },
- memory: { header: 'RAM usage', required: true, renderer: render_meminfo },
- swap: { header: 'SWAP usage', required: true, renderer: render_meminfo },
- rootfs: { header: 'HD space (root)', required: true, renderer: render_meminfo },
- pveversion: { header: 'PVE Manager version', required: true },
- kversion: { header: 'Kernel version', required: true }
+ uptime: { header: gettext('Uptime'), required: true, renderer: PVE.Utils.format_duration_long },
+ loadavg: { header: gettext('Load average'), required: true, renderer: render_loadavg },
+ cpuinfo: { header: gettext('CPUs'), required: true, renderer: render_cpuinfo },
+ cpu: { header: gettext('CPU usage'),required: true, renderer: render_cpu },
+ wait: { header: gettext('IO delay'), required: true, renderer: render_cpu },
+ memory: { header: gettext('RAM usage'), required: true, renderer: render_meminfo },
+ swap: { header: gettext('SWAP usage'), required: true, renderer: render_meminfo },
+ rootfs: { header: gettext('HD space (root)'), required: true, renderer: render_meminfo },
+ pveversion: { header: gettext('PVE Manager version'), required: true },
+ kversion: { header: gettext('Kernel version'), required: true }
};
Ext.applyIf(me, {
diff --git a/www/manager/node/Summary.js b/www/manager/node/Summary.js
index 0466874..a0aa7aa 100644
--- a/www/manager/node/Summary.js
+++ b/www/manager/node/Summary.js
@@ -7,17 +7,17 @@ Ext.define('PVE.node.Summary', {
var nodename = me.pveSelNode.data.node;
if (!nodename) {
- throw "no node name specified";
+ throw gettext("no node name specified");
}
if (!me.statusStore) {
- throw "no status storage specified";
+ throw gettext("no status storage specified");
}
var rstore = me.statusStore;
var statusview = Ext.create('PVE.node.StatusView', {
- title: 'Status',
+ title: gettext('Status'),
pveSelNode: me.pveSelNode,
style: 'padding-top:0px',
rstore: rstore
@@ -37,25 +37,25 @@ Ext.define('PVE.node.Summary', {
statusview,
{
xtype: 'pveRRDView',
- title: "CPU usage %",
+ title: gettext("CPU usage %"),
datasource: 'cpu,iowait',
rrdurl: rrdurl
},
{
xtype: 'pveRRDView',
- title: "Server load",
+ title: gettext("Server load"),
datasource: 'loadavg',
rrdurl: rrdurl
},
{
xtype: 'pveRRDView',
- title: "Memory usage",
+ title: gettext("Memory usage"),
datasource: 'memtotal,memused',
rrdurl: rrdurl
},
{
xtype: 'pveRRDView',
- title: "Network traffic",
+ title: gettext("Network traffic"),
datasource: 'netin,netout',
rrdurl: rrdurl
}
diff --git a/www/manager/node/TimeEdit.js b/www/manager/node/TimeEdit.js
index ae9ec02..8f767c0 100644
--- a/www/manager/node/TimeEdit.js
+++ b/www/manager/node/TimeEdit.js
@@ -8,11 +8,11 @@ Ext.define('PVE.node.TimeEdit', {
var nodename = me.pveSelNode.data.node;
if (!nodename) {
- throw "no node name specified";
+ throw gettext("no node name specified");
}
Ext.applyIf(me, {
- title: "Set time zone",
+ title: gettext("Set time zone"),
url: "/api2/extjs/nodes/" + nodename + "/time",
fieldDefaults: {
labelWidth: 70
@@ -20,7 +20,7 @@ Ext.define('PVE.node.TimeEdit', {
width: 400,
items: {
xtype: 'combo',
- fieldLabel: 'Time zone',
+ fieldLabel: gettext('Time zone'),
name: 'timezone',
queryMode: 'local',
store: new PVE.data.TimezoneStore({autoDestory: true}),
diff --git a/www/manager/node/TimeView.js b/www/manager/node/TimeView.js
index 6baf25a..ca58578 100644
--- a/www/manager/node/TimeView.js
+++ b/www/manager/node/TimeView.js
@@ -7,7 +7,7 @@ Ext.define('PVE.node.TimeView', {
var nodename = me.pveSelNode.data.node;
if (!nodename) {
- throw "no node name specified";
+ throw gettext("no node name specified");
}
var tzoffset = (new Date()).getTimezoneOffset()*60000;
@@ -29,18 +29,18 @@ Ext.define('PVE.node.TimeView', {
interval: 1000,
rows: {
timezone: {
- header: 'Time zone',
+ header: gettext('Time zone'),
required: true
},
localtime: {
- header: 'Server time',
+ header: gettext('Server time'),
required: true,
renderer: renderlocaltime
}
},
tbar: [
{
- text: "Edit",
+ text: gettext("Edit"),
handler: run_editor
}
],
diff --git a/www/manager/openvz/BeanCounterGrid.js b/www/manager/openvz/BeanCounterGrid.js
index a1baa37..415dd80 100644
--- a/www/manager/openvz/BeanCounterGrid.js
+++ b/www/manager/openvz/BeanCounterGrid.js
@@ -49,36 +49,36 @@ Ext.define('PVE.openvz.BeanCounterGrid', {
stateful: false,
columns: [
{
- header: 'Ressource',
+ header: gettext('Ressource'),
width: 100,
dataIndex: 'id'
},
{
- header: 'held',
+ header: gettext('held'),
width: 100,
renderer: me.renderUbc,
dataIndex: 'held'
},
{
- header: 'maxheld',
+ header: gettext('maxheld'),
width: 100,
renderer: me.renderUbc,
dataIndex: 'maxheld'
},
{
- header: 'barrier',
+ header: gettext('barrier'),
width: 100,
renderer: me.renderUbc,
dataIndex: 'bar'
},
{
- header: 'limit',
+ header: gettext('limit'),
width: 100,
renderer: me.renderUbc,
dataIndex: 'lim'
},
{
- header: 'failcnt',
+ header: gettext('failcnt'),
width: 100,
dataIndex: 'failcnt'
}
diff --git a/www/manager/openvz/CmdMenu.js b/www/manager/openvz/CmdMenu.js
index 44d5758..79045e1 100644
--- a/www/manager/openvz/CmdMenu.js
+++ b/www/manager/openvz/CmdMenu.js
@@ -5,11 +5,11 @@ Ext.define('PVE.openvz.CmdMenu', {
var me = this;
if (!me.nodename) {
- throw "no node name specified";
+ throw gettext("no node name specified");
}
if (!me.vmid) {
- throw "no VM ID specified";
+ throw gettext("no VM ID specified");
}
var vm_command = function(cmd, params) {
diff --git a/www/manager/openvz/CreateWizard.js b/www/manager/openvz/CreateWizard.js
index c5722f0..1867799 100644
--- a/www/manager/openvz/CreateWizard.js
+++ b/www/manager/openvz/CreateWizard.js
@@ -23,7 +23,7 @@ Ext.define('PVE.openvz.CreateWizard', {
var storagesel = Ext.create('PVE.form.StorageSelector', {
name: 'storage',
- fieldLabel: 'Storage',
+ fieldLabel: gettext('Storage'),
storageContent: 'rootdir',
autoSelect: true,
allowBlank: false
@@ -32,13 +32,13 @@ Ext.define('PVE.openvz.CreateWizard', {
var tmplsel = Ext.create('PVE.form.FileSelector', {
name: 'ostemplate',
storageContent: 'vztmpl',
- fieldLabel: 'OS template',
+ fieldLabel: gettext('OS template'),
allowBlank: false
});
var tmplstoragesel = Ext.create('PVE.form.StorageSelector', {
name: 'tmplstorage',
- fieldLabel: 'Storage',
+ fieldLabel: gettext('Storage'),
storageContent: 'vztmpl',
autoSelect: true,
allowBlank: false,
@@ -51,7 +51,7 @@ Ext.define('PVE.openvz.CreateWizard', {
var bridgesel = Ext.create('PVE.form.BridgeSelector', {
name: 'bridge',
- fieldLabel: 'Bridge',
+ fieldLabel: gettext('Bridge'),
labelAlign: 'right',
autoSelect: true,
disabled: true,
@@ -59,16 +59,16 @@ Ext.define('PVE.openvz.CreateWizard', {
});
Ext.applyIf(me, {
- title: 'Create new container',
+ title: gettext('Create new container'),
items: [
{
xtype: 'inputpanel',
- title: 'General',
+ title: gettext('General'),
column1: [
{
xtype: 'PVE.form.NodeSelector',
name: 'nodename',
- fieldLabel: 'Node',
+ fieldLabel: gettext('Node'),
allowBlank: false,
onlineValidator: true,
listeners: {
@@ -90,7 +90,7 @@ Ext.define('PVE.openvz.CreateWizard', {
xtype: 'pvetextfield',
name: 'hostname',
value: '',
- fieldLabel: 'Hostname',
+ fieldLabel: gettext('Hostname'),
skipEmptyText: true,
allowBlank: true
}
@@ -102,7 +102,7 @@ Ext.define('PVE.openvz.CreateWizard', {
inputType: 'password',
name: 'password',
value: '',
- fieldLabel: 'Password',
+ fieldLabel: gettext('Password'),
allowBlank: false,
minLength: 5,
change: function(f, value) {
@@ -117,12 +117,12 @@ Ext.define('PVE.openvz.CreateWizard', {
inputType: 'password',
name: 'confirmpw',
value: '',
- fieldLabel: 'Confirm password',
+ fieldLabel: gettext('Confirm password'),
allowBlank: false,
validator: function(value) {
var pw = me.down('field[name=password]').getValue();
if (pw !== value) {
- return "Passowords does not match!";
+ return gettext("Passowords does not match!");
}
return true;
}
@@ -135,22 +135,22 @@ Ext.define('PVE.openvz.CreateWizard', {
},
{
xtype: 'inputpanel',
- title: 'Template',
+ title: gettext('Template'),
column1: [ tmplstoragesel, tmplsel]
},
{
xtype: 'pveOpenVZResourceInputPanel',
- title: 'Resources'
+ title: gettext('Resources')
},
{
xtype: 'inputpanel',
- title: 'Network',
+ title: gettext('Network'),
column1: [
{
xtype: 'radiofield',
name: 'networkmode',
inputValue: 'routed',
- boxLabel: 'Routed mode (venet)',
+ boxLabel: gettext('Routed mode (venet)'),
checked: true,
listeners: {
change: function(f, value) {
@@ -167,7 +167,7 @@ Ext.define('PVE.openvz.CreateWizard', {
name: 'ip_address',
vtype: 'IPAddress',
value: '',
- fieldLabel: 'IP address',
+ fieldLabel: gettext('IP address'),
labelAlign: 'right',
allowBlank: false
}
@@ -177,7 +177,7 @@ Ext.define('PVE.openvz.CreateWizard', {
xtype: 'radiofield',
name: 'networkmode',
inputValue: 'bridge',
- boxLabel: 'Bridged mode',
+ boxLabel: gettext('Bridged mode'),
checked: false,
listeners: {
change: function(f, value) {
@@ -201,14 +201,14 @@ Ext.define('PVE.openvz.CreateWizard', {
},
{
xtype: 'inputpanel',
- title: 'DNS',
+ title: gettext('DNS'),
column1: [
{
xtype: 'pvetextfield',
name: 'searchdomain',
skipEmptyText: true,
- fieldLabel: 'DNS domain',
- emptyText: 'use host settings',
+ fieldLabel: gettext('DNS domain'),
+ emptyText: gettext('use host settings'),
allowBlank: true,
listeners: {
change: function(f, value) {
@@ -226,7 +226,7 @@ Ext.define('PVE.openvz.CreateWizard', {
},
{
xtype: 'pvetextfield',
- fieldLabel: 'DNS server 1',
+ fieldLabel: gettext('DNS server 1'),
vtype: 'IPAddress',
allowBlank: true,
disabled: true,
@@ -235,7 +235,7 @@ Ext.define('PVE.openvz.CreateWizard', {
},
{
xtype: 'pvetextfield',
- fieldLabel: 'DNS server 2',
+ fieldLabel: gettext('DNS server 2'),
vtype: 'IPAddress',
skipEmptyText: true,
disabled: true,
@@ -245,11 +245,11 @@ Ext.define('PVE.openvz.CreateWizard', {
]
},
{
- title: 'Confirm',
+ title: gettext('Confirm'),
layout: 'fit',
items: [
{
- title: 'Settings',
+ title: gettext('Settings'),
xtype: 'grid',
store: summarystore,
columns: [
diff --git a/www/manager/openvz/DNS.js b/www/manager/openvz/DNS.js
index dbf72ea..b5c576b 100644
--- a/www/manager/openvz/DNS.js
+++ b/www/manager/openvz/DNS.js
@@ -9,56 +9,56 @@ Ext.define('PVE.openvz.DNS', {
var nodename = me.pveSelNode.data.node;
if (!nodename) {
- throw "no node name specified";
+ throw gettext("no node name specified");
}
var vmid = me.pveSelNode.data.vmid;
if (!vmid) {
- throw "no VM ID specified";
+ throw gettext("no VM ID specified");
}
var rows = {
hostname: {
required: true,
defaultValue: me.pveSelNode.data.name,
- header: 'Hostname',
+ header: gettext('Hostname'),
editor: {
xtype: 'pveWindowEdit',
- title: 'Container Hostname',
+ title: gettext('Container Hostname'),
items: {
xtype: 'textfield',
name: 'hostname',
value: '',
- fieldLabel: 'Hostname',
+ fieldLabel: gettext('Hostname'),
allowBlank: true,
emptyText: me.pveSelNode.data.name
}
}
},
searchdomain: {
- header: 'DNS domain',
+ header: gettext('DNS domain'),
defaultValue: '',
editor: {
xtype: 'pveWindowEdit',
- title: 'DNS domain',
+ title: gettext('DNS domain'),
items: {
xtype: 'pvetextfield',
name: 'searchdomain',
- fieldLabel: 'DNS domain',
+ fieldLabel: gettext('DNS domain'),
allowBlank: false
}
}
},
nameserver: {
- header: 'DNS servers',
+ header: gettext('DNS servers'),
defaultValue: '',
editor: {
xtype: 'pveWindowEdit',
- title: 'DNS servers',
+ title: gettext('DNS servers'),
items: {
xtype: 'pvetextfield',
name: 'nameserver',
- fieldLabel: 'DNS servers',
+ fieldLabel: gettext('DNS servers'),
allowBlank: false
}
}
diff --git a/www/manager/openvz/Network.js b/www/manager/openvz/Network.js
index e8ba347..252d62f 100644
--- a/www/manager/openvz/Network.js
+++ b/www/manager/openvz/Network.js
@@ -20,11 +20,11 @@ Ext.define('PVE.OpenVZ.NetIfEdit', {
var me = this;
if (!me.dataCache) {
- throw "no dataCache specified";
+ throw gettext("no dataCache specified");
}
if (!me.nodename) {
- throw "no node name specified";
+ throw gettext("no node name specified");
}
me.netif = PVE.Parser.parseOpenVZNetIf(me.dataCache.netif) || {};
@@ -33,16 +33,16 @@ Ext.define('PVE.OpenVZ.NetIfEdit', {
if (!me.create) {
if (!me.ifname) {
- throw "no interface name specified";
+ throw gettext("no interface name specified");
}
cdata = me.netif[me.ifname];
if (!cdata) {
- throw "no such interface '" + me.ifname + "'";
+ throw gettext("no such interface") + " '" + me.ifname + "'";
}
}
Ext.apply(me, {
- title: me.create ? 'Add ethernet device (veth)' : 'Edit ethernet device (veth)',
+ title: me.create ? gettext('Add ethernet device (veth)') : gettext('Edit ethernet device (veth)'),
digest: me.dataCache.digest,
width: 350,
fieldDefaults: {
@@ -53,12 +53,12 @@ Ext.define('PVE.OpenVZ.NetIfEdit', {
xtype: me.create ? 'textfield' : 'displayfield',
name: 'ifname',
height: 22, // hack: set same height as text fields
- fieldLabel: 'Device name',
+ fieldLabel: gettext('Device name'),
allowBlank: false,
value: cdata.ifname,
validator: function(value) {
if (me.create && me.netif[value]) {
- return "interface name already in use";
+ return gettext("interface name already in use");
}
return true;
}
@@ -66,7 +66,7 @@ Ext.define('PVE.OpenVZ.NetIfEdit', {
{
xtype: 'textfield',
name: 'mac',
- fieldLabel: 'MAC address',
+ fieldLabel: gettext('MAC address'),
vtype: 'MacAddress',
value: cdata.mac,
allowBlank: me.create,
@@ -76,14 +76,14 @@ Ext.define('PVE.OpenVZ.NetIfEdit', {
xtype: 'PVE.form.BridgeSelector',
name: 'bridge',
nodename: me.nodename,
- fieldLabel: 'Bridge',
+ fieldLabel: gettext('Bridge'),
value: cdata.bridge,
allowBlank: false
},
{
xtype: 'textfield',
name: 'host_ifname',
- fieldLabel: 'Host device name',
+ fieldLabel: gettext('Host device name'),
value: cdata.host_ifname,
allowBlank: true,
emptyText: 'auto'
@@ -91,7 +91,7 @@ Ext.define('PVE.OpenVZ.NetIfEdit', {
{
xtype: 'textfield',
name: 'host_mac',
- fieldLabel: 'Host MAC address',
+ fieldLabel: gettext('Host MAC address'),
vtype: 'MacAddress',
value: cdata.host_mac,
allowBlank: true,
@@ -124,17 +124,17 @@ Ext.define('PVE.OpenVZ.IPAdd', {
var me = this;
if (!me.dataCache) {
- throw "no dataCache specified";
+ throw gettext("no dataCache specified");
}
Ext.apply(me, {
- title: "Add IP address (venet)",
+ title: gettext("Add IP address (venet)"),
digest: me.dataCache.digest,
width: 350,
items: {
xtype: 'textfield',
name: 'ipaddress',
- fieldLabel: 'IP Address',
+ fieldLabel: gettext('IP Address'),
vtype: 'IPAddress',
allowBlank: false
}
@@ -156,11 +156,11 @@ Ext.define('PVE.openvz.NetworkView', {
renderType: function(value, metaData, record, rowIndex, colIndex, store) {
if (value === 'ip') {
- return 'IP address';
+ return gettext('IP address');
} else if (value === 'net') {
- return 'IP network';
+ return gettext('IP network');
} else if (value === 'veth') {
- return 'Ethernet device';
+ return gettext('Ethernet device');
} else {
return value;
}
@@ -183,7 +183,7 @@ Ext.define('PVE.openvz.NetworkView', {
PVE.Utils.API2Request({
url: me.url,
failure: function(response, opts) {
- me.setLoading('Error: ' + response.htmlStatus);
+ me.setLoading(gettext('Error') + ': ' + response.htmlStatus);
},
success: function(response, opts) {
me.setLoading(false);
@@ -226,12 +226,12 @@ Ext.define('PVE.openvz.NetworkView', {
var nodename = me.pveSelNode.data.node;
if (!nodename) {
- throw "no node name specified";
+ throw gettext("no node name specified");
}
var vmid = me.pveSelNode.data.vmid;
if (!vmid) {
- throw "no VM ID specified";
+ throw gettext("no VM ID specified");
}
me.url = '/nodes/' + nodename + '/openvz/' + vmid + '/config';
@@ -241,7 +241,7 @@ Ext.define('PVE.openvz.NetworkView', {
});
var remove_btn = new Ext.Button({
- text: 'Remove',
+ text: gettext('Remove'),
disabled: true,
handler: function(){
var sm = me.getSelectionModel();
@@ -253,14 +253,14 @@ Ext.define('PVE.openvz.NetworkView', {
var msg;
if (rec.data.type === 'ip') {
- msg = 'Are you sure you want to remove IP address "' + rec.data.value + '"';
+ msg = gettext('Are you sure you want to remove IP address') + ' "' + rec.data.value + '"';
} else if (rec.data.type === 'veth') {
- msg = 'Are you sure you want to remove device "' + rec.data.id + '"';
+ msg = gettext('Are you sure you want to remove device') + ' "' + rec.data.id + '"';
} else {
- msg = 'Are you sure you want to remove this item';
+ msg = gettext('Are you sure you want to remove this item');
}
- Ext.Msg.confirm('Deletion Confirmation', msg, function(btn) {
+ Ext.Msg.confirm(gettext('Deletion Confirmation'), msg, function(btn) {
if (btn !== 'yes') {
return;
}
@@ -317,7 +317,7 @@ Ext.define('PVE.openvz.NetworkView', {
};
var edit_btn = new Ext.Button({
- text: 'Edit',
+ text: gettext('Edit'),
disabled: true,
handler: run_editor
});
@@ -342,11 +342,11 @@ Ext.define('PVE.openvz.NetworkView', {
//hideHeaders: true,
tbar: [
{
- text: 'Add',
+ text: gettext('Add'),
menu: new Ext.menu.Menu({
items: [
{
- text: 'IP address (venet)',
+ text: gettext('IP address (venet)'),
//plain: true,
//iconCls: 'pve-itype-icon-storage',
handler: function() {
@@ -359,7 +359,7 @@ Ext.define('PVE.openvz.NetworkView', {
}
},
{
- text: 'Ethernet device (veth)',
+ text: gettext('Ethernet device (veth)'),
//plain: true,
//iconCls: 'pve-itype-icon-storage',
handler: function() {
@@ -381,34 +381,34 @@ Ext.define('PVE.openvz.NetworkView', {
],
columns: [
{
- header: 'Type',
+ header: gettext('Type'),
width: 110,
dataIndex: 'type',
renderer: me.renderType
},
{
- header: 'IP/Name',
+ header: gettext('IP/Name'),
width: 110,
dataIndex: 'value',
renderer: me.renderValue
},
{
- header: 'Bridge',
+ header: gettext('Bridge'),
width: 110,
dataIndex: 'bridge'
},
{
- header: 'MAC',
+ header: gettext('MAC'),
width: 110,
dataIndex: 'mac'
},
{
- header: 'Host ifname',
+ header: gettext('Host ifname'),
width: 110,
dataIndex: 'host_ifname'
},
{
- header: 'Host MAC',
+ header: gettext('Host MAC'),
width: 110,
dataIndex: 'host_mac'
}
diff --git a/www/manager/openvz/Options.js b/www/manager/openvz/Options.js
index 9cd3431..8fe293e 100644
--- a/www/manager/openvz/Options.js
+++ b/www/manager/openvz/Options.js
@@ -9,49 +9,49 @@ Ext.define('PVE.openvz.Options', {
var nodename = me.pveSelNode.data.node;
if (!nodename) {
- throw "no node name specified";
+ throw gettext("no node name specified");
}
var vmid = me.pveSelNode.data.vmid;
if (!vmid) {
- throw "no VM ID specified";
+ throw gettext("no VM ID specified");
}
var rows = {
onboot: {
- header: 'Start at boot',
+ header: gettext('Start at boot'),
defaultValue: '',
renderer: PVE.Utils.format_boolean,
editor: {
xtype: 'pveWindowEdit',
- title: 'Start at boot',
+ title: gettext('Start at boot'),
items: {
xtype: 'pvecheckbox',
name: 'onboot',
uncheckedValue: 0,
defaultValue: 0,
- fieldLabel: 'Start at boot'
+ fieldLabel: gettext('Start at boot')
}
}
},
ostemplate: {
- header: 'Template',
+ header: gettext('Template'),
defaultValue: 'no set'
},
storage: {
- header: 'Storage',
+ header: gettext('Storage'),
defaultValue: 'no set'
},
cpuunits: {
- header: 'CPU units',
+ header: gettext('CPU units'),
defaultValue: '1000',
editor: {
xtype: 'pveWindowEdit',
- title: 'CPU units',
+ title: gettext('CPU units'),
items: {
xtype: 'numberfield',
name: 'cpuunits',
- fieldLabel: 'CPU units',
+ fieldLabel: gettext('CPU units'),
minValue: 8,
maxValue: 500000,
allowBlank: false
@@ -59,38 +59,38 @@ Ext.define('PVE.openvz.Options', {
}
},
quotaugidlimit: {
- header: 'Quota UGID limit',
+ header: gettext('Quota UGID limit'),
defaultValue: '0',
renderer: function(value) {
if (value == 0) {
- return 'User quotas disabled.';
+ return gettext('User quotas disabled.');
}
return value;
},
editor: {
xtype: 'pveWindowEdit',
- title: 'Quota UGID limit (0 to disable user quotas)',
+ title: gettext('Quota UGID limit (0 to disable user quotas)'),
items: {
xtype: 'numberfield',
name: 'quotaugidlimit',
- fieldLabel: 'UGID limit',
+ fieldLabel: gettext('UGID limit'),
minValue: 0,
allowBlank: false
}
}
},
quotatime: {
- header: 'Quota Grace period',
+ header: gettext('Quota Grace period'),
defaultValue: '0',
editor: {
xtype: 'pveWindowEdit',
- title: 'Quota Grace period (seconds)',
+ title: gettext('Quota Grace period (seconds)'),
items: {
xtype: 'numberfield',
name: 'quotatime',
minValue: 0,
allowBlank: false,
- fieldLabel: 'Grace period'
+ fieldLabel: gettext('Grace period')
}
}
}
diff --git a/www/manager/openvz/RessourceEdit.js b/www/manager/openvz/RessourceEdit.js
index 4be0151..1a8b7c4 100644
--- a/www/manager/openvz/RessourceEdit.js
+++ b/www/manager/openvz/RessourceEdit.js
@@ -15,7 +15,7 @@ Ext.define('PVE.openvz.RessourceInputPanel', {
maxValue: 128*1024,
value: '512',
step: 32,
- fieldLabel: 'Memory (MB)',
+ fieldLabel: gettext('Memory (MB)'),
allowBlank: false
},
{
@@ -25,7 +25,7 @@ Ext.define('PVE.openvz.RessourceInputPanel', {
maxValue: 128*1024,
value: '512',
step: 32,
- fieldLabel: 'Swap (MB)',
+ fieldLabel: gettext('Swap (MB)'),
allowBlank: false
}
];
@@ -37,7 +37,7 @@ Ext.define('PVE.openvz.RessourceInputPanel', {
minValue: 0.5,
value: '4',
step: 1,
- fieldLabel: 'Disk space (GB)',
+ fieldLabel: gettext('Disk space (GB)'),
allowBlank: false
},
{
@@ -46,7 +46,7 @@ Ext.define('PVE.openvz.RessourceInputPanel', {
minValue: 1,
value: '1',
step: 1,
- fieldLabel: 'CPUs',
+ fieldLabel: gettext('CPUs'),
allowBlank: false
}
];
@@ -62,7 +62,7 @@ Ext.define('PVE.openvz.RessourceEdit', {
var me = this;
Ext.apply(me, {
- title: "Edit ressource settings",
+ title: gettext("Edit ressource settings"),
items: Ext.create('PVE.openvz.RessourceInputPanel')
});
diff --git a/www/manager/openvz/RessourceView.js b/www/manager/openvz/RessourceView.js
index 542d993..ddb7999 100644
--- a/www/manager/openvz/RessourceView.js
+++ b/www/manager/openvz/RessourceView.js
@@ -10,17 +10,17 @@ Ext.define('PVE.openvz.RessourceView', {
var nodename = me.pveSelNode.data.node;
if (!nodename) {
- throw "no node name specified";
+ throw gettext("no node name specified");
}
var vmid = me.pveSelNode.data.vmid;
if (!vmid) {
- throw "no VM ID specified";
+ throw gettext("no VM ID specified");
}
var rows = {
memory: {
- header: 'Memory',
+ header: gettext('Memory'),
editor: 'PVE.openvz.RessourceEdit',
never_delete: true,
renderer: function(value) {
@@ -28,7 +28,7 @@ Ext.define('PVE.openvz.RessourceView', {
}
},
swap: {
- header: 'Swap',
+ header: gettext('Swap'),
editor: 'PVE.openvz.RessourceEdit',
never_delete: true,
renderer: function(value) {
@@ -36,13 +36,13 @@ Ext.define('PVE.openvz.RessourceView', {
}
},
cpus: {
- header: 'Processors',
+ header: gettext('Processors'),
never_delete: true,
editor: 'PVE.openvz.RessourceEdit',
defaultValue: 1
},
disk: {
- header: 'Disk space',
+ header: gettext('Disk space'),
editor: 'PVE.openvz.RessourceEdit',
never_delete: true,
renderer: function(value) {
diff --git a/www/manager/openvz/StatusView.js b/www/manager/openvz/StatusView.js
index 4d2ab2a..d66f4ad 100644
--- a/www/manager/openvz/StatusView.js
+++ b/www/manager/openvz/StatusView.js
@@ -6,12 +6,12 @@ Ext.define('PVE.openvz.StatusView', {
var nodename = me.pveSelNode.data.node;
if (!nodename) {
- throw "no node name specified";
+ throw gettext("no node name specified");
}
var vmid = me.pveSelNode.data.vmid;
if (!vmid) {
- throw "no VM ID specified";
+ throw gettext("no VM ID specified");
}
var render_cpu = function(value, metaData, record, rowIndex, colIndex, store) {
@@ -26,7 +26,7 @@ Ext.define('PVE.openvz.StatusView', {
}
var cpu = value * 100;
- return cpu.toFixed(1) + '% of ' + maxcpu.toString() + (maxcpu > 1 ? 'CPUs' : 'CPU');
+ return cpu.toFixed(1) + '% '+ gettext('of') + ' ' + maxcpu.toString() + (maxcpu > 1 ? 'CPUs' : 'CPU');
};
@@ -39,16 +39,16 @@ Ext.define('PVE.openvz.StatusView', {
var used = value-swap;
var per = (used / max)*100;
- var text = "<div>Total: " + PVE.Utils.format_size(max) + "</div>" +
- "<div>Used: " + PVE.Utils.format_size(used) + "</div>";
+ var text = "<div>" + gettext("Total") + ": " + PVE.Utils.format_size(max) + "</div>" +
+ "<div>" + gettext("Used") + ": " + PVE.Utils.format_size(used) + "</div>";
return text;
};
var render_swap = function(value, metaData, record, rowIndex, colIndex, store) {
var maxswap = me.getObjectValue('maxswap', 0);
var per = (value / maxswap)*100;
- var text = "<div>Total: " + PVE.Utils.format_size(maxswap) + "</div>" +
- "<div>Used: " + PVE.Utils.format_size(value) + "</div>";
+ var text = "<div>" + gettext("Total") + ": " + PVE.Utils.format_size(maxswap) + "</div>" +
+ "<div>" + gettext("Used") + ": " + PVE.Utils.format_size(value) + "</div>";
return text;
};
@@ -61,16 +61,16 @@ Ext.define('PVE.openvz.StatusView', {
};
var rows = {
- name: { header: 'Name', defaultValue: 'no name specified' },
- status: { header: 'Status', defaultValue: 'unknown', renderer: render_status },
+ name: { header: gettext('Name'), defaultValue: gettext('no name specified') },
+ status: { header: gettext('Status'), defaultValue: 'unknown', renderer: render_status },
failcnt: { visible: false },
- cpu: { header: 'CPU usage', required: true, renderer: render_cpu },
+ cpu: { header: gettext('CPU usage'), required: true, renderer: render_cpu },
cpus: { visible: false },
- mem: { header: 'Memory usage', required: true, renderer: render_mem },
+ mem: { header: gettext('Memory usage'), required: true, renderer: render_mem },
maxmem: { visible: false },
- swap: { header: 'VSwap usage', required: true, renderer: render_swap },
+ swap: { header: gettext('VSwap usage'), required: true, renderer: render_swap },
maxswap: { visible: false },
- uptime: { header: 'Uptime', required: true, renderer: PVE.Utils.render_uptime }
+ uptime: { header: gettext('Uptime'), required: true, renderer: PVE.Utils.render_uptime }
};
Ext.applyIf(me, {
diff --git a/www/manager/openvz/Summary.js b/www/manager/openvz/Summary.js
index 692e8a3..91af866 100644
--- a/www/manager/openvz/Summary.js
+++ b/www/manager/openvz/Summary.js
@@ -7,26 +7,26 @@ Ext.define('PVE.openvz.Summary', {
var nodename = me.pveSelNode.data.node;
if (!nodename) {
- throw "no node name specified";
+ throw gettext("no node name specified");
}
var vmid = me.pveSelNode.data.vmid;
if (!vmid) {
- throw "no VM ID specified";
+ throw gettext("no VM ID specified");
}
if (!me.workspace) {
- throw "no workspace specified";
+ throw gettext("no workspace specified");
}
if (!me.statusStore) {
- throw "no status storage specified";
+ throw gettext("no status storage specified");
}
var rstore = me.statusStore;
var statusview = Ext.create('PVE.openvz.StatusView', {
- title: 'Status',
+ title: gettext('Status'),
pveSelNode: me.pveSelNode,
width: 400,
rstore: rstore
@@ -64,28 +64,28 @@ Ext.define('PVE.openvz.Summary', {
},
{
xtype: 'pveRRDView',
- title: "CPU usage %",
+ title: gettext("CPU usage %"),
pveSelNode: me.pveSelNode,
datasource: 'cpu',
rrdurl: rrdurl
},
{
xtype: 'pveRRDView',
- title: "Memory usage",
+ title: gettext("Memory usage"),
pveSelNode: me.pveSelNode,
datasource: 'mem,maxmem',
rrdurl: rrdurl
},
{
xtype: 'pveRRDView',
- title: "Network traffic",
+ title: gettext("Network traffic"),
pveSelNode: me.pveSelNode,
datasource: 'netin,netout',
rrdurl: rrdurl
},
{
xtype: 'pveRRDView',
- title: "Disk IO",
+ title: gettext("Disk IO"),
pveSelNode: me.pveSelNode,
datasource: 'diskread,diskwrite',
rrdurl: rrdurl
diff --git a/www/manager/panel/InputPanel.js b/www/manager/panel/InputPanel.js
index 1c6c9c5..856b1a8 100644
--- a/www/manager/panel/InputPanel.js
+++ b/www/manager/panel/InputPanel.js
@@ -78,7 +78,7 @@ Ext.define('PVE.panel.InputPanel', {
}
];
} else {
- throw "unsupported config";
+ throw gettext("unsupported config");
}
if (me.useFieldContainer) {
diff --git a/www/manager/panel/LogView.js b/www/manager/panel/LogView.js
index a376918..9152994 100644
--- a/www/manager/panel/LogView.js
+++ b/www/manager/panel/LogView.js
@@ -196,7 +196,7 @@ Ext.define('PVE.panel.LogView', {
var me = this;
if (!me.url) {
- throw "no url specified";
+ throw gettext("no url specified");
}
me.dataCmp = Ext.create('Ext.Component', {
diff --git a/www/manager/panel/NotesView.js b/www/manager/panel/NotesView.js
index d7b3a16..bce38fa 100644
--- a/www/manager/panel/NotesView.js
+++ b/www/manager/panel/NotesView.js
@@ -8,7 +8,7 @@ Ext.define('PVE.panel.NotesView', {
url: me.url,
waitMsgTarget: me,
failure: function(response, opts) {
- me.update("Error " + response.htmlStatus);
+ me.update(gettext("Error") + " " + response.htmlStatus);
},
success: function(response, opts) {
var data = response.result.data.description || '';
@@ -22,12 +22,12 @@ Ext.define('PVE.panel.NotesView', {
var nodename = me.pveSelNode.data.node;
if (!nodename) {
- throw "no node name specified";
+ throw gettext("no node name specified");
}
var vmid = me.pveSelNode.data.vmid;
if (!vmid) {
- throw "no VM ID specified";
+ throw gettext("no VM ID specified");
}
var vmtype = me.pveSelNode.data.type;
@@ -38,11 +38,11 @@ Ext.define('PVE.panel.NotesView', {
} else if (vmtype === 'openvz') {
me.url = '/api2/extjs/nodes/' + nodename + '/openvz/' + vmid + '/config';
} else {
- throw "unknown vm type '" + vmtype + "'";
+ throw gettext("unknown vm type") + " '" + vmtype + "'";
}
Ext.apply(me, {
- title: "Notes",
+ title: gettext("Notes"),
style: 'padding-left:10px',
bodyStyle: 'white-space:pre',
bodyPadding: 10,
diff --git a/www/manager/panel/RRDView.js b/www/manager/panel/RRDView.js
index 486a195..90ea80d 100644
--- a/www/manager/panel/RRDView.js
+++ b/www/manager/panel/RRDView.js
@@ -14,11 +14,11 @@ Ext.define('PVE.panel.RRDView', {
}
if (!me.datasource) {
- throw "no datasource specified";
+ throw gettext("no datasource specified");
}
if (!me.rrdurl) {
- throw "no rrdurl specified";
+ throw gettext("no rrdurl specified");
}
var datasource = me.datasource;
diff --git a/www/manager/qemu/BootOrderEdit.js b/www/manager/qemu/BootOrderEdit.js
index 2308ce4..4eb8427 100644
--- a/www/manager/qemu/BootOrderEdit.js
+++ b/www/manager/qemu/BootOrderEdit.js
@@ -62,23 +62,23 @@ Ext.define('PVE.qemu.BootOrderPanel', {
Ext.Object.each(me.vmconfig, function(key, value) {
if ((/^(ide|scsi|virtio)\d+$/).test(key) &&
!(/media=cdrom/).test(value)) {
- list.push([key, "Disk '" + key + "'"]);
+ list.push([key, gettext("Disk") + " '" + key + "'"]);
}
});
}
if (sel1 !== 'd' && (sel2 !== 'd')) {
- list.push(['d', 'CD-ROM']);
+ list.push(['d', gettext('CD-ROM')]);
}
if (sel1 !== 'n' && (sel2 !== 'n')) {
- list.push(['n', 'Network']);
+ list.push(['n', gettext('Network')]);
}
//if (sel1 !== 'a' && (sel2 !== 'a')) {
- // list.push(['a', 'Floppy']);
+ // list.push(['a', gettext('Floppy')]);
//}
if (includeNone) {
- list.push(['', 'None']);
+ list.push(['', gettext('None')]);
}
return list;
@@ -111,7 +111,7 @@ Ext.define('PVE.qemu.BootOrderPanel', {
var me = this;
me.kv1 = Ext.create('PVE.form.KVComboBox', {
- fieldLabel: 'First boot device',
+ fieldLabel: gettext('First boot device'),
labelWidth: 120,
name: 'bd1',
allowBlank: false,
@@ -119,7 +119,7 @@ Ext.define('PVE.qemu.BootOrderPanel', {
});
me.kv2 = Ext.create('PVE.form.KVComboBox', {
- fieldLabel: 'Second boot device',
+ fieldLabel: gettext('Second boot device'),
labelWidth: 120,
name: 'bd2',
allowBlank: false,
@@ -127,7 +127,7 @@ Ext.define('PVE.qemu.BootOrderPanel', {
});
me.kv3 = Ext.create('PVE.form.KVComboBox', {
- fieldLabel: 'Third boot device',
+ fieldLabel: gettext('Third boot device'),
labelWidth: 120,
name: 'bd3',
allowBlank: false,
@@ -183,7 +183,7 @@ Ext.define('PVE.qemu.BootOrderEdit', {
me.callParent();
- me.title = 'Boot order';
+ me.title = gettext('Boot order');
me.load({
success: function(response, options) {
diff --git a/www/manager/qemu/CDEdit.js b/www/manager/qemu/CDEdit.js
index 3db838d..ab8054b 100644
--- a/www/manager/qemu/CDEdit.js
+++ b/www/manager/qemu/CDEdit.js
@@ -82,7 +82,7 @@ Ext.define('PVE.qemu.CDInputPanel', {
xtype: 'radiofield',
name: 'mediaType',
inputValue: 'iso',
- boxLabel: 'Use CD/DVD disc image file (iso)',
+ boxLabel: gettext('Use CD/DVD disc image file (iso)'),
checked: true,
listeners: {
change: function(f, value) {
@@ -100,7 +100,7 @@ Ext.define('PVE.qemu.CDInputPanel', {
name: 'cdimage',
nodename: me.nodename,
storageContent: 'iso',
- fieldLabel: 'ISO Image',
+ fieldLabel: gettext('ISO Image'),
labelAlign: 'right',
allowBlank: false
});
@@ -108,7 +108,7 @@ Ext.define('PVE.qemu.CDInputPanel', {
me.cdstoragesel = Ext.create('PVE.form.StorageSelector', {
name: 'cdstorage',
nodename: me.nodename,
- fieldLabel: 'Storage',
+ fieldLabel: gettext('Storage'),
labelAlign: 'right',
storageContent: 'iso',
allowBlank: false,
@@ -127,14 +127,14 @@ Ext.define('PVE.qemu.CDInputPanel', {
xtype: 'radiofield',
name: 'mediaType',
inputValue: 'cdrom',
- boxLabel: 'Use physical CD/DVD Drive'
+ boxLabel: gettext('Use physical CD/DVD Drive')
});
items.push({
xtype: 'radiofield',
name: 'mediaType',
inputValue: 'none',
- boxLabel: 'Do not use any media'
+ boxLabel: gettext('Do not use any media')
});
if (me.insideWizard) {
@@ -155,7 +155,7 @@ Ext.define('PVE.qemu.CDEdit', {
var nodename = me.pveSelNode.data.node;
if (!nodename) {
- throw "no node name specified";
+ throw gettext("no node name specified");
}
me.create = me.confid ? false : true;
@@ -166,8 +166,8 @@ Ext.define('PVE.qemu.CDEdit', {
});
Ext.applyIf(me, {
- title: me.create ? 'Add CD/DVD Drive' :
- 'Change CD/DVD settings (' + me.confid + ')',
+ title: me.create ? gettext('Add CD/DVD Drive') :
+ Ext.String.format(gettext('Change CD/DVD settings ({0})'), me.confid),
items: [ ipanel ]
});
@@ -180,7 +180,7 @@ Ext.define('PVE.qemu.CDEdit', {
var value = response.result.data[me.confid];
var drive = PVE.Parser.parseQemuDrive(me.confid, value);
if (!drive) {
- Ext.Msg.alert('Error', 'Unable to parse drive options');
+ Ext.Msg.alert(gettext('Error'), gettext('Unable to parse drive options');
me.close();
return;
}
diff --git a/www/manager/qemu/CmdMenu.js b/www/manager/qemu/CmdMenu.js
index 8bf146f..339738f 100644
--- a/www/manager/qemu/CmdMenu.js
+++ b/www/manager/qemu/CmdMenu.js
@@ -5,11 +5,11 @@ Ext.define('PVE.qemu.CmdMenu', {
var me = this;
if (!me.nodename) {
- throw "no node name specified";
+ throw gettext("no node name specified");
}
if (!me.vmid) {
- throw "no VM ID specified";
+ throw gettext("no VM ID specified");
}
var vm_command = function(cmd, params) {
diff --git a/www/manager/qemu/Config.js b/www/manager/qemu/Config.js
index 5f115b2..106cc2e 100644
--- a/www/manager/qemu/Config.js
+++ b/www/manager/qemu/Config.js
@@ -7,12 +7,12 @@ Ext.define('PVE.qemu.Config', {
var nodename = me.pveSelNode.data.node;
if (!nodename) {
- throw "no node name specified";
+ throw gettext("no node name specified");
}
var vmid = me.pveSelNode.data.vmid;
if (!vmid) {
- throw "no VM ID specified";
+ throw gettext("no VM ID specified");
}
me.statusStore = Ext.create('PVE.data.ObjectStore', {
@@ -27,7 +27,7 @@ Ext.define('PVE.qemu.Config', {
waitMsgTarget: me,
method: 'POST',
failure: function(response, opts) {
- Ext.Msg.alert('Error', response.htmlStatus);
+ Ext.Msg.alert(gettext('Error'), response.htmlStatus);
}
});
};
diff --git a/www/manager/qemu/CreateWizard.js b/www/manager/qemu/CreateWizard.js
index 8d937ff..784283f 100644
--- a/www/manager/qemu/CreateWizard.js
+++ b/www/manager/qemu/CreateWizard.js
@@ -23,33 +23,33 @@ Ext.define('PVE.qemu.CreateWizard', {
});
var cdpanel = Ext.create('PVE.qemu.CDInputPanel', {
- title: 'Installation Media',
+ title: gettext('Installation Media'),
confid: 'ide2',
insideWizard: true
});
var hdpanel = Ext.create('PVE.qemu.HDInputPanel', {
- title: 'Harddisk',
+ title: gettext('Harddisk'),
create: true,
insideWizard: true
});
var networkpanel = Ext.create('PVE.qemu.NetworkInputPanel', {
- title: 'Network',
+ title: gettext('Network'),
insideWizard: true
});
Ext.applyIf(me, {
- title: 'Create new virtual machine',
+ title: gettext('Create new virtual machine'),
items: [
{
xtype: 'inputpanel',
- title: 'General',
+ title: gettext('General'),
column1: [
{
xtype: 'PVE.form.NodeSelector',
name: 'nodename',
- fieldLabel: 'Node',
+ fieldLabel: gettext('Node'),
allowBlank: false,
onlineValidator: true,
listeners: {
@@ -70,7 +70,7 @@ Ext.define('PVE.qemu.CreateWizard', {
xtype: 'textfield',
name: 'name',
value: '',
- fieldLabel: 'VM name',
+ fieldLabel: gettext('VM name'),
allowBlank: true
}
],
@@ -82,27 +82,27 @@ Ext.define('PVE.qemu.CreateWizard', {
}
},
{
- title: 'OS Type',
+ title: gettext('OS Type'),
xtype: 'PVE.qemu.OSTypeInputPanel'
},
cdpanel,
hdpanel,
{
xtype: 'PVE.qemu.ProcessorInputPanel',
- title: 'CPU'
+ title: gettext('CPU')
},
{
xtype: 'PVE.qemu.MemoryInputPanel',
insideWizard: true,
- title: 'Memory'
+ title: gettext('Memory')
},
networkpanel,
{
- title: 'Confirm',
+ title: gettext('Confirm'),
layout: 'fit',
items: [
{
- title: 'Settings',
+ title: gettext('Settings'),
xtype: 'grid',
store: summarystore,
columns: [
@@ -148,7 +148,7 @@ Ext.define('PVE.qemu.CreateWizard', {
me.close();
},
failure: function(response, opts) {
- Ext.Msg.alert('Error', response.htmlStatus);
+ Ext.Msg.alert(gettext('Error'), response.htmlStatus);
}
});
}
diff --git a/www/manager/qemu/DisplayEdit.js b/www/manager/qemu/DisplayEdit.js
index 0cabd87..ac40cb2 100644
--- a/www/manager/qemu/DisplayEdit.js
+++ b/www/manager/qemu/DisplayEdit.js
@@ -5,13 +5,13 @@ Ext.define('PVE.qemu.DisplayEdit', {
var me = this;
Ext.apply(me, {
- title: "Edit display settings",
+ title: gettext("Edit display settings"),
width: 350,
items: {
xtype: 'DisplaySelector',
name: 'vga',
value: '',
- fieldLabel: 'Graphic card'
+ fieldLabel: gettext('Graphic card')
}
});
diff --git a/www/manager/qemu/HDEdit.js b/www/manager/qemu/HDEdit.js
index d3f93ce..5b96e32 100644
--- a/www/manager/qemu/HDEdit.js
+++ b/www/manager/qemu/HDEdit.js
@@ -104,7 +104,7 @@ Ext.define('PVE.qemu.HDInputPanel', {
if (me.unused) {
me.unusedDisks = Ext.create('PVE.form.KVComboBox', {
name: 'unusedId',
- fieldLabel: 'Disk image',
+ fieldLabel: gettext('Disk image'),
matchFieldWidth: false,
listConfig: {
width: 350
@@ -117,7 +117,7 @@ Ext.define('PVE.qemu.HDInputPanel', {
me.hdstoragesel = Ext.create('PVE.form.StorageSelector', {
name: 'hdstorage',
nodename: me.nodename,
- fieldLabel: 'Storage',
+ fieldLabel: gettext('Storage'),
storageContent: 'images',
autoSelect: me.insideWizard,
allowBlank: false
@@ -130,13 +130,13 @@ Ext.define('PVE.qemu.HDInputPanel', {
minValue: 1,
maxValue: 128*1024,
value: '32',
- fieldLabel: 'Disk size (GB)',
+ fieldLabel: gettext('Disk size (GB)'),
allowBlank: false
});
} else {
me.column1.push({
xtype: 'displayfield',
- fieldLabel: 'Image',
+ fieldLabel: gettext('Image'),
labelWidth: 50,
name: 'hdimage'
});
@@ -146,7 +146,7 @@ Ext.define('PVE.qemu.HDInputPanel', {
me.column2.push({
xtype: 'PVE.form.DiskFormatSelector',
name: 'diskformat',
- fieldLabel: 'Image format',
+ fieldLabel: gettext('Image format'),
value: 'raw',
allowBlank: false
});
@@ -156,13 +156,13 @@ Ext.define('PVE.qemu.HDInputPanel', {
xtype: 'CacheTypeSelector',
name: 'cache',
value: '',
- fieldLabel: 'Cache'
+ fieldLabel: gettext('Cache')
});
if (!me.insideWizard) {
me.column2.push({
xtype: 'pvecheckbox',
- fieldLabel: 'No backup',
+ fieldLabel: gettext('No backup'),
name: 'nobackup'
});
}
@@ -179,7 +179,7 @@ Ext.define('PVE.qemu.HDEdit', {
var nodename = me.pveSelNode.data.node;
if (!nodename) {
- throw "no node name specified";
+ throw gettext("no node name specified");
}
var unused = me.confid && me.confid.match(/^unused\d+$/);
@@ -195,11 +195,11 @@ Ext.define('PVE.qemu.HDEdit', {
var title;
if (unused) {
- me.title = 'Add (previously unused) Harddisk';
+ me.title = gettext('Add (previously unused) Harddisk');
} else if (me.create) {
- me.title = 'Add Harddisk';
+ me.title = gettext('Add Harddisk');
} else {
- me.title = 'Edit Harddisk settings (' + me.confid + ')';
+ me.title = gettext('Edit Harddisk settings') + ' (' + me.confid + ')';
}
me.items = [ ipanel ];
@@ -213,7 +213,7 @@ Ext.define('PVE.qemu.HDEdit', {
var value = response.result.data[me.confid];
var drive = PVE.Parser.parseQemuDrive(me.confid, value);
if (!drive) {
- Ext.Msg.alert('Error', 'Unable to parse drive options');
+ Ext.Msg.alert(gettext('Error'), gettext('Unable to parse drive options');
me.close();
return;
}
diff --git a/www/manager/qemu/HardwareView.js b/www/manager/qemu/HardwareView.js
index 74f17ab..cc21981 100644
--- a/www/manager/qemu/HardwareView.js
+++ b/www/manager/qemu/HardwareView.js
@@ -14,7 +14,7 @@ Ext.define('PVE.qemu.HardwareView', {
if (rowdef.tdCls == 'pve-itype-icon-storage') {
if (record.data.value.match(/media=cdrom/)) {
metaData.tdCls = 'pve-itype-icon-cdrom';
- return rowdef.header.replace(/Hard Disk/, 'CD/DVD');
+ return rowdef.header.replace(gettext('/Hard Disk/'), 'CD/DVD');
}
}
}
@@ -27,17 +27,17 @@ Ext.define('PVE.qemu.HardwareView', {
var nodename = me.pveSelNode.data.node;
if (!nodename) {
- throw "no node name specified";
+ throw gettext("no node name specified");
}
var vmid = me.pveSelNode.data.vmid;
if (!vmid) {
- throw "no VM ID specified";
+ throw gettext("no VM ID specified");
}
var rows = {
memory: {
- header: 'Memory',
+ header: gettext('Memory'),
editor: 'PVE.qemu.MemoryEdit',
never_delete: true,
tdCls: 'pve-itype-icon-memory',
@@ -46,7 +46,7 @@ Ext.define('PVE.qemu.HardwareView', {
}
},
sockets: {
- header: 'Processors',
+ header: gettext('Processors'),
never_delete: true,
editor: 'PVE.qemu.ProcessorEdit',
tdCls: 'pve-itype-icon-processor',
@@ -67,7 +67,7 @@ Ext.define('PVE.qemu.HardwareView', {
}
},
keyboard: {
- header: 'Keyboard',
+ header: gettext('Keyboard'),
never_delete: true,
editor: 'PVE.qemu.KeyboardEdit',
tdCls: 'pve-itype-icon-keyboard',
@@ -75,7 +75,7 @@ Ext.define('PVE.qemu.HardwareView', {
renderer: PVE.Utils.render_kvm_language
},
vga: {
- header: 'Display',
+ header: gettext('Display'),
editor: 'PVE.qemu.DisplayEdit',
never_delete: true,
tdCls: 'pve-itype-icon-display',
@@ -96,7 +96,7 @@ Ext.define('PVE.qemu.HardwareView', {
group: 1,
tdCls: 'pve-itype-icon-storage',
editor: 'PVE.qemu.HDEdit',
- header: 'Hard Disk ' + '(' + confid +')'
+ header: gettext('Hard Disk') + ' (' + confid +')'
};
}
for (i = 0; i < 16; i++) {
@@ -105,7 +105,7 @@ Ext.define('PVE.qemu.HardwareView', {
group: 1,
tdCls: 'pve-itype-icon-storage',
editor: 'PVE.qemu.HDEdit',
- header: 'Hard Disk ' + '(' + confid +')'
+ header: gettext('Hard Disk') + ' (' + confid +')'
};
}
for (i = 0; i < 16; i++) {
@@ -114,7 +114,7 @@ Ext.define('PVE.qemu.HardwareView', {
group: 1,
tdCls: 'pve-itype-icon-storage',
editor: 'PVE.qemu.HDEdit',
- header: 'Hard Disk ' + '(' + confid +')'
+ header: gettext('Hard Disk') + ' (' + confid +')'
};
}
for (i = 0; i < 32; i++) {
@@ -123,7 +123,7 @@ Ext.define('PVE.qemu.HardwareView', {
group: 2,
tdCls: 'pve-itype-icon-network',
editor: 'PVE.qemu.NetworkEdit',
- header: 'Network Adapter '+ '(' + confid +')'
+ header: gettext('Network Adapter') + ' (' + confid +')'
};
}
for (i = 0; i < 8; i++) {
@@ -131,7 +131,7 @@ Ext.define('PVE.qemu.HardwareView', {
group: 3,
tdCls: 'pve-itype-icon-storage',
editor: 'PVE.qemu.HDEdit',
- header: 'Unused Disk'
+ header: gettext('Unused Disk')
};
}
@@ -181,13 +181,13 @@ Ext.define('PVE.qemu.HardwareView', {
};
var edit_btn = new Ext.Button({
- text: 'Edit',
+ text: gettext('Edit'),
disabled: true,
handler: run_editor
});
var remove_btn = new Ext.Button({
- text: 'Remove',
+ text: gettext('Remove'),
disabled: true,
handler: function(){
var sm = me.getSelectionModel();
@@ -197,15 +197,12 @@ Ext.define('PVE.qemu.HardwareView', {
return;
}
- var msg = 'Are you sure you want to remove: ' +
- me.renderKey(rec.data.key, {}, rec);
+ var msg = Ext.String.format(gettext('Are you sure you want to remove: {0}?'), me.renderKey(rec.data.key, {}, rec));
if (rec.data.key.match(/^unused\d+$/)) {
- msg = 'Are you sure you want to remove image "' +
- rec.data.value + '"? This will permanently erase ' +
- 'all image data.';
+ msg = Ext.String.format(gettext('Are you sure you want to remove image "{0}"? This will permanently erase all image data.'), rec.data.value);
}
- Ext.Msg.confirm('Deletion Confirmation', msg, function(btn) {
+ Ext.Msg.confirm(gettext('Deletion Confirmation'), msg, function(btn) {
if (btn !== 'yes') {
return;
}
@@ -220,7 +217,7 @@ Ext.define('PVE.qemu.HardwareView', {
reload();
},
failure: function (response, opts) {
- Ext.Msg.alert('Error',response.htmlStatus);
+ Ext.Msg.alert(gettext('Error'), response.htmlStatus);
}
});
});
@@ -249,11 +246,11 @@ Ext.define('PVE.qemu.HardwareView', {
cwidth1: 170,
tbar: [
{
- text: 'Add',
+ text: gettext('Add'),
menu: new Ext.menu.Menu({
items: [
{
- text: 'Hard Disk',
+ text: gettext('Hard Disk'),
iconCls: 'pve-itype-icon-storage',
handler: function() {
var win = Ext.create('PVE.qemu.HDEdit', {
@@ -265,7 +262,7 @@ Ext.define('PVE.qemu.HardwareView', {
}
},
{
- text: 'CD/DVD Drive',
+ text: gettext('CD/DVD Drive'),
iconCls: 'pve-itype-icon-cdrom',
handler: function() {
var win = Ext.create('PVE.qemu.CDEdit', {
@@ -277,7 +274,7 @@ Ext.define('PVE.qemu.HardwareView', {
}
},
{
- text: 'Network Device',
+ text: gettext('Network Device'),
iconCls: 'pve-itype-icon-network',
handler: function() {
var win = Ext.create('PVE.qemu.NetworkEdit', {
diff --git a/www/manager/qemu/KeyboardEdit.js b/www/manager/qemu/KeyboardEdit.js
index 2a37513..2a866db 100644
--- a/www/manager/qemu/KeyboardEdit.js
+++ b/www/manager/qemu/KeyboardEdit.js
@@ -5,12 +5,12 @@ Ext.define('PVE.qemu.KeyboardEdit', {
var me = this;
Ext.applyIf(me, {
- title: "Edit keyboard settings",
+ title: gettext("Edit keyboard settings"),
items: {
xtype: 'VNCKeyboardSelector',
name: 'keyboard',
value: '',
- fieldLabel: 'Keyboard Layout'
+ fieldLabel: gettext('Keyboard Layout')
}
});
diff --git a/www/manager/qemu/MemoryEdit.js b/www/manager/qemu/MemoryEdit.js
index a54a218..cab08d8 100644
--- a/www/manager/qemu/MemoryEdit.js
+++ b/www/manager/qemu/MemoryEdit.js
@@ -14,7 +14,7 @@ Ext.define('PVE.qemu.MemoryInputPanel', {
maxValue: 128*1024,
value: '512',
step: 32,
- fieldLabel: 'Memory (MB)',
+ fieldLabel: gettext('Memory (MB)'),
allowBlank: false
};
@@ -35,7 +35,7 @@ Ext.define('PVE.qemu.MemoryEdit', {
var me = this;
Ext.apply(me, {
- title: "Edit memory settings",
+ title: gettext("Edit memory settings"),
items: Ext.create('PVE.qemu.MemoryInputPanel')
});
diff --git a/www/manager/qemu/Monitor.js b/www/manager/qemu/Monitor.js
index cd8e6ec..b5cd914 100644
--- a/www/manager/qemu/Monitor.js
+++ b/www/manager/qemu/Monitor.js
@@ -10,12 +10,12 @@ Ext.define('PVE.qemu.Monitor', {
var nodename = me.pveSelNode.data.node;
if (!nodename) {
- throw "no node name specified";
+ throw gettext("no node name specified");
}
var vmid = me.pveSelNode.data.vmid;
if (!vmid) {
- throw "no VM ID specified";
+ throw gettext("no VM ID specified");
}
var lines = [];
@@ -70,7 +70,7 @@ Ext.define('PVE.qemu.Monitor', {
refresh();
},
failure: function(response, opts) {
- Ext.Msg.alert('Error', response.htmlStatus);
+ Ext.Msg.alert(gettext('Error'), response.htmlStatus);
}
});
};
@@ -92,7 +92,7 @@ Ext.define('PVE.qemu.Monitor', {
listeners: {
afterrender: function(f) {
f.focus(false);
- addLine("Type 'help' for help.");
+ addLine(gettext("Type 'help' for help."));
refresh();
},
specialkey: function(f, e) {
diff --git a/www/manager/qemu/NetworkEdit.js b/www/manager/qemu/NetworkEdit.js
index 1f52dd9..1d8b09b 100644
--- a/www/manager/qemu/NetworkEdit.js
+++ b/www/manager/qemu/NetworkEdit.js
@@ -60,7 +60,7 @@ Ext.define('PVE.qemu.NetworkInputPanel', {
me.bridgesel = Ext.create('PVE.form.BridgeSelector', {
name: 'bridge',
- fieldLabel: 'Bridge',
+ fieldLabel: gettext('Bridge'),
nodename: me.nodename,
labelAlign: 'right',
autoSelect: true,
@@ -73,7 +73,7 @@ Ext.define('PVE.qemu.NetworkInputPanel', {
name: 'networkmode',
height: 22, // hack: set same height as text fields
inputValue: 'bridge',
- boxLabel: 'Bridged mode',
+ boxLabel: gettext('Bridged mode'),
checked: true,
listeners: {
change: function(f, value) {
@@ -91,7 +91,7 @@ Ext.define('PVE.qemu.NetworkInputPanel', {
name: 'networkmode',
height: 22, // hack: set same height as text fields
inputValue: 'nat',
- boxLabel: 'NAT mode'
+ boxLabel: gettext('NAT mode')
}
];
@@ -101,7 +101,7 @@ Ext.define('PVE.qemu.NetworkInputPanel', {
name: 'networkmode',
height: 22, // hack: set same height as text fields
inputValue: 'none',
- boxLabel: 'No network device'
+ boxLabel: gettext('No network device')
});
}
@@ -109,14 +109,14 @@ Ext.define('PVE.qemu.NetworkInputPanel', {
{
xtype: 'PVE.form.NetworkCardSelector',
name: 'model',
- fieldLabel: 'Network card',
+ fieldLabel: gettext('Network card'),
value: 'rtl8139',
allowBlank: false
},
{
xtype: 'textfield',
name: 'macaddr',
- fieldLabel: 'MAC address',
+ fieldLabel: gettext('MAC address'),
vtype: 'MacAddress',
allowBlank: true,
emptyText: 'auto'
@@ -124,7 +124,7 @@ Ext.define('PVE.qemu.NetworkInputPanel', {
{
xtype: 'numberfield',
name: 'rate',
- fieldLabel: 'Rate limit (MB/s)',
+ fieldLabel: gettext('Rate limit (MB/s)'),
minValue: 0,
maxValue: 10*1024,
value: '',
@@ -147,7 +147,7 @@ Ext.define('PVE.qemu.NetworkEdit', {
var nodename = me.pveSelNode.data.node;
if (!nodename) {
- throw "no node name specified";
+ throw gettext("no node name specified");
}
me.create = me.confid ? false : true;
@@ -158,8 +158,8 @@ Ext.define('PVE.qemu.NetworkEdit', {
});
Ext.applyIf(me, {
- title: me.create ? "Add network device" :
- "Edit network device settings",
+ title: me.create ? gettext("Add network device") :
+ gettext("Edit network device settings"),
items: ipanel
});
@@ -173,7 +173,7 @@ Ext.define('PVE.qemu.NetworkEdit', {
var value = me.vmconfig[me.confid];
var network = PVE.Parser.parseQemuNetwork(me.confid, value);
if (!network) {
- Ext.Msg.alert('Error', 'Unable to parse network options');
+ Ext.Msg.alert(gettext('Error'), gettext('Unable to parse network options');
me.close();
return;
}
diff --git a/www/manager/qemu/OSTypeEdit.js b/www/manager/qemu/OSTypeEdit.js
index ce5ea0f..9b9737b 100644
--- a/www/manager/qemu/OSTypeEdit.js
+++ b/www/manager/qemu/OSTypeEdit.js
@@ -8,7 +8,7 @@ Ext.define('PVE.qemu.OSTypeInputPanel', {
me.column1 = [
{
xtype: 'component',
- html: 'Microsoft Windows',
+ html: gettext('Microsoft Windows'),
cls:'x-form-check-group-label'
},
{
@@ -36,7 +36,7 @@ Ext.define('PVE.qemu.OSTypeInputPanel', {
me.column2 = [
{
xtype: 'component',
- html: 'Linux/Other',
+ html: gettext('Linux/Other'),
cls:'x-form-check-group-label'
},
{
@@ -85,7 +85,7 @@ Ext.define('PVE.qemu.OSTypeEdit', {
var me = this;
Ext.apply(me, {
- title: 'OS Type',
+ title: gettext('OS Type'),
items: Ext.create('PVE.qemu.OSTypeInputPanel')
});
diff --git a/www/manager/qemu/Options.js b/www/manager/qemu/Options.js
index dc7b36e..05b415c 100644
--- a/www/manager/qemu/Options.js
+++ b/www/manager/qemu/Options.js
@@ -9,50 +9,50 @@ Ext.define('PVE.qemu.Options', {
var nodename = me.pveSelNode.data.node;
if (!nodename) {
- throw "no node name specified";
+ throw gettext("no node name specified");
}
var vmid = me.pveSelNode.data.vmid;
if (!vmid) {
- throw "no VM ID specified";
+ throw gettext("no VM ID specified");
}
var rows = {
name: {
required: true,
defaultValue: me.pveSelNode.data.name,
- header: 'Name',
+ header: gettext('Name'),
editor: {
xtype: 'pveWindowEdit',
- title: 'VM name',
+ title: gettext('VM name'),
items: {
xtype: 'textfield',
name: 'name',
value: '',
- fieldLabel: 'VM name',
+ fieldLabel: gettext('VM name'),
allowBlank: true
}
}
},
onboot: {
- header: 'Start at boot',
+ header: gettext('Start at boot'),
defaultValue: '',
renderer: PVE.Utils.format_boolean,
editor: {
xtype: 'pveWindowEdit',
- title: 'Start at boot',
+ title: gettext('Start at boot)',
items: {
xtype: 'pvecheckbox',
name: 'onboot',
uncheckedValue: 0,
defaultValue: 0,
deleteDefaultValue: true,
- fieldLabel: 'Start at boot'
+ fieldLabel: gettext('Start at boot')
}
}
},
ostype: {
- header: 'OS Type',
+ header: gettext('OS Type'),
editor: 'PVE.qemu.OSTypeEdit',
renderer: PVE.Utils.render_kvm_ostype,
defaultValue: 'other'
@@ -61,7 +61,7 @@ Ext.define('PVE.qemu.Options', {
visible: false
},
boot: {
- header: 'Boot order',
+ header: gettext('Boot order'),
defaultValue: 'cdn',
editor: 'PVE.qemu.BootOrderEdit',
renderer: function(order) {
@@ -76,16 +76,16 @@ Ext.define('PVE.qemu.Options', {
}
if (sel === 'c') {
if (bootdisk) {
- text += "Disk '" + bootdisk + "'";
+ text += gettext("Disk") + " '" + bootdisk + "'";
} else {
- text += "Disk";
+ text += gettext("Disk");
}
} else if (sel === 'n') {
- text += 'Network';
+ text += gettext('Network');
} else if (sel === 'a') {
- text += 'Floppy';
+ text += gettext('Floppy');
} else if (sel === 'd') {
- text += 'CD-ROM';
+ text += gettext('CD-ROM');
} else {
text += sel;
}
@@ -94,12 +94,12 @@ Ext.define('PVE.qemu.Options', {
}
},
acpi: {
- header: 'ACPI support',
+ header: gettext('ACPI support'),
defaultValue: true,
renderer: PVE.Utils.format_boolean,
editor: {
xtype: 'pveWindowEdit',
- title: 'ACPI support',
+ title: gettext('ACPI support'),
items: {
xtype: 'pvecheckbox',
name: 'acpi',
@@ -107,17 +107,17 @@ Ext.define('PVE.qemu.Options', {
uncheckedValue: 0,
defaultValue: 1,
deleteDefaultValue: true,
- fieldLabel: 'Enable'
+ fieldLabel: gettext('Enable')
}
}
},
kvm: {
- header: 'KVM hardware virtualization',
+ header: gettext('KVM hardware virtualization'),
defaultValue: true,
renderer: PVE.Utils.format_boolean,
editor: {
xtype: 'pveWindowEdit',
- title: 'KVM hardware virtualization',
+ title: gettext('KVM hardware virtualization'),
items: {
xtype: 'pvecheckbox',
name: 'kvm',
@@ -125,17 +125,17 @@ Ext.define('PVE.qemu.Options', {
uncheckedValue: 0,
defaultValue: 1,
deleteDefaultValue: true,
- fieldLabel: 'Enable'
+ fieldLabel: gettext('Enable')
}
}
},
freeze: {
- header: 'Freeze CPU at startup',
+ header: gettext('Freeze CPU at startup'),
defaultValue: false,
renderer: PVE.Utils.format_boolean,
editor: {
xtype: 'pveWindowEdit',
- title: 'Freeze CPU at startup',
+ title: gettext('Freeze CPU at startup'),
items: {
xtype: 'pvecheckbox',
name: 'freeze',
@@ -143,17 +143,17 @@ Ext.define('PVE.qemu.Options', {
defaultValue: 0,
deleteDefaultValue: true,
labelWidth: 140,
- fieldLabel: 'Freeze CPU at startup'
+ fieldLabel: gettext('Freeze CPU at startup')
}
}
},
localtime: {
- header: 'Use local time for RTC',
+ header: gettext('Use local time for RTC'),
defaultValue: false,
renderer: PVE.Utils.format_boolean,
editor: {
xtype: 'pveWindowEdit',
- title: 'Use local time for RTC',
+ title: gettext('Use local time for RTC'),
items: {
xtype: 'pvecheckbox',
name: 'localtime',
@@ -161,23 +161,23 @@ Ext.define('PVE.qemu.Options', {
defaultValue: 0,
deleteDefaultValue: true,
labelWidth: 140,
- fieldLabel: 'Use local time for RTC'
+ fieldLabel: gettext('Use local time for RTC')
}
}
},
startdate: {
- header: 'RTC start date',
+ header: gettext('RTC start date'),
defaultValue: 'now',
editor: {
xtype: 'pveWindowEdit',
- title: 'RTC start date',
+ title: gettext('RTC start date'),
items: {
xtype: 'pvetextfield',
name: 'startdate',
deleteEmpty: true,
value: 'now',
- fieldLabel: 'RTC start date',
+ fieldLabel: gettext('RTC start date'),
vtype: 'QemuStartDate',
allowBlank: true
}
@@ -225,7 +225,7 @@ Ext.define('PVE.qemu.Options', {
};
var edit_btn = new Ext.Button({
- text: 'Edit',
+ text: getext('Edit'),
disabled: true,
handler: run_editor
});
diff --git a/www/manager/qemu/ProcessorEdit.js b/www/manager/qemu/ProcessorEdit.js
index 19002d2..c645b3f 100644
--- a/www/manager/qemu/ProcessorEdit.js
+++ b/www/manager/qemu/ProcessorEdit.js
@@ -12,7 +12,7 @@ Ext.define('PVE.qemu.ProcessorInputPanel', {
minValue: 1,
maxValue: 4,
value: '1',
- fieldLabel: 'Sockets',
+ fieldLabel: gettext('Sockets'),
allowBlank: false,
listeners: {
change: function(f, value) {
@@ -28,7 +28,7 @@ Ext.define('PVE.qemu.ProcessorInputPanel', {
minValue: 1,
maxValue: 32,
value: '1',
- fieldLabel: 'Cores',
+ fieldLabel: gettext('Cores'),
allowBlank: false,
listeners: {
change: function(f, value) {
@@ -46,11 +46,11 @@ Ext.define('PVE.qemu.ProcessorInputPanel', {
xtype: 'CPUModelSelector',
name: 'cpu',
value: '',
- fieldLabel: 'CPU type'
+ fieldLabel: gettext('CPU type)'
},
{
xtype: 'displayfield',
- fieldLabel: 'Total cores',
+ fieldLabel: gettext('Total cores'),
name: 'totalcores',
value: '1'
}
@@ -68,7 +68,7 @@ Ext.define('PVE.qemu.ProcessorEdit', {
var me = this;
Ext.apply(me, {
- title: "Edit processor settings",
+ title: gettext("Edit processor settings"),
items: Ext.create('PVE.qemu.ProcessorInputPanel')
});
diff --git a/www/manager/qemu/SendKeyMenu.js b/www/manager/qemu/SendKeyMenu.js
index 72f1a2d..25350db 100644
--- a/www/manager/qemu/SendKeyMenu.js
+++ b/www/manager/qemu/SendKeyMenu.js
@@ -6,11 +6,11 @@ Ext.define('PVE.qemu.SendKeyMenu', {
var me = this;
if (!me.nodename) {
- throw "no node name specified";
+ throw gettext("no node name specified");
}
if (!me.vmid) {
- throw "no VM ID specified";
+ throw gettext("no VM ID specified");
}
var sendKey = function(key) {
@@ -20,83 +20,83 @@ Ext.define('PVE.qemu.SendKeyMenu', {
method: 'PUT',
waitMsgTarget: me,
failure: function(response, opts) {
- Ext.Msg.alert('Error', response.htmlStatus);
+ Ext.Msg.alert(getext('Error'), response.htmlStatus);
}
});
};
Ext.apply(me, {
- text: 'SendKey',
+ text: gettext('SendKey'),
menu: new Ext.menu.Menu({
height: 200,
items: [
{
- text: 'Ctrl-Alt-Delete', handler: function() {
+ text: gettext('Ctrl-Alt-Delete'), handler: function() {
sendKey('ctrl-alt-delete');
}
},
{
- text: 'Ctrl-Alt-Backspace', handler: function() {
+ text: gettext('Ctrl-Alt-Backspace'), handler: function() {
sendKey('ctrl-alt-backspace');
}
},
{
- text: 'Ctrl-Alt-F1', handler: function() {
+ text: gettext('Ctrl-Alt-F1'), handler: function() {
sendKey('ctrl-alt-f1');
}
},
{
- text: 'Ctrl-Alt-F2', handler: function() {
+ text: gettext('Ctrl-Alt-F2'), handler: function() {
sendKey('ctrl-alt-f2');
}
},
{
- text: 'Ctrl-Alt-F3', handler: function() {
+ text: gettext('Ctrl-Alt-F3'), handler: function() {
sendKey('ctrl-alt-f3');
}
},
{
- text: 'Ctrl-Alt-F4', handler: function() {
+ text: gettext('Ctrl-Alt-F4'), handler: function() {
sendKey('ctrl-alt-f4');
}
},
{
- text: 'Ctrl-Alt-F5', handler: function() {
+ text: gettext('Ctrl-Alt-F5'), handler: function() {
sendKey('ctrl-alt-f5');
}
},
{
- text: 'Ctrl-Alt-F6', handler: function() {
+ text: gettext('Ctrl-Alt-F6'), handler: function() {
sendKey('ctrl-alt-f6');
}
},
{
- text: 'Ctrl-Alt-F7', handler: function() {
+ text: gettext('Ctrl-Alt-F7'), handler: function() {
sendKey('ctrl-alt-f7');
}
},
{
- text: 'Ctrl-Alt-F8', handler: function() {
+ text: gettext('Ctrl-Alt-F8'), handler: function() {
sendKey('ctrl-alt-f8');
}
},
{
- text: 'Ctrl-Alt-F9', handler: function() {
+ text: gettext('Ctrl-Alt-F9'), handler: function() {
sendKey('ctrl-alt-f9');
}
},
{
- text: 'Ctrl-Alt-F10', handler: function() {
+ text: gettext('Ctrl-Alt-F10'), handler: function() {
sendKey('ctrl-alt-f10');
}
},
{
- text: 'Ctrl-Alt-F11', handler: function() {
+ text: gettext('Ctrl-Alt-F11'), handler: function() {
sendKey('ctrl-alt-f11');
}
},
{
- text: 'Ctrl-Alt-F12', handler: function() {
+ text: gettext('Ctrl-Alt-F12'), handler: function() {
sendKey('ctrl-alt-f12');
}
}
diff --git a/www/manager/qemu/StatusView.js b/www/manager/qemu/StatusView.js
index 357c000..4488a69 100644
--- a/www/manager/qemu/StatusView.js
+++ b/www/manager/qemu/StatusView.js
@@ -7,12 +7,12 @@ Ext.define('PVE.qemu.StatusView', {
var nodename = me.pveSelNode.data.node;
if (!nodename) {
- throw "no node name specified";
+ throw gettext("no node name specified");
}
var vmid = me.pveSelNode.data.vmid;
if (!vmid) {
- throw "no VM ID specified";
+ throw gettext("no VM ID specified");
}
var render_cpu = function(value, metaData, record, rowIndex, colIndex, store) {
@@ -28,25 +28,25 @@ Ext.define('PVE.qemu.StatusView', {
var per = (value * 100);
- return per.toFixed(1) + '% of ' + maxcpu.toString() + (maxcpu > 1 ? 'CPUs' : 'CPU');
+ return Ext.String.format('{0}% of {1} {2}', per.toFixed(1), maxcpu.toString(), (maxcpu > 1 ? gettext('CPUs') : gettext('CPU'));
};
var render_mem = function(value, metaData, record, rowIndex, colIndex, store) {
var maxmem = me.getObjectValue('maxmem', 0);
var per = (value / maxmem)*100;
- var text = "<div>Total: " + PVE.Utils.format_size(maxmem) + "</div>" +
- "<div>Used: " + PVE.Utils.format_size(value) + "</div>";
+ var text = "<div>" + gettext("Total") + ": " + PVE.Utils.format_size(maxmem) + "</div>" +
+ "<div>" + gettext("Used") + ": " + PVE.Utils.format_size(value) + "</div>";
return text;
};
var rows = {
- name: { header: 'Name', defaultValue: 'no name specified' },
- status: { header: 'Status', defaultValue: 'unknown' },
- cpu: { header: 'CPU usage', required: true, renderer: render_cpu },
+ name: { header: gettext('Name'), defaultValue: gettext('no name specified') },
+ status: { header: gettext('Status'), defaultValue: 'unknown' },
+ cpu: { header: gettext('CPU usage'), required: true, renderer: render_cpu },
cpus: { visible: false },
- mem: { header: 'Memory usage', required: true, renderer: render_mem },
+ mem: { header: gettext('Memory usage'), required: true, renderer: render_mem },
maxmem: { visible: false },
- uptime: { header: 'Uptime', required: true, renderer: PVE.Utils.render_uptime }
+ uptime: { header: gettext('Uptime'), required: true, renderer: PVE.Utils.render_uptime }
};
Ext.applyIf(me, {
diff --git a/www/manager/qemu/Summary.js b/www/manager/qemu/Summary.js
index d0de526..93d8611 100644
--- a/www/manager/qemu/Summary.js
+++ b/www/manager/qemu/Summary.js
@@ -7,26 +7,26 @@ Ext.define('PVE.qemu.Summary', {
var nodename = me.pveSelNode.data.node;
if (!nodename) {
- throw "no node name specified";
+ throw gettext("no node name specified");
}
var vmid = me.pveSelNode.data.vmid;
if (!vmid) {
- throw "no VM ID specified";
+ throw gettext("no VM ID specified");
}
if (!me.workspace) {
- throw "no workspace specified";
+ throw gettext("no workspace specified");
}
if (!me.statusStore) {
- throw "no status storage specified";
+ throw gettext("no status storage specified");
}
var rstore = me.statusStore;
var statusview = Ext.create('PVE.qemu.StatusView', {
- title: 'Status',
+ title: gettext('Status'),
pveSelNode: me.pveSelNode,
width: 400,
rstore: rstore
@@ -59,28 +59,28 @@ Ext.define('PVE.qemu.Summary', {
},
{
xtype: 'pveRRDView',
- title: "CPU usage %",
+ title: gettext("CPU usage %"),
pveSelNode: me.pveSelNode,
datasource: 'cpu',
rrdurl: rrdurl
},
{
xtype: 'pveRRDView',
- title: "Memory usage",
+ title: gettext("Memory usage"),
pveSelNode: me.pveSelNode,
datasource: 'mem,maxmem',
rrdurl: rrdurl
},
{
xtype: 'pveRRDView',
- title: "Network traffic",
+ title: gettext("Network traffic"),
pveSelNode: me.pveSelNode,
datasource: 'netin,netout',
rrdurl: rrdurl
},
{
xtype: 'pveRRDView',
- title: "Disk IO",
+ title: gettext("Disk IO"),
pveSelNode: me.pveSelNode,
datasource: 'diskread,diskwrite',
rrdurl: rrdurl
diff --git a/www/manager/storage/Browser.js b/www/manager/storage/Browser.js
index 079997d..77e538c 100644
--- a/www/manager/storage/Browser.js
+++ b/www/manager/storage/Browser.js
@@ -7,12 +7,12 @@ Ext.define('PVE.storage.Browser', {
var nodename = me.pveSelNode.data.node;
if (!nodename) {
- throw "no node name specified";
+ throw getext("no node name specified");
}
var storeid = me.pveSelNode.data.storage;
if (!storeid) {
- throw "no storage ID specified";
+ throw getext("no storage ID specified");
}
Ext.apply(me, {
diff --git a/www/manager/storage/ContentView.js b/www/manager/storage/ContentView.js
index c14c7b4..8908abc 100644
--- a/www/manager/storage/ContentView.js
+++ b/www/manager/storage/ContentView.js
@@ -13,17 +13,17 @@ Ext.define('PVE.storage.Upload', {
var xhr;
if (!me.nodename) {
- throw "no node name specified";
+ throw gettext("no node name specified");
}
if (!me.storage) {
- throw "no storage ID specified";
+ throw gettext("no storage ID specified");
}
var baseurl = "/nodes/" + me.nodename + "/storage/" + me.storage + "/upload";
var pbar = Ext.create('Ext.ProgressBar', {
- text: 'Ready',
+ text: gettext('Ready'),
hidden: true
});
@@ -41,19 +41,19 @@ Ext.define('PVE.storage.Upload', {
{
xtype: 'pveKVComboBox',
data: [
- ['iso', 'ISO image'],
- ['backup', 'VZDump backup file'],
- ['vztmpl', 'OpenVZ template']
+ ['iso', gettext('ISO image')],
+ ['backup', gettext('VZDump backup file')],
+ ['vztmpl', gettext('OpenVZ template')]
],
- fieldLabel: 'Content type',
+ fieldLabel: gettext('Content type'),
name: 'content',
value: 'iso'
},
{
xtype: 'filefield',
name: 'filename',
- filedLabel: 'File',
- buttonText: 'Select File...',
+ filedLabel: gettext('File'),
+ buttonText: gettext('Select File...'),
allowBlank: false
},
pbar
@@ -65,7 +65,7 @@ Ext.define('PVE.storage.Upload', {
var doStandardSubmit = function() {
form.submit({
url: "/api2/htmljs" + baseurl,
- waitMsg: 'Uploading file...',
+ waitMsg: gettext('Uploading file...'),
success: function(f, action) {
me.close();
},
@@ -85,7 +85,7 @@ Ext.define('PVE.storage.Upload', {
};
var abortBtn = Ext.create('Ext.Button', {
- text: 'Abort',
+ text: gettext('Abort'),
disabled: true,
handler: function() {
me.close();
@@ -93,7 +93,7 @@ Ext.define('PVE.storage.Upload', {
});
var submitBtn = Ext.create('Ext.Button', {
- text: 'Upload',
+ text: gettext('Upload'),
disabled: true,
handler: function(button) {
var fd;
@@ -125,8 +125,8 @@ Ext.define('PVE.storage.Upload', {
if (xhr.status == 200) {
me.close();
} else {
- var msg = "Error " + xhr.status.toString() + ": " + Ext.htmlEncode(xhr.statusText);
- Ext.Msg.alert('Upload failed', msg, function(btn) {
+ var msg = gettext("Error ") + xhr.status.toString() + ": " + Ext.htmlEncode(xhr.statusText);
+ Ext.Msg.alert(gettext('Upload failed'), msg, function(btn) {
me.close();
});
@@ -134,8 +134,8 @@ Ext.define('PVE.storage.Upload', {
}, false);
xhr.addEventListener("error", function(e) {
- var msg = "Error " + e.target.status.toString() + " occurred while receiving the document.";
- Ext.Msg.alert('Upload failed', msg, function(btn) {
+ var msg = gettext("Error ") + e.target.status.toString() + " " + gettext("occurred while receiving the document.");
+ Ext.Msg.alert(gettext('Upload failed'), msg, function(btn) {
me.close();
});
});
@@ -157,7 +157,7 @@ Ext.define('PVE.storage.Upload', {
});
Ext.applyIf(me, {
- title: 'Upload',
+ title: gettext('Upload'),
items: me.formPanel,
buttons: [ abortBtn, submitBtn ],
listeners: {
@@ -183,12 +183,12 @@ Ext.define('PVE.storage.ContentView', {
var nodename = me.pveSelNode.data.node;
if (!nodename) {
- throw "no node name specified";
+ throw gettext("no node name specified");
}
var storage = me.pveSelNode.data.storage;
if (!storage) {
- throw "no storage ID specified";
+ throw gettext("no storage ID specified");
}
var baseurl = "/nodes/" + nodename + "/storage/" + storage + "/content";
@@ -226,7 +226,7 @@ Ext.define('PVE.storage.ContentView', {
tbar: [
{
xtype: 'pveButton',
- text: 'Restore',
+ text: gettext('Restore'),
selModel: sm,
disabled: true,
enableFn: function(rec) {
@@ -254,11 +254,11 @@ Ext.define('PVE.storage.ContentView', {
},
{
xtype: 'pveButton',
- text: 'Delete',
+ text: gettext('Delete'),
selModel: sm,
disabled: true,
confirmMsg: function(rec) {
- return 'Are you sure you want to delete volume "' + rec.data.volid + '"';
+ return Ext.String.format(gettext('Are you sure you want to delete volume "{0}"'), rec.data.volid);
},
enableFn: function(rec) {
return rec && rec.data.content !== 'images';
@@ -272,7 +272,7 @@ Ext.define('PVE.storage.ContentView', {
reload();
},
failure: function (response, opts) {
- Ext.Msg.alert('Error', response.htmlStatus);
+ Ext.Msg.alert(gettext('Error'), response.htmlStatus);
}
});
}
@@ -291,19 +291,19 @@ Ext.define('PVE.storage.ContentView', {
],
columns: [
{
- header: 'Name',
+ header: gettext('Name'),
flex: 1,
sortable: true,
renderer: PVE.Utils.render_storage_content,
dataIndex: 'text'
},
{
- header: 'Format',
+ header: gettext('Format'),
width: 100,
dataIndex: 'format'
},
{
- header: 'Size',
+ header: gettext('Size'),
width: 100,
renderer: PVE.Utils.format_size,
dataIndex: 'size'
diff --git a/www/manager/storage/DirEdit.js b/www/manager/storage/DirEdit.js
index b193c68..aa6c111 100644
--- a/www/manager/storage/DirEdit.js
+++ b/www/manager/storage/DirEdit.js
@@ -26,7 +26,7 @@ Ext.define('PVE.storage.DirInputPanel', {
name: 'storage',
height: 22, // hack: set same height as text fields
value: me.storageId || '',
- fieldLabel: 'ID',
+ fieldLabel: gettext('ID'),
vtype: 'StorageId',
allowBlank: false
},
diff --git a/www/manager/storage/IScsiEdit.js b/www/manager/storage/IScsiEdit.js
index 0001419..b16349f 100644
--- a/www/manager/storage/IScsiEdit.js
+++ b/www/manager/storage/IScsiEdit.js
@@ -46,7 +46,7 @@ Ext.define('PVE.storage.IScsiScan', {
displayField: 'target',
matchFieldWidth: false,
listConfig: {
- loadingText: 'Scanning...',
+ loadingText: gettext('Scanning...'),
width: 350
}
});
@@ -86,7 +86,7 @@ Ext.define('PVE.storage.IScsiInputPanel', {
name: 'storage',
height: 22, // hack: set same height as text fields
value: me.storageId || '',
- fieldLabel: 'ID',
+ fieldLabel: gettext('ID'),
vtype: 'StorageId',
allowBlank: false
},
@@ -95,7 +95,7 @@ Ext.define('PVE.storage.IScsiInputPanel', {
height: 22, // hack: set same height as text fields
name: 'portal',
value: '',
- fieldLabel: 'Portal',
+ fieldLabel: gettext('Portal'),
allowBlank: false,
listeners: {
change: function(f, value) {
@@ -112,7 +112,7 @@ Ext.define('PVE.storage.IScsiInputPanel', {
xtype: me.create ? 'pveIScsiScan' : 'displayfield',
name: 'target',
value: '',
- fieldLabel: 'Target',
+ fieldLabel: gettext('Target'),
allowBlank: false
}
];
diff --git a/www/manager/storage/LVMEdit.js b/www/manager/storage/LVMEdit.js
index 7aae749..a8a0368 100644
--- a/www/manager/storage/LVMEdit.js
+++ b/www/manager/storage/LVMEdit.js
@@ -25,7 +25,7 @@ Ext.define('PVE.storage.VgSelector', {
queryMode: 'local',
editable: false,
listConfig: {
- loadingText: 'Scanning...'
+ loadingText: gettext('Scanning...')
}
});
@@ -109,7 +109,7 @@ Ext.define('PVE.storage.LVMInputPanel', {
name: 'storage',
height: 22, // hack: set same height as text fields
value: me.storageId || '',
- fieldLabel: 'ID',
+ fieldLabel: gettext('ID'),
vtype: 'StorageId',
submitValue: !!me.create,
allowBlank: false
diff --git a/www/manager/storage/NFSEdit.js b/www/manager/storage/NFSEdit.js
index 570ff90..382985d 100644
--- a/www/manager/storage/NFSEdit.js
+++ b/www/manager/storage/NFSEdit.js
@@ -83,7 +83,7 @@ Ext.define('PVE.storage.NFSInputPanel', {
name: 'storage',
height: 22, // hack: set same height as text fields
value: me.storageId || '',
- fieldLabel: 'ID',
+ fieldLabel: gettext('ID'),
vtype: 'StorageId',
allowBlank: false
},
@@ -109,7 +109,7 @@ Ext.define('PVE.storage.NFSInputPanel', {
height: 22, // hack: set same height as text fields
name: 'export',
value: '',
- fieldLabel: 'Export',
+ fieldLabel: gettext('Export'),
allowBlank: false
},
{
diff --git a/www/manager/storage/StatusView.js b/www/manager/storage/StatusView.js
index be06b5f..8e7c9d9 100644
--- a/www/manager/storage/StatusView.js
+++ b/www/manager/storage/StatusView.js
@@ -7,47 +7,47 @@ Ext.define('PVE.storage.StatusView', {
var nodename = me.pveSelNode.data.node;
if (!nodename) {
- throw "no node name specified";
+ throw gettext("no node name specified");
}
var storage = me.pveSelNode.data.storage;
if (!storage) {
- throw "no storage ID specified";
+ throw gettext("no storage ID specified");
}
var rows = {
disable: {
- header: 'Enabled',
+ header: gettext('Enabled'),
required: true,
renderer: PVE.Utils.format_neg_boolean
},
active: {
- header: 'Active',
+ header: gettext('Active'),
required: true,
renderer: PVE.Utils.format_boolean
},
content: {
- header: 'Content',
+ header: gettext('Content'),
required: true,
renderer: PVE.Utils.format_content_types
},
type: {
- header: 'Type',
+ header: gettext('Type'),
required: true,
renderer: PVE.Utils.format_storage_type
},
shared: {
- header: 'Shared',
+ header: gettext('Shared'),
required: true,
renderer: PVE.Utils.format_boolean
},
total: {
- header: 'Size',
+ header: gettext('Size'),
required: true,
renderer: PVE.Utils.render_size
},
used: {
- header: 'Used',
+ header: gettext('Used'),
required: true,
renderer: function(value) {
// do not confuse users with filesystem details
@@ -57,7 +57,7 @@ Ext.define('PVE.storage.StatusView', {
}
},
avail: {
- header: 'Avail',
+ header: gettext('Avail'),
required: true,
renderer: PVE.Utils.render_size
}
diff --git a/www/manager/storage/Summary.js b/www/manager/storage/Summary.js
index c29b242..d4ceb37 100644
--- a/www/manager/storage/Summary.js
+++ b/www/manager/storage/Summary.js
@@ -7,16 +7,16 @@ Ext.define('PVE.storage.Summary', {
var nodename = me.pveSelNode.data.node;
if (!nodename) {
- throw "no node name specified";
+ throw gettext("no node name specified");
}
var storage = me.pveSelNode.data.storage;
if (!storage) {
- throw "no storage ID specified";
+ throw gettext("no storage ID specified");
}
var statusview = Ext.create('PVE.storage.StatusView', {
- title: 'Status',
+ title: gettext('Status'),
pveSelNode: me.pveSelNode,
style: 'padding-top:0px'
});
@@ -42,7 +42,7 @@ Ext.define('PVE.storage.Summary', {
statusview,
{
xtype: 'pveRRDView',
- title: "Usage",
+ title: gettext("Usage"),
pveSelNode: me.pveSelNode,
datasource: 'total,used',
rrdurl: rrdurl
diff --git a/www/manager/tree/ResourceTree.js b/www/manager/tree/ResourceTree.js
index cbacc24..e17d750 100644
--- a/www/manager/tree/ResourceTree.js
+++ b/www/manager/tree/ResourceTree.js
@@ -387,7 +387,7 @@ Ext.define('PVE.tree.ResourceTree', {
},
checkVmMigration: function(record) {
if (!(record.data.type === 'qemu' || record.data.type === 'openvz')) {
- throw "not a vm type";
+ throw gettext("not a vm type");
}
var rootnode = me.store.getRootNode();
diff --git a/www/manager/window/Backup.js b/www/manager/window/Backup.js
index 5787de0..91f65a3 100644
--- a/www/manager/window/Backup.js
+++ b/www/manager/window/Backup.js
@@ -7,15 +7,15 @@ Ext.define('PVE.window.Backup', {
var me = this;
if (!me.nodename) {
- throw "no node name specified";
+ throw gettext("no node name specified");
}
if (!me.vmid) {
- throw "no VM ID specified";
+ throw gettext("no VM ID specified");
}
if (!me.vmtype) {
- throw "no VM type specified";
+ throw gettext("no VM type specified");
}
var storagesel = Ext.create('PVE.form.StorageSelector', {
@@ -55,7 +55,7 @@ Ext.define('PVE.window.Backup', {
var form = me.formPanel.getForm();
var submitBtn = Ext.create('Ext.Button', {
- text: 'Backup',
+ text: gettext('Backup'),
handler: function(){
var storage = storagesel.getValue();
var values = form.getValues();
@@ -71,7 +71,7 @@ Ext.define('PVE.window.Backup', {
},
method: 'POST',
failure: function (response, opts) {
- Ext.Msg.alert('Error',response.htmlStatus);
+ Ext.Msg.alert(gettext('Error'), response.htmlStatus);
},
success: function(response, options) {
var upid = response.result.data;
@@ -87,8 +87,8 @@ Ext.define('PVE.window.Backup', {
});
var title = (me.vmtype === 'openvz') ?
- "Backup CT " + me.vmid :
- "Backup VM " + me.vmid;
+ Ext.String.format(getext("Backup CT {0}"), me.vmid) :
+ Ext.String.format(getext("Backup VM {0}"), me.vmid);
Ext.apply(me, {
title: title,
diff --git a/www/manager/window/Edit.js b/www/manager/window/Edit.js
index eb122de..03cc8a1 100644
--- a/www/manager/window/Edit.js
+++ b/www/manager/window/Edit.js
@@ -171,7 +171,7 @@ Ext.define('PVE.window.Edit', {
});
var resetBtn = Ext.create('Ext.Button', {
- text: 'Reset',
+ text: getext('Reset'),
disabled: true,
handler: function(){
form.reset();
diff --git a/www/manager/window/Migrate.js b/www/manager/window/Migrate.js
index 8239c2d..ecca1cc 100644
--- a/www/manager/window/Migrate.js
+++ b/www/manager/window/Migrate.js
@@ -11,7 +11,7 @@ Ext.define('PVE.window.Migrate', {
waitMsgTarget: me,
method: 'POST',
failure: function(response, opts) {
- Ext.Msg.alert('Error', response.htmlStatus);
+ Ext.Msg.alert(gettext('Error'), response.htmlStatus);
},
success: function(response, options) {
var upid = response.result.data;
@@ -29,15 +29,15 @@ Ext.define('PVE.window.Migrate', {
var me = this;
if (!me.nodename) {
- throw "no node name specified";
+ throw gettext("no node name specified");
}
if (!me.vmid) {
- throw "no VM ID specified";
+ throw gettext("no VM ID specified");
}
if (!me.vmtype) {
- throw "no VM type specified";
+ throw gettext("no VM type specified");
}
me.formPanel = Ext.create('Ext.form.Panel', {
@@ -51,7 +51,7 @@ Ext.define('PVE.window.Migrate', {
{
xtype: 'PVE.form.NodeSelector',
name: 'target',
- fieldLabel: 'Target node',
+ fieldLabel: gettext('Target node'),
allowBlank: false,
onlineValidator: true
},
@@ -60,7 +60,7 @@ Ext.define('PVE.window.Migrate', {
name: 'online',
uncheckedValue: 0,
defaultValue: 0,
- fieldLabel: 'Online'
+ fieldLabel: gettext('Online')
}
]
});
@@ -68,7 +68,7 @@ Ext.define('PVE.window.Migrate', {
var form = me.formPanel.getForm();
var submitBtn = Ext.create('Ext.Button', {
- text: 'Migrate',
+ text: gettext('Migrate'),
handler: function() {
var values = form.getValues();
me.migrate(values.target, values.online);
@@ -76,7 +76,7 @@ Ext.define('PVE.window.Migrate', {
});
Ext.apply(me, {
- title: "Migrate VM " + me.vmid,
+ title: Ext.String.format(gettext("Migrate VM {0}"), me.vmid),
width: 350,
modal: true,
layout: 'auto',
diff --git a/www/manager/window/NotesEdit.js b/www/manager/window/NotesEdit.js
index 868a46d..952e0a0 100644
--- a/www/manager/window/NotesEdit.js
+++ b/www/manager/window/NotesEdit.js
@@ -5,7 +5,7 @@ Ext.define('PVE.window.NotesEdit', {
var me = this;
Ext.apply(me, {
- title: "Notes",
+ title: gettext("Notes"),
width: 600,
layout: 'fit',
items: {
diff --git a/www/manager/window/Restore.js b/www/manager/window/Restore.js
index 8ee7c41..f11780f 100644
--- a/www/manager/window/Restore.js
+++ b/www/manager/window/Restore.js
@@ -7,22 +7,22 @@ Ext.define('PVE.window.Restore', {
var me = this;
if (!me.nodename) {
- throw "no node name specified";
+ throw getext("no node name specified");
}
if (!me.volid) {
- throw "no volume ID specified";
+ throw getext("no volume ID specified");
}
if (!me.vmtype) {
- throw "no vmtype specified";
+ throw getext("no vmtype specified");
}
var storagesel = Ext.create('PVE.form.StorageSelector', {
nodename: me.nodename,
name: 'storage',
value: '',
- fieldLabel: 'Storage',
+ fieldLabel: getext('Storage'),
storageContent: (me.vmtype === 'openvz') ? 'rootdir' : 'images',
allowBlank: true
});
@@ -38,13 +38,13 @@ Ext.define('PVE.window.Restore', {
{
xtype: 'displayfield',
value: me.volidText || me.volid,
- fieldLabel: 'Source'
+ fieldLabel: getext('Source')
},
storagesel,
{
xtype: me.vmid ? 'displayfield' : 'pveVMIDSelector',
name: 'vmid',
- fieldLabel: 'VM ID',
+ fieldLabel: getext('VM ID'),
value: me.vmid || PVE.data.ResourceStore.findNextVMID(),
validateExists: false
}
@@ -59,7 +59,7 @@ Ext.define('PVE.window.Restore', {
params: params,
method: 'POST',
failure: function (response, opts) {
- Ext.Msg.alert('Error', response.htmlStatus);
+ Ext.Msg.alert(getext('Error'), response.htmlStatus);
},
success: function(response, options) {
var upid = response.result.data;
@@ -116,7 +116,7 @@ Ext.define('PVE.window.Restore', {
submitBtn.setDisabled(!valid);
});
- var title = (me.vmtype === 'openvz') ? "Restore CT" : "Restore VM";
+ var title = (me.vmtype === 'openvz') ? getext("Restore CT") : getext("Restore VM");
Ext.apply(me, {
title: title,
diff --git a/www/manager/window/TaskViewer.js b/www/manager/window/TaskViewer.js
index 212f2ff..0828bfc 100644
--- a/www/manager/window/TaskViewer.js
+++ b/www/manager/window/TaskViewer.js
@@ -12,39 +12,39 @@ Ext.define('PVE.window.TaskViewer', {
var me = this;
if (!me.upid) {
- throw "no task specified";
+ throw gettext("no task specified");
}
var task = PVE.Utils.parse_task_upid(me.upid);
var rows = {
status: {
- header: 'Status',
+ header: gettext('Status'),
defaultValue: 'unknown'
},
type: {
- header: 'Task type',
+ header: gettext('Task type'),
required: true
},
user: {
- header: 'User name',
+ header: gettext('User name'),
required: true
},
node: {
- header: 'Node',
+ header: gettext('Node'),
required: true
},
pid: {
- header: 'Process ID',
+ header: gettext('Process ID'),
required: true
},
starttime: {
- header: 'Start time',
+ header: gettext('Start time'),
required: true,
renderer: PVE.Utils.render_timestamp
},
upid: {
- header: 'Unique task ID'
+ header: gettext('Unique task ID')
}
};
@@ -62,25 +62,25 @@ Ext.define('PVE.window.TaskViewer', {
waitMsgTarget: me,
method: 'DELETE',
failure: function(response, opts) {
- Ext.Msg.alert('Error', response.htmlStatus);
+ Ext.Msg.alert(getext('Error'), response.htmlStatus);
}
});
};
var stop_btn1 = new Ext.Button({
- text: 'Stop',
+ text: gettext('Stop'),
disabled: true,
handler: stop_task
});
var stop_btn2 = new Ext.Button({
- text: 'Stop',
+ text: gettext('Stop'),
disabled: true,
handler: stop_task
});
var statgrid = Ext.create('PVE.grid.ObjectGrid', {
- title: 'Status',
+ title: gettext('Status'),
layout: 'fit',
tbar: [ stop_btn1 ],
rstore: statstore,
@@ -89,7 +89,7 @@ Ext.define('PVE.window.TaskViewer', {
});
var logView = Ext.create('PVE.panel.LogView', {
- title: 'Output',
+ title: gettext('Output'),
tbar: [ stop_btn2 ],
border: false,
url: "/api2/extjs/nodes/" + task.node + "/tasks/" + me.upid + "/log"
@@ -111,7 +111,7 @@ Ext.define('PVE.window.TaskViewer', {
statstore.startUpdate();
Ext.applyIf(me, {
- title: "Task viewer: " + task.desc,
+ title: gettext("Task viewer: ") + task.desc,
width: 800,
height: 400,
layout: 'fit',
diff --git a/www/manager/window/Wizard.js b/www/manager/window/Wizard.js
index 1b95389..37992ee 100644
--- a/www/manager/window/Wizard.js
+++ b/www/manager/window/Wizard.js
@@ -70,7 +70,7 @@ Ext.define('PVE.window.Wizard', {
items: [
'->',
{
- text: 'Back',
+ text: getext('Back'),
disabled: true,
itemId: 'back',
minWidth: 60,
@@ -90,7 +90,7 @@ Ext.define('PVE.window.Wizard', {
}
},
{
- text: 'Next',
+ text: getext('Next'),
disabled: true,
itemId: 'next',
minWidth: 60,
@@ -114,7 +114,7 @@ Ext.define('PVE.window.Wizard', {
}
},
{
- text: 'Finish',
+ text: getext('Finish'),
minWidth: 60,
hidden: true,
itemId: 'submit',
@@ -179,7 +179,7 @@ Ext.define('PVE.window.Wizard', {
closable: true,
resizable: false,
layout: 'border',
- title: 'Proxmox VE Wizard',
+ title: gettext('Proxmox VE Wizard'),
items: [
{
// disabled for now - not really needed
--
1.7.5.4
More information about the pve-devel
mailing list