Commit c389746a by Andy Armstrong

Describe Python support for multi-line comments

Added more details around Python's support for multi-line translator comments.
parent ed9ab3ad
......@@ -62,7 +62,8 @@ do:
3. How are translator comments indicated? These are comments in the file that
will travel with the strings to the translators, giving them context to
produce the best translation. They have a "Translators:" marker. They must
appear on the line preceding the text they describe.
appear on the line preceding the text they describe. Multi-line comments
are supported for Python in case the translator comment needs to be wrapped.
The code samples below show how to do each of these things for:
......@@ -89,6 +90,10 @@ In most Python source code (read the Django docs for more details)::
# Translators: This will help the translator
message = _("Welcome!")
# Translators: This is a very long comment that needs to wrap
# over multiple lines because it would be too long otherwise.
message = _("Hello world")
Some edX code cannot use Django imports. To maintain portability, XBlocks,
XModules, Inputtypes and Responsetypes forbid importing Django. Each of these
has its own way of accessing translations. You'll use lines like these
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment