On Wed, May 12, 2010 at 4:35 PM, F Wolff <[email protected]> wrote:
> Op Do, 2010-03-18 om 10:47 -0400 skryf Jacques Beaurain:
>> Hi Again,
>>
>> Ok I cleaned up the Javascript a bit and here is my patch. I've found
>> that Google API messes with string format specifiers so there is a
>> couple of regular expressions used to replace the entries with __1__,
>> __2__ etc. before sending the string to Google and after translation
>> the original specifiers will be placed back. We use 3 kinds of
>> specifiers with position:
>>
>>   1. C/C++ printf: e.g. "Only %2$d bytes free on '%1$s'."
>>   2. .Net String.Format: e.g. "Only {1} bytes free on '{0}'."
>>   3. Single %n positional specifiers: e.g. "Only %2 bytes free on '%
>> 1'."
>>
>> By doing the replacements in the same order as specified above we've
>> found that we get pretty good results with the languages we are
>> currently experimenting with (ru & zh_CN).
>>
>> This is my first venture into Pootle's codebase so I appreciated any
>> feedback and will refine the implementation further if needed.
>
>
> Hallo Jacques
>
> I was wondering if it might be a good idea to give an option in
> localsettings.py to make it possible for Pootle administrators to switch
> off the functionality entirely.  Let's think of someone translating
> something confidential and they don't want it to go over the wire to
> Google (or don't want to make it too easy anyway).
>
> What do people think about this?

Agreed.

------------------------------------------------------------------------------

_______________________________________________
Translate-pootle mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/translate-pootle

Reply via email to