Description of problem: Trying to drop strings in msgstr with --empty option in msghack, the result doesn't contain msgctxt which is there in the source. Version-Release number of selected component (if applicable): gettext-0.19.7-3.fc23.x86_64 How reproducible: always Steps to Reproduce: 1.msghack --empty <(echo "msgctxt \"ctxt\"\nmsgid \"id\"\nmsgstr \"string\"\n") 2. 3. Actual results: msgid "id" msgstr "" Expected results: msgctxt "ctxt" msgid "id" msgstr "" Additional info:
I don't know the origin of msghack, but apparently the tool doesn't support msgctxt at all. Can't you just use msgfilter instead? msgfilter sed -e d < <(echo "msgctxt \"ctxt\"\nmsgid \"id\"\nmsgstr \"string\"\n")
yes, msgfilter with --keep-header looks good as a workaround.
Given that msghack is provided only for backward compatibility (as noted in msghack.1), and the same task can be performed with the standard tool, I don't think it's worthwhile to add support for msgctxt.