[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
head - improve m4.pot
From: |
Eric Blake |
Subject: |
head - improve m4.pot |
Date: |
Wed, 16 Aug 2006 06:21:32 -0600 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.5) Gecko/20060719 Thunderbird/1.5.0.5 Mnenhy/0.7.4.666 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
This idea was sparked by recent changes to coreutils. It ensures that our
m4.pot file contains all translatable strings, with proper designation of
when a string will be parsed as a c-format. It also fixes a few messages
to follow consistent style.
2006-08-16 Eric Blake <address@hidden>
* po/POTFILES.in: Add more files that contain translatable
strings.
* po/Makevars (XGETTEXT_OPTIONS): Add options to pass more
information to translators.
(USE_MSGCTXT): New var for gettext 0.15.
* m4/input.c (file_clean, m4_push_file, m4__next_token): Start
debug/trace messages in lower case.
* m4/macro.c (expand_argument): Likewise.
* m4/path.c (m4_path_search): Likewise.
* src/main.c (main): Likewise.
- --
Life is short - so eat dessert first!
Eric Blake address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFE4w3L84KuGfSFAYARAtc1AJ4oK0VT0m/NFjOSNKLDdyeIZgwIfACgpYHj
7ph5TGcaR8i9Y7wrnAsoWKw=
=odP8
-----END PGP SIGNATURE-----
Index: m4/input.c
===================================================================
RCS file: /sources/m4/m4/m4/input.c,v
retrieving revision 1.42
diff -u -p -r1.42 input.c
--- m4/input.c 9 Aug 2006 21:33:24 -0000 1.42
+++ m4/input.c 16 Aug 2006 12:15:21 -0000
@@ -223,7 +223,7 @@ static void
file_clean (m4 *context)
{
if (m4_is_debug_bit (context, M4_DEBUG_TRACE_INPUT))
- M4_DEBUG_MESSAGE2 (context, _("Input reverted to %s, line %d"),
+ M4_DEBUG_MESSAGE2 (context, _("input reverted to %s, line %d"),
isp->u.u_f.name, isp->u.u_f.lineno);
fclose (isp->u.u_f.file);
@@ -251,7 +251,7 @@ m4_push_file (m4 *context, FILE *fp, con
}
if (BIT_TEST (m4_get_debug_level_opt (context), M4_DEBUG_TRACE_INPUT))
- M4_DEBUG_MESSAGE1 (context, _("Input read from %s"), title);
+ M4_DEBUG_MESSAGE1 (context, _("input read from %s"), title);
i = (input_block *) obstack_alloc (current_input,
sizeof (struct input_block));
@@ -827,7 +827,7 @@ m4__next_token (m4 *context, m4_symbol_v
if (ch == CHAR_EOF)
error_at_line (EXIT_FAILURE, 0,
current_file, current_line,
- _("EOF in string"));
+ _("end of file in string"));
if (m4_has_syntax (M4SYNTAX, ch, M4_SYNTAX_RQUOTE))
{
@@ -857,7 +857,7 @@ m4__next_token (m4 *context, m4_symbol_v
if (ch == CHAR_EOF)
error_at_line (EXIT_FAILURE, 0,
current_file, current_line,
- _("EOF in string"));
+ _("end of file in string"));
if (MATCH (context, ch, context->syntax->rquote.string))
{
if (--quote_level == 0)
Index: m4/macro.c
===================================================================
RCS file: /sources/m4/m4/m4/macro.c,v
retrieving revision 1.47
diff -u -p -r1.47 macro.c
--- m4/macro.c 9 Aug 2006 21:33:24 -0000 1.47
+++ m4/macro.c 16 Aug 2006 12:15:21 -0000
@@ -184,7 +184,7 @@ expand_argument (m4 *context, m4_obstack
case M4_TOKEN_EOF:
error_at_line (EXIT_FAILURE, 0, current_file, current_line,
- _("EOF in argument list"));
+ _("end of file in argument list"));
break;
case M4_TOKEN_WORD:
Index: m4/path.c
===================================================================
RCS file: /sources/m4/m4/m4/path.c,v
retrieving revision 1.16
diff -u -p -r1.16 path.c
--- m4/path.c 22 Jul 2006 19:23:04 -0000 1.16
+++ m4/path.c 16 Aug 2006 12:15:21 -0000
@@ -158,7 +158,7 @@ m4_path_search (m4 *context, const char
if (fp != NULL)
{
if (BIT_TEST (m4_get_debug_level_opt (context), M4_DEBUG_TRACE_PATH))
- M4_DEBUG_MESSAGE2 (context, _("Path search for `%s' found `%s'"),
+ M4_DEBUG_MESSAGE2 (context, _("path search for `%s' found `%s'"),
dir, name);
if (expanded_name != NULL)
Index: po/Makevars
===================================================================
RCS file: /sources/m4/m4/po/Makevars,v
retrieving revision 1.2
diff -u -p -r1.2 Makevars
--- po/Makevars 6 May 2006 12:23:33 -0000 1.2
+++ po/Makevars 16 Aug 2006 12:15:21 -0000
@@ -8,7 +8,18 @@ subdir = po
top_builddir = ..
# These options get passed to xgettext.
-XGETTEXT_OPTIONS = --keyword=_ --keyword=N_
+XGETTEXT_OPTIONS = \
+ --from-code=UTF-8 \
+ --keyword=_ --flag=_:1:pass-c-format \
+ --keyword=N_ --flag=N_:1:pass-c-format \
+ --flag=error:3:c-format --flag=error_at_line:5:c-format \
+ --flag=verror:3:c-format --flag=verror_at_line:5:c-format \
+ --flag=asprintf:2:c-format --flag=vasprintf:2:c-format \
+ --flag=asnprintf:3:c-format --flag=vasnprintf:3:c-format \
+ --flag=m4_error:4:c-format --flag=m4_error_at_line:6:c-format \
+ --flag=M4_DEBUG_MESSAGE:2:c-format \
+ --flag=M4_DEBUG_MESSAGE1:2:c-format \
+ --flag=M4_DEBUG_MESSAGE2:2:c-format
# This is the copyright holder that gets inserted into the header of the
# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding
@@ -39,3 +50,9 @@ MSGID_BUGS_ADDRESS = address@hidden
# This is the list of locale categories, beyond LC_MESSAGES, for which the
# message catalogs shall be used. It is usually empty.
EXTRA_LOCALE_CATEGORIES =
+
+# This tells whether the $(DOMAIN).pot file contains messages with an 'msgctxt'
+# context. Possible values are "yes" and "no". Set this to yes if the
+# package uses functions taking also a message context, like pgettext(), or
+# if in $(XGETTEXT_OPTIONS) you define keywords with a context argument.
+USE_MSGCTXT = no
Index: po/POTFILES.in
===================================================================
RCS file: /sources/m4/m4/po/POTFILES.in,v
retrieving revision 1.13
diff -u -p -r1.13 POTFILES.in
--- po/POTFILES.in 6 May 2006 12:23:33 -0000 1.13
+++ po/POTFILES.in 16 Aug 2006 12:15:21 -0000
@@ -1,6 +1,8 @@
+gnu/error.c
gnu/obstack.c
-gnu/regex.c
-gnu/xmalloc.c
+gnu/strtol.c
+gnu/verror.c
+gnu/xalloc-die.c
m4/builtin.c
m4/debug.c
m4/input.c
@@ -9,6 +11,7 @@ m4/module.c
m4/output.c
m4/path.c
m4/symtab.c
+m4/utility.c
modules/evalparse.c
modules/format.c
modules/gnu.c
Index: src/main.c
===================================================================
RCS file: /sources/m4/m4/src/main.c,v
retrieving revision 1.73
diff -u -p -r1.73 main.c
--- src/main.c 14 Aug 2006 13:07:49 -0000 1.73
+++ src/main.c 16 Aug 2006 12:15:21 -0000
@@ -348,7 +348,7 @@ main (int argc, char *const *argv, char
m4_set_debug_level_opt (context, m4_debug_decode (context, optarg));
if (m4_get_debug_level_opt (context) < 0)
{
- error (0, 0, _("Bad debug flags: `%s'"), optarg);
+ error (0, 0, _("bad debug flags: `%s'"), optarg);
m4_set_debug_level_opt (context, 0);
}
break;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- head - improve m4.pot,
Eric Blake <=