Comments (9)
Which formater are you using here? I may well be blind, but it seems to be no Markdown format importer, is it? The first step for a proper MarkDown support is probably to have a dedicated formater, don't you think? As always, PR are warmely welcomed :-P
from po4a.
Which formater are you using here? I may well be blind, but it seems to be no Markdown format importer, is it? The first step for a proper MarkDown support is probably to have a dedicated formater, don't you think?
I have (vague) plans for other improvements in Markdown bullet list handling and noticed this discussion. @mquinson, I'm not sure I understand your comment correctly and wether I should be discouraged to improve the existing Markdown support (in Locale::Po4a::Text
) because I would be required to first create a brand new class and think hard about design to avoid too much code duplication.
I would argue that it's best to improve Markdown syntax support in Locale::Po4a::Text
as long as these conditions are met:
- the
parse_markdown
method remains small (currently it is pretty small; compare for example to the asciidoc support that takes about 50% of the SLOC in that class) - improving support of Markdown syntax incidentally improves parsing of other simple text documents supported by that class; I think this should be easy given staying close to how most people would write text without knowing about Markdown is one design goal of that format; IMO it's already confirmed by the fact we already have pretty good Markdown support with very little Markdown-specific code.
Whenever any of these conditions is not met then I'll be all for creating a dedicated Locale::Po4a::Markdown
class but right now I don't really see the point given it would basically be a copy of Locale::Po4a::Text
minus the asciidoc, debian/control and fortunes bits.
What do you think?
from po4a.
will a Locale::Po4a::Markdown class:
- strip the markdown from [[!meta title="this is our title"] and generate a mstr= "this is our title"?
- similar with [[!wikipedia Word desc="mydescription"] becoming mstr= "Word" and mstr= "mydescription" in .pot ?
- could maybe verify the existence of internal links?
from po4a.
from po4a.
ok!
from po4a.
I'd be interested to know if this is a case where leveraging another CPAN based markdown processor would be of help. Otherwise, I agree that your criteria for splitting or not splitting look good.
from po4a.
Hello, sorry for the delay.
I totally agree with @intrigeri that support for markdown can grow further in the text parser since it does not harm the text parser in any way for now. When we will have to choose to split the text here or there, depending on whether we assume that it's asciidoc or markdown, then we'll need to consider spliting the parsers. But not for now. So, my first question is now answered.
As for the remark of @bexelbie , I really fail to understand how you could use a regular parser to build a po4a transtractor. I'd be interested in an example ;)
from po4a.
from po4a.
We now have a test case for this, see MarkDown.md in the test directory. From what I can tell, this issue seems to be solved -- the parser generates separate msgids for each bullet point and marks them as being wrappable.
I'm therefore closing this issue, please reopen it if you're missing some functionallity.
from po4a.
Related Issues (20)
- zh_CN or zh_CHS? (zh_TW or zh_Hant) HOT 2
- Translations are created both in the path of destdir option in the po4a config and in the current directory HOT 2
- \input should not be parsed when it's part of a verbatim environment (po4a::tex: Cannot find 'main.tex' with kpsewhich)
- Use of uninitialized values when trying to translate the darktable documentation HOT 5
- Build failure with `gettext 0.22`
- Can po4a handle the Doxygen's Source Files, *.doc? HOT 2
- proposal: use xmlcatalog to find docbook.xsl
- po file generated with an extension ending by a dot at middle line height HOT 2
- Ambiguity in license statement HOT 5
- Temp pot file not created HOT 10
- Yaml module fails to generate array like string HOT 12
- .po file language translation to another language tutorial or howto?
- Feature request for AsciiDoc: Translate tables by line HOT 3
- Creating an empty .po file causes non-ASCII characters to be silently discarded from msgids HOT 6
- Broken parsing of files with Unicode BOM HOT 1
- Asciidoc: Problem with + in list items HOT 8
- po4a modifes the msgid from man page
- 0.69: bulid is failing HOT 3
- AsciiDoc: numbered list or TIP box text starting with bold markup becomes no-wrap
- PO4A:LATEX ifthenelse puts everything in one message
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from po4a.