Passing options to `GettextParser.po` compiler in `i18nextToGettext`
See original GitHub issueHello, everyone, sorry if this issue was created somewhere, I tried to searching through the list but did not find anything relevant.
The problem I’ve encountered is that when I’m trying to parse json
-> po
I get the following output of po file:
msgid "Accept offer note"
msgstr ""
"Jetzt bräuchten wir noch ein paar Informationen von Ihnen um die Bestellung "
"abzuschliessen."
whereas expected output would be:
msgid "Accept offer note"
msgstr "Jetzt bräuchten wir noch ein paar Informationen von Ihnen um die Bestellung abzuschliessen."
I’ve dug deep into the library and found out that pocompiler
which is used by gettext-parser
has a default of 76
foldLength of a string, that’s why you get such result.
It seems that when i18nextToGettext
passes the data into parser.compile
it is not possible to pass any options for the compiler itself, which imo would be awesome to have! Or at least default foldLength to 0 (disable) because this is, imho, is an opinionated feature.
Or maybe there’s a workaround? Because right now we have a bunch of translation keys which are longer than 76 chars and our translation service does not accept “invalid” po files
Could someone clarify if it’s an issue at all?
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (3 by maintainers)
I see, it’s all very good that it is in the spec (sorry if I came on wrong footing! I’m just not very familiar with the spec), but it would be more awesome to be able to pass options to the parser as well, it’s not even a breaking change, just an optional feature 😉
That’s it, that’s all there is to it 😉
On Fri, Feb 1, 2019, 4:06 PM mvirbicianskas <notifications@github.com wrote: