summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2018-04-18 08:29:21 -0400
committerCarlton Gibson <carlton.gibson@noumenal.es>2018-04-18 14:35:50 +0200
commit0d2ec8db483a900c27b8fada30688ef8f25cecfa (patch)
tree207882225fd333d100d1dbd66edbb93cbed64650
parent1d807b91dc1ed1e423fb6d3e1e606e49abc46b34 (diff)
[2.0.x] Fixed #29174, #29175 -- Doc'd that f-strings and JavaScript template strings can't be translated.
Backport of c3437f734d03d93f798151f712064394652cabed from master
-rw-r--r--docs/topics/i18n/translation.txt7
1 files changed, 7 insertions, 0 deletions
diff --git a/docs/topics/i18n/translation.txt b/docs/topics/i18n/translation.txt
index c49f83f83f..cdb783b9b6 100644
--- a/docs/topics/i18n/translation.txt
+++ b/docs/topics/i18n/translation.txt
@@ -138,6 +138,13 @@ instead of positional interpolation (e.g., ``%s`` or ``%d``) whenever you
have more than a single parameter. If you used positional interpolation,
translations wouldn't be able to reorder placeholder text.
+Since string extraction is done by the ``xgettext`` command, only syntaxes
+supported by ``gettext`` are supported by Django. Python f-strings_ and
+`JavaScript template strings`_ are not yet supported by ``xgettext``.
+
+.. _f-strings: https://docs.python.org/3/reference/lexical_analysis.html#f-strings
+.. _JavaScript template strings: https://savannah.gnu.org/bugs/?50920
+
.. _translator-comments:
Comments for translators