diff options
author | Thierry Vignaud <tv@mageia.org> | 2012-10-17 16:30:50 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mageia.org> | 2012-10-17 16:30:50 +0000 |
commit | 0f1c281ec14788740994ac6f5e581b64fd1141d2 (patch) | |
tree | 31535c488999938299be601a7e557304613b953c | |
parent | a82b53295f3f886e94eec36744fc9b4dcc7f1f1a (diff) | |
download | drakwizard-0f1c281ec14788740994ac6f5e581b64fd1141d2.tar drakwizard-0f1c281ec14788740994ac6f5e581b64fd1141d2.tar.gz drakwizard-0f1c281ec14788740994ac6f5e581b64fd1141d2.tar.bz2 drakwizard-0f1c281ec14788740994ac6f5e581b64fd1141d2.tar.xz drakwizard-0f1c281ec14788740994ac6f5e581b64fd1141d2.zip |
fix calling N()
-rwxr-xr-x | sshd_wizard/Sshd.pm | 72 |
1 files changed, 36 insertions, 36 deletions
diff --git a/sshd_wizard/Sshd.pm b/sshd_wizard/Sshd.pm index 3c865522..c232bc43 100755 --- a/sshd_wizard/Sshd.pm +++ b/sshd_wizard/Sshd.pm @@ -64,13 +64,13 @@ my @syslog = qw(DAEMON USER AUTH LOCAL0 LOCAL1 LOCAL2 LOCAL3 LOCAL4 LOCAL5 LOCAL my @loglevel = qw(QUIET FATAL ERROR INFO VERBOSE DEBUG DEBUG1 DEBUG2 DEBUG3); push @loglevel, ""; my %type = ( - 1 => N('Newbie - classical options'), - 2 => N('Expert - advanced ssh options'), + 1 => N("Newbie - classical options"), + 2 => N("Expert - advanced ssh options"), ); $o->{pages} = { welcome => { - name => N('OpenSSH daemon configuration') . "\n\n" . N("Which type of configuration do you want to do:"), + name => N("OpenSSH daemon configuration") . "\n\n" . N("Which type of configuration do you want to do:"), data => [ { label => "", type => 'list', val => \$o->{var}{wiz_type}, list => [ keys %type ], format => sub { $type{$_[0]} } }, ], @@ -78,19 +78,19 @@ $o->{pages} = { no_back => 1, }, config_step1 => { - name => N('SSH server, classical options'), + name => N("SSH server, classical options"), pre => sub { $sshd->{ListenAddress} and $o->{var}{ListenAddress} = $sshd->{ListenAddress} or $o->{var}{ListenAddress} = "0.0.0.0"; $sshd->{Port} and $o->{var}{Port} = $sshd->{Port} or $o->{var}{Port} = "22"; $o->{var}{PermitRootLogin} ||= $sshd->{PermitRootLogin}; }, data => [ - { label => N('Permit root login:'), val => \$o->{var}{PermitRootLogin}, list_ref => \@yesnoother }, - { label => N('Listen address:'), val => \$o->{var}{ListenAddress}, help => N('Specifies the local addresses sshd should listen on.') }, - { label => N('Port number:'), val => \$o->{var}{Port}, help => N('Specifies the port number that sshd listens on. The default is 22.') }, + { label => N("Permit root login:"), val => \$o->{var}{PermitRootLogin}, list_ref => \@yesnoother }, + { label => N("Listen address:"), val => \$o->{var}{ListenAddress}, help => N("Specifies the local addresses sshd should listen on.") }, + { label => N("Port number:"), val => \$o->{var}{Port}, help => N("Specifies the port number that sshd listens on. The default is 22.") }, ], complete => sub { - if ($o->{var}{Port} !~ /^\d+$/) { $::in->ask_warn(N('Error'), N('Port should be a number')); return 1; } + if ($o->{var}{Port} !~ /^\d+$/) { $::in->ask_warn(N("Error"), N("Port should be a number")); return 1; } }, post => sub { if ($o->{var}{wiz_type} == 2) { @@ -101,7 +101,7 @@ $o->{pages} = { next => 'auth_options', }, auth_options => { - name => N('Authentication Method'), + name => N("Authentication Method"), pre => sub { $o->{var}{RSAAuthentication} ||= $sshd->{RSAAuthentication}; $o->{var}{PubkeyAuthentication} ||= $sshd->{PubkeyAuthentication}; @@ -111,29 +111,29 @@ $o->{pages} = { $o->{var}{PermitEmptyPasswords} ||= $sshd->{PermitEmptyPasswords}; }, data => [ - { label => N('RSA auth:'), val => \$o->{var}{RSAAuthentication}, list_ref => \@yesorno }, - { label => N('PubKey auth:'), val => \$o->{var}{PubkeyAuthentication}, list_ref => \@yesorno }, - { label => N('Auth key file:'), val => \$o->{var}{AuthorizedKeysFile} }, - { label => N('Password auth:'), val => \$o->{var}{PasswordAuthentication}, list_ref => \@yesorno }, - { label => N('Ignore rhosts file:'), val => \$o->{var}{IgnoreRhosts}, list_ref => \@yesorno }, - { label => N('Permit empty password:'), val => \$o->{var}{PermitEmptyPasswords}, list_ref => \@yesorno }, + { label => N("RSA auth:"), val => \$o->{var}{RSAAuthentication}, list_ref => \@yesorno }, + { label => N("PubKey auth:"), val => \$o->{var}{PubkeyAuthentication}, list_ref => \@yesorno }, + { label => N("Auth key file:"), val => \$o->{var}{AuthorizedKeysFile} }, + { label => N("Password auth:"), val => \$o->{var}{PasswordAuthentication}, list_ref => \@yesorno }, + { label => N("Ignore rhosts file:"), val => \$o->{var}{IgnoreRhosts}, list_ref => \@yesorno }, + { label => N("Permit empty password:"), val => \$o->{var}{PermitEmptyPasswords}, list_ref => \@yesorno }, ], next => 'log_options', }, log_options => { - name => N('Log') . "\n\n" . N('Syslog facility: gives the facility code that is used when logging messages from sshd') . "\n" . N('Log level: gives the verbosity level that is used when logging messages from sshd.'), + name => N("Log") . "\n\n" . N("Syslog facility: gives the facility code that is used when logging messages from sshd") . "\n" . N("Log level: gives the verbosity level that is used when logging messages from sshd."), pre => sub { $o->{var}{SyslogFacility} ||= $sshd->{SyslogFacility}; $o->{var}{LogLevel} ||= $sshd->{LogLevel}; }, data => [ - { label => N('Syslog facility:'), val => \$o->{var}{SyslogFacility}, list_ref => \@syslog }, - { label => N('Log level:'), val => \$o->{var}{LogLevel}, list_ref => \@loglevel }, + { label => N("Syslog facility:"), val => \$o->{var}{SyslogFacility}, list_ref => \@syslog }, + { label => N("Log level:"), val => \$o->{var}{LogLevel}, list_ref => \@loglevel }, ], next => 'login_options', }, login_options => { - name => N('Login options') . "\n\n" . N('Print last log: whether sshd should print the date and time when the user last logged in'), + name => N("Login options") . "\n\n" . N("Print last log: whether sshd should print the date and time when the user last logged in"), pre => sub { $o->{var}{LoginGraceTime} ||= $sshd->{LoginGraceTime}; $o->{var}{KeepAlive} ||= $sshd->{KeepAlive}; @@ -141,18 +141,18 @@ $o->{pages} = { $o->{var}{PrintLastLog} ||= $sshd->{PrintLastLog}; }, data => [ - { label => N('Login Grace time:'), val => \$o->{var}{LoginGraceTime}, help => N('The server disconnects after this time if the user has not successfully logged in. If the value is 0, there is no time limit. The default is 120 seconds.') }, - { label => N('Keep alive:'), val => \$o->{var}{KeepAlive}, list_ref => \@yesorno }, - { label => N('Print motd:'), val => \$o->{var}{PrintMotd}, list_ref => \@yesorno }, - { label => N('Print last log:'), val => \$o->{var}{PrintLastLog}, list_ref => \@yesorno }, + { label => N("Login Grace time:"), val => \$o->{var}{LoginGraceTime}, help => N("The server disconnects after this time if the user has not successfully logged in. If the value is 0, there is no time limit. The default is 120 seconds.") }, + { label => N("Keep alive:"), val => \$o->{var}{KeepAlive}, list_ref => \@yesorno }, + { label => N("Print motd:"), val => \$o->{var}{PrintMotd}, list_ref => \@yesorno }, + { label => N("Print last log:"), val => \$o->{var}{PrintLastLog}, list_ref => \@yesorno }, ], complete => sub { - if ($o->{var}{LoginGraceTime} !~ /^\d+$/ and $o->{var}{LoginGraceTime}) { $::in->ask_warn(N('Error'), N('Login grace time should be a number')); return 1; } + if ($o->{var}{LoginGraceTime} !~ /^\d+$/ and $o->{var}{LoginGraceTime}) { $::in->ask_warn(N("Error"), N("Login grace time should be a number")); return 1; } }, next => 'user_login', }, user_login => { - name => N('User Login options') . "\n\n" . N('Strict modes: specifies whether sshd should check file modes and ownership of the user\'s files and home directory before accepting login. This is normally desirable because novices sometimes accidentally leave their directory or files world-writable'), + name => N("User Login options") . "\n\n" . N("Strict modes: specifies whether sshd should check file modes and ownership of the user\'s files and home directory before accepting login. This is normally desirable because novices sometimes accidentally leave their directory or files world-writable"), pre => sub { $o->{var}{StrictModes} ||= $sshd->{StrictModes}; $o->{var}{AllowUsers} ||= $sshd->{AllowUsers}; @@ -160,36 +160,36 @@ $o->{pages} = { }, data => [ - { label => N('Strict modes:'), val => \$o->{var}{StrictModes}, list_ref => \@yesorno }, - { label => N('Allow users:'), val => \$o->{var}{AllowUsers}, help => N('If specified, login is allowed only for user names that match one of the patterns. ie: erwan aginies guibo') }, - { label => N('Deny users:'), val => \$o->{var}{DenyUsers}, help => N('Login is disallowed for user names that match one of the patterns. ie: pirate guillomovitch') }, + { label => N("Strict modes:"), val => \$o->{var}{StrictModes}, list_ref => \@yesorno }, + { label => N("Allow users:"), val => \$o->{var}{AllowUsers}, help => N("If specified, login is allowed only for user names that match one of the patterns. ie: erwan aginies guibo") }, + { label => N("Deny users:"), val => \$o->{var}{DenyUsers}, help => N("Login is disallowed for user names that match one of the patterns. ie: pirate guillomovitch") }, ], next => 'other', }, other => { - name => N('Compression: Specifies whether compression is allowed.') . "\n" . N('X11 forwarding: specifies whether X11 forwarding is permitted. Note that disabling X11 forwarding does not prevent users from forwarding X11 traffic, as users can always install their own forwarders.'), + name => N("Compression: Specifies whether compression is allowed.") . "\n" . N("X11 forwarding: specifies whether X11 forwarding is permitted. Note that disabling X11 forwarding does not prevent users from forwarding X11 traffic, as users can always install their own forwarders."), pre => sub { $o->{var}{Compression} ||= $sshd->{Compression}; $o->{var}{X11Forwarding} ||= $sshd->{X11Forwarding}; }, data => [ - { label => N('Compression:'), val => \$o->{var}{Compression}, list_ref => \@yesorno }, - { label => N('X11 forwarding:'), val => \$o->{var}{X11Forwarding}, list_ref => \@yesorno }, + { label => N("Compression:"), val => \$o->{var}{Compression}, list_ref => \@yesorno }, + { label => N("X11 forwarding:"), val => \$o->{var}{X11Forwarding}, list_ref => \@yesorno }, ], next => 'summary', }, summary => { - name => N('Summary of OpenSSH configuration.'), + name => N("Summary of OpenSSH configuration."), data => [ - { label => N('Permit root login:'), val_ref => \$o->{var}{PermitRootLogin} }, - { label => N('Listen address:'), val_ref => \$o->{var}{ListenAddress} }, - { label => N('Port number:'), val_ref => \$o->{var}{Port} }, + { label => N("Permit root login:"), val_ref => \$o->{var}{PermitRootLogin} }, + { label => N("Listen address:"), val_ref => \$o->{var}{ListenAddress} }, + { label => N("Port number:"), val_ref => \$o->{var}{Port} }, ], post => \&do_it, next => 'end', }, end => { - name => N('Congratulations') . "\n\n" . N('The wizard successfully configured your SSH server.'), + name => N("Congratulations") . "\n\n" . N("The wizard successfully configured your SSH server."), no_back => 1, end => 1, }, |