(responding to the shorter one first...)
On Do, 2006-11-16 at 22:16 -0200, Leonardo Fontenelle wrote:
> Oh, and another question / feature request. In Brazil we usually edit
> the header comments of the PO file, to preserve the name of previous
> translators (see example [1]). I don't remember Pootle allowing us to
> do that, so I'd like to:
> - know how to do that; or
> - ask the devs to implement it (à la gtranslator, KBabel).
>
> Thanks again!
>
> Leonardo Fontenelle
>
> 1.
> http://live.gnome.org/GnomeBR/Traducao#head-f6019de343f8e0549e0d89cc0e18b61666f10a2d
>
Yes, this is something we would like to add. We already update the
header as well as we can with the fields such as PO-Revision-Date,
Last-Translator with the email-address, X-Generator, the plural
information (nplurals and plurals), but editing the comments according
to the convention as you mention, is still lacking.
This will have to be done in the file Pootle/pootlefile.py in them
method updateunit()
The basic idea is something like:
# get the header
header = self.header()
# get the current header comments
headercomments = header.getnotes()
# If necessary add the translator
translator = "%s <%s>" % (userprefs.name, userprefs.email)
if not translator in headercomments:
headercomments += translator
header.removenotes()
header.addnote(headercomments)
This is entirely untested, but hopefully gives an idea of how this can
be done. This does not give the exact format as the page you mention,
but I'm trying not to get into detail :-) For more inspiration, see
po.py and base.py in the translate toolkit.
Do we have another programmer in the making? We definitely hope so :-)
Feel free to ask questions. For interactive session, there are often
people on #pootle on freenode (irc://irc.freenode.net/#pootle)
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Translate-pootle mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/translate-pootle