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 toolsSeverity: 3 - Normal
Item Group: NoneStatus: Works For Me
Privacy: PublicAssigned 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 click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follow 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 27 Nov 2016 01:34:13 AM UTChaibleCategoryNone=>Translator tools
    Wed 13 Mar 2013 10:53:01 AM UTCm1gu3lOpen/ClosedOpen=>Closed
    Thu 28 Feb 2013 10:32:19 AM UTCm1gu3lStatusNot a Bug=>Works For Me
    Thu 28 Feb 2013 10:31:16 AM UTCm1gu3lStatusNone=>Not a Bug
      Assigned toNone=>m1gu3l
    Wed 30 Jan 2013 07:23:08 PM UTCacdhaCarbon-Copy-=>Added -email is unavailable-

    Back to the top

    Powered by Savane 3.1-cleanup1