From a2b6f8584ac687ab2f3ca2cd5404f4fd0c5cdfe4 Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Fri, 14 Mar 2008 19:21:27 +0000 Subject: extract the "wrong PIN" error message to be reused --- lib/network/connection/cellular_card.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/network/connection/cellular_card.pm b/lib/network/connection/cellular_card.pm index fb6948f..084e22c 100644 --- a/lib/network/connection/cellular_card.pm +++ b/lib/network/connection/cellular_card.pm @@ -5,6 +5,8 @@ use base qw(network::connection::cellular); use strict; use common; +my $wrong_pin_error = N_("Wrong PIN number format: it should be 4 digits."); + sub get_type_name() { N("GPRS/Edge/3G") } sub _get_type_icon() { 'cellular' } sub get_devices() { @@ -71,7 +73,7 @@ sub get_hardware_settings { sub check_hardware_settings { my ($self) = @_; if ($self->{hardware}{pin} !~ /^[0-9]{4}$/) { - $self->{hardware}{error} = N("Wrong PIN number format: it should be 4 digits."); + $self->{hardware}{error} = translate($wrong_pin_error); return 0; } 1; -- cgit v1.2.1