bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bugs in xgettext compared with msgcat


From: Bruno Haible
Subject: Re: Bugs in xgettext compared with msgcat
Date: Sun, 29 Apr 2007 18:55:23 +0200
User-agent: KMail/1.5.4

Hello,

Marc Bauer wrote:
> There are some bugs in xgettext. I'm using Windows poEdit 1.3.6 and have the
> following version in my poEdit directory:
> 
> xgettext.exe (GNU gettext-tools) 0.13.1
> Copyright (C) 1995-1998, 2000-2003 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.  There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> Written by Ulrich Drepper.
> 
> 
> I merged some POT files into one POT file (see below) generated with
> XGETTEXT file is generated with the command line:
> 
> C:\Programme\poEdit\bin\xgettext.exe --omit-header --from-code=utf-8
> general.pot views-module.pot views_book-inc.pot views_comment-inc.pot
> views_node-inc.pot views_profile-inc.pot views_statistics-inc.pot
> views_taxonomy-inc.pot views_theme_wizard-module.pot views_ui-module.pot
> views_upload-inc.pot views_user-inc.pot -o views.pot
> 
> 
> The other file was generated with MSGCAT and the following command line:
> 
> msgcat --use-first general.pot views-module.pot views_book-inc.pot
> views_comment-inc.pot views_node-inc.pot views_profile-inc.pot
> views_statistics-inc.pot views_taxonomy-inc.pot
> views_theme_wizard-module.pot views_ui-module.pot views_upload-inc.pot
> views_user-inc.pot  | msgattrib  --no-fuzzy -o views.pot

In general, the differences in the details come from the different purpose
of the tools. xgettext is made for creating POT files, whereas msgcat is
made for creating PO files that will be edited or validated by a translator.

> 1. Bug:
> 
> This line is created with xgettext:
> #: modules/views_statistics.inc:111 ;200 modules/views_user.inc:152
> 
> And this line with msgcat:
> #: modules/views_statistics.inc:111;200 modules/views_user.inc:152
> 
> As you can see there is a "blank" inserted between the line numbers "111
> ;200" if a string occurs more then once in a file.

xgettext version 0.14.2 or newer does not insert this blank. The current
release is 0.16.1.

> 2. Bug:
> 
> MSGCAT produces the following header - as an example:
> 
> # $Id$
> #
> # LANGUAGE translation of Drupal (general)
> # Copyright YEAR NAME <address@hidden>
> # Generated from files:
> #  views.module,v 1.166.2.32 2007/04/13 16:27:12 merlinofchaos
> #  views_ui.module,v 1.44.2.18 2007/04/12 01:29:08 merlinofchaos
> #  views_comment.inc,v 1.4.4.6 2007/03/06 22:39:24 merlinofchaos
> #  views_node.inc,v 1.30.2.15 2007/04/12 18:44:04 merlinofchaos
> #  views_search.inc,v 1.2.2.6 2007/03/03 22:59:33 merlinofchaos
> #  views_statistics.inc,v 1.9.2.6 2007/03/06 21:23:27 merlinofchaos
> #  views_user.inc,v 1.14.2.7 2007/03/03 22:31:27 merlinofchaos
> #  views_upload.inc,v 1.4.4.5 2007/03/03 22:40:31 merlinofchaos
> #  views_rss.module,v 1.12.2.5 2007/03/06 21:44:32 merlinofchaos
> #  views.install,v 1.21.4.12 2007/04/14 03:35:47 merlinofchaos
> #  views.info,v 1.2.2.3 2007/01/19 00:22:45 merlinofchaos
> #  views_rss.info,v 1.3.2.3 2007/01/19 00:22:46 merlinofchaos
> #  views_theme_wizard.info,v 1.3.2.3 2007/01/19 00:22:46 merlinofchaos
> #  views_ui.info,v 1.4.2.3 2007/01/19 00:22:46 merlinofchaos
> #
> 
> 
> And XGETTEXT creates the following header - all extra lines must be
> prevented to not log senseless code in CVS:
> 
> # $Id$
> #
> # LANGUAGE translation of Drupal (general)
> # Copyright YEAR NAME <address@hidden>
> # Generated from files:
> #  views.module,v 1.166.2.32 2007/04/13 16:27:12 merlinofchaos
> #  views_ui.module,v 1.44.2.18 2007/04/12 01:29:08 merlinofchaos
> #  views_comment.inc,v 1.4.4.6 2007/03/06 22:39:24 merlinofchaos
> #  views_node.inc,v 1.30.2.15 2007/04/12 18:44:04 merlinofchaos
> #  views_search.inc,v 1.2.2.6 2007/03/03 22:59:33 merlinofchaos
> #  views_statistics.inc,v 1.9.2.6 2007/03/06 21:23:27 merlinofchaos
> #  views_user.inc,v 1.14.2.7 2007/03/03 22:31:27 merlinofchaos
> #  views_upload.inc,v 1.4.4.5 2007/03/03 22:40:31 merlinofchaos
> #  views_rss.module,v 1.12.2.5 2007/03/06 21:44:32 merlinofchaos
> #  views.install,v 1.21.4.12 2007/04/14 03:35:47 merlinofchaos
> #  views.info,v 1.2.2.3 2007/01/19 00:22:45 merlinofchaos
> #  views_rss.info,v 1.3.2.3 2007/01/19 00:22:46 merlinofchaos
> #  views_theme_wizard.info,v 1.3.2.3 2007/01/19 00:22:46 merlinofchaos
> #  views_ui.info,v 1.4.2.3 2007/01/19 00:22:46 merlinofchaos
> #
> # $Id$
> #
> # LANGUAGE translation of Drupal (views.module)
> # Copyright YEAR NAME <address@hidden>
> # Generated from files:
> #  views.module,v 1.166.2.32 2007/04/13 16:27:12 merlinofchaos
> #  views.info,v 1.2.2.3 2007/01/19 00:22:45 merlinofchaos
> #  views_rss.info,v 1.3.2.3 2007/01/19 00:22:46 merlinofchaos
> #  views_theme_wizard.info,v 1.3.2.3 2007/01/19 00:22:46 merlinofchaos
> #  views_ui.info,v 1.4.2.3 2007/01/19 00:22:46 merlinofchaos
> #
> # $Id$
> #
> # LANGUAGE translation of Drupal (modules/views_book.inc)
> # Copyright YEAR NAME <address@hidden>
> # Generated from file: views_book.inc,v 1.6.4.4 2007/03/04 06:30:22
> merlinofchaos
> #
> # $Id$
> #
> # LANGUAGE translation of Drupal (modules/views_comment.inc)
> # Copyright YEAR NAME <address@hidden>
> # Generated from file: views_comment.inc,v 1.4.4.6 2007/03/06 22:39:24
> merlinofchaos
> #
> # $Id$
> #
> # LANGUAGE translation of Drupal (modules/views_node.inc)
> # Copyright YEAR NAME <address@hidden>
> # Generated from file: views_node.inc,v 1.30.2.15 2007/04/12 18:44:04
> merlinofchaos
> #
> # $Id$
> #
> # LANGUAGE translation of Drupal (modules/views_profile.inc)
> # Copyright YEAR NAME <address@hidden>
> # No version information was available in the source files.
> #
> # $Id$
> #
> # LANGUAGE translation of Drupal (modules/views_statistics.inc)
> # Copyright YEAR NAME <address@hidden>
> # Generated from file: views_statistics.inc,v 1.9.2.6 2007/03/06 21:23:27
> merlinofchaos
> #
> # $Id$
> #
> # LANGUAGE translation of Drupal (modules/views_taxonomy.inc)
> # Copyright YEAR NAME <address@hidden>
> # Generated from file: views_taxonomy.inc,v 1.27.2.7 2007/03/06 21:44:32
> merlinofchaos
> #
> # $Id$
> #
> # LANGUAGE translation of Drupal (views_theme_wizard.module)
> # Copyright YEAR NAME <address@hidden>
> # Generated from file: views_theme_wizard.module,v 1.11.2.3 2007/01/19
> 00:22:46 merlinofchaos
> #
> # $Id$
> #
> # LANGUAGE translation of Drupal (views_ui.module)
> # Copyright YEAR NAME <address@hidden>
> # Generated from files:
> #  views_ui.module,v 1.44.2.18 2007/04/12 01:29:08 merlinofchaos
> #  views.info,v 1.2.2.3 2007/01/19 00:22:45 merlinofchaos
> #  views_rss.info,v 1.3.2.3 2007/01/19 00:22:46 merlinofchaos
> #  views_theme_wizard.info,v 1.3.2.3 2007/01/19 00:22:46 merlinofchaos
> #  views_ui.info,v 1.4.2.3 2007/01/19 00:22:46 merlinofchaos
> #
> # $Id$
> #
> # LANGUAGE translation of Drupal (modules/views_upload.inc)
> # Copyright YEAR NAME <address@hidden>
> # Generated from file: views_upload.inc,v 1.4.4.5 2007/03/03 22:40:31
> merlinofchaos
> #
> # $Id$
> #
> # LANGUAGE translation of Drupal (modules/views_user.inc)
> # Copyright YEAR NAME <address@hidden>
> # Generated from file: views_user.inc,v 1.14.2.7 2007/03/03 22:31:27
> merlinofchaos
> #

This is how the tools are supposed to work. msgcat, like xgettext, will
combine the header comments. But you passed the option --use-first to
msgcat, hence msgcat assumes that the header comments from the other files
are irrelevant.

Bruno





reply via email to

[Prev in Thread] Current Thread [Next in Thread]