Hi. Finally I got the big picture of .po, translate-toolkit and po4a.
I like the concept because that is the right approach to build the
whole framework for a translator (a human) with VIM as the editor of
choice. Then I could put the framework inside some VIM plugin. This
environment would be awesome!
I read your FAQ. I really miss the segmentation on sentence level when
creating .pot files (I need translation memories). I speak perl, but
am not smart enough to mess with the code.
Question/Feature Request:
Is it much work to add the option to have custom segmenting to
po4a-gettextize? The user provides the rules for segmenting, that `.'
is the general separator with the exception of provided abbreviations
(list in a file).
--
Karol Kreński
Show replies by date
OK, so I wrote sentence segmentator on top of po4a. It works this way:
1. po4a-gettextize creates the initial .po with paragraph-level
segments.
2. The attached po4a-segment.pl -S(plit) splits the paragraphs
(currently by dot+space, but abbrevs and rules should be added). Each
sentence belongs to a block, so that it can be merged back to
paragraphs at the end.
3. Tranlators work with this sentence-level file. My wife is a
translator and don't tell me sentence is a poor context - you guys
were just lazy to code the sentence splitter :)
4. Once the translators are done, the po4a-segment.pl -M(erge) is run
to revert to original po4a paragraph segments.
Quick tested with a libreoffice file (attached 1.odf with content.xml
inside) and latex. Seems to work for the attached file - I am able to
split, translate, merge back to paragraphs and at the end succesfully
po4a-translate! :)
The code is well documented and I hope to maintain the code if you
merge it with po4a package. Of course there are features missing, like
more rules for sentence splitting, picking proper latex (and other
formats) environments which can be translated, encodings, etc. But
basic work is done and if it's accepted I can work more on that.
--
Karol Kreński