Op Dinsdag 2007-10-23 skryf Samuel Murray: > 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
Well, for Latin based languages I guess this might work, but will be a humongous amount of work. Think about the effect of ligatures, for example. This all depends on the font and the rendering engine that will be used eventually. For Arabic and Indic languages - well, let's just say it gets "interesting" with joining, stacked vowels and reordering. Pango does this of course. But it is definitely not trivial. One would need to understand the requirements and the operating environment very well. To emulate this is mostly pointless, I'd say - it is necessary to use the actual environment to be sure. My understanding of the situation. Friedel ------------------------------------------------------------------------- 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
