Converts GNU gettext PO file content into a Loreline translation file body.
Mapping:
msgctxt "" -> # hash comment (preferred if present)
msgid "" -> fallback for key if no msgctxt, else used as
// <source> reference comment
msgstr "" -> the translation text line
Empty msgstr -> entry skipped.
Plural forms (msgstr[N]) -> take msgstr[0].
Multi-line msgid/msgstr (msgid ""\n"line1"\n"line2") -> concatenated.
PO files are mono-locale by design; the locale parameter is accepted for
API uniformity with the other format converters but unused here.
msgstr must be valid Loreline body content. Its value is written
verbatim into the synthesised .lor and re-parsed by Loreline. See the
full rules in loreline.translation.TranslationFormats.
Generates a PO file body for the given source script, suitable for the
given locale. If existing is provided, entries already present there
are preserved as the msgstr value; otherwise the msgstr defaults to
the source text (placeholder).
Escape a string for use inside a PO double-quoted string literal.
Escapes \ -> \\ and " -> \". Other escapes (like \n from the
Loreline printer) round-trip correctly because they get re-applied by
the Loreline parser when the synthesized body is re-parsed.
Escape a string for use as a Loreline text body line.
Real newlines stay (Loreline groups consecutive non-blank lines into a
single multi-line text block). The $ character is doubled to avoid
triggering interpolation in the synthesized .lor content.