xhtml11 configuration file and footer

170 views
Skip to first unread message

Laurent Laville

unread,
Jan 18, 2010, 5:57:56 PM1/18/10
to asciidoc
Hello,

I've recently found this cool application (in version 8.5.2) and I've
definitivly became a fan :)
I've shown a demo at my work, and today a colleague shown me a minor
problem with footer and xhtml11.conf file.

By default with english version, we got a footer like this

Version 2.0.0
Last updated 2010-01-18 21:41:45

And no translation for other languages.

As french users we prefered to see something like

Version 2.0.0
Dernière mise à jour 2010-01-18 21:41:45

So I suggest to modify the xhtml11.conf file (and all others related
too) and change the "footer" section
From =>

<div id="footer-text">
Version {revnumber}<br />
Last updated {docdate} {doctime}
</div>

To =>

<div id="footer-text">
{version} {revnumber}<br />
{lastupdate} {docdate} {doctime}
</div>

And put translations in each files. In french it will be into lang-
fr.conf arround line 20

version=Version
lastupdate=Dernière mise à jour

And so on ...

I've got the latest 8.5.3 (and sorry, but problem is there too). So
this is why my first post

Keep on the good works !!!

Regards
Laurent

Stuart Rackham

unread,
Jan 24, 2010, 9:35:36 PM1/24/10
to asci...@googlegroups.com
Laurent Laville wrote:
> Hello,
>
> I've recently found this cool application (in version 8.5.2) and I've
> definitivly became a fan :)
> I've shown a demo at my work, and today a colleague shown me a minor
> problem with footer and xhtml11.conf file.
>
> By default with english version, we got a footer like this
>
> Version 2.0.0
> Last updated 2010-01-18 21:41:45
>
> And no translation for other languages.
>
> As french users we prefered to see something like
>
> Version 2.0.0
> Derni�re mise � jour 2010-01-18 21:41:45

>
> So I suggest to modify the xhtml11.conf file (and all others related
> too) and change the "footer" section
>>From =>
>
> <div id="footer-text">
> Version {revnumber}<br />
> Last updated {docdate} {doctime}
> </div>
>
> To =>
>
> <div id="footer-text">
> {version} {revnumber}<br />
> {lastupdate} {docdate} {doctime}
> </div>
>
> And put translations in each files. In french it will be into lang-
> fr.conf arround line 20
>
> version=Version
> lastupdate=Derni�re mise � jour
>
> And so on ...

Thanks for your input on this problem, I decided to generalise your solution by
pushing all the HTML footer text into the language conf files using a new
[footer-text] configuration file template section.

It was a bit trickier than I thought (there was a latent limitation resolving
templates in language configuration files). Hopefully the patch solves the problem:

http://hg.sharesource.org/asciidoc/rev/1715afbf2338

I left the non-French language files as English, translations of the footer text
in these files would be most welcome.


Cheers, Stuart

Simon Ruderich

unread,
Jan 25, 2010, 12:49:58 PM1/25/10
to asci...@googlegroups.com
On Mon, Jan 25, 2010 at 03:35:36PM +1300, Stuart Rackham wrote:
> [snip]
>
> http://hg.sharesource.org/asciidoc/rev/1715afbf2338

> --- a/lang-en.conf Mon Jan 18 08:59:49 2010 +1300
> +++ b/lang-en.conf Mon Jan 25 15:33:53 2010 +1300
> @@ -17,13 +17,14 @@
> appendix-caption=Appendix
> +# Man page NAME section title.
> +manname-title=NAME
> +
> +[footer-text]
> +Version {revnumber}{backend@xhtml11:<br />:<br>}
> +Last updated {docdate} {doctime}
>
> endif::basebackend-html[]
> -
> -ifdef::doctype-manpage[]
> -# Man page NAME section title.
> -manname-title=NAME
> -endif::doctype-manpage[]

