[Po4a-devel] [RFC] [Docbook] Add 'translator-credits' support

Nicolas François nicolas.francois at centraliens.net
Tue Mar 3 14:40:13 UTC 2009


On Tue, Mar 03, 2009 at 11:29:07AM +0800, dongsheng.song at gmail.com wrote:
> Hello,
> 
> As a competition, I suggest po4a add 'translator-credits' support.
> 
> po4a-updatepo will generate 'translator-credits':
> 
>     #: ../source/book.xml:0
>     msgid "translator-credits"
>     msgstr ""
>     "alice <alice at example.com>, 2005-2008\n"
>     "bob <bob at example.com>, 2005,2008"
> 
> if the source xml have info (bookinfo|articleinfo|info) element,
> po4a-translate will
> add 'othercredit' and 'copyright' like this:
> 
>     <othercredit class="translator">
>       <firstname>alice</firstname>
>       <email>alice at example.com</email>
>     </othercredit>
>     <othercredit class="translator">
>       <firstname>bob</firstname>
>       <email>bob at example.com</email>
>     </othercredit>
> 
>     <copyright>
>       <year>2005</year>
>       <year>2006</year>
>       <year>2007</year>
>       <year>2008</year>
>       <holder>alice <alice at example.com></holder>
>     </copyright>

I would prefer that the translator string contains the information and the
formating tags.

Otherwise, I will have to parse and support too many things.
(what is a year, a firstname, a surname, a company, etc.)

Then I would prefer to have it as an option since it is not always wanted
and might be fragile (there might be an <info> tag that does not refer to
the document.

Also, only the first <info> should receive this extra information.

Otherwise, it looks feasible. But requires changes in the Xml module and
in the Docbook module.
This will have to be configurable from the Xml module point of view
because different format may want to use this for different tags.

Also for Docbook, multiple tags will require this to support different
versions of Docbook (looking at the history, the <*info> tags have never
been really stable)

-- 
Nekral



More information about the Po4a-devel mailing list