From: Thomas Lamprecht Date: Thu, 20 Sep 2018 07:31:12 +0000 (+0200) Subject: fix some erro mesage and comment typos X-Git-Url: https://git.proxmox.com/?p=pve-common.git;a=commitdiff_plain;h=fb3a1b2985a35eb7e2630fbe4ddd6981f81d0b98 fix some erro mesage and comment typos Signed-off-by: Thomas Lamprecht --- diff --git a/src/PVE/AtomicFile.pm b/src/PVE/AtomicFile.pm index 110a8ae..b1889e8 100644 --- a/src/PVE/AtomicFile.pm +++ b/src/PVE/AtomicFile.pm @@ -15,5 +15,5 @@ sub new { sub DESTROY { - # dont close atomatically (explicit close required to commit changes) + # don't close atomatically (explicit close required to commit changes) } diff --git a/src/PVE/CLIFormatter.pm b/src/PVE/CLIFormatter.pm index 3040323..e886db5 100644 --- a/src/PVE/CLIFormatter.pm +++ b/src/PVE/CLIFormatter.pm @@ -2,12 +2,14 @@ package PVE::CLIFormatter; use strict; use warnings; + use I18N::Langinfo; use POSIX qw(strftime); use CPAN::Meta::YAML; # comes with perl-modules use PVE::JSONSchema; use PVE::PTY; + use JSON; use utf8; use Encode; @@ -356,7 +358,7 @@ sub extract_properties_to_print { # takes formatting information from the results property of the call # if $props_to_print is provided, prints only those columns. otherwise # takes all fields of the results property, with a fallback -# to all fields occuring in items of $data. +# to all fields occurring in items of $data. sub print_api_list { my ($data, $result_schema, $props_to_print, $options, $terminal_opts) = @_; diff --git a/src/PVE/CalendarEvent.pm b/src/PVE/CalendarEvent.pm index 3c08eb0..9fdc95a 100644 --- a/src/PVE/CalendarEvent.pm +++ b/src/PVE/CalendarEvent.pm @@ -7,7 +7,7 @@ use Time::Local; use PVE::JSONSchema; use PVE::Tools qw(trim); -# Note: This class implements a parser/utils for systemd like calender exents +# Note: This class implements a parser/utils for systemd like calendar exents # Date specification is currently not implemented my $dow_names = { diff --git a/src/PVE/Daemon.pm b/src/PVE/Daemon.pm index dcc4d34..e3e43d9 100644 --- a/src/PVE/Daemon.pm +++ b/src/PVE/Daemon.pm @@ -3,7 +3,7 @@ package PVE::Daemon; # Abstract class to implement Daemons # # Features: -# * lock and write PID file /var/run/$name.pid to make sure onyl +# * lock and write PID file /var/run/$name.pid to make sure only # one instance is running. # * keep lock open during restart # * correctly daemonize (redirect STDIN/STDOUT) @@ -102,9 +102,9 @@ my $lockpidfile = sub { my ($running, $pid) = $self->running(); if ($running) { - die "can't aquire lock '$lkfn' - daemon already started (pid = $pid)\n"; + die "can't acquire lock '$lkfn' - daemon already started (pid = $pid)\n"; } else { - die "can't aquire lock '$lkfn' - $err\n"; + die "can't acquire lock '$lkfn' - $err\n"; } } }; diff --git a/src/PVE/JSONSchema.pm b/src/PVE/JSONSchema.pm index 06c500f..c8fff77 100644 --- a/src/PVE/JSONSchema.pm +++ b/src/PVE/JSONSchema.pm @@ -83,7 +83,7 @@ register_standard_option('pve-config-digest', { description => 'Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.', type => 'string', optional => 1, - maxLength => 40, # sha1 hex digest lenght is 40 + maxLength => 40, # sha1 hex digest length is 40 }); register_standard_option('skiplock', { @@ -403,7 +403,7 @@ sub pve_verify_disk_size { } register_standard_option('spice-proxy', { - description => "SPICE proxy server. This can be used by the client to specify the proxy server. All nodes in a cluster runs 'spiceproxy', so it is up to the client to choose one. By default, we return the node where the VM is currently running. As resonable setting is to use same node you use to connect to the API (This is window.location.hostname for the JS GUI).", + description => "SPICE proxy server. This can be used by the client to specify the proxy server. All nodes in a cluster runs 'spiceproxy', so it is up to the client to choose one. By default, we return the node where the VM is currently running. As reasonable setting is to use same node you use to connect to the API (This is window.location.hostname for the JS GUI).", type => 'string', format => 'address', }); @@ -487,7 +487,7 @@ sub pve_parse_startup_order { } } - return $res; + retturn $res; } PVE::JSONSchema::register_standard_option('pve-startup-order', { @@ -1242,7 +1242,7 @@ my $method_schema = { }, proxyto_callback => { type => 'coderef', - description => "A function which is called to resolve the proxyto attribute. The default implementaion returns the value of the 'proxyto' parameter.", + description => "A function which is called to resolve the proxyto attribute. The default implementation returns the value of the 'proxyto' parameter.", optional => 1, }, permissions => { @@ -1282,7 +1282,7 @@ my $method_schema = { }, fragmentDelimiter => { type => 'string', - description => "A ways to override the default fragment delimiter '/'. This onyl works on a whole sub-class. You can set this to the empty string to match the whole rest of the URI.", + description => "A way to override the default fragment delimiter '/'. This only works on a whole sub-class. You can set this to the empty string to match the whole rest of the URI.", optional => 1, }, parameters => { @@ -1297,7 +1297,7 @@ my $method_schema = { }, code => { type => 'coderef', - description => "method implementaion (code reference)", + description => "method implementation (code reference)", optional => 1, }, subclass => { diff --git a/src/PVE/RESTEnvironment.pm b/src/PVE/RESTEnvironment.pm index 338a534..69af004 100644 --- a/src/PVE/RESTEnvironment.pm +++ b/src/PVE/RESTEnvironment.pm @@ -26,7 +26,7 @@ my $rest_env; # and register forked processes with &$register_worker(pid) # Note: using $SIG{CHLD} = 'IGNORE' or $SIG{CHLD} = sub { wait (); } or ... # has serious side effects, because perls built in system() and open() -# functions can't get the correct exit status of a child. So we cant use +# functions can't get the correct exit status of a child. So we can't use # that (also see perlipc) my $WORKER_PIDS; @@ -520,7 +520,7 @@ sub fork_worker { &$atfork(); } - # same algorythm as used inside SA + # same algorithm as used inside SA # STDIN = /dev/null my $fd = fileno (STDIN); diff --git a/src/PVE/Tools.pm b/src/PVE/Tools.pm index d4ab2ad..6254b2e 100644 --- a/src/PVE/Tools.pm +++ b/src/PVE/Tools.pm @@ -760,7 +760,7 @@ my $keymaphash = { 'pl' => ['Polish', 'pl', 'qwerty/pl.kmap.gz', 'pl', undef], 'pt' => ['Portuguese', 'pt', 'qwerty/pt-latin1.kmap.gz', 'pt', 'nodeadkeys'], 'pt-br' => ['Brazil-Portuguese', 'pt-br', 'qwerty/br-latin1.kmap.gz', 'br', 'nodeadkeys'], - #'ru' => ['Russian', 'ru', 'qwerty/ru.kmap.gz', 'ru', undef], # dont know? + #'ru' => ['Russian', 'ru', 'qwerty/ru.kmap.gz', 'ru', undef], # don't know? 'si' => ['Slovenian', 'sl', 'qwertz/slovene.kmap.gz', 'si', undef], 'se' => ['Swedish', 'sv', 'qwerty/se-latin1.kmap.gz', 'se', 'nodeadkeys'], #'th' => [],