Objet : Liste de discussion pour le groupe de travail traductions (liste à inscription publique)
Archives de la liste
- From: Thérèse Godefroy <godef.th AT free.fr>
- To: traductions <traductions AT april.org>
- Subject: [Trad April] Re: Scripts html2pad et pad2html, v2
- Date: Fri, 27 Sep 2013 16:54:18 +0200
Le jeudi 26 septembre 2013 à 12:51 +0200, Thérèse Godefroy a écrit :
> Hello everyone,
>
> This new version replaces what was attached with
> https://listes.april.org/wws/arc/traductions/2013-09/msg00021.html
> It is quite different and doesn't depend on po4a/gettext anymore.
>
> The most recent pad (https://pad.april.org/p/FrEn-quebec-motion ) was
> created with the new version of html2pad, so the old pad2html won't
> touch it.
>
> I tried to make it as automatic as possible. You only have to enter the
> name of the pad when you rename the original HTML and create the pad.
[...]
There was a bug in one of the sed commands. A diff is attached.
Thérèse
PS. It would be nice to use a VCS for that sort of things. ;)
--- pad2html.2 2013-09-26 12:33:05.000000000 +0200 +++ pad2html.21 2013-09-27 16:41:54.440799655 +0200 @@ -153,8 +153,8 @@ # Restore the <br />'s and remove the <split>'s. sed -i 's,<br>,\n<br />,g' $TMP2 - sed -i '/$/ {N; s,\n<split>, ,}' $TMP2 + sed -i ':egin; $!{N; begin}; s,\n<split>,,g' $TMP2 # Attach the closing block tags to the end of the string. - sed -i '/$/ {N; s,\n\(<\/.*>\)$,\1,}' $TMP2 + sed -i ':egin; $!{N; begin}; s,\n</,</,g' $TMP2 # Split between closing block tags and opening block tags. <strong> and @@ -174,4 +174,12 @@ sed -i 's,$,\n,' $TMP2 + # Single out the blockquotes and lists. + + for tag in blockquote ul ol dl ; do + sed -i "s,<$tag>,<$tag>\\n," $TMP2 + sed -i "s,</$tag>,\\n</$tag>," $TMP2 + done + + # Save the translated web page. mv $TMP2 $name.en.html if [ -s "$name.en.html" ]; then
- [Trad April] Scripts html2pad et pad2html, v2, Thérèse Godefroy, 26/09/2013
- [Trad April] Re: Scripts html2pad et pad2html, v2, Thérèse Godefroy, 27/09/2013
Archives gérées par MHonArc 2.6.16.