[Po4a-devel] po4a with markdown

Dongsheng Song dongsheng.song at gmail.com
Wed Apr 1 02:16:54 UTC 2009


2009/4/1 Nicolas François <nicolas.francois at centraliens.net>:
> On Tue, Mar 31, 2009 at 05:13:07PM +0800, dongsheng.song at gmail.com wrote:
>> Here is the source:
>>
>> ## Glossary ##
>>
>> Here we have the meanings of some terms used into Git context.
>> These terms were entirely copied from
>> [Git Glossary](http://www.kernel.org/pub/software/scm/git/docs/gitglossary.html).
>>
>> After I run 'po4a-updatepo -M UTF-8 -f text -o markdown -m
>> ../text/55_Glossary/0_Glossary.markdown -p test.po',
>> generate a po file with '\r' and extra space:
>
> Are you running po4a on Windows?
> Was the 0_Glossary.markdown file edited on Windows?
> (Can you send the file?)
>
> One way to fix this could be to run first
> dos2unix ../text/55_Glossary/0_Glossary.markdown
>
> This will convert the Windows end of line '\r\n' to Unix end of lines '\n'.
>

When I use LF format, the source :

Here we have the meanings of some terms used into Git context.
These terms were entirely copied from
[Git Glossary](http://www.kernel.org/pub/software/scm/git/docs/gitglossary.html).

generate :

msgid ""
"Here we have the meanings of some terms used into Git context.  These terms "
"were entirely copied from [Git "
"Glossary](http://www.kernel.org/pub/software/scm/git/docs/gitglossary.html)."
msgstr ""

If some one don't know markdown grammar, or are careless, they will
drop the extra
space when translation. So I suggest generate two strings instead of one:

msgid ""
"Here we have the meanings of some terms used into Git context."
msgstr ""

msgid ""
"These terms were entirely copied from [Git "
"Glossary](http://www.kernel.org/pub/software/scm/git/docs/gitglossary.html)."
msgstr ""

---
Dongsheng Song



More information about the Po4a-devel mailing list