I don't have a strong objection, but I think translating sample code
is much less important than translating regular docs.

For example, see https://docs.python.org/3/library/functools.html
There are many example code blocks.  Translating strings in them
doesn't help much.

So I think focusing to regular doc is better for effort-benefit ratio.

Regards,

On Sun, Jan 26, 2020 at 7:31 AM Maciek Olko <maciej.o...@gmail.com> wrote:
>
> Hello,
>
> I'd like to set up discussion about making code blocks in documentation 
> translatable. From my experience many of code blocks would benefit from being 
> translated. Especially comments and string literals. For example this code 
> block from tutorial:
>
> # this is the first comment
> spam = 1  # and this is the second comment
>           # ... and now a third!
> text = "# This is not a comment because it's inside quotes."
>
> To enable their translation, it requires slight modification of Sphinx call – 
> gettext_additional_targets = ['literal-block'] configuration option value 
> would do this. The option has been introduced in Sphinx 1.3.
>
> If there would be consensus about that I'd willingly add pull request in 
> docsbuild-scripts repository.
>
> Kind regards,
> Maciej
> _______________________________________________
> Doc-SIG maillist  -  Doc-SIG@python.org
> https://mail.python.org/mailman/listinfo/doc-sig



-- 
Inada Naoki  <songofaca...@gmail.com>
_______________________________________________
Doc-SIG maillist  -  Doc-SIG@python.org
https://mail.python.org/mailman/listinfo/doc-sig

Reply via email to