@@ -118,20 +118,20 @@ sub format_2822_time {
118
118
my $localmin = $localtm [1] + $localtm [2] * 60;
119
119
my $gmtmin = $gmttm [1] + $gmttm [2] * 60;
120
120
if ($localtm [0] != $gmttm [0]) {
121
- die " local zone differs from GMT by a non-minute interval\n " ;
121
+ die __( " local zone differs from GMT by a non-minute interval\n " ) ;
122
122
}
123
123
if ((($gmttm [6] + 1) % 7) == $localtm [6]) {
124
124
$localmin += 1440;
125
125
} elsif ((($gmttm [6] - 1) % 7) == $localtm [6]) {
126
126
$localmin -= 1440;
127
127
} elsif ($gmttm [6] != $localtm [6]) {
128
- die " local time offset greater than or equal to 24 hours\n " ;
128
+ die __( " local time offset greater than or equal to 24 hours\n " ) ;
129
129
}
130
130
my $offset = $localmin - $gmtmin ;
131
131
my $offhour = $offset / 60;
132
132
my $offmin = abs($offset % 60);
133
133
if (abs($offhour ) >= 24) {
134
- die (" local time offset greater than or equal to 24 hours\n " );
134
+ die __ (" local time offset greater than or equal to 24 hours\n " );
135
135
}
136
136
137
137
return sprintf (" %s , %2d %s %d %02d:%02d:%02d %s %02d%02d" ,
@@ -199,13 +199,13 @@ sub do_edit {
199
199
map {
200
200
system (' sh' , ' -c' , $editor .' "$@"' , $editor , $_ );
201
201
if (($? & 127) || ($? >> 8)) {
202
- die (" the editor exited uncleanly, aborting everything" );
202
+ die (__( " the editor exited uncleanly, aborting everything" ) );
203
203
}
204
204
} @_ ;
205
205
} else {
206
206
system (' sh' , ' -c' , $editor .' "$@"' , $editor , @_ );
207
207
if (($? & 127) || ($? >> 8)) {
208
- die (" the editor exited uncleanly, aborting everything" );
208
+ die (__( " the editor exited uncleanly, aborting everything" ) );
209
209
}
210
210
}
211
211
}
@@ -299,7 +299,7 @@ sub signal_handler {
299
299
my $rc = GetOptions(" h" => \$help ,
300
300
" dump-aliases" => \$dump_aliases );
301
301
usage() unless $rc ;
302
- die " --dump-aliases incompatible with other options\n "
302
+ die __( " --dump-aliases incompatible with other options\n " )
303
303
if !$help and $dump_aliases and @ARGV ;
304
304
$rc = GetOptions(
305
305
" sender|from=s" => \$sender ,
@@ -362,7 +362,7 @@ sub signal_handler {
362
362
usage();
363
363
}
364
364
365
- die " Cannot run git format-patch from outside a repository\n "
365
+ die __( " Cannot run git format-patch from outside a repository\n " )
366
366
if $format_patch and not $repo ;
367
367
368
368
# Now, let's fill any that aren't set in with defaults:
@@ -617,7 +617,7 @@ sub is_format_patch_arg {
617
617
}
618
618
619
619
if (@rev_list_opts ) {
620
- die " Cannot run git format-patch from outside a repository\n "
620
+ die __( " Cannot run git format-patch from outside a repository\n " )
621
621
unless $repo ;
622
622
push @files , $repo -> command(' format-patch' , ' -o' , tempdir(CLEANUP => 1), @rev_list_opts );
623
623
}
@@ -638,7 +638,7 @@ sub is_format_patch_arg {
638
638
print $_ ," \n " for (@files );
639
639
}
640
640
} else {
641
- print STDERR " \n No patch files specified!\n\n " ;
641
+ print STDERR __( " \n No patch files specified!\n\n " ) ;
642
642
usage();
643
643
}
644
644
@@ -730,7 +730,7 @@ sub get_patch_subject {
730
730
$sender = $1 ;
731
731
next ;
732
732
} elsif (/ ^(?:To|Cc|Bcc):/i ) {
733
- print " To/Cc/Bcc fields are not interpreted yet, they have been ignored\n " ;
733
+ print __( " To/Cc/Bcc fields are not interpreted yet, they have been ignored\n " ) ;
734
734
next ;
735
735
}
736
736
print $c2 $_ ;
@@ -739,7 +739,7 @@ sub get_patch_subject {
739
739
close $c2 ;
740
740
741
741
if ($summary_empty ) {
742
- print " Summary email is empty, skipping it\n " ;
742
+ print __( " Summary email is empty, skipping it\n " ) ;
743
743
$compose = -1;
744
744
}
745
745
} elsif ($annotate ) {
@@ -1315,7 +1315,7 @@ sub send_message {
1315
1315
$_ = ask(__(" Send this email? ([y]es|[n]o|[q]uit|[a]ll): " ),
1316
1316
valid_re => qr / ^(?:yes|y|no|n|quit|q|all|a)/ i ,
1317
1317
default => $ask_default );
1318
- die " Send this email reply required" unless defined $_ ;
1318
+ die __( " Send this email reply required" ) unless defined $_ ;
1319
1319
if (/ ^n/i ) {
1320
1320
return 0;
1321
1321
} elsif (/ ^q/i ) {
@@ -1341,7 +1341,7 @@ sub send_message {
1341
1341
} else {
1342
1342
1343
1343
if (!defined $smtp_server ) {
1344
- die " The required SMTP server is not properly defined."
1344
+ die __( " The required SMTP server is not properly defined." )
1345
1345
}
1346
1346
1347
1347
if ($smtp_encryption eq ' ssl' ) {
@@ -1412,7 +1412,7 @@ sub send_message {
1412
1412
$smtp -> code =~ / 250|200/ or die " Failed to send $subject \n " .$smtp -> message;
1413
1413
}
1414
1414
if ($quiet ) {
1415
- printf (($dry_run ? " Dry-" : " " )." Sent %s \n " , $subject );
1415
+ printf (($dry_run ? " Dry-" : " " ). __( " Sent %s \n " ) , $subject );
1416
1416
} else {
1417
1417
print (($dry_run ? " Dry-" : " " ). __(" OK. Log says:\n " ));
1418
1418
if (!file_name_is_absolute($smtp_server )) {
@@ -1426,10 +1426,10 @@ sub send_message {
1426
1426
}
1427
1427
print $header , " \n " ;
1428
1428
if ($smtp ) {
1429
- print " Result: " , $smtp -> code, ' ' ,
1429
+ print __( " Result: " ) , $smtp -> code, ' ' ,
1430
1430
($smtp -> message =~ / \n ([^\n ]+\n )$ /s ), " \n " ;
1431
1431
} else {
1432
- print " Result: OK\n " ;
1432
+ print __( " Result: OK\n " ) ;
1433
1433
}
1434
1434
}
1435
1435
@@ -1702,15 +1702,15 @@ sub apply_transfer_encoding {
1702
1702
$message = MIME::Base64::decode($message )
1703
1703
if ($from eq ' base64' );
1704
1704
1705
- die " cannot send message as 7bit"
1705
+ die __( " cannot send message as 7bit" )
1706
1706
if ($to eq ' 7bit' and $message =~ / [^[:ascii:]]/ );
1707
1707
return $message
1708
1708
if ($to eq ' 7bit' or $to eq ' 8bit' );
1709
1709
return MIME::QuotedPrint::encode($message , " \n " , 0)
1710
1710
if ($to eq ' quoted-printable' );
1711
1711
return MIME::Base64::encode($message , " \n " )
1712
1712
if ($to eq ' base64' );
1713
- die " invalid transfer encoding" ;
1713
+ die __( " invalid transfer encoding" ) ;
1714
1714
}
1715
1715
1716
1716
sub unique_email_list {
0 commit comments