bugGNU gettext - Bugs: bug #38205, msggrep: field selection is...


You are not allowed to post comments on this tracker with your current authentication level.

bug #38205: msggrep: field selection is cumbersome, incorrectly documented

Submitted by:  None
Submitted on:  Wed 30 Jan 2013 07:19:09 PM UTC  
Category:  Translator tools Severity:  3 - Normal
Item Group:  None Status:  Works For Me
Privacy:  Public Assigned to:  Miguel Ángel Arruga Vivas <m1gu3l>
Open/Closed:  Closed

Mon 04 Feb 2013 11:42:09 PM UTC, comment #3:

Please, read the full text:

Miguel Ángel Arruga Vivas <m1gu3l>
Project MemberIn charge of this item.
Mon 04 Feb 2013 09:09:09 PM UTC, comment #2:

Miguel: it remains a bug - see the --help output as quoted in the original message:

As noted in my original message, you cannot specify the pattern as the argument for the flag as shown above – you must provide it as a separate argument to a different flag (--regexp).

Chris Adams <acdha>
Mon 04 Feb 2013 06:44:17 PM UTC, comment #1:

It is not a bug, It is a feature request.

From msggrep info and --help:

[-E | -F] [-e PATTERN | -f FILE]...
PATTERNs are basic regular expressions by default, or extended
regular expressions if -E is given, or fixed strings if -F is given.

Miguel Ángel Arruga Vivas <m1gu3l>
Project MemberIn charge of this item.
Wed 30 Jan 2013 07:19:09 PM UTC, original submission:

Using msggrep (GNU gettext-tools) 0.18.1:

Message selection:

This misleadingly suggests that the pattern is an argument for the flags which select the field to search. Unfortunately, this does not actually work:

$ msggrep -T Bug locale/en_US/LC_MESSAGES/django.po
msggrep: at most one input file allowed
Try `msggrep --help' for more information.

$ msggrep --msgstr=Topic locale/en_US/LC_MESSAGES/django.po
msggrep: option '--msgstr' doesn't allow an argument
Try `msggrep --help' for more information.

Instead, the arguments must be provided to the --regexp option, which works but is particularly counterintuitive when using fixed strings:

$ msggrep --msgstr --fixed-strings --regexp 'Bug' locale/en_US/LC_MESSAGES/django.po

The best way to fix this would be for msggrep to move closer to grep and simply allow you to provide the pattern as the first of two positional arguments:

msggrep --msgid Bug locale/en_US/LC_MESSAGES/django.po

This might even be backwards compatible as msggrep has historically prevented you from using more than one positional argument.

However, the easiest fix might simply be to update the documentation and provide an example of basic usage.



No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by haible (Updated the item)
  • -email is unavailable- added by acdha (Posted a comment)
  • -email is unavailable- added by m1gu3l (Posted a comment)
  • -email is unavailable- added by acdha

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.




    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-11-27 haible CategoryNone => Translator tools
    2013-03-13 m1gu3l Open/ClosedOpen => Closed
    2013-02-28 m1gu3l StatusNot a Bug => Works For Me
    2013-02-28 m1gu3l StatusNone => Not a Bug
        Assigned toNone => m1gu3l
    2013-01-30 acdha Carbon-Copy- => Added -email is unavailable-

    Back to the top

    Powered by Savane 3.3