From e7109cc41007269560f78b985f10bf343e58ee3c Mon Sep 17 00:00:00 2001 From: Markus Tacker Date: Fri, 13 Jan 2012 16:23:34 +0100 Subject: [PATCH] Added clarification of placeholder usage in gettext msgids. --- doc/i18n.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/i18n.rst b/doc/i18n.rst index 865dce3e..9b0227bf 100644 --- a/doc/i18n.rst +++ b/doc/i18n.rst @@ -54,6 +54,8 @@ In a translatable string, you can embed variables: Hello {{ name }}! {% endtrans %} +During the gettext lookup these placeholders are converted. ``{{ name }}`` becomes ``%name%`` so the gettext ``msgid`` for this string would be ``Hello %name%!``. + .. note:: ``{% trans "Hello {{ name }}!" %}`` is not a valid statement.