Bug 1321532 - msghack drops msgctxt
Summary: msghack drops msgctxt
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: gettext
Version: 23
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Daiki Ueno
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-03-28 08:32 UTC by Akira TAGOH
Modified: 2016-05-09 07:01 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-05-09 07:01:19 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.