[Po4a-devel]Xhtml module
by Yves Rutschle
Ok, I gave up on HTML: HTML is a load of rubbish, and
parsing all the rubbish that's out there would be enough to
drive the Dalai-Lama to eat a raw cow (ok I may be
exaggerating a little).
Using Jordi's help from months ago, I got an Xhtml module
that uses Xml.pm working in less than a couple of hours, and
it seems to be working quite well.
I'll submit another patch soon to update the tests.
Y.
19 years, 7 months
[Po4a-devel]Canonizing tabs
by Jordi Vilalta
Hi,
today, while testing the Docbook module on new documents, I've seen that
some docbook documents are indented with tabs. I've noticed that the
canonizing function doesn't handle tabs, and such msgids look like this:
"line1\t\t\tline2\t\t\tline3..."
It's so annoying to translate. Can we also canonize tabs to spaces or
would it break something?
This simple patch works for me:
--- lib/Locale/Po4a/Po.pm 27 Feb 2005 22:53:53 -0000 1.37
+++ lib/Locale/Po4a/Po.pm 21 Mar 2005 14:53:19 -0000
@@ -1065,6 +1065,7 @@
$text =~ s/^ *//s;
# if ($text eq "\n"), it messed up the first string (header)
$text =~ s/\n/ /gm if ($text ne "\n");
+ $text =~ s/\t/ /gm;
$text =~ s/([.)]) +/$1 /gm;
$text =~ s/([^.)]) */$1 /gm;
$text =~ s/ *$//s;
Regards,
Jordi Vilalta
19 years, 7 months
[Po4a-devel]New solution to translate XML using po files
by Martin Quinson
Hello,
I just discovered that the gnome guys did come out with their own solution
to convert xml files from and to po files. Of course, they couldn't use the
KDE one "poxml", neither one of the existing "translate" and "po4a".
Erm. Enough grumbling.
It's called xml2po, it's included as a sub-directory of the gnome-doc-utils
debian package. It's python based (grumble grumble).
From what I can see, the entities are rewritten before the content is
extracted to po files. This is bad because it will unnecessary fuzzy the
strings when the entity content change. In po4a/sgml, entities are
translated separately, and then the entities are preserved into msgids. I'm
not sure about po4a/xml.
The most interesting point is that they provide an heuristic for automatic
tags classification. Maybe from dtd, I only glanced the code. But at the
same time, they provide specific "modes" for the dtd they use (docbook and
gnomesummary). If it works, it's exactly what I'm dreaming of since years.
I think that it could be interesting to :
- see whether we can reuse their automatic classification heuristic
- build a gnomesummary module from their one (it looks really easy to do)
- contact the authors to see whether they would accept to merge our efforts
since it's also python based, we may well get the same result than with
the translate project (both parts willing to merge, none willing to
switch the programming language, and no change as result), but it worth
trying...
Your advice?
Bye, Mt.
PS: I dream of Perl6, which will make possible the code sharing between
perl, python and even java ;)
19 years, 7 months
[Po4a-devel]Configuration file example
by Jean-Michel POURE
Dear all,
Would it be possible to provide an example of a configuration file. I am not
sure of the syntax to use. A simple example would help.
Kind regards,
Jean-Michel
19 years, 7 months
[Po4a-devel]Docbook XML translation - howto skip tags
by Jean-Michel POURE
Dear friends,
First of all, thanks for this great work on po4a.
Presently, I am writing a contrarian book, available freely over the internet,
about the real estate bubble in France and UK.
The book is available (freely) there :
http://www.bulle-immobiliere.org
I am trying to use po4a to translate the docbook XML source files.
The command line is :
po4a-gettextize -M utf-8 -f docbook \
-m introduction.docbook -p introduction.pot
It works well, except for dbhtml XML extensions.
For example, the following text is not parsed :
************************************************************************************
<chapter id="introduction">
<? dbhtml filename="introduction.html" ?>
<title>Introduction</title>
<section><title>Les origines de l'étude</title>
************************************************************************************
But the following text is parsed like a charm :
************************************************************************************
<chapter id="introduction">
<title>Introduction</title>
<section><title>Les origines de l'étude</title>
************************************************************************************
I tried to send options to the parser using -o, but did not succeed. Any
solution to skip <? dbhtml filename="introduction.html" ?> ?
Best regards,
Jean-Michel Pouré
19 years, 7 months
[Po4a-devel]Docbook XML translation - howto skip tags
by Jean-Michel POURE
I posted this message without success. I hope it can pass through.
************************
Dear friends,
First of all, thanks for this great work on po4a.
Presently, I am writing a contrarian book, available freely over the internet,
about the real estate bubble in France and UK.
The book is available (freely) there :
http://www.bulle-immobiliere.org
I am trying to use po4a to translate the docbook XML source files.
The command line is :
po4a-gettextize -M utf-8 -f docbook \
-m introduction.docbook -p introduction.pot
It works well, except for dbhtml XML extensions.
For example, the following text is not parsed :
************************************************************************************
<chapter id="introduction">
<? dbhtml filename="introduction.html" ?>
<title>Introduction</title>
<section><title>Les origines de l'étude</title>
************************************************************************************
But the following text is parsed like a charm :
************************************************************************************
<chapter id="introduction">
<title>Introduction</title>
<section><title>Les origines de l'étude</title>
************************************************************************************
I tried to send options to the parser using -o, but did not succeed. Any
solution to skip <? dbhtml filename="introduction.html" ?> ?
Best regards,
Jean-Michel Pouré
19 years, 7 months
Re: [Po4a-devel]Re: Translating NEWS.Debian files: a (crude) first try
by Jordi Vilalta
Hello,
On Tue, 1 Feb 2005, Jordi Vilalta wrote:
> I might be wrong, but I think it's time to create a new module with common
> functions used by several scripts, like the config file loading, or a
> function to show wrapped messages using the proposed syntax in
> https://alioth.debian.org/tracker/index.php?func=detail&aid=300889&group_...
>
> Any ideas about this? What name should it take? (Common, Utils, Tools,
> ...?)
I've begun working on it (with the temporary name "Common").
While moving common parts of the scripts to this module, I've found an
undocumented option in the po4a script: split. What does it do? It adds a big
amount of code. Should it be documented or is it there just for testing?
hmm, I'm now thinking on posponing these big moves and concentrating in the
gcc-like syntax/wrapping stuff.
Regards,
Jordi Vilalta
19 years, 7 months
[Po4a-devel]Some encoding issues
by Nicolas François
Hello,
With a latin1 master document, I'm using the following commands:
po4a-gettextize -f man -m test.1 -M ISO-8859-1 -p test.po
po4a-translate -f man -m test.1 -M ISO-8859-1 -p test.po -l test.fr -k 0
The generated test.po is OK
The generated test.fr is not OK. If I translate the non ascii string
with only ascii char, the same non valid string is output.
I could also reproduce this with 0.19.
I also tried with various -L encoding, without success.
With an UTF-8 master document (and changing the -M option to UTF-8), I
have the same issues, but with 0.19, the output string is OK if it is
translated in the PO (whether or not the translated string contain non
any ascii char).
I may have just messed up something. Can somebody try it?
(I did verify the master document encoding, this time;)
TIA,
--
Nekral
19 years, 7 months
[Po4a-devel]Re: [Po4a-commits] po4a/debian changelog,1.154,1.155
by Nicolas François
Hello,
This changelog's changelog may need to be checked by somebody else.
I've set the distribution to unstable, and changed the uploader and date.
> Index: changelog
> ===================================================================
> RCS file: /cvsroot/po4a/po4a/debian/changelog,v
> retrieving revision 1.154
> retrieving revision 1.155
> diff -u -d -r1.154 -r1.155
> --- changelog 6 Mar 2005 11:13:15 -0000 1.154
> +++ changelog 11 Mar 2005 23:20:08 -0000 1.155
> @@ -1,4 +1,13 @@
> -po4a (0.20-1) UNRELEASED; urgency=low
> +po4a (0.20-2) UNRELEASED; urgency=low
> +
> + [Nicolas François]
> + (TeX module)
> + * Fix an issue with file excluded from inclusion:
> + after a gettextization, the PO file contained two \input{x}.
> +
> + -- Martin Quinson <mquinson(a)debian.org> Sun, 6 Mar 2005 11:44:40 +0100
> +
> +po4a (0.20-1) unstable; urgency=low
>
> [Nicolas François]
> (man module)
> @@ -104,7 +113,7 @@
> * Print full help when the user asks for --help, and a terse message
> otherwise.
>
> - -- Denis Barbier <barbier(a)debian.org> Thu, 11 Nov 2004 23:07:29 +0100
> + -- Martin Quinson <mquinson(a)debian.org> Sun, 6 Mar 2005 11:44:39 +0100
>
> po4a (0.19-1) unstable; urgency=low
--
Nekral
19 years, 7 months