Bug 1321532

Summary: msghack drops msgctxt
Product: [Fedora] Fedora Reporter: Akira TAGOH <tagoh>
Component: gettextAssignee: Daiki Ueno <dueno>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 23CC: dueno, i18n-bugs, petersen, praiskup
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-05-09 07:01:19 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Akira TAGOH 2016-03-28 08:32:12 UTC
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:

Comment 1 Daiki Ueno 2016-03-28 09:13:48 UTC
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")

Comment 2 Akira TAGOH 2016-03-29 02:25:26 UTC
yes, msgfilter with --keep-header looks good as a workaround.

Comment 3 Daiki Ueno 2016-05-09 07:01:19 UTC
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.