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

Dongsheng Song dongsheng.song at gmail.com
Wed Mar 4 01:56:54 UTC 2009


2009/3/3 Nicolas François <nicolas.francois at centraliens.net>:
> 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.)
>

I don't think so, as xml2po has implement this, and translator like it.

> 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)
>

No, a valid Docbook document has only one qualified <*info>, we can only do
the  process at the following xpath:
    /article/articleinfo (DocBook 4.x)
    /book/bookinfo (DocBook 4.x)
    /article/info (DocBook 5.x)
    /book/info (DocBook 5.x)

---
Dongsheng Song



More information about the Po4a-devel mailing list