Bug#260265: [Adduser-devel] Bug#260265: adduser: English tidy-up
Adam D. Barratt
"Adam D. Barratt" <debian-bts@adam-barratt.org.uk>, 260265-maintonly@bugs.debian.org
Tue, 20 Jul 2004 20:20:38 +0100
--=-Eourhwb+I3tB3VX5R3CI
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
On Tue, 2004-07-20 at 11:52, Marc Haber wrote:
> tags #260265 patch confirmed
> thanks
>
> On Mon, Jul 19, 2004 at 05:35:48PM +0100, Adam D. Barratt wrote:
> > Please consider applying the attached patch which removes some awkward
> > phrasing from the English strings and unifies some of the phrasing used.
>
> The patch will be applied in the next upload.
Thanks. I've attached an updated (final, I promise ;->) version of the
patch which includes a few more unifying changes - primarily making all
messages use definite articles and making the quoting of messages
consistent: always `' around strings, never around numbers.
If at all possible, could this version please be used in place of the
earlier patch?
Thanks,
Adam
--=-Eourhwb+I3tB3VX5R3CI
Content-Disposition: attachment; filename=adduser2.diff
Content-Type: text/x-patch; name=adduser2.diff; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
diff -Nru adduser-3.57/adduser adduser-3.57.new/adduser
--- adduser-3.57/adduser 2004-06-20 13:55:15.000000000 +0100
+++ adduser-3.57.new/adduser 2004-07-20 20:01:49.000000000 +0100
@@ -175,7 +175,7 @@
} elsif ($arg eq "--conf") {
die "$0: ",_("--conf requires an argument.\n")
if (!defined($defaults = shift(@ARGV)));
- dief (_("`%s' doesn't exist.\n",$defaults))
+ dief (_("`%s' does not exist.\n",$defaults))
if (! -f $defaults);
} elsif ($arg eq "--no-create-home") {
$no_create_home = 1;
@@ -233,7 +233,7 @@
$action = "addgroup";
}
}
-die "$0: ",_("--group, --ingroup, and --gid options are mutually exclusive.\n") if
+die "$0: ",_("The --group, --ingroup, and --gid options are mutually exclusive.\n") if
($action ne "addgroup" &&
defined($found_group_opt) +defined($ingroup_name) +defined($new_gid) > 1);
@@ -279,12 +279,12 @@
if ($action eq "addsysgroup") {
# Check if requested group already exists and we can exit safely
if (existing_group_ok($new_name, $new_gid)) {
- printf (_("Group %s does already exist as a system group. Exiting...\n"), $new_name) if $verbose;
+ printf (_("The group `%s' already exists as a system group. Exiting...\n"), $new_name) if $verbose;
exit 0;
}
dief (_("The group `%s' already exists.\n"),$new_name)
if (defined getgrnam($new_name));
- dief (_("The GID `%s' is already in use.\n"),$new_gid)
+ dief (_("The GID %s is already in use.\n"),$new_gid)
if (defined($new_gid) && defined(getgrgid($new_gid)));
if (!defined($new_gid)) {
$new_gid = &first_avail_id($config{"first_system_gid"},
@@ -295,11 +295,11 @@
print STDERR "$0: ",_("No GID is available in the range "),
"$config{\"first_system_gid\"} - $config{\"last_system_gid\"}\n",
"(FIRST_SYS_GID - LAST_SYS_GID). ";
- dief (_("Group `%s' not created.\n"),$new_name);
+ dief (_("The group `%s' was not created.\n"),$new_name);
}
}
- printf (_("Adding group %s (%s)...\n"),$new_name,$new_gid) if $verbose;
+ printf (_("Adding group `%s' (%s)...\n"),$new_name,$new_gid) if $verbose;
&invalidate_nscd("group");
&systemcall('/usr/sbin/groupadd', '-g', $new_gid, $new_name);
&invalidate_nscd("group");
@@ -314,7 +314,7 @@
if ($action eq "addgroup") {
dief (_("The group `%s' already exists.\n"),$new_name)
if (defined getgrnam($new_name));
- dief (_("The GID `%s' is already in use.\n"),$new_gid)
+ dief (_("The GID %s is already in use.\n"),$new_gid)
if (defined($new_gid) && defined(getgrgid($new_gid)));
if (!defined($new_gid)) {
$new_gid = &first_avail_id($config{"first_gid"},
@@ -325,11 +325,11 @@
print STDERR "$0: ",_("No GID is available in the range "),
"$config{\"first_gid\"} - $config{\"last_gid\"}\n",
"(FIRST_GID - LAST_GID). ";
- dief (_("Group `%s' not created.\n"),$new_name);
+ dief (_("The group `%s' was not created.\n"),$new_name);
}
}
- printf (_("Adding group %s (%s)...\n"),$new_name,$new_gid) if $verbose;
+ printf (_("Adding group `%s' (%s)...\n"),$new_name,$new_gid) if $verbose;
&invalidate_nscd("group");
&systemcall('/usr/sbin/groupadd', '-g', $new_gid, $new_name);
&invalidate_nscd("group");
@@ -342,17 +342,17 @@
## addusertogroup ##
####################
elsif ($action eq "addusertogroup") {
- dief (_("The user `%s' doesn't exist.\n"),$existing_user)
+ dief (_("The user `%s' does not exist.\n"),$existing_user)
if (!defined getpwnam($existing_user));
- dief (_("The group `%s' doesn't exist.\n"),$existing_group)
+ dief (_("The group `%s' does not exist.\n"),$existing_group)
if (!defined getgrnam($existing_group));
if (&user_is_member($existing_user, $existing_group)) {
- printf _("The user `%s' is already a member of %s.\n"),
+ printf _("The user `%s' is already a member of `%s'.\n"),
$existing_user,$existing_group if $verbose;
exit 0; # not really an error
}
- printf _("Adding user %s to group %s...\n"),$existing_user,$existing_group
+ printf _("Adding user `%s' to group `%s'...\n"),$existing_user,$existing_group
if $verbose;
&invalidate_nscd();
# FIXME - the next line has a race condition.
@@ -374,13 +374,13 @@
################
elsif ($action eq "addsysuser") {
if (existing_user_ok($new_name, $new_uid)) {
- printf (_("User %s does already exist as a system user. Exiting...\n"), $new_name) if $verbose;
+ printf (_("The user `%s' already exists as a system user. Exiting...\n"), $new_name) if $verbose;
exit 0;
}
$new_gid = $nogroup_id
if (!$ingroup_name && !defined($new_gid) && !$make_group_also);
check_user_group(1);
- printf (_("Adding system user %s...\n"),$new_name) if $verbose;
+ printf (_("Adding system user `%s'...\n"),$new_name) if $verbose;
if (!defined($new_uid) && $make_group_also) {
$new_uid = &first_avail_id($config{"first_system_uid"},
@@ -390,7 +390,7 @@
print STDERR "$0: ",_("No UID/GID pair is available in the range "),
"$config{\"first_system_uid\"} - $config{\"last_system_uid\"}\n",
"(FIRST_SYS_UID - LAST_SYS_UID). ";
- dief (_("User `%s' not created.\n"),$new_name);
+ dief (_("The user `%s' was not created.\n"),$new_name);
}
$new_gid = $new_uid;
$ingroup_name = $new_name;
@@ -403,7 +403,7 @@
print STDERR "$0: ",_("No UID is available in the range "),
"$config{\"first_system_uid\"} - $config{\"last_system_uid\"}\n",
"(FIRST_SYS_UID - LAST_SYS_UID). ";
- &dief (_("User `%s' not created.\n"),$new_name);
+ &dief (_("The user `%s' was not created.\n"),$new_name);
}
if (defined($new_gid)) { $ingroup_name = getgrgid($new_gid); }
elsif ($ingroup_name) { $new_gid = getgrnam($ingroup_name); }
@@ -418,13 +418,13 @@
&invalidate_nscd();
# if we reach this point, and the group does already exist, we can use it.
- if ($make_group_also && !getgrnam($new_name)) {printf _("Adding new group %s (%s).\n"),$new_name,$new_gid if $verbose;
+ if ($make_group_also && !getgrnam($new_name)) {printf _("Adding new group `%s' (%s).\n"),$new_name,$new_gid if $verbose;
$undogroup = $new_name;
&systemcall('/usr/sbin/groupadd', '-g', $new_gid, $new_name);
&invalidate_nscd("group");
}
- printf _("Adding new user %s (%s) with group %s.\n"),$new_name,$new_uid,$ingroup_name
+ printf _("Adding new user `%s' (%s) with group `%s'.\n"),$new_name,$new_uid,$ingroup_name
if $verbose;
$home_dir = $special_home || &homedir($new_name, $ingroup_name);
$shell = $special_shell || '/bin/false';
@@ -440,9 +440,9 @@
if ($no_create_home) {
print _("Not creating home directory.\n") if $verbose;
} elsif (-e $home_dir) {
- printf _("Home directory %s already exists.\n"),$home_dir if $verbose;
+ printf _("Home directory `%s' already exists.\n"),$home_dir if $verbose;
} else {
- printf _("Creating home directory %s.\n"),$home_dir if $verbose;
+ printf _("Creating home directory `%s'.\n"),$home_dir if $verbose;
$undohome = $home_dir;
&mktree($home_dir) || &cleanup("Couldn't create $home_dir: $!.\n");
chown($new_uid, $new_gid, $home_dir)
@@ -467,7 +467,7 @@
check_user_group(0);
$first_uid = $new_firstuid || $config{"first_uid"};
$last_uid = $new_lastuid || $config{"last_uid"};
- printf _("Adding user %s...\n"),$new_name if $verbose;
+ printf _("Adding user `%s'...\n"),$new_name if $verbose;
if (!defined($new_uid) && $make_group_also) {
$new_uid = &first_avail_id($first_uid,
@@ -477,7 +477,7 @@
print STDERR "$0: ",_("No UID/GID pair is available in the range "),
"$first_uid - $last_uid\n",
"(FIRST_UID - LAST_UID). ";
- dief(_("User `%s' not created.\n"),$new_name);
+ dief(_("The user `%s' was not created.\n"),$new_name);
}
$new_gid = $new_uid;
$ingroup_name = $new_name;
@@ -490,7 +490,7 @@
print STDERR "$0: ",_("No UID is available in the range "),
"$config{\"first_uid\"} - $config{\"last_uid\"}\n",
"(FIRST_UID - LAST_UID). ";
- dief(_("User `%s' not created.\n"),$new_name);
+ dief(_("The user `%s' was not created.\n"),$new_name);
}
if (defined($new_gid)) { $ingroup_name = getgrgid($new_gid); }
elsif ($ingroup_name) { $new_gid = getgrnam($ingroup_name); }
@@ -505,13 +505,13 @@
&invalidate_nscd();
if ($make_group_also) {
- printf _("Adding new group %s (%s).\n"),$new_name,$new_gid if $verbose;
+ printf _("Adding new group `%s' (%s).\n"),$new_name,$new_gid if $verbose;
$undogroup = $new_name;
&systemcall('/usr/sbin/groupadd', '-g', $new_gid, $new_name);
&invalidate_nscd();
}
- printf _("Adding new user %s (%s) with group %s.\n"),$new_name,$new_uid,$ingroup_name
+ printf _("Adding new user `%s' (%s) with group `%s'.\n"),$new_name,$new_uid,$ingroup_name
if $verbose;
$home_dir = $special_home || &homedir($new_name, $ingroup_name);
$shell = $special_shell || $config{"dshell"};
@@ -521,13 +521,13 @@
&invalidate_nscd();
if (-e $home_dir) {
- printf _("Home directory %s already exists. Not copying from %s\n"),
+ printf _("The home directory `%s' already exists. Not copying from `%s'\n"),
$home_dir,$config{skel} if $verbose && !$no_create_home;
} elsif ($no_create_home) {
print "Not creating $home_dir.\n" if $verbose;
}
else {
- printf _("Creating home directory %s.\n"),$home_dir if $verbose;
+ printf _("Creating home directory `%s'.\n"),$home_dir if $verbose;
$undohome = $home_dir;
&mktree($home_dir) || &cleanup("Couldn't create $home_dir: $!.\n");
chown($new_uid, $new_gid, $home_dir)
@@ -537,7 +537,7 @@
&cleanup("chmod $dir_mode $home_dir: $!\n");
if ($config{"skel"}) {
- printf _("Copying files from %s\n"),$config{skel} if $verbose;
+ printf _("Copying files from `%s'\n"),$config{skel} if $verbose;
open(FIND, "cd $config{skel}; find . ! -name '*.dpkg-*' -print |")
|| &cleanup("fork for find: $!\n");
while (<FIND>) {
@@ -570,7 +570,7 @@
}
if ($config{"quotauser"}) {
- printf _("Setting quota from %s.\n"),$config{quotauser};
+ printf _("Setting quota from `%s'.\n"),$config{quotauser};
&systemcall('/usr/sbin/edquota', '-p', $config{quotauser}, $new_name);
}
@@ -656,26 +656,26 @@
if( !$system || !existing_user_ok($new_name, $new_uid) ) {
if( defined getpwnam($new_name) ) {
if( $system ) {
- dief(_("The user %s\' already exists, and is not a system user.\n"),$new_name);
+ dief(_("The user `%s' already exists, and is not a system user.\n"),$new_name);
} else {
- dief(_("The user %s\' already exists.\n"),$new_name);
+ dief(_("The user `%s' already exists.\n"),$new_name);
}
}
- dief(_("The UID %s' already exists.\n"),$new_uid)
+ dief(_("The UID %s is already in use.\n"),$new_uid)
if (defined($new_uid) && getpwuid($new_uid));
}
if ($make_group_also) {
if( !$system || !existing_group_ok($new_name, $new_uid) ) {
- dief(_("The group %s' already exists.\n"),$new_name)
+ dief(_("The group `%s' already exists.\n"),$new_name)
if (defined getgrnam($new_name));
- dief(_("The GID %s' already exists.\n"),$new_uid)
+ dief(_("The GID %s is already in use.\n"),$new_uid)
if (defined($new_uid) && defined(getgrgid($new_uid)));
}
}
else {
- dief(_("The group `%s' doesn't exist.\n"),$ingroup_name)
+ dief(_("The group `%s' does not exist.\n"),$ingroup_name)
if ($ingroup_name && !defined(getgrnam($ingroup_name)));
- dief(_("The GID `%s' doesn't exist.\n"),$new_gid)
+ dief(_("The GID %s does not exist.\n"),$new_gid)
if (defined($new_gid) && !defined(getgrgid($new_gid)));
}
}
@@ -722,7 +722,7 @@
print STDERR
"$0: ",_("To avoid problems, the username should consist of a letter or
underscore followed by letters, digits, underscores, and dashes. For
-compatibility with Samba machine accounts also \$ is supported at the
+compatibility with Samba machine accounts \$ is also supported at the
end of the username\n");
exit 1;
}
diff -Nru adduser-3.57/deluser adduser-3.57.new/deluser
--- adduser-3.57/deluser 2004-06-20 13:55:15.000000000 +0100
+++ adduser-3.57.new/deluser 2004-07-20 20:06:08.000000000 +0100
@@ -147,7 +147,7 @@
} elsif($arg eq "--conf" || $arg eq "-c") {
die "$0: ",_("--conf requires an argument.\n")
if (!($defaults = shift(@ARGV)));
- dief (_("`%s' doesn't exist.\n"),$defaults)
+ dief (_("`%s' does not exist.\n"),$defaults)
if (! -f $defaults);
} elsif($arg eq "--system") {
$pconfig{"system"} = 1;
@@ -250,21 +250,21 @@
if( ($dummy1,$dummy2,$uid) = getpwnam($user) ) {
if ( ($uid < $config{"first_system_uid"} ||
$uid > $config{"last_system_uid" } ) ) {
- printf (_("User %s is not a system account... Exiting.\n"), $user) if $verbose;
+ printf (_("The user `%s' is not a system account... Exiting.\n"), $user) if $verbose;
exit 0;
}
} else {
- printf (_("User %s does not exist, but --system is given... Exiting.\n"), $user) if $verbose;
+ printf (_("The user `%s' does not exist, but --system was given... Exiting.\n"), $user) if $verbose;
exit 0;
}
}
unless(exist_user($user)) {
- dief (_("`%s' does not exist.\n"),$user);
+ dief (_("The user `%s' does not exist.\n"),$user);
}
if($config{"remove_home"} && ($config{"home"} ne "") && ($config{"home"} ne $pw_homedir)) {
- dief (_("passwd home dir %s' does not match command line home dir, aborting.\n"),$pw_homedir,$config{"home"});
+ dief (_("passwd home dir `%s' does not match command line home dir, aborting.\n"),$pw_homedir,$config{"home"});
} elsif($config{"remove_home"} || $config{"remove_all_files"}) {
s_print(_("Looking for files to backup/remove...\n"));
my(@files,@dirs);
@@ -318,7 +318,7 @@
}
}
- s_printf(_("Removing user %s...\n"),$user);
+ s_printf(_("Removing user `%s'...\n"),$user);
systemcall("/usr/sbin/userdel", $user);
&invalidate_nscd();
@@ -329,7 +329,7 @@
} elsif($action eq "delgroup") {
&invalidate_nscd();
unless(exist_group($group)) {
- dief (_("`%s' does not exist.\n"),$group);
+ dief (_("The group `%s' does not exist.\n"),$group);
}
my($dummy,$gid,$members);
if( !(($dummy, $dummy, $gid, $members ) = getgrnam($group)) ) {
@@ -338,19 +338,19 @@
if( $config{"system"} &&
($gid < $config{"first_system_gid"} ||
$gid > $config{"last_system_gid" } )) {
- printf (_("Group %s is not a system group... Exiting.\n"), $group) if $verbose;
+ printf (_("The group `%s' is not a system group... Exiting.\n"), $group) if $verbose;
exit 0;
}
if( $config{"only-if-empty"} && $members ne "") {
- dief (_("`%s' is not empty!\n"),$group);
+ dief (_("The group `%s' is not empty!\n"),$group);
}
# This needs to be fixed - we need use getpwent here.
if(system("grep", "-q", "^.*:.*:.*:$gr_gid:.*:.*:.*\$", "/etc/passwd") == 0) {
- dief (_("There are users having `%s' as primary group!\n"),$group);
+ dief (_("There are users with `%s' as their primary group!\n"),$group);
}
- s_printf(_("Removing group %s...\n"),$group);
+ s_printf(_("Removing group `%s'...\n"),$group);
systemcall("/usr/sbin/groupdel",$group);
&invalidate_nscd();
s_print(_("done.\n"));
@@ -359,10 +359,10 @@
{
&invalidate_nscd();
unless(exist_user($user)) {
- dief (_("`%s' does not exist.\n"),$user);
+ dief (_("The user `%s' does not exist.\n"),$user);
}
unless(exist_group($group)) {
- dief (_("`%s' does not exist.\n"),$group);
+ dief (_("The group `%s' does not exist.\n"),$group);
}
if($maingroup eq $group) {
die "$0: ",_("You may not remove the user from his/her primary group.\n");
@@ -379,10 +379,10 @@
}
unless($ismember) {
- dief(_("%s is not a member of group %s.\n"),$user,$group);
+ dief(_("The user `%s' is not a member of group `%s'.\n"),$user,$group);
}
- s_printf(_("Removing user %s from group %s...\n"),$user,$group);
+ s_printf(_("Removing user `%s' from group `%s'...\n"),$user,$group);
#systemcall("usermod","-G", join(",",@groups), $user );
systemcall('/usr/bin/gpasswd','-M', join(',',@members), $group);
&invalidate_nscd();
--=-Eourhwb+I3tB3VX5R3CI--