pofile
pofile copied to clipboard
msgctxt spanning more than one line is not captured
xgettext output:
#: standard input:49
msgctxt ""
"hello world hello world hello world hello world hello world hello world hello world"
"hello world hello world"
msgid "inviting friends"
msgstr ""
Parsed output:
{
msgid: 'inviting friends',
msgctxt: '',
references: [Object],
msgid_plural: null,
msgstr: [Object],
comments: [],
extractedComments: [],
flags: {},
obsolete: false
}
It appears as though we need to add a context = 'msgctxt';
when we're on a msgctxt line, and then add another conditional to // Probably multiline string or blank
. Since this is not typical usage of context (very large string), I thought it might be better to discuss first.
This is very interesting.
Normally, message contexts are intended to be used as short identifiers. What exactly are you trying to do?
The problem is that xgettext is unable to parse comments for translators from JavaScript so I end up using the context for this purpose (trying to use it as little as possible though).