Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
John McEleney
/
mailutils
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
2fce3d14
...
2fce3d14de6bfd91076a514d4c13c809b17511d5
authored
2003-01-26 13:47:54 +0000
by
Sergey Poznyakoff
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Use ngettext
1 parent
755f928e
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
37 additions
and
25 deletions
mail/summary.c
mh/folder.c
mh/refile.c
mh/repl.c
pop3d/user.c
mail/summary.c
View file @
2fce3d1
...
...
@@ -65,11 +65,11 @@ mail_summary (int argc, char **argv)
}
printf
(
ngettext
(
"%d message"
,
"%d messages"
,
count
),
count
);
if
(
mnew
>
0
)
printf
(
_
(
" %d new"
),
mnew
);
printf
(
ngettext
(
" %d new"
,
" %d new"
,
mnew
),
mnew
);
if
(
mseen
>
0
)
printf
(
_
(
" %d unread"
),
mseen
);
printf
(
ngettext
(
" %d unread"
,
" %d unread"
,
mseen
),
mseen
);
if
(
mdelete
>
0
)
printf
(
_
(
" %d deleted"
),
mdelete
);
printf
(
ngettext
(
" %d deleted"
,
" %d deleted"
,
mdelete
),
mdelete
);
printf
(
"
\n
"
);
/* Set the cursor. */
...
...
mh/folder.c
View file @
2fce3d1
...
...
@@ -33,14 +33,15 @@
#include <obstack.h>
const
char
*
argp_program_version
=
"folder ("
PACKAGE_STRING
")"
;
static
char
doc
[]
=
"GNU MH folder"
;
static
char
doc
[]
=
N_
(
"GNU MH folder
\v
"
"Use -help to obtain the list of traditional MH options."
);
static
char
args_doc
[]
=
N_
(
"[action] [msg]"
);
#define ARG_PUSH 1
#define ARG_POP 2
static
struct
argp_option
options
[]
=
{
{
N_
(
"Actions are:"
),
0
,
0
,
OPTION_DOC
,
""
,
0
},
{
N_
(
"Actions are:"
),
0
,
0
,
OPTION_DOC
,
NULL
,
0
},
{
"print"
,
'p'
,
NULL
,
0
,
N_
(
"List the folders (default)"
),
1
},
{
"list"
,
'l'
,
NULL
,
0
,
N_
(
"List the contents of the folder stack"
),
1
},
{
"push"
,
ARG_PUSH
,
N_
(
"FOLDER"
),
OPTION_ARG_OPTIONAL
,
...
...
@@ -50,7 +51,7 @@ static struct argp_option options[] = {
"stack are exchanged"
),
1
},
{
"pop"
,
ARG_POP
,
NULL
,
0
,
N_
(
"Pop the folder off the folder stack"
),
1
},
{
N_
(
"Options are:"
),
0
,
0
,
OPTION_DOC
,
""
,
2
},
{
N_
(
"Options are:"
),
0
,
0
,
OPTION_DOC
,
NULL
,
2
},
{
"folder"
,
'f'
,
N_
(
"FOLDER"
),
0
,
N_
(
"Specify folder to operate upon"
),
3
},
{
"all"
,
'a'
,
NULL
,
0
,
N_
(
"List all folders"
),
3
},
{
"create"
,
'c'
,
N_
(
"BOOL"
),
OPTION_ARG_OPTIONAL
,
...
...
@@ -63,8 +64,6 @@ static struct argp_option options[] = {
N_
(
"Scan folders recursively"
),
3
},
{
"total"
,
't'
,
N_
(
"BOOL"
),
OPTION_ARG_OPTIONAL
,
N_
(
"Output the total statistics"
),
3
},
{
N_
(
"
\n
Use -help switch to obtain the list of traditional MH options. "
),
0
,
0
,
OPTION_DOC
,
""
,
4
},
{
NULL
},
};
...
...
@@ -329,9 +328,9 @@ print_all ()
if
(
info
->
message_count
)
{
printf
(
info
->
message_count
==
1
?
_
(
" has %4lu message (%4lu-%4lu)"
)
:
_
(
" has %4lu messages (%4lu-%4lu)"
),
printf
(
ngettext
(
" has %4lu message (%4lu-%4lu)"
,
" has %4lu messages (%4lu-%4lu)"
,
info
->
message_count
),
(
unsigned
long
)
info
->
message_count
,
(
unsigned
long
)
info
->
min
,
(
unsigned
long
)
info
->
max
);
...
...
@@ -401,16 +400,22 @@ action_print ()
print_fast
();
else
{
if
(
print_header
)
printf
(
"Folder # of messages ( range ) cur msg (other files)
\n
"
);
if
(
print_header
)
printf
(
_
(
"Folder # of messages ( range ) cur msg (other files)
\n
"
)
);
print_all
();
if
(
print_total
)
printf
(
_
(
"
\n
%24.24s=%4lu messages in %4lu folders
\n
"
),
_
(
"TOTAL"
),
(
unsigned
long
)
message_count
,
(
unsigned
long
)
folder_info_count
);
{
printf
(
"
\n
%24.24s="
,
_
(
"TOTAL"
));
printf
(
ngettext
(
"%4lu message "
,
"%4lu messages "
,
message_count
),
(
unsigned
long
)
message_count
);
printf
(
ngettext
(
"in %4lu folder"
,
"in %4lu folders"
,
folder_info_count
),
(
unsigned
long
)
folder_info_count
);
printf
(
"
\n
"
);
}
}
if
(
push_folder
)
mh_global_save_state
();
...
...
mh/refile.c
View file @
2fce3d1
...
...
@@ -25,7 +25,8 @@
#include <fcntl.h>
const
char
*
argp_program_version
=
"refile ("
PACKAGE_STRING
")"
;
static
char
doc
[]
=
"GNU MH refile"
;
static
char
doc
[]
=
N_
(
"GNU MH refile
\v
"
"Use -help to obtain the list of traditional MH options."
);
static
char
args_doc
[]
=
N_
(
"messages folder [folder...]"
);
/* GNU options */
...
...
@@ -37,10 +38,9 @@ static struct argp_option options[] = {
{
"preserve"
,
'p'
,
N_
(
"BOOL"
),
OPTION_ARG_OPTIONAL
,
N_
(
"(not implemented) Try to preserve message sequence numbers"
)},
{
"source"
,
's'
,
N_
(
"FOLDER"
),
0
,
N_
(
"Specify source folder. FOLDER will bec
a
me the current folder after the program exits."
)},
N_
(
"Specify source folder. FOLDER will bec
o
me the current folder after the program exits."
)},
{
"src"
,
0
,
NULL
,
OPTION_ALIAS
,
NULL
},
{
"file"
,
'F'
,
N_
(
"FILE"
),
0
,
N_
(
"Use FILE as the source message"
)},
{
N_
(
"
\n
Use -help switch to obtain the list of traditional MH options. "
),
0
,
0
,
OPTION_DOC
,
""
},
{
0
}
};
...
...
@@ -274,7 +274,9 @@ open_source (char *file_name)
}
else
if
(
len
>
1
)
{
mh_error
(
_
(
"input file %s contains %lu messages"
),
mh_error
(
ngettext
(
"input file %s contains %lu message"
,
"input file %s contains %lu messages"
,
len
),
(
unsigned
long
)
len
);
return
NULL
;
}
...
...
mh/repl.c
View file @
2fce3d1
...
...
@@ -22,7 +22,8 @@
#include <unistd.h>
const
char
*
argp_program_version
=
"reply ("
PACKAGE_STRING
")"
;
static
char
doc
[]
=
"GNU MH repl"
;
static
char
doc
[]
=
N_
(
"GNU MH repl
\v
"
"Use -help to obtain the list of traditional MH options."
);
static
char
args_doc
[]
=
N_
(
"[+folder] [msg]"
);
#define ARG_NOEDIT 1
...
...
@@ -65,7 +66,6 @@ static struct argp_option options[] = {
{
"whatnowproc"
,
ARG_WHATNOWPROC
,
N_
(
"PROG"
),
0
,
N_
(
"Set the replacement for whatnow program"
)},
{
"use"
,
'u'
,
N_
(
"BOOL"
),
OPTION_ARG_OPTIONAL
,
N_
(
"Use draft file preserved after the last session"
)
},
{
N_
(
"
\n
Use -help switch to obtain the list of traditional MH options. "
),
0
,
0
,
OPTION_DOC
,
""
},
{
0
}
};
...
...
@@ -222,7 +222,9 @@ make_draft (mailbox_t mbox, int disp, struct mh_whatnow_env *wh)
disp
=
DISP_USE
;
else
{
printf
(
_
(
"Draft
\"
%s
\"
exists (%lu bytes).
\n
"
),
printf
(
ngettext
(
"Draft
\"
%s
\"
exists (%lu byte).
\n
"
,
"Draft
\"
%s
\"
exists (%lu bytes).
\n
"
,
st
.
st_size
),
wh
->
draftfile
,
(
unsigned
long
)
st
.
st_size
);
disp
=
mh_disposition
(
wh
->
draftfile
);
}
...
...
pop3d/user.c
View file @
2fce3d1
...
...
@@ -151,7 +151,10 @@ pop3d_user (const char *arg)
size_t
total
=
0
;
mailbox_get_url
(
mbox
,
&
url
);
mailbox_messages_count
(
mbox
,
&
total
);
syslog
(
LOG_INFO
,
_
(
"User '%s' logged in with mailbox '%s' (%d msgs)"
),
syslog
(
LOG_INFO
,
ngettext
(
"User '%s' logged in with mailbox '%s' (%d message)"
,
"User '%s' logged in with mailbox '%s' (%d messages)"
,
total
),
username
,
url_to_string
(
url
),
total
);
}
return
OK
;
...
...
Please
register
or
sign in
to post a comment