Discussion:
[Docutils-users] how to correct reStructuredText markup batchly.
Jeffery
2016-05-19 01:53:10 UTC
Permalink
hey, recently i review the translation project that translate English reST
document into chinese reST document use gettext tools on transifex
platform.

a you know, there have no bank need in chinese, and most translator no
sense with reST markup, so that the no bank around reST markup. now, i
want a tools/or scripts that can correct this issue batch process po file.

thanks.
--
Jeffery -odoo expert form kunshan, suzhou, china
Aahz
2016-05-21 18:09:51 UTC
Permalink
Post by Jeffery
hey, recently i review the translation project that translate English reST
document into chinese reST document use gettext tools on transifex
platform.
Can you provide more information or at least a link?
Post by Jeffery
a you know, there have no bank need in chinese, and most translator no
sense with reST markup, so that the no bank around reST markup. now, i
want a tools/or scripts that can correct this issue batch process po file.
What is a "bank"? Do you mean "backquote"? If you want a batch process,
you need to identify some kind of text that you can use to delimit reST
markup.
--
Aahz (***@pythoncraft.com) <*> http://www.pythoncraft.com/

"There are three kinds of lies: Lies, Damn Lies, and Statistics." --Disraeli

------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
Docutils-users mailing list
Docutils-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/docutils-users

Please use "Reply All" to reply to the list.
Guenter Milde
2016-05-22 10:11:38 UTC
Permalink
Post by Aahz
Post by Jeffery
hey, recently i review the translation project that translate English reST
document into chinese reST document use gettext tools on transifex
platform.
Can you provide more information or at least a link?
Post by Jeffery
a you know, there have no bank need in chinese, and most translator no
sense with reST markup, so that the no bank around reST markup. now, i
want a tools/or scripts that can correct this issue batch process po file.
What is a "bank"?
I suppose this should be "blank" (i.e. whitespace).

rST `inline markup recognition rules`__ require whitespace or punctuation
around inline markup. This is a problem for languages that dont't use
whitespace to separate words (Chinese, Japanese, ...).

__ http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#inline-markup-recognition-rules

There is already a bug report and patch for this issue.
https://sourceforge.net/p/docutils/patches/103/


--conservative-inline-markup
Require whitespace or punctuation around inline
markup. Enabled by default.
--simple-inline-markup No restrictions on characters around inline markup.
Post by Aahz
If you want a batch process, you need to identify some kind of text
that you can use to delimit reST markup.
This might be solved via a set of regular expression replacements, but I
don't know a ready solution.

It might be simpler to apply the patch
https://sourceforge.net/p/docutils/patches/_discuss/thread/e5337656/6356/attachment/simple-inline-rules.patch
or wait for the config setting to
be in the SVN version and use it.

Günter


------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
Docutils-users mailing list
Docutils-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/docutils-users

P

Loading...