With this change the manname-title is only used when generating
HTML pages, not when man pages are created. Was this intentional
(I don't have access to any non English man pages at the moment
thus I'm not sure if they use NAME or a localized version)?

> I left the non-French language files as English, translations of the
> footer text in these files would be most welcome.

Here is an update for lang-de.txt:

diff -r 8cc5b620e122 lang-de.conf
--- a/lang-de.conf Mon Jan 25 15:49:22 2010 +1300
+++ b/lang-de.conf Mon Jan 25 18:44:44 2010 +0100
@@ -22,9 +22,8 @@
manname-title=NAME

[footer-text]
-#TODO: Translation of 'Version' and 'Last updated'.
Version {revnumber}{backend@xhtml11:<br />:<br>}
-Last updated {docdate} {doctime}
+Letzte Änderung {docdate} {doctime}

endif::basebackend-html[]

> Cheers, Stuart

Thanks,
Simon
--
+ privacy is necessary
+ using gnupg http://gnupg.org
+ public key id: 0x92FEFDB7E44C32F9

Stuart Rackham

unread,
Jan 25, 2010, 4:14:13 PM1/25/10
to asci...@googlegroups.com
Simon Ruderich wrote:
> On Mon, Jan 25, 2010 at 03:35:36PM +1300, Stuart Rackham wrote:
>> [snip]
>>
>> http://hg.sharesource.org/asciidoc/rev/1715afbf2338
>
>> --- a/lang-en.conf Mon Jan 18 08:59:49 2010 +1300
>> +++ b/lang-en.conf Mon Jan 25 15:33:53 2010 +1300
>> @@ -17,13 +17,14 @@
>> appendix-caption=Appendix
>> +# Man page NAME section title.
>> +manname-title=NAME
>> +
>> +[footer-text]
>> +Version {revnumber}{backend@xhtml11:<br />:<br>}
>> +Last updated {docdate} {doctime}
>>
>> endif::basebackend-html[]
>> -
>> -ifdef::doctype-manpage[]
>> -# Man page NAME section title.
>> -manname-title=NAME
>> -endif::doctype-manpage[]
>
> With this change the manname-title is only used when generating
> HTML pages, not when man pages are created. Was this intentional
> (I don't have access to any non English man pages at the moment
> thus I'm not sure if they use NAME or a localized version)?

Yes it was, just to simplify the conf file.

>
>> I left the non-French language files as English, translations of the
>> footer text in these files would be most welcome.
>
> Here is an update for lang-de.txt:
>
> diff -r 8cc5b620e122 lang-de.conf
> --- a/lang-de.conf Mon Jan 25 15:49:22 2010 +1300
> +++ b/lang-de.conf Mon Jan 25 18:44:44 2010 +0100
> @@ -22,9 +22,8 @@
> manname-title=NAME
>
> [footer-text]
> -#TODO: Translation of 'Version' and 'Last updated'.
> Version {revnumber}{backend@xhtml11:<br />:<br>}
> -Last updated {docdate} {doctime}

> +Letzte �nderung {docdate} {doctime}
>
> endif::basebackend-html[]
>

Thanks for the translation, it's in the trunk:
http://hg.sharesource.org/asciidoc/rev/ac5ee7d908d1

>> Cheers, Stuart
>
> Thanks,
> Simon

Cheers, Stuart

Simon Ruderich

unread,
Jan 28, 2010, 12:20:55 PM1/28/10
to asci...@googlegroups.com

Hi,

Just to make sure I understood correctly. In localized (non
English) man pages the English names for sections (like NAME) are
used? Or does docbook handle the translation?

Stuart Rackham

unread,
Jan 28, 2010, 3:22:59 PM1/28/10
to asci...@googlegroups.com

DocBook processors handle the NAME section title localization (the DocBook
refnamediv element doesn't have a section title element, that's left up the the
downstream processors).

Cheers, Stuart

>
> Thanks,
> Simon

Simon Ruderich

unread,
Jan 28, 2010, 5:22:42 PM1/28/10
to asci...@googlegroups.com
On Fri, Jan 29, 2010 at 09:22:59AM +1300, Stuart Rackham wrote:
>> Just to make sure I understood correctly. In localized (non
>> English) man pages the English names for sections (like NAME) are
>> used? Or does docbook handle the translation?
>
> DocBook processors handle the NAME section title localization (the
> DocBook refnamediv element doesn't have a section title element,
> that's left up the the downstream processors).

Thank you for the information, I didn't know that.

Miklos Vajna

unread,
Jan 28, 2010, 8:57:11 PM1/28/10
to asci...@googlegroups.com
On Mon, Jan 25, 2010 at 03:35:36PM +1300, Stuart Rackham <srac...@gmail.com> wrote:
> I left the non-French language files as English, translations of the footer text
> in these files would be most welcome.

Here comes the Hungarian part:

diff -r ac5ee7d908d1 lang-hu.conf
--- a/lang-hu.conf Tue Jan 26 10:11:06 2010 +1300
+++ b/lang-hu.conf Fri Jan 29 02:56:25 2010 +0100
@@ -22,9 +22,8 @@
manname-title=NĂ V



[footer-text]
-#TODO: Translation of 'Version' and 'Last updated'.

-Version {revnumber}{backend@xhtml11:<br />:<br>}
-Last updated {docdate} {doctime}
+VerziĂł {revnumber}{backend@xhtml11:<br />:<br>}
+UtolsĂł frissĂ­tĂŠs: {docdate} {doctime}

endif::basebackend-html[]

Stuart Rackham

unread,
Feb 5, 2010, 10:52:33 PM2/5/10
to asci...@googlegroups.com
Thanks Miklos, it's in the trunk:

http://hg.sharesource.org/asciidoc/rev/2c6d1c8363c7

Cheers, Stuart

Miklos Vajna

unread,
Feb 7, 2010, 7:11:36 PM2/7/10
to asci...@googlegroups.com
On Sat, Feb 06, 2010 at 04:52:33PM +1300, Stuart Rackham <srac...@gmail.com> wrote:
> Thanks Miklos, it's in the trunk:
>
> http://hg.sharesource.org/asciidoc/rev/2c6d1c8363c7

Ugh, accents are broken now. Maybe it's because I sent it inline, I'm
attaching the diff now.

Thanks.

lang-hu-utf8-fix.patch

Stuart Rackham

unread,
Feb 7, 2010, 11:57:15 PM2/7/10
to asci...@googlegroups.com

Committed: http://hg.sharesource.org/asciidoc/rev/936189059562

Cheers, Stuart


>
> Thanks.
>

Reply all
Reply to author
Forward
0 new messages