Please try to get an email client which is able to reply in a thread,
rather than creating a new thread each time you send an email.

You might want to try HyperKitty:
https://mail.python.org/archives/list/python-dev@python.org/

Victor

Le jeu. 5 déc. 2019 à 10:50, Anders Munch <a...@flonidan.dk> a écrit :
>
> >> I'm struggling to see what i-strings would do for i18n that str.format 
> >> doesn't do better.
> Serhiy Storchaka [mailto:storch...@gmail.com]
> > You would not need to repeat yourself.
> >     _('{name} costs ${price:.2f}').format(name=name, price=price)
>
> A small price to pay for having a well-defined interface with the translator.
>
> Security is one reason: A translator could sneak {password} or {signing_key} 
> into an unrelated string, if those names happen to be present in the 
> namespace.  That may not seem like a big issue if you've only ever used 
> gettext/.po-file translation, where the translation is pre-built with the 
> program, but in a more dynamic setting where end-users can supply 
> translations, it's a different story.
>
> You could parse the strings and require translations to have the same 
> variables, but that is limiting. E.g. that would mean you couldn't translate
>     'Welcome, {first_name}'
> into
>     'Willkommen, {title} {last_name}'
>
> Another reason is that you don't want variable names in your program and 
> translations to have to change in lock-step.
> E.g. you might change your code to:
>      _('{name} costs ${price:.2f}').format(name=prod.short_name,
>                                                                         
> price=context.convert_to_chosen_currency(price))
> without needing to change any translations.
>
> regards, Anders
>
> _______________________________________________
> Python-Dev mailing list -- python-dev@python.org
> To unsubscribe send an email to python-dev-le...@python.org
> https://mail.python.org/mailman3/lists/python-dev.python.org/
> Message archived at 
> https://mail.python.org/archives/list/python-dev@python.org/message/A2PDRFFJWK2XYPHLVGKC26QR2DJ6H4QM/
> Code of Conduct: http://python.org/psf/codeofconduct/



-- 
Night gathers, and now my watch begins. It shall not end until my death.
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/2F3O3CMR2A5NZJ6UQMYW4QJB2MKSEFBH/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to