+2010-03-13 Bruno Haible <bruno@clisp.org>
+
+ * NEWS: Mention the --color and --style options on many programs.
+
2010-01-19 Bruno Haible <bruno@clisp.org>
* AUTHORS: Update from fencepost.gnu.org:/gd/gnuorg/copyright.list.
to the message. Translators can produce better translations when they know
that the numeric argument is small.
+* Colorized PO files:
+ msgattrib, msgcomm, msgconv, msgen, msgfilter, msggrep, msginit, msgmerge,
+ msgunfmt, msguniq, xgettext now have options --color and --style, like msgcat
+ has since version 0.17.
+
* msgmerge is up to 10 times faster when the PO and POT files are large.
This speedup was contributed by Ralf Wildenhues.
+2010-03-13 Bruno Haible <bruno@clisp.org>
+
+ New options --color, --style for many programs.
+ * msgattrib.texi: Document the options --color and --style.
+ * msgcomm.texi: Likewise.
+ * msgconv.texi: Likewise.
+ * msgen.texi: Likewise.
+ * msgfilter.texi: Likewise.
+ * msggrep.texi: Likewise.
+ * msginit.texi: Likewise.
+ * msgmerge.texi: Likewise.
+ * msgunfmt.texi: Likewise.
+ * msguniq.texi: Likewise.
+ * xgettext.texi: Likewise.
+ Reported by Kalle Olavi Niemitalo <kon@iki.fi>
+ via Santiago Vila <sanvila@unex.es>.
+
2010-02-20 Bruno Haible <bruno@clisp.org>
* gettext.texi (Plural forms): Add Bulgarian.
@c --no-escape and --escape omitted on purpose. They are not useful.
@table @samp
+@item --color
+@itemx --color=@var{when}
+@opindex --color@r{, @code{msgattrib} option}
+Specify whether or when to use colors and other text attributes.
+See @ref{The --color option} for details.
+
+@item --style=@var{style_file}
+@opindex --style@r{, @code{msgattrib} option}
+Specify the CSS style rule file to use for @code{--color}.
+See @ref{The --style option} for details.
+
@item --force-po
@opindex --force-po@r{, @code{msgattrib} option}
Always write an output file even if it contains no message.
@c --no-escape and --escape omitted on purpose. They are not useful.
@table @samp
+@item --color
+@itemx --color=@var{when}
+@opindex --color@r{, @code{msgcomm} option}
+Specify whether or when to use colors and other text attributes.
+See @ref{The --color option} for details.
+
+@item --style=@var{style_file}
+@opindex --style@r{, @code{msgcomm} option}
+Specify the CSS style rule file to use for @code{--color}.
+See @ref{The --style option} for details.
+
@item --force-po
@opindex --force-po@r{, @code{msgcomm} option}
Always write an output file even if it contains no message.
@c --no-escape and --escape omitted on purpose. They are not useful.
@table @samp
+@item --color
+@itemx --color=@var{when}
+@opindex --color@r{, @code{msgconv} option}
+Specify whether or when to use colors and other text attributes.
+See @ref{The --color option} for details.
+
+@item --style=@var{style_file}
+@opindex --style@r{, @code{msgconv} option}
+Specify the CSS style rule file to use for @code{--color}.
+See @ref{The --style option} for details.
+
@item --force-po
@opindex --force-po@r{, @code{msgconv} option}
Always write an output file even if it contains no message.
@samp{Language-Team} and @samp{Plural-Forms} fields are not set by this
option.
+@item --color
+@itemx --color=@var{when}
+@opindex --color@r{, @code{msgen} option}
+Specify whether or when to use colors and other text attributes.
+See @ref{The --color option} for details.
+
+@item --style=@var{style_file}
+@opindex --style@r{, @code{msgen} option}
+Specify the CSS style rule file to use for @code{--color}.
+See @ref{The --style option} for details.
+
@item --force-po
@opindex --force-po@r{, @code{msgen} option}
Always write an output file even if it contains no message.
@c --no-escape and --escape omitted on purpose. They are not useful.
@table @samp
+@item --color
+@itemx --color=@var{when}
+@opindex --color@r{, @code{msgfilter} option}
+Specify whether or when to use colors and other text attributes.
+See @ref{The --color option} for details.
+
+@item --style=@var{style_file}
+@opindex --style@r{, @code{msgfilter} option}
+Specify the CSS style rule file to use for @code{--color}.
+See @ref{The --style option} for details.
+
@item --force-po
@opindex --force-po@r{, @code{msgfilter} option}
Always write an output file even if it contains no message.
@c --no-escape and --escape omitted on purpose. They are not useful.
@table @samp
+@item --color
+@itemx --color=@var{when}
+@opindex --color@r{, @code{msggrep} option}
+Specify whether or when to use colors and other text attributes.
+See @ref{The --color option} for details.
+
+@item --style=@var{style_file}
+@opindex --style@r{, @code{msggrep} option}
+Specify the CSS style rule file to use for @code{--color}.
+See @ref{The --style option} for details.
+
@item --force-po
@opindex --force-po@r{, @code{msggrep} option}
Always write an output file even if it contains no message.
Declares that the PO file will not have a human translator and is instead
automatically generated.
+@item --color
+@itemx --color=@var{when}
+@opindex --color@r{, @code{msginit} option}
+Specify whether or when to use colors and other text attributes.
+See @ref{The --color option} for details.
+
+@item --style=@var{style_file}
+@opindex --style@r{, @code{msginit} option}
+Specify the CSS style rule file to use for @code{--color}.
+See @ref{The --style option} for details.
+
@item -p
@itemx --properties-output
@opindex -p@r{, @code{msginit} option}
If this option is not specified, the @samp{Language} field is inferred, as
best as possible, from the @samp{Language-Team} field.
+@item --color
+@itemx --color=@var{when}
+@opindex --color@r{, @code{msgmerge} option}
+Specify whether or when to use colors and other text attributes.
+See @ref{The --color option} for details.
+
+@item --style=@var{style_file}
+@opindex --style@r{, @code{msgmerge} option}
+Specify the CSS style rule file to use for @code{--color}.
+See @ref{The --style option} for details.
+
@item --force-po
@opindex --force-po@r{, @code{msgmerge} option}
Always write an output file even if it contains no message.
@c --no-escape and --escape omitted on purpose. They are not useful.
@table @samp
+@item --color
+@itemx --color=@var{when}
+@opindex --color@r{, @code{msgunfmt} option}
+Specify whether or when to use colors and other text attributes.
+See @ref{The --color option} for details.
+
+@item --style=@var{style_file}
+@opindex --style@r{, @code{msgunfmt} option}
+Specify the CSS style rule file to use for @code{--color}.
+See @ref{The --style option} for details.
+
@item --force-po
@opindex --force-po@r{, @code{msgunfmt} option}
Always write an output file even if it contains no message.
Use first available translation for each message. Don't merge several
translations into one.
+@item --color
+@itemx --color=@var{when}
+@opindex --color@r{, @code{msguniq} option}
+Specify whether or when to use colors and other text attributes.
+See @ref{The --color option} for details.
+
+@item --style=@var{style_file}
+@opindex --style@r{, @code{msguniq} option}
+Specify the CSS style rule file to use for @code{--color}.
+See @ref{The --style option} for details.
+
@item --force-po
@opindex --force-po@r{, @code{msguniq} option}
Always write an output file even if it contains no message.
@c --no-escape and --escape omitted on purpose. They are not useful.
@table @samp
+@item --color
+@itemx --color=@var{when}
+@opindex --color@r{, @code{xgettext} option}
+Specify whether or when to use colors and other text attributes.
+See @ref{The --color option} for details.
+
+@item --style=@var{style_file}
+@opindex --style@r{, @code{xgettext} option}
+Specify the CSS style rule file to use for @code{--color}.
+See @ref{The --style option} for details.
+
@item --force-po
@opindex --force-po@r{, @code{xgettext} option}
Always write an output file even if no message is defined.
+2010-03-13 Bruno Haible <bruno@clisp.org>
+
+ New options --color, --style for many programs.
+ * msgattrib.c: Include color.h.
+ (long_options): Add options --color, --style.
+ (main): Implement them.
+ (usage): Document them.
+ * msgcomm.c: Include color.h.
+ (long_options): Add options --color, --style.
+ (main): Implement them.
+ (usage): Document them.
+ * msgconv.c: Include color.h.
+ (long_options): Add options --color, --style.
+ (main): Implement them.
+ (usage): Document them.
+ * msgen.c: Include color.h.
+ (long_options): Add options --color, --style.
+ (main): Implement them.
+ (usage): Document them.
+ * msgfilter.c: Include color.h.
+ (long_options): Add options --color, --style.
+ (main): Implement them.
+ (usage): Document them.
+ * msggrep.c: Include color.h.
+ (long_options): Add options --color, --style.
+ (main): Implement them.
+ (usage): Document them.
+ * msginit.c: Include color.h.
+ (long_options): Add options --color, --style.
+ (main): Implement them.
+ (usage): Document them.
+ * msgmerge.c: Include color.h.
+ (long_options): Add options --color, --style.
+ (main): Implement them.
+ (usage): Document them.
+ * msgunfmt.c: Include color.h.
+ (long_options): Add options --color, --style.
+ (main): Implement them.
+ (usage): Document them.
+ * msguniq.c: Include color.h.
+ (long_options): Add options --color, --style.
+ (main): Implement them.
+ (usage): Document them.
+ * xgettext.c: Include color.h.
+ (long_options): Add options --color, --style.
+ (main): Implement them.
+ (usage): Document them.
+ Reported by Kalle Olavi Niemitalo <kon@iki.fi>
+ via Santiago Vila <sanvila@unex.es>.
+
2010-02-20 Bruno Haible <bruno@clisp.org>
* plural-table.c (plural_table): Add Bulgarian.
/* Manipulates attributes of messages in translation catalogs.
- Copyright (C) 2001-2007, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2001-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <haible@clisp.cons.org>, 2001.
This program is free software: you can redistribute it and/or modify
#include "write-po.h"
#include "write-properties.h"
#include "write-stringtable.h"
+#include "color.h"
#include "propername.h"
#include "gettext.h"
{ "clear-fuzzy", no_argument, NULL, CHAR_MAX + 8 },
{ "clear-obsolete", no_argument, NULL, CHAR_MAX + 10 },
{ "clear-previous", no_argument, NULL, CHAR_MAX + 18 },
+ { "color", optional_argument, NULL, CHAR_MAX + 19 },
{ "directory", required_argument, NULL, 'D' },
{ "escape", no_argument, NULL, 'E' },
{ "force-po", no_argument, &force_po, 1 },
{ "stringtable-input", no_argument, NULL, CHAR_MAX + 16 },
{ "stringtable-output", no_argument, NULL, CHAR_MAX + 17 },
{ "strict", no_argument, NULL, 'S' },
+ { "style", required_argument, NULL, CHAR_MAX + 20 },
{ "translated", no_argument, NULL, CHAR_MAX + 1 },
{ "untranslated", no_argument, NULL, CHAR_MAX + 2 },
{ "version", no_argument, NULL, 'V' },
to_change |= REMOVE_PREV;
break;
+ case CHAR_MAX + 19: /* --color */
+ if (handle_color_option (optarg) || color_test_mode)
+ usage (EXIT_FAILURE);
+ break;
+
+ case CHAR_MAX + 20: /* --style */
+ handle_style_option (optarg);
+ break;
+
default:
usage (EXIT_FAILURE);
/* NOTREACHED */
printf (_("\
Output details:\n"));
printf (_("\
+ --color use colors and other text attributes always\n\
+ --color=WHEN use colors and other text attributes if WHEN.\n\
+ WHEN may be 'always', 'never', 'auto', or 'html'.\n"));
+ printf (_("\
+ --style=STYLEFILE specify CSS style rule file for --color\n"));
+ printf (_("\
-e, --no-escape do not use C escapes in output (default)\n"));
printf (_("\
-E, --escape use C escapes in output, no extended chars\n"));
/* GNU gettext - internationalization aids
- Copyright (C) 1997-1998, 2000-2007, 2009 Free Software Foundation, Inc.
+ Copyright (C) 1997-1998, 2000-2007, 2009-2010 Free Software Foundation, Inc.
This file was written by Peter Miller <millerp@canb.auug.org.au>
#include "write-po.h"
#include "write-properties.h"
#include "write-stringtable.h"
+#include "color.h"
#include "msgl-cat.h"
#include "propername.h"
#include "gettext.h"
static const struct option long_options[] =
{
{ "add-location", no_argument, &line_comment, 1 },
+ { "color", optional_argument, NULL, CHAR_MAX + 5 },
{ "directory", required_argument, NULL, 'D' },
{ "escape", no_argument, NULL, 'E' },
{ "files-from", required_argument, NULL, 'f' },
{ "strict", no_argument, NULL, 'S' },
{ "stringtable-input", no_argument, NULL, CHAR_MAX + 3 },
{ "stringtable-output", no_argument, NULL, CHAR_MAX + 4 },
+ { "style", required_argument, NULL, CHAR_MAX + 6 },
{ "to-code", required_argument, NULL, 't' },
{ "unique", no_argument, NULL, 'u' },
{ "version", no_argument, NULL, 'V' },
output_syntax = &output_format_stringtable;
break;
+ case CHAR_MAX + 5: /* --color */
+ if (handle_color_option (optarg) || color_test_mode)
+ usage (EXIT_FAILURE);
+ break;
+
+ case CHAR_MAX + 6: /* --style */
+ handle_style_option (optarg);
+ break;
+
default:
usage (EXIT_FAILURE);
/* NOTREACHED */
printf (_("\
Output details:\n"));
printf (_("\
+ --color use colors and other text attributes always\n\
+ --color=WHEN use colors and other text attributes if WHEN.\n\
+ WHEN may be 'always', 'never', 'auto', or 'html'.\n"));
+ printf (_("\
+ --style=STYLEFILE specify CSS style rule file for --color\n"));
+ printf (_("\
-e, --no-escape do not use C escapes in output (default)\n"));
printf (_("\
-E, --escape use C escapes in output, no extended chars\n"));
/* Converts a translation catalog to a different character encoding.
- Copyright (C) 2001-2007, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2001-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <haible@clisp.cons.org>, 2001.
This program is free software: you can redistribute it and/or modify
#include "write-po.h"
#include "write-properties.h"
#include "write-stringtable.h"
+#include "color.h"
#include "msgl-iconv.h"
#include "localcharset.h"
#include "propername.h"
static const struct option long_options[] =
{
{ "add-location", no_argument, &line_comment, 1 },
+ { "color", optional_argument, NULL, CHAR_MAX + 4 },
{ "directory", required_argument, NULL, 'D' },
{ "escape", no_argument, NULL, 'E' },
{ "force-po", no_argument, &force_po, 1 },
{ "strict", no_argument, NULL, 'S' },
{ "stringtable-input", no_argument, NULL, CHAR_MAX + 2 },
{ "stringtable-output", no_argument, NULL, CHAR_MAX + 3 },
+ { "style", required_argument, NULL, CHAR_MAX + 5 },
{ "to-code", required_argument, NULL, 't' },
{ "version", no_argument, NULL, 'V' },
{ "width", required_argument, NULL, 'w', },
output_syntax = &output_format_stringtable;
break;
+ case CHAR_MAX + 4: /* --color */
+ if (handle_color_option (optarg) || color_test_mode)
+ usage (EXIT_FAILURE);
+ break;
+
+ case CHAR_MAX + 5: /* --style */
+ handle_style_option (optarg);
+ break;
+
default:
usage (EXIT_FAILURE);
break;
printf (_("\
Output details:\n"));
printf (_("\
+ --color use colors and other text attributes always\n\
+ --color=WHEN use colors and other text attributes if WHEN.\n\
+ WHEN may be 'always', 'never', 'auto', or 'html'.\n"));
+ printf (_("\
+ --style=STYLEFILE specify CSS style rule file for --color\n"));
+ printf (_("\
-e, --no-escape do not use C escapes in output (default)\n"));
printf (_("\
-E, --escape use C escapes in output, no extended chars\n"));
/* Creates an English translation catalog.
- Copyright (C) 2001-2007, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2001-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <haible@clisp.cons.org>, 2001.
This program is free software: you can redistribute it and/or modify
#include "write-po.h"
#include "write-properties.h"
#include "write-stringtable.h"
+#include "color.h"
#include "propername.h"
#include "gettext.h"
static const struct option long_options[] =
{
{ "add-location", no_argument, &line_comment, 1 },
+ { "color", optional_argument, NULL, CHAR_MAX + 5 },
{ "directory", required_argument, NULL, 'D' },
{ "escape", no_argument, NULL, 'E' },
{ "force-po", no_argument, &force_po, 1 },
{ "strict", no_argument, NULL, 'S' },
{ "stringtable-input", no_argument, NULL, CHAR_MAX + 2 },
{ "stringtable-output", no_argument, NULL, CHAR_MAX + 3 },
+ { "style", required_argument, NULL, CHAR_MAX + 6 },
{ "version", no_argument, NULL, 'V' },
{ "width", required_argument, NULL, 'w', },
{ NULL, 0, NULL, 0 }
catalogname = optarg;
break;
+ case CHAR_MAX + 5: /* --color */
+ if (handle_color_option (optarg) || color_test_mode)
+ usage (EXIT_FAILURE);
+ break;
+
+ case CHAR_MAX + 6: /* --style */
+ handle_style_option (optarg);
+ break;
+
default:
usage (EXIT_FAILURE);
break;
printf (_("\
--lang=CATALOGNAME set 'Language' field in the header entry\n"));
printf (_("\
+ --color use colors and other text attributes always\n\
+ --color=WHEN use colors and other text attributes if WHEN.\n\
+ WHEN may be 'always', 'never', 'auto', or 'html'.\n"));
+ printf (_("\
+ --style=STYLEFILE specify CSS style rule file for --color\n"));
+ printf (_("\
-e, --no-escape do not use C escapes in output (default)\n"));
printf (_("\
-E, --escape use C escapes in output, no extended chars\n"));
/* Edit translations using a subprocess.
- Copyright (C) 2001-2009 Free Software Foundation, Inc.
+ Copyright (C) 2001-2010 Free Software Foundation, Inc.
Written by Bruno Haible <haible@clisp.cons.org>, 2001.
This program is free software: you can redistribute it and/or modify
#include "write-po.h"
#include "write-properties.h"
#include "write-stringtable.h"
+#include "color.h"
#include "msgl-charset.h"
#include "xalloc.h"
#include "findprog.h"
static const struct option long_options[] =
{
{ "add-location", no_argument, &line_comment, 1 },
+ { "color", optional_argument, NULL, CHAR_MAX + 6 },
{ "directory", required_argument, NULL, 'D' },
{ "escape", no_argument, NULL, 'E' },
{ "force-po", no_argument, &force_po, 1 },
{ "strict", no_argument, NULL, 'S' },
{ "stringtable-input", no_argument, NULL, CHAR_MAX + 4 },
{ "stringtable-output", no_argument, NULL, CHAR_MAX + 5 },
+ { "style", required_argument, NULL, CHAR_MAX + 7 },
{ "version", no_argument, NULL, 'V' },
{ "width", required_argument, NULL, 'w', },
{ NULL, 0, NULL, 0 }
output_syntax = &output_format_stringtable;
break;
+ case CHAR_MAX + 6: /* --color */
+ if (handle_color_option (optarg) || color_test_mode)
+ usage (EXIT_FAILURE);
+ break;
+
+ case CHAR_MAX + 7: /* --style */
+ handle_style_option (optarg);
+ break;
+
default:
usage (EXIT_FAILURE);
break;
printf ("\n");
printf (_("\
Output details:\n"));
+ printf (_("\
+ --color use colors and other text attributes always\n\
+ --color=WHEN use colors and other text attributes if WHEN.\n\
+ WHEN may be 'always', 'never', 'auto', or 'html'.\n"));
+ printf (_("\
+ --style=STYLEFILE specify CSS style rule file for --color\n"));
printf (_("\
--no-escape do not use C escapes in output (default)\n"));
printf (_("\
/* Extract some translations of a translation catalog.
- Copyright (C) 2001-2007, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2001-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <haible@clisp.cons.org>, 2001.
This program is free software: you can redistribute it and/or modify
#include "write-po.h"
#include "write-properties.h"
#include "write-stringtable.h"
+#include "color.h"
#include "str-list.h"
#include "msgl-charset.h"
#include "xalloc.h"
static const struct option long_options[] =
{
{ "add-location", no_argument, &line_comment, 1 },
+ { "color", optional_argument, NULL, CHAR_MAX + 9 },
{ "comment", no_argument, NULL, 'C' },
{ "directory", required_argument, NULL, 'D' },
{ "domain", required_argument, NULL, 'M' },
{ "strict", no_argument, NULL, 'S' },
{ "stringtable-input", no_argument, NULL, CHAR_MAX + 7 },
{ "stringtable-output", no_argument, NULL, CHAR_MAX + 8 },
+ { "style", required_argument, NULL, CHAR_MAX + 10 },
{ "version", no_argument, NULL, 'V' },
{ "width", required_argument, NULL, 'w' },
{ NULL, 0, NULL, 0 }
output_syntax = &output_format_stringtable;
break;
+ case CHAR_MAX + 9: /* --color */
+ if (handle_color_option (optarg) || color_test_mode)
+ usage (EXIT_FAILURE);
+ break;
+
+ case CHAR_MAX + 10: /* --style */
+ handle_style_option (optarg);
+ break;
+
default:
usage (EXIT_FAILURE);
break;
printf ("\n");
printf (_("\
Output details:\n"));
+ printf (_("\
+ --color use colors and other text attributes always\n\
+ --color=WHEN use colors and other text attributes if WHEN.\n\
+ WHEN may be 'always', 'never', 'auto', or 'html'.\n"));
+ printf (_("\
+ --style=STYLEFILE specify CSS style rule file for --color\n"));
printf (_("\
--no-escape do not use C escapes in output (default)\n"));
printf (_("\
/* Initializes a new PO file.
- Copyright (C) 2001-2009 Free Software Foundation, Inc.
+ Copyright (C) 2001-2010 Free Software Foundation, Inc.
Written by Bruno Haible <haible@clisp.cons.org>, 2001.
This program is free software: you can redistribute it and/or modify
#include "write-po.h"
#include "write-properties.h"
#include "write-stringtable.h"
+#include "color.h"
#include "po-charset.h"
#include "localcharset.h"
#include "localename.h"
/* Long options. */
static const struct option long_options[] =
{
+ { "color", optional_argument, NULL, CHAR_MAX + 5 },
{ "help", no_argument, NULL, 'h' },
{ "input", required_argument, NULL, 'i' },
{ "locale", required_argument, NULL, 'l' },
{ "properties-output", no_argument, NULL, 'p' },
{ "stringtable-input", no_argument, NULL, CHAR_MAX + 3 },
{ "stringtable-output", no_argument, NULL, CHAR_MAX + 4 },
+ { "style", required_argument, NULL, CHAR_MAX + 6 },
{ "version", no_argument, NULL, 'V' },
{ "width", required_argument, NULL, 'w' },
{ NULL, 0, NULL, 0 }
output_syntax = &output_format_stringtable;
break;
+ case CHAR_MAX + 5: /* --color */
+ if (handle_color_option (optarg) || color_test_mode)
+ usage (EXIT_FAILURE);
+ break;
+
+ case CHAR_MAX + 6: /* --style */
+ handle_style_option (optarg);
+ break;
+
default:
usage (EXIT_FAILURE);
break;
printf (_("\
--no-translator assume the PO file is automatically generated\n"));
printf (_("\
+ --color use colors and other text attributes always\n\
+ --color=WHEN use colors and other text attributes if WHEN.\n\
+ WHEN may be 'always', 'never', 'auto', or 'html'.\n"));
+ printf (_("\
+ --style=STYLEFILE specify CSS style rule file for --color\n"));
+ printf (_("\
-p, --properties-output write out a Java .properties file\n"));
printf (_("\
--stringtable-output write out a NeXTstep/GNUstep .strings file\n"));
/* GNU gettext - internationalization aids
- Copyright (C) 1995-1998, 2000-2009 Free Software Foundation, Inc.
+ Copyright (C) 1995-1998, 2000-2010 Free Software Foundation, Inc.
This file was written by Peter Miller <millerp@canb.auug.org.au>
This program is free software: you can redistribute it and/or modify
#include "write-po.h"
#include "write-properties.h"
#include "write-stringtable.h"
+#include "color.h"
#include "format.h"
#include "xalloc.h"
#include "xmalloca.h"
{
{ "add-location", no_argument, &line_comment, 1 },
{ "backup", required_argument, NULL, CHAR_MAX + 1 },
+ { "color", optional_argument, NULL, CHAR_MAX + 9 },
{ "compendium", required_argument, NULL, 'C', },
{ "directory", required_argument, NULL, 'D' },
{ "escape", no_argument, NULL, 'E' },
{ "strict", no_argument, NULL, CHAR_MAX + 2 },
{ "stringtable-input", no_argument, NULL, CHAR_MAX + 5 },
{ "stringtable-output", no_argument, NULL, CHAR_MAX + 6 },
+ { "style", required_argument, NULL, CHAR_MAX + 10 },
{ "suffix", required_argument, NULL, CHAR_MAX + 3 },
{ "update", no_argument, NULL, 'U' },
{ "verbose", no_argument, NULL, 'v' },
catalogname = optarg;
break;
+ case CHAR_MAX + 9: /* --color */
+ if (handle_color_option (optarg) || color_test_mode)
+ usage (EXIT_FAILURE);
+ break;
+
+ case CHAR_MAX + 10: /* --style */
+ handle_style_option (optarg);
+ break;
+
default:
usage (EXIT_FAILURE);
break;
printf (_("\
--lang=CATALOGNAME set 'Language' field in the header entry\n"));
printf (_("\
+ --color use colors and other text attributes always\n\
+ --color=WHEN use colors and other text attributes if WHEN.\n\
+ WHEN may be 'always', 'never', 'auto', or 'html'.\n"));
+ printf (_("\
+ --style=STYLEFILE specify CSS style rule file for --color\n"));
+ printf (_("\
-e, --no-escape do not use C escapes in output (default)\n"));
printf (_("\
-E, --escape use C escapes in output, no extended chars\n"));
/* msgunfmt - converts binary .mo files to Uniforum style .po files
- Copyright (C) 1995-1998, 2000-2007, 2009 Free Software Foundation, Inc.
+ Copyright (C) 1995-1998, 2000-2007, 2009-2010 Free Software Foundation, Inc.
Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, April 1995.
This program is free software: you can redistribute it and/or modify
#include "write-po.h"
#include "write-properties.h"
#include "write-stringtable.h"
+#include "color.h"
#include "propername.h"
#include "gettext.h"
/* Long options. */
static const struct option long_options[] =
{
+ { "color", optional_argument, NULL, CHAR_MAX + 6 },
{ "csharp", no_argument, NULL, CHAR_MAX + 4 },
{ "csharp-resources", no_argument, NULL, CHAR_MAX + 5 },
{ "escape", no_argument, NULL, 'E' },
{ "sort-output", no_argument, NULL, 's' },
{ "strict", no_argument, NULL, 'S' },
{ "stringtable-output", no_argument, NULL, CHAR_MAX + 3 },
+ { "style", required_argument, NULL, CHAR_MAX + 7 },
{ "tcl", no_argument, NULL, CHAR_MAX + 1 },
{ "verbose", no_argument, NULL, 'v' },
{ "version", no_argument, NULL, 'V' },
csharp_resources_mode = true;
break;
+ case CHAR_MAX + 6: /* --color */
+ if (handle_color_option (optarg) || color_test_mode)
+ usage (EXIT_FAILURE);
+ break;
+
+ case CHAR_MAX + 7: /* --style */
+ handle_style_option (optarg);
+ break;
+
default:
usage (EXIT_FAILURE);
break;
printf (_("\
Output details:\n"));
printf (_("\
+ --color use colors and other text attributes always\n\
+ --color=WHEN use colors and other text attributes if WHEN.\n\
+ WHEN may be 'always', 'never', 'auto', or 'html'.\n"));
+ printf (_("\
+ --style=STYLEFILE specify CSS style rule file for --color\n"));
+ printf (_("\
-e, --no-escape do not use C escapes in output (default)\n"));
printf (_("\
-E, --escape use C escapes in output, no extended chars\n"));
/* Remove, select or merge duplicate translations.
- Copyright (C) 2001-2007, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2001-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <haible@clisp.cons.org>, 2001.
This program is free software: you can redistribute it and/or modify
#include "write-po.h"
#include "write-properties.h"
#include "write-stringtable.h"
+#include "color.h"
#include "msgl-cat.h"
#include "propername.h"
#include "gettext.h"
static const struct option long_options[] =
{
{ "add-location", no_argument, &line_comment, 1 },
+ { "color", optional_argument, NULL, CHAR_MAX + 5 },
{ "directory", required_argument, NULL, 'D' },
{ "escape", no_argument, NULL, 'E' },
{ "force-po", no_argument, &force_po, 1 },
{ "strict", no_argument, NULL, 'S' },
{ "stringtable-input", no_argument, NULL, CHAR_MAX + 3 },
{ "stringtable-output", no_argument, NULL, CHAR_MAX + 4 },
+ { "style", required_argument, NULL, CHAR_MAX + 6 },
{ "to-code", required_argument, NULL, 't' },
{ "unique", no_argument, NULL, 'u' },
{ "use-first", no_argument, NULL, CHAR_MAX + 1 },
output_syntax = &output_format_stringtable;
break;
+ case CHAR_MAX + 5: /* --color */
+ if (handle_color_option (optarg) || color_test_mode)
+ usage (EXIT_FAILURE);
+ break;
+
+ case CHAR_MAX + 6: /* --style */
+ handle_style_option (optarg);
+ break;
+
default:
usage (EXIT_FAILURE);
/* NOTREACHED */
--use-first use first available translation for each\n\
message, don't merge several translations\n"));
printf (_("\
+ --color use colors and other text attributes always\n\
+ --color=WHEN use colors and other text attributes if WHEN.\n\
+ WHEN may be 'always', 'never', 'auto', or 'html'.\n"));
+ printf (_("\
+ --style=STYLEFILE specify CSS style rule file for --color\n"));
+ printf (_("\
-e, --no-escape do not use C escapes in output (default)\n"));
printf (_("\
-E, --escape use C escapes in output, no extended chars\n"));
#include "write-po.h"
#include "write-properties.h"
#include "write-stringtable.h"
+#include "color.h"
#include "format.h"
#include "propername.h"
#include "gettext.h"
{ "add-location", no_argument, &line_comment, 1 },
{ "boost", no_argument, NULL, CHAR_MAX + 11 },
{ "c++", no_argument, NULL, 'C' },
+ { "color", optional_argument, NULL, CHAR_MAX + 14 },
{ "copyright-holder", required_argument, NULL, CHAR_MAX + 1 },
{ "debug", no_argument, &do_debug, 1 },
{ "default-domain", required_argument, NULL, 'd' },
{ "strict", no_argument, NULL, 'S' },
{ "string-limit", required_argument, NULL, 'l' },
{ "stringtable-output", no_argument, NULL, CHAR_MAX + 7 },
+ { "style", required_argument, NULL, CHAR_MAX + 15 },
{ "trigraphs", no_argument, NULL, 'T' },
{ "version", no_argument, NULL, 'V' },
{ "width", required_argument, NULL, 'w', },
package_version = optarg;
break;
+ case CHAR_MAX + 14: /* --color */
+ if (handle_color_option (optarg) || color_test_mode)
+ usage (EXIT_FAILURE);
+ break;
+
+ case CHAR_MAX + 15: /* --style */
+ handle_style_option (optarg);
+ break;
+
default:
usage (EXIT_FAILURE);
/* NOTREACHED */
printf (_("\
Output details:\n"));
printf (_("\
+ --color use colors and other text attributes always\n\
+ --color=WHEN use colors and other text attributes if WHEN.\n\
+ WHEN may be 'always', 'never', 'auto', or 'html'.\n"));
+ printf (_("\
+ --style=STYLEFILE specify CSS style rule file for --color\n"));
+ printf (_("\
-e, --no-escape do not use C escapes in output (default)\n"));
printf (_("\
-E, --escape use C escapes in output, no extended chars\n"));