s from
the end of the banner to the beginning of school.html, and make a footer
which closes what the header opened.
(I understand that it may mean to change a lot files in this server)
[0] I don't think it is a problem. These #include are useful to avoid
rewriting always the same section and to enforce consistency between
pages. In the case of generated files, this is not a problem. The
documents will be a bit bigger, but we are just talking about a few
kilobytes.
Kind Regards,
--
Nekral
From nicolas.francois at centraliens.net Wed Aug 8 15:38:08 2007
From: nicolas.francois at centraliens.net (Nicolas =?iso-8859-1?Q?Fran=E7ois?=)
Date: Wed, 8 Aug 2007 17:38:08 +0200
Subject: [Po4a-devel] Preparation of the next po4a 0.32 release
Message-ID: <20070808153808.GC19800@nekral.homelinux.net>
Hello,
I intend to release po4a next week (15th of August).
I don't expect a lot of string changes until then.
If you need more time to update the translations, just let me know. I can
change the date, or plan a dot-release afterwards.
If you want a feature or bug fix in 0.32, please raise your hand.
I will give a try to Server Side Includes for the Xhtml module. This will
probably introduce an option in the Xhtml module and another one in the
Xml module (and their documentation).
Here are the current status of the translations:
================================================
Translations of the binaries:
-----------------------------
af: 22t 11f 129u
ar: 1t 161u
ca: 145t 6f 11u
de: 51t 21f 90u
cs: 11t 15f 136u
eo: 24t 2f 136u
es: 145t 6f 11u
eu: 11t 2f 149u
fr: 162t
he: 3t 1f 158u
it: 135t 14f 13u
ku: 4t 1f 157u
nb: 51t 17f 94u
nl: 12t 2f 148u
pl: 157t 2f 3u
pt: 10t 2f 150u
ru: 145t 6f 11u
sl: 6t 8f 148u
sv: 132t 9f 21u
uk: 4t 6f 152u
pt_BR: 20t 6f 136u
You can find the PO files in:
http://alioth.debian.org/plugins/scmcvs/cvsweb.php/po4a/po/bin/?cvsroot=po4a
Translations of the man pages:
------------------------------
ca: 842t 99f 192u
es: 842t 99f 192u
fr: 1103t 1u
it: 292t 91f 750u
pl: 1121t 6f 6u
You can find the PO files in:
http://alioth.debian.org/plugins/scmcvs/cvsweb.php/po4a/po/pod/?cvsroot=po4a
The major changes for this release are:
=======================================
** Security fix
Fix a possible race condition on a file created in /tmp.
** Bug fixes
sgml: The handling of newlines was broken in no-wrap sections in 0.31
xhtml: The module is now distributed as the other modules.
texinfo: Fix infinite loop when a command parameter ends with \
(as in @samp{\})
** New features
xml: New option includeexternal to support external entities.
texinfo: Added support for many commands and environment (see
changelog).
Kind Regards,
--
Nekral
From nicolas.francois at centraliens.net Wed Aug 8 21:22:26 2007
From: nicolas.francois at centraliens.net (Nicolas =?iso-8859-1?Q?Fran=E7ois?=)
Date: Wed, 8 Aug 2007 23:22:26 +0200
Subject: [Po4a-devel] Translatable attributes in HTML
In-Reply-To: <20070808153433.GB19800@nekral.homelinux.net>
References: <87ps22ev28.fsf@doganov.org>
<20070805170035.GB12184@nekral.homelinux.net>
<20070808105021.GB28202@naryves.com>
<20070808105246.GA19660@yavor.doganov.org>
<20070808121601.GA19800@nekral.homelinux.net>
<20070808122024.GA19933@yavor.doganov.org>
<20070808153433.GB19800@nekral.homelinux.net>
Message-ID: <20070808212226.GD19800@nekral.homelinux.net>
Hello,
On Wed, Aug 08, 2007 at 05:34:33PM +0200, nicolas.francois at centraliens.net wrote:
> Hello,
>
> On Wed, Aug 08, 2007 at 03:20:24PM +0300, yavor at gnu.org wrote:
> > On Wed, Aug 08, 2007 at 02:16:01PM +0200, Nicolas Fran?ois wrote:
> > > IMO, if the #include thing does not do nasty things, like opening a
> > > tag in one file and closing it in another, there should be no problem.
> >
> > It does nasty things; here's an example:
> > http://web.cvs.savannah.gnu.org/viewvc/www/philosophy/schools.html?revision=1.30&root=www&view=markup
>
> Thanks for the pointer.
>
> It seems it's a common feature (SSI), so I will consider implementing it
> in the Xhtml module.
I've added an includessi option to the xhtml module. Here is the result.
The attached tar ball contains the resulting PO file and a resulting
translated document (well, translated ... in English).
Yavor or Kaloian, could you check if that seems correct/usable to you?
Kind Regards,
--
Nekral
-------------- next part --------------
A non-text attachment was scrubbed...
Name: schools.tar.gz
Type: application/octet-stream
Size: 7547 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/po4a-devel/attachments/20070808/6f012497/attachment-0001.obj
From debian.anti-spam at rutschle.net Thu Aug 9 07:58:44 2007
From: debian.anti-spam at rutschle.net (Yves Rutschle)
Date: Thu, 9 Aug 2007 09:58:44 +0200
Subject: [Po4a-devel] Translatable attributes in HTML
In-Reply-To: <20070808153433.GB19800@nekral.homelinux.net>
References: <87ps22ev28.fsf@doganov.org>
<20070805170035.GB12184@nekral.homelinux.net>
<20070808105021.GB28202@naryves.com>
<20070808105246.GA19660@yavor.doganov.org>
<20070808121601.GA19800@nekral.homelinux.net>
<20070808122024.GA19933@yavor.doganov.org>
<20070808153433.GB19800@nekral.homelinux.net>
Message-ID: <20070809075844.GD28202@naryves.com>
On Wed, Aug 08, 2007 at 05:34:33PM +0200, Nicolas Fran?ois wrote:
> It seems it's a common feature (SSI), so I will consider implementing it
> in the Xhtml module.
I know talk is cheap, but I don't have time to code this
myself, however I'd suggest doing differently and allowing
Xhtml.pm to call an external pre-filter program instead of
doing the SSI work directly in Xhtml.pm. This way if someone
was using the C preprocessor, or m4, or whatever to include
files the whole process still works.
In fact, it might make sense to have such an option at a
more generic level (Xml.pm, or even for every file?)
> To use the current Xhtml module, you could move the
> opening
of school.html, and make a footer which closes what the
> header opened. (I understand that it may mean to change a
> lot files in this server)
This is what we went through when we moved to using
Xhtml.pm. The goal being that every file is individually
well-formed, and you only ever include entire sections. It
seems to work well in practice, and there are several
reasons it's a good idea: It's cleaner, it allows the Web
developers to work on proper XHTML, and it lets you use
automated tools (because this problem is not po4a-specific:
most every XML/Xhtml tool out there will choke on SSI or
non-well-formed code).
In the end, I'd say it was worth the pain, especially
considering that most of it can be automated with a good vi
macro.
Y.
From kaloian at doganov.org Thu Aug 9 10:36:19 2007
From: kaloian at doganov.org (Kaloian Doganov)
Date: Thu, 09 Aug 2007 13:36:19 +0300
Subject: [Po4a-devel] Translatable attributes in HTML
In-Reply-To: <20070809075844.GD28202@naryves.com> (Yves Rutschle's message of
"Thu\, 9 Aug 2007 09\:58\:44 +0200")
References: <87ps22ev28.fsf@doganov.org>
<20070805170035.GB12184@nekral.homelinux.net>
<20070808105021.GB28202@naryves.com>
<20070808105246.GA19660@yavor.doganov.org>
<20070808121601.GA19800@nekral.homelinux.net>
<20070808122024.GA19933@yavor.doganov.org>
<20070808153433.GB19800@nekral.homelinux.net>
<20070809075844.GD28202@naryves.com>
Message-ID: <877io56llo.fsf@doganov.org>
Nicolas Fran?ois writes:
When po4a parses the master file, it reads the other files when
they are included and includes the file in the generated
translation (i.e. the generated file will not have #include
stanza). Is it a problem?
Yes, it is a problem. The new option `includessi' may be useful in
some cases, but it's not what we need. We really don't want the
strings from other files to be included in the generated .pot-file.
The point of using those included files in the first place is:
1. to separate the repeatable parts, so that the pages can become
more manageable;
2. to make the actual text of the articles independend of the
navigational menus and other items around them; we don't want to
update all translations of all articles on the site just because
the webmaster adds a new item in the navigation menu.
So, we would like to keep included files like "www/server/banner.html"
separately and translate them separately from the articles that
includes them.
Yves Rutschle writes:
This is what we went through when we moved to using Xhtml.pm. The
goal being that every file is individually well-formed, and you
only ever include entire sections.
Sounds reasonable, but this way we cannot keep the simple paradigm:
main text
I'm not convinced it's worth breaking it.
I understand that it is reasonable for the xhtml module to expect a
well-formed input and I'm far from urging for changing this. We're
still at an early prototype stage and we'll continue to experiment
before making any conclusions about 1) what should be changed on our
system and 2) how we want our tools to behave.
--
Protect your digital freedom and privacy, eliminate DRM, learn more at
http://www.defectivebydesign.org/what_is_drm
From nicolas.francois at centraliens.net Thu Aug 9 11:45:42 2007
From: nicolas.francois at centraliens.net (Nicolas =?iso-8859-1?Q?Fran=E7ois?=)
Date: Thu, 9 Aug 2007 13:45:42 +0200
Subject: [Po4a-devel] Translatable attributes in HTML
In-Reply-To: <20070809075844.GD28202@naryves.com>
References: <87ps22ev28.fsf@doganov.org>
<20070805170035.GB12184@nekral.homelinux.net>
<20070808105021.GB28202@naryves.com>
<20070808105246.GA19660@yavor.doganov.org>
<20070808121601.GA19800@nekral.homelinux.net>
<20070808122024.GA19933@yavor.doganov.org>
<20070808153433.GB19800@nekral.homelinux.net>
<20070809075844.GD28202@naryves.com>
Message-ID: <20070809114542.GA11327@nekral.homelinux.net>
On Thu, Aug 09, 2007 at 09:58:44AM +0200, debian.anti-spam at rutschle.net wrote:
> On Wed, Aug 08, 2007 at 05:34:33PM +0200, Nicolas Fran?ois wrote:
> > It seems it's a common feature (SSI), so I will consider implementing it
> > in the Xhtml module.
>
> I know talk is cheap, but I don't have time to code this
> myself, however I'd suggest doing differently and allowing
> Xhtml.pm to call an external pre-filter program instead of
> doing the SSI work directly in Xhtml.pm. This way if someone
> was using the C preprocessor, or m4, or whatever to include
> files the whole process still works.
>
> In fact, it might make sense to have such an option at a
> more generic level (Xml.pm, or even for every file?)
The Xhtml module only contained a configuration with a set of tags.
To implement SSI, I just needed to add an option and divert the f_extract
method of tag !--# to a specific extraction function. So it was clean
enough for me.
Providing support for filters (for any module) is a good idea.
I will add it to my TODO list for 0.33.
It may just be a matter of changing the Transtractor's read() to support
reading from "filter < file |" or "filter file |"
Best Regards,
--
Nekral
From nicolas.francois at centraliens.net Thu Aug 9 12:16:53 2007
From: nicolas.francois at centraliens.net (Nicolas =?iso-8859-1?Q?Fran=E7ois?=)
Date: Thu, 9 Aug 2007 14:16:53 +0200
Subject: [Po4a-devel] Translatable attributes in HTML
In-Reply-To: <877io56llo.fsf@doganov.org>
References: <87ps22ev28.fsf@doganov.org>
<20070805170035.GB12184@nekral.homelinux.net>
<20070808105021.GB28202@naryves.com>
<20070808105246.GA19660@yavor.doganov.org>
<20070808121601.GA19800@nekral.homelinux.net>
<20070808122024.GA19933@yavor.doganov.org>
<20070808153433.GB19800@nekral.homelinux.net>
<20070809075844.GD28202@naryves.com> <877io56llo.fsf@doganov.org>
Message-ID: <20070809121653.GB11327@nekral.homelinux.net>
On Thu, Aug 09, 2007 at 01:36:19PM +0300, kaloian at doganov.org wrote:
> Nicolas Fran?ois writes:
>
> When po4a parses the master file, it reads the other files when
> they are included and includes the file in the generated
> translation (i.e. the generated file will not have #include
> stanza). Is it a problem?
>
> Yes, it is a problem. The new option `includessi' may be useful in
> some cases, but it's not what we need. We really don't want the
> strings from other files to be included in the generated .pot-file.
> The point of using those included files in the first place is:
>
> 1. to separate the repeatable parts, so that the pages can become
> more manageable;
I don't think it's a problem.
Even if, with includessi, the file is included multiple times, the POT
file will contain only one copy of the common strings. So the work of
translating the included files will be done only once.
> 2. to make the actual text of the articles independend of the
> navigational menus and other items around them; we don't want to
> update all translations of all articles on the site just because
> the webmaster adds a new item in the navigation menu.
This will just require to regenerate all the translated materials every
time one included file is changed.
But this will be automated by a script.
> So, we would like to keep included files like "www/server/banner.html"
> separately and translate them separately from the articles that
> includes them.
Could you test changing the "die" to a "warn" in tag_trans_close of the
Xml module (maybe also in treat_content).
This may be sufficient, and the resulting POT should be better than with
the Html module.
BTW, in that case should the SSI element be translatable?
Maybe
Should be translated to
I'm a bit reluctant currently to make the die => warn change (even with an
option), because I don't know how to react in the module.
I can think of 2 different strategies:
* keep the tag tree
* reset the tag tree
(* invoke voodoo magic to guess where we can branch in the tag tree)
> Yves Rutschle writes:
>
> This is what we went through when we moved to using Xhtml.pm. The
> goal being that every file is individually well-formed, and you
> only ever include entire sections.
>
> Sounds reasonable, but this way we cannot keep the simple paradigm:
>
>
> main text
>
I don't think in that case the header and footer documents can be well
formed, but it would be better if the footer was closing the tags opened
by the header (that way, the main document can be parsed).
In any case, the header will contain open tags which are not closed (it
should be OK for the Xhtml module). And the footer will contain closing
tags for tags not opened (which the Xhtml module does not support).
The latter could be solved by indicating to the module that it shall start
with a given tag tree. (Or by using a non translatable footer)
And by the way, we could also support some special comments in the middle
of a document, like:
(which would indicate to po4a that it shall close the current "head" tag and
open a "body" and "div" tag)
If anything makes sense here, just tell me.
Cheers,
--
Nekral
From kaloian at doganov.org Thu Aug 9 18:01:47 2007
From: kaloian at doganov.org (Kaloian Doganov)
Date: Thu, 09 Aug 2007 21:01:47 +0300
Subject: [Po4a-devel] Translatable attributes in HTML
In-Reply-To: <20070809121653.GB11327@nekral.homelinux.net> ("Nicolas
=?utf-8?Q?Fran=C3=A7ois=22's?= message of "Thu\, 9 Aug 2007 14\:16\:53
+0200")
References: <87ps22ev28.fsf@doganov.org>
<20070805170035.GB12184@nekral.homelinux.net>
<20070808105021.GB28202@naryves.com>
<20070808105246.GA19660@yavor.doganov.org>
<20070808121601.GA19800@nekral.homelinux.net>
<20070808122024.GA19933@yavor.doganov.org>
<20070808153433.GB19800@nekral.homelinux.net>
<20070809075844.GD28202@naryves.com> <877io56llo.fsf@doganov.org>
<20070809121653.GB11327@nekral.homelinux.net>
Message-ID: <873ays7fjo.fsf@doganov.org>
Nicolas Fran?ois writes:
I don't think it's a problem. Even if, with includessi, the file
is included multiple times, the POT file will contain only one
copy of the common strings. So the work of translating the
included files will be done only once.
I agree that there is no problem when including one external file
multiple times in an article. (We don't have such case, I think.).
The problem is when there are hundreth of articles that all include a
few common external files. (Which is more like our case.) We would
like to translate the few common external files separately from the
articles they are included in.
This will just require to regenerate all the translated materials
every time one included file is changed. But this will be
automated by a script.
Yes, it can be automated, but it is undesired anyway, because a small
change in an included file can easily lead to changes in a hundreth of
files. In the long run, tracing all those changes will be a very
heavy burden for the webmasters. We would like to avoid it, if we
can.
Could you test changing the "die" to a "warn" in tag_trans_close
of the Xml module (maybe also in treat_content). This may be
sufficient, and the resulting POT should be better than with the
Html module.
A quick test shows that changing just `tag_trans_close' does the job.
(It is hard to test this in the current CVS HEAD, because for some
reason po4a always resolves SSI #include directives. So, I did it in
a slightly older version of CVS HEAD, which still does not support
`includessi'.)
BTW, in that case should the SSI element be translatable?
Maybe
Should be translated to
We're doing this with a simple sed script, there is no need to bother
the translators (or po4a) with this.
I'm a bit reluctant currently to make the die => warn change (even
with an option), because I don't know how to react in the module.
I can think of 2 different strategies:
* keep the tag tree
* reset the tag tree
(* invoke voodoo magic to guess where we can branch in the tag
tree)
If I understand correctly, the question is what to do with the tag
tree when an unexpected closing tag is encountered by the parser. In
this case, we can assume that the corresponding matching tag is opened
in another file which we don't see for some reason (#include). With
this assumption, the right thing to do is to reset the tag tree.
In any case, the header will contain open tags which are not
closed (it should be OK for the Xhtml module). And the footer will
contain closing tags for tags not opened (which the Xhtml module
does not support).
The latter could be solved by indicating to the module that it
shall start with a given tag tree. (Or by using a non translatable
footer)
And by the way, we could also support some special comments in the
middle of a document, like:
(which would indicate to po4a that it shall close the current
"head" tag and open a "body" and "div" tag)
I don't think there is a good reason to bother with keeping track of
the tag tree between separate files and introducing special comments
like the example above. It looks like adding an option for changing
"die" to "warn" (just for block elements) is enough.
--
Protect your digital freedom and privacy, eliminate DRM, learn more at
http://www.defectivebydesign.org/what_is_drm
From debian.anti-spam at rutschle.net Thu Aug 9 20:22:53 2007
From: debian.anti-spam at rutschle.net (Yves Rutschle)
Date: Thu, 9 Aug 2007 22:22:53 +0200
Subject: [Po4a-devel] Translatable attributes in HTML
In-Reply-To: <877io56llo.fsf@doganov.org>
References: <87ps22ev28.fsf@doganov.org>
<20070805170035.GB12184@nekral.homelinux.net>
<20070808105021.GB28202@naryves.com>
<20070808105246.GA19660@yavor.doganov.org>
<20070808121601.GA19800@nekral.homelinux.net>
<20070808122024.GA19933@yavor.doganov.org>
<20070808153433.GB19800@nekral.homelinux.net>
<20070809075844.GD28202@naryves.com> <877io56llo.fsf@doganov.org>
Message-ID: <20070809202253.GE28202@naryves.com>
On Thu, Aug 09, 2007 at 01:36:19PM +0300, Kaloian Doganov wrote:
> This is what we went through when we moved to using Xhtml.pm. The
> goal being that every file is individually well-formed, and you
> only ever include entire sections.
>
> Sounds reasonable, but this way we cannot keep the simple paradigm:
>
>
> main text
>
>
> I'm not convinced it's worth breaking it.
What we have is a skeleton, so a file looks like:
main text
I guess that is more cruft than your solution.
> I understand that it is reasonable for the xhtml module to expect a
> well-formed input and I'm far from urging for changing this.
Well, if it can be made to work on other inputs, it'd be a
shame not to do that. At the end of the day, a good tool is
a tool that does something useful :)
Y.
From nicolas.francois at centraliens.net Thu Aug 9 21:36:39 2007
From: nicolas.francois at centraliens.net (Nicolas =?iso-8859-1?Q?Fran=E7ois?=)
Date: Thu, 9 Aug 2007 23:36:39 +0200
Subject: [Po4a-devel] Translatable attributes in HTML
In-Reply-To: <873ays7fjo.fsf@doganov.org>
References: <20070805170035.GB12184@nekral.homelinux.net>
<20070808105021.GB28202@naryves.com>
<20070808105246.GA19660@yavor.doganov.org>
<20070808121601.GA19800@nekral.homelinux.net>
<20070808122024.GA19933@yavor.doganov.org>
<20070808153433.GB19800@nekral.homelinux.net>
<20070809075844.GD28202@naryves.com> <877io56llo.fsf@doganov.org>
<20070809121653.GB11327@nekral.homelinux.net>
<873ays7fjo.fsf@doganov.org>
Message-ID: <20070809213639.GB10543@nekral.homelinux.net>
Hi,
On Thu, Aug 09, 2007 at 09:01:47PM +0300, kaloian at doganov.org wrote:
> Nicolas Fran?ois writes:
>
> I don't think it's a problem. Even if, with includessi, the file
> is included multiple times, the POT file will contain only one
> copy of the common strings. So the work of translating the
> included files will be done only once.
>
> I agree that there is no problem when including one external file
> multiple times in an article. (We don't have such case, I think.).
> The problem is when there are hundreth of articles that all include a
> few common external files. (Which is more like our case.) We would
> like to translate the few common external files separately from the
> articles they are included in.
I would use a single POT for all the files.
> A quick test shows that changing just `tag_trans_close' does the job.
Nice.
See attached a patch I plan to commit.
It adds a ontagerror option to the Xml module, and implement multiple
strategies.
In your case, I wonder if a "silent" strategy could not be useful.
> (It is hard to test this in the current CVS HEAD, because for some
> reason po4a always resolves SSI #include directives. So, I did it in
> a slightly older version of CVS HEAD, which still does not support
> `includessi'.)
Thanks for noticing. That's fixed.
> BTW, in that case should the SSI element be translatable?
> Maybe
>
> Should be translated to
>
>
> We're doing this with a simple sed script, there is no need to bother
> the translators (or po4a) with this.
Well, if it's useful for many peoples, it's worth it.
Kind Regards,
--
Nekral
-------------- next part --------------
A non-text attachment was scrubbed...
Name: po4a_Xml_ontagerror.patch
Type: text/x-diff
Size: 5034 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/po4a-devel/attachments/20070809/f124517a/attachment.patch
From kaloian at doganov.org Sat Aug 11 21:51:47 2007
From: kaloian at doganov.org (Kaloian Doganov)
Date: Sun, 12 Aug 2007 00:51:47 +0300
Subject: [Po4a-devel] Translatable attributes in HTML
In-Reply-To: <20070809213639.GB10543@nekral.homelinux.net> ("Nicolas
=?utf-8?Q?Fran=C3=A7ois=22's?= message of "Thu\, 9 Aug 2007 23\:36\:39
+0200")
References: <20070805170035.GB12184@nekral.homelinux.net>
<20070808105021.GB28202@naryves.com>
<20070808105246.GA19660@yavor.doganov.org>
<20070808121601.GA19800@nekral.homelinux.net>
<20070808122024.GA19933@yavor.doganov.org>
<20070808153433.GB19800@nekral.homelinux.net>
<20070809075844.GD28202@naryves.com> <877io56llo.fsf@doganov.org>
<20070809121653.GB11327@nekral.homelinux.net>
<873ays7fjo.fsf@doganov.org>
<20070809213639.GB10543@nekral.homelinux.net>
Message-ID: <87lkch3fkc.fsf@doganov.org>
Nicolas Fran?ois writes:
I would use a single POT for all the files.
This will lead to an unmaintainable mess. Usually, different articles
are translated and maintained by different persons. Working with all
the strings of all articles together in a single po-file will be a
nightmare for translators.
See attached a patch I plan to commit. It adds a ontagerror
option to the Xml module, and implement multiple strategies.
Great! Using this patch and "ontagerror=reset" option makes po4a
almost perfect for the job.
I've noticed a problem with the output of po4a-translate. An empty
elements with no tag names appear where the non-matching closing tags
should be found. Here is an example:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.alioth.debian.org/pipermail/po4a-devel/attachments/20070812/47c09801/attachment.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.alioth.debian.org/pipermail/po4a-devel/attachments/20070812/47c09801/attachment-0001.html
From kaloian at doganov.org Sun Aug 12 01:22:29 2007
From: kaloian at doganov.org (Kaloian Doganov)
Date: Sun, 12 Aug 2007 04:22:29 +0300
Subject: [Po4a-devel] Xhtml module: Integrated comments and strange
whitespace
Message-ID: <87hcn535t6.fsf@doganov.org>
An HTML attachment was scrubbed...
URL: http://lists.alioth.debian.org/pipermail/po4a-devel/attachments/20070812/ef23422e/attachment.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: po4a-normalize.output.xhtml
Type: application/xhtml+xml
Size: 880 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/po4a-devel/attachments/20070812/ef23422e/attachment.xhtml
-------------- next part --------------
A non-text attachment was scrubbed...
Name: po4a-normalize.output.2.xhtml
Type: application/xhtml+xml
Size: 875 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/po4a-devel/attachments/20070812/ef23422e/attachment-0001.xhtml
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.alioth.debian.org/pipermail/po4a-devel/attachments/20070812/ef23422e/attachment-0001.html
From kaloian at doganov.org Sun Aug 12 12:31:30 2007
From: kaloian at doganov.org (Kaloian Doganov)
Date: Sun, 12 Aug 2007 15:31:30 +0300
Subject: [Po4a-devel] Translatable attributes in HTML
In-Reply-To: <87lkch3fkc.fsf@doganov.org> (Kaloian Doganov's message of "Sun\,
12 Aug 2007 00\:51\:47 +0300")
References: <20070805170035.GB12184@nekral.homelinux.net>
<20070808105021.GB28202@naryves.com>
<20070808105246.GA19660@yavor.doganov.org>
<20070808121601.GA19800@nekral.homelinux.net>
<20070808122024.GA19933@yavor.doganov.org>
<20070808153433.GB19800@nekral.homelinux.net>
<20070809075844.GD28202@naryves.com> <877io56llo.fsf@doganov.org>
<20070809121653.GB11327@nekral.homelinux.net>
<873ays7fjo.fsf@doganov.org>
<20070809213639.GB10543@nekral.homelinux.net>
<87lkch3fkc.fsf@doganov.org>
Message-ID: <874pj52au5.fsf@doganov.org>
I've noticed a problem with the output of po4a-translate. An
empty elements with no tag names appear where the non-matching
closing tags should be found.
This bug cannot be reproduced using pristine po4a from the current CVS
HEAD and `-o ontagerror=silent'.
--
Protect your digital freedom and privacy, eliminate DRM, learn more at
http://www.defectivebydesign.org/what_is_drm
From nicolas.francois at centraliens.net Sun Aug 12 12:44:36 2007
From: nicolas.francois at centraliens.net (Nicolas =?iso-8859-1?Q?Fran=E7ois?=)
Date: Sun, 12 Aug 2007 14:44:36 +0200
Subject: [Po4a-devel] Translatable attributes in HTML
In-Reply-To: <87lkch3fkc.fsf@doganov.org>
References: <20070808105246.GA19660@yavor.doganov.org>
<20070808121601.GA19800@nekral.homelinux.net>
<20070808122024.GA19933@yavor.doganov.org>
<20070808153433.GB19800@nekral.homelinux.net>
<20070809075844.GD28202@naryves.com> <877io56llo.fsf@doganov.org>
<20070809121653.GB11327@nekral.homelinux.net>
<873ays7fjo.fsf@doganov.org>
<20070809213639.GB10543@nekral.homelinux.net>
<87lkch3fkc.fsf@doganov.org>
Message-ID: <20070812124436.GA7495@nekral.homelinux.net>
Hello,
On Sun, Aug 12, 2007 at 12:51:47AM +0300, kaloian at doganov.org wrote:
> Nicolas Fran?ois writes:
>
> See attached a patch I plan to commit. It adds a ontagerror
> option to the Xml module, and implement multiple strategies.
>
> Great! Using this patch and "ontagerror=reset" option makes po4a
> almost perfect for the job.
Thanks a lot for testing.
> I've noticed a problem with the output of po4a-translate. An empty
> elements with no tag names appear where the non-matching closing tags
> should be found. Here is an example:
I fixed it (@tag was reset instead of @path).
I committed the patch, but I changed the available parameters.
ontagerror now supports 3 parameters: fail, warn and silent.
"fail" is still the default.
Use "warn" if the input Xml file is invalid (and you can't fix the input).
Use "silent" if the input is valid but considered as invalid by po4a.
(So in your case, "silent" is probably the preferred parameter)
Cheers,
--
Nekral
From nicolas.francois at centraliens.net Sun Aug 12 13:43:43 2007
From: nicolas.francois at centraliens.net (Nicolas =?iso-8859-1?Q?Fran=E7ois?=)
Date: Sun, 12 Aug 2007 15:43:43 +0200
Subject: [Po4a-devel] Xhtml module: Integrated comments and
strange whitespace
In-Reply-To: <87hcn535t6.fsf@doganov.org>
References: <87hcn535t6.fsf@doganov.org>
Message-ID: <20070812134343.GB7495@nekral.homelinux.net>
Hi,
On Sun, Aug 12, 2007 at 04:22:29AM +0300, kaloian at doganov.org wrote:
> There is another problem with po4a-translate and Xhtml module that
> I've run into.
>
> If the input document contains a group of adjacent comments, those
> adjacent comments became integrated as one big comment, preceded by
> newlines. The number of preceding newlines is equal to the number of
> lines used by the group of comments.
Comments in a paragraph are grouped to be presented in the PO (it is
sometimes useful to see the comments in the PO).
Just an explanation why there are some empty lines and only one comment.
in
there are newline and spaces between the two comments.
The comments are extracted, and the newline and spaces are added to the
current paragraph (to be translated).
At the end of the paragraph, the cumulated text are presented in the PO
(with the cumulated comments).
Newlines and spaces at the beginning of the paragraph are extracted (i.e.
not translated), and printed in the output text.
In the example, as there are no translatable text, the comments are just
printed in the output text (without being present in the PO).
I understand that the empty lines and the concatenation of comments is not
very pretty (this can be even more strange when there are comments before,
in the middle and after a translatable paragraph), but is it really an
issue?
> Appart from the problem described, here we can see how the last
> comment of the group has survived the integration. It looks like it
> is saved by the fact that there is no whitespace between the starting
> sequence "
$Date: 2007/06/19 00:02:58 $
We don't want the line with $Date to be translatable at all, since it
is set automatically by CVS. This is a dynamically changing string
that we don't want to leak in POT and POs. So we comment it out and
after the preprocessing phase the fragment looks like this:
Updated:
After the po4a phase it looks like (for Bulgarian):
???????? ??????????:
And finally, after the postprocessing phase the fragment looks like
this (for Bulgarian):
???????? ??????????:
$Date: 2007/06/19 00:02:58 $
This was working fine with Html module, but Xhtml's comment
concatenation breaks it. I don't insist on keeping the Html's way of
doing things, I can imagine that comment concatenation may be good in
other cases, but it is really useful to have some construct that po4a
will just pass verbatim into the output document.
(The above example was picked because is the shortest one.)
--
Protect your digital freedom and privacy, eliminate DRM, learn more at
http://www.defectivebydesign.org/what_is_drm
From nicolas.francois at centraliens.net Sun Aug 12 16:43:10 2007
From: nicolas.francois at centraliens.net (Nicolas =?iso-8859-1?Q?Fran=E7ois?=)
Date: Sun, 12 Aug 2007 18:43:10 +0200
Subject: [Po4a-devel] Xhtml module: Integrated comments and
strange whitespace
In-Reply-To: <87eji8zqs2.fsf@doganov.org>
References: <87hcn535t6.fsf@doganov.org>
<20070812134343.GB7495@nekral.homelinux.net>
<87eji8zqs2.fsf@doganov.org>
Message-ID: <20070812164310.GC7495@nekral.homelinux.net>
On Sun, Aug 12, 2007 at 07:00:45PM +0300, kaloian at doganov.org wrote:
> Nicolas Fran?ois writes:
>
> But the concatenation of comments is a real issue. It is useful to
> have a construct that is guaranteed not to be modified by the
> processing tool (po4a). In Html module, comments were such
> constructs. We used them in a preprocessing phase to leave marks and
> placeholders in the original document that have special meaning to our
> postprocessing tools. The workflow is (very roughly):
>
> Process an article
> ------------------
> 1. Preprocess the original article
> 2. Run po4a on the preprocessed article to get localized one
> 3. Postprocess the localized article
>
> For instance, in the first phase we comment out some portions of the
> document that must not be made translatable. Here is one real
> example:
[...]
>
> Updated:
>
>
>
>
OK. I see how you use it.
One option could be to use another trick:
Updated:
This could be generated by the preprocessor, and the timestamp could be
restored afterward by the postprocessor.
I can try to add an option to handle comments differently:
* drop comments inside a line
(foo bar
baz qux
will have to be translated as two different paragraphs.)
I will work on it after the 0.32 release.
Best Regards,
--
Nekral
From nicolas.francois at centraliens.net Fri Aug 17 11:32:39 2007
From: nicolas.francois at centraliens.net (Nicolas =?iso-8859-1?Q?Fran=E7ois?=)
Date: Fri, 17 Aug 2007 13:32:39 +0200
Subject: [Po4a-devel] Preparation of the next po4a 0.32 release
In-Reply-To: <20070808153808.GC19800@nekral.homelinux.net>
References: <20070808153808.GC19800@nekral.homelinux.net>
Message-ID: <20070817113238.GB7446@nekral.homelinux.net>
Hello,
po4a 0.32 was released.
I will prepare the Debian package, but it will probably be uploaded only
next week.
BTW, I've updated the po4a web site, based on the proposal prepared by
Jordi a few years ago:
http://po4a.alioth.debian.org/
Best Regards,
--
Nekral
From kaloian at doganov.org Sun Aug 12 20:31:54 2007
From: kaloian at doganov.org (Kaloian Doganov)
Date: Sun, 12 Aug 2007 23:31:54 +0300
Subject: [Po4a-devel] Xhtml module: Integrated comments and
strange whitespace
In-Reply-To: <20070812164310.GC7495@nekral.homelinux.net> ("Nicolas
\=\?utf-8\?Q\?Fran\=C3\=A7ois\=22's\?\= message of "Sun\,
12 Aug 2007 18\:43\:10 +0200")
References: <87hcn535t6.fsf@doganov.org>
<20070812134343.GB7495@nekral.homelinux.net>
<87eji8zqs2.fsf@doganov.org>
<20070812164310.GC7495@nekral.homelinux.net>
Message-ID: <87643kze85.fsf@doganov.org>
Nicolas Fran?ois writes:
One option could be to use another trick:
Updated:
This could be generated by the preprocessor, and the timestamp could be
restored afterward by the postprocessor.
Oh, looks like a viable option. Thanks for the idea! I'll try it out
as soon as I can.
I can try to add an option to handle comments differently. I will
work on it after the 0.32 release.
Such an option would be very useful improvement. Of course, there is
no rush. Wish you good luck with the incoming release and thank you
for your invaluable help!
--
Protect your digital freedom and privacy, eliminate DRM, learn more at
http://www.defectivebydesign.org/what_is_drm
From kaloian at doganov.org Sun Aug 19 10:07:10 2007
From: kaloian at doganov.org (Kaloian Doganov)
Date: Sun, 19 Aug 2007 13:07:10 +0300
Subject: [Po4a-devel] Incorrect URL for sources download
Message-ID: <87lkc796sx.fsf@doganov.org>
A non-text attachment was scrubbed...
Name: sources-download.patch
Type: text/x-patch
Size: 472 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/po4a-devel/attachments/20070819/bad01414/attachment.bin