Dwayne Bailey het geskryf:

> On Tue, 2007-10-23 at 14:13 +0200, Samuel Murray wrote:

>> The Pootle UI is HTML/JavaScript, and there are free JavaScript scripts 
>> that count the characters in a text box in real time.  The character 
>> count of the source text can be handled by pocount, not?  So all you 
>> need is some kind of comparison, and perhaps a counter box that turns 
>> red if the one exceeds the other.

> The simple problem, not that difficult to overcome, is where to specify
> that information.  Since Pootle works directly on PO or XLIFF files it
> would need to be something in those and preferably something that is
> already used.

I think we can assume that the length of the source text can be taken as 
the guideline for the length of the target text.  In other words, it is 
not necessary to specify the information anywhere.  Pootle simply counts 
the characters in the current source segment, and makes that the limit 
for the current target text (or, do a calculation, specified by the 
admin user, eg target = source * 120%).

Calculating pixels would be more difficult, but not impossible.  You 
can't just count characters, though -- you'd have to read the characters 
and calculate their total length (using a file that the admin user 
supplies, containing characters and their pixel lengths).  So doing it 
based on pixels is possible but rather more involved.

Samuel

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Translate-pootle mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/translate-pootle

Reply via email to