I'm working on modernizing Rosetta Code's infrastructure. Starting with communications. Please accept this time-limited open invite to RC's Slack.. --Michael Mol (talk) 20:59, 30 May 2020 (UTC)

Template:Trans

From Rosetta Code


This template marks a programming example as a translation of another one on the same task page.

Purpose[edit]

Sometimes examples are translated directly from other examples by multi-lingual users. This is a template to help people see where examples came from when they were translated directly from other languages. Of course the idea of RC is that all of the examples on a page do exactly the same thing in the same way, but this is not always possible. Examples that differ in this way may still be able to be translated back and forth. Some examples need to use fundamentally different methods to do things where certain things aren't available in a language (GUIs, data structures, etc.) or languages aren't similar in a way that relates to the task. These examples probably cannot be translated between each other.

Usage[edit]

First argument
The other programming language, spelled exactly as its heading is spelled on the same task page. This link will take them to that example.
Second argument (optional):
Summary of changes, or other remarks about the translation.
Named arguments (optional):
subpage —  Set to 1 if the examples for this task are on subpages (i.e. pages named Taskname/Langname), so that the link can be adjusted accordingly.
version —  Set to a version number if you want to link to an old version page
Example Renders as
{{trans|Python}}
Translation of: Python
{{trans|Python|without the error handling}}
Translation of: Python – without the error handling
{{trans|Python|subpage=1}}
Translation of: Python
{{trans|Haskell|version=256063}}
Translation of: Haskell (old version)



This is a template. There are many others. See Category:RCTemplates for a complete list of templates.