From c389746a2a49a4e02675dad295e4fe8bc4a8c4d3 Mon Sep 17 00:00:00 2001 From: Andy Armstrong Date: Fri, 30 May 2014 11:45:23 -0400 Subject: [PATCH] Describe Python support for multi-line comments Added more details around Python's support for multi-line translator comments. --- docs/en_us/developers/source/i18n.rst | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/en_us/developers/source/i18n.rst b/docs/en_us/developers/source/i18n.rst index 892131fd6f..a69c5cd776 100644 --- a/docs/en_us/developers/source/i18n.rst +++ b/docs/en_us/developers/source/i18n.rst @@ -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: @@ -88,6 +89,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