Preparation of the next po4a 0.32 release
by Nicolas François
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
17 years, 4 months
Xhtml module: Integrated comments and strange whitespace
by Kaloian Doganov
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.
Here is an example input:
The output of `po4a-normalize --format xhtml' is:
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 "<!--" and the actual text of the comment ("#include...").
If I put a single space between them, po4a-normalize integrates this
comment alongside with the others:
As a comparament, Html module does much better job to preserve the
structure of the original document:
--
Protect your digital freedom and privacy, eliminate DRM, learn more at
http://www.defectivebydesign.org/what_is_drm
17 years, 4 months
Translatable attributes in HTML
by Kaloian Doganov
Recently I've started to play with po4a while trying to
internationalize a bunch of articles in HTML format. One of the major
obstacles for making the job done is this: po4a considers as
translatable (almost) only the text contained between the tags of an
element. This is OK, but sometimes is not enough, since in HTML some
attributes are intended to contain a human-readable text. For
example:
<link rel="stylesheet" type="text/css" href="/new.css" title= "All-new style of mine">
<a href="/" accesskey="1" title="Go to the project homepage">
The value of the `title' attribute here should be translatable too.
In fact, HTML.pm already does this by treating the IMG's `alt'
attribute specially and thus making it's value translatable. Maybe
IMG's `alt' is the most common case for an attribute that needs
translation, but there are three other elements that also can contain
`alt': INPUT, AREA and APPLET. They deserve the same treatment as
IMG.
Also, it would be nice if `title' attribute is considered translatable
too (keeping in mind that any element can contain a `title'
attribute).
A patch that solves those two problems is attached.
--- Locale/Po4a/Html.pm.orig 2007-08-04 10:08:46.000000000 +0300
+++ Locale/Po4a/Html.pm 2007-08-05 00:40:18.000000000 +0300
@@ -111,27 +111,29 @@
} elsif ($token->[0] eq 'S') {
push @type,$token->[1];
my $text = get_tag( $token );
- if ( $token->[1] eq 'img' ) {
- my %attr = %{$token->[2]};
- for my $a (qw/title alt/) {
- my $content = $attr{$a};
- if (defined $content) {
- $content = trim($content);
- my $translated = $self->translate(
- $content,
- "FIXME:0",
- "img_$a"
- );
- $attr{$a} = $translated;
- }
- }
- my ($closing) = ( $text =~ /(\s*\/?>)/ );
- # reconstruct the tag from scratch
- delete $attr{'/'}; # Parser thinks closing / in XHTML is an attribute
- $text = "<img";
- $text .= " $_=\"$attr{$_}\"" foreach keys %attr;
- $text .= $closing;
- }
+ my $tag = $token->[1];
+ my @trans_attr = (( $tag eq 'img' ) || ( $tag eq 'input' ) ||
+ ( $tag eq 'area' ) || ( $tag eq 'applet'))
+ ? qw/title alt/ : qw/title/;
+ my %attr = %{$token->[2]};
+ for my $a (@trans_attr) {
+ my $content = $attr{$a};
+ if (defined $content) {
+ $content = trim($content);
+ my $translated = $self->translate(
+ $content,
+ "FIXME:0",
+ "${tag}_$a"
+ );
+ $attr{$a} = $translated;
+ }
+ }
+ my ($closing) = ( $text =~ /(\s*\/?>)/ );
+ # reconstruct the tag from scratch
+ delete $attr{'/'}; # Parser thinks closing / in XHTML is an attribute
+ $text = "<$tag";
+ $text .= " $_=\"$attr{$_}\"" foreach keys %attr;
+ $text .= $closing;
$self->pushline( $text );
} elsif ($token->[0] eq 'E') {
pop @type;
17 years, 4 months
[po4a-Bugs][304394] Unexpected escaped chars in the po
by po4a-bugs@alioth.debian.org
Bugs item #304394, was opened at 30/04/2007 14:24
Status: Open
Priority: 3
Submitted By: Nobody (None)
>Assigned to: Nicolas FRANCOIS (nekral-guest)
Summary: Unexpected escaped chars in the po
Category: None
Group: None
Resolution: None
Initial Comment:
Hi,
It seems that the "\n*" are replaced by " *" (where * is not a wildcard).
The bug is visible in the removed 0.30 series, don't know for other release.
----------------------------------------------------------------------
>Comment By: Nicolas FRANCOIS (nekral-guest)
Date: 08/08/2007 14:08
Message:
Hello,
Could you provide a test file, and indicate which module you used?
Thanks in advance
----------------------------------------------------------------------
You can respond by visiting:
http://alioth.debian.org/tracker/?func=detail&atid=410622&aid=304394&grou...
17 years, 4 months