mquinson / po4a

Maintain the translations of your documentation with ease (PO for anything)
http://po4a.org/
GNU General Public License v2.0
123 stars 61 forks source link

How to disable wrap on generated markdown file #357

Closed PeterNjeim closed 2 years ago

PeterNjeim commented 2 years ago

I've tried every option to disable wrapping, but it only applies to the po file. How can I stop wrapping on the final, translated md file? Using po4a version 0.66 and command po4a po4a.conf.

po4a.conf:

[po_directory] po/

[options] --addendum-charset UTF-8 --localized-charset UTF-8 --master-charset UTF-8 --master-language en --msgmerge-opt '--no-wrap' --porefs file --wrap-po no -k 0

[po4a_alias:markdown] text markdown neverwrap nowrap

[type:markdown] source/README.md $lang:i18n/$lang/README.md

en.po:

#. type: Plain text
#: source/README.md
msgid "# docs"
msgstr ""

#. type: Plain text
#: source/README.md
msgid "Documentation translations"
msgstr ""

#. type: Plain text
#: source/README.md
msgid "## Instructions"
msgstr ""

#. type: Bullet: '1. '
#: source/README.md
msgid "kasdys"
msgstr ""

#. type: Bullet: '2. '
#: source/README.md
msgid "lolsakj dksjs sa shsd kja hd sjkh asjkd hajshdkjahsjkdhasdh askjdh ajkshdkjah sgdjh ajskdhjkahs djkahskjdhjkh`akjhdasjh` khhakshdjkahskjd asjhaskd akhd ajsdjkahs djkhakjdhajksdh kjash djkah sjkdh ajksd hjkas hdjka hsjkdh ajksh"
msgstr ""

Source:

# docs

Documentation translations

## Instructions

1. kasdys
2. lolsakj dksjs sa shsd kja hd sjkh asjkd hajshdkjahsjkdhasdh askjdh ajkshdkjah sgdjh ajskdhjkahs djkahskjdhjkh`akjhdasjh` khhakshdjkahskjd asjhaskd akhd ajsdjkahs djkhakjdhajksdh kjash djkah sjkdh ajksd hjkas hdjka hsjkdh ajksh

Output:

# docs

Documentation translations

## Instructions

1. kasdys
2. lolsakj dksjs sa shsd kja hd sjkh asjkd hajshdkjahsjkdhasdh askjdh
   ajkshdkjah sgdjh ajskdhjkahs djkahskjdhjkh`akjhdasjh` khhakshdjkahskjd
   asjhaskd akhd ajsdjkahs djkhakjdhajksdh kjash djkah sjkdh ajksd hjkas
   hdjka hsjkdh ajksh
PeterNjeim commented 2 years ago

Sorry for the confusion, I needed a -o before the neverwrap option in [po4a_alias:markdown]. All is working well now.

ghostwords commented 2 years ago

Hi @PeterNjeim, did enabling neverwrap add newlines to your plain text type messages? It did for me, I opened #359 to ask for help.

PeterNjeim commented 2 years ago

@ghostwords answered here: https://github.com/mquinson/po4a/issues/359#issuecomment-1082261483 (for any future readers of this thread).