Make Source Code link translateable

There are quite a lot of

**Source Code:** :source:`FILE`

Which have to each be translated separately as the “Source Code” text is not translated as it is not a directive and each paragraph is different.

This is perhaps an instance of the “XY problem”. As I mentioned on the issue, this is something that should be solved via translation tools.

This will certainly not be the only example of a repeated source string, and replacing each such repeated source string with a custom-to-CPython directive is of little benefit. It would be better to find (or create!) a tool that can recognise and copy-paste translations for substrings, even if those substrings need to be manually defined to start.

It is worth noting that one of the design principles of reStructuredText (and plain-text source documentation in general) is that it should be readable in source form. Taking your example, **Source Code:** blah is obviously just a bold text, but a directive can do any manner of things, and requires an engaged editor to check that this is just inserting a common source string. [1]

A


  1. this case is actually a good use for reST substitutions, but it would also not solve the issue at hand ↩︎

1 Like