Le 20/12/2016 à 03:47, Bryce Harrington a écrit :
> On Mon, Dec 19, 2016 at 10:05:12PM +0200, Yuri Chornoivan wrote:
>> Some relatively new strings in 0.92.x branch are actually untranslatable due 
>> to such called "string puzzles":
>>
>> http://bazaar.launchpad.net/~inkscape.dev/inkscape/0.92.x/view/head:/share/extensions/draw_from_triangle.py#L179
>>
>> inkex.errormsg(_("Side Length 'a' (" + unit + "): " + str( params[0][0] ) ))
>> inkex.errormsg(_("Side Length 'b' (" + unit + "): " + str( params[0][1] ) ))
>> inkex.errormsg(_("Side Length 'c' (" + unit + "): " + str( params[0][2] ) ))
>>
>> extracts as
>>
>> Side Length 'a' (
>> Side Length 'b' (
>> Side Length 'c' (
> 
> Good point.  There are probably other instances like this where
> variables are being included in the translatable.  I would guess the
> proper way to do it would be something like:
> 
>    inkex.errormsg(_("Side Length 'a'") + " (" + unit + "): " + str( 
> params[0][0] ) )

Punctuation must be translatable too, e.g. in French you need a no-break
space before the colon, so it would be closer to something like this:

   inkex.errormsg(_("Side Length 'a' ({0}):").format(unit) + " " + str(
params[0][0] ) )

But one should refer to the Gettext doc for Python.

Regards,
--
Sylvain

------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/intel
_______________________________________________
Inkscape-translator mailing list
Inkscape-translator@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/inkscape-translator

Reply via email to