Op Wo, 2011-10-12 om 12:23 +0000 skryf Floris van den Hoeven:
> Hi All,

Hi Floris

> For one of your translation projects I would need a button added to
> Pootle.
> However, I do not have any knowledge about Django or Perl.. so I'm not
> sure which files to edit to get this work.
> 
> Here some more info:
> We are working with large RC files and for this reason I had to write
> some converter scripts in PHP to get it working in Pootle.
> The standard RC to PO convertor of the translation Toolkit was/is not
> useful because PO files does not work with unique ID's.
> We need the unique ID's because we can have multiple translations of
> certain words depending on the placement within our software.
> (Portrait or Landscape screens.)
> Also it will depend if the string is used in buttons, labels or
> control boxes.
> Anyway,.. to make a long story short,.. I had to write routines to
> convert monolingual RC files to bi-lingual XLIFF files.
> 
> As a second step, I would like to generate the dialogs in html format
> because all the information is available in RC files.
> Especially with translations for mobile based applications, it is very
> important to see the dialogs and to know how long a certain string can
> be.
> 
> So the only thing I would need help on is to be able to add a
> button/image to the Pootle interface that sends the current string-ID
> to a remote script.
> The remote script would then filter out the ID and show the original
> and translated dialog.
> 
> I hope someone could inform me how to:
> 
> - Add a button to the <DIV class="comments"> in the Translate template
> 
> - Get the current string ID and put it in the hyperlink of the button.
> 
> Thank you very much in advance for taking the time to read this email.


I'll make a few assumptions, but if you know some HTML, I don't think
this will be too hard. Have a look at this template:
Pootle/local_apps/pootle_store/templates/unit/edit.html

This is the template for editing one translation unit. If you have your
ID as the id attribute in XLIFF, it will be available in the python list
unit.locations. You can add use this to build the URL you want to put
behind the button.

I hope that helps to get you started.

Friedel

-- 
Recently on my blog:
http://translate.org.za/blogs/friedel/en/content/firefox-maybe-now-most-popular-africa


------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct
_______________________________________________
Translate-pootle mailing list
Translate-pootle@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/translate-pootle

Reply via email to