diff options
| author | Michael Merickel <github@m.merickel.org> | 2018-11-20 13:40:48 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-11-20 13:40:48 -0600 |
| commit | 6918b285ba2db917b640a0d715bc70fecfd2fabe (patch) | |
| tree | 00c9160a2f9ac1d8a50bdc8ab28088e3a7aa3c82 /docs/narr/i18n.rst | |
| parent | 8c943501e87bed7836bb9ec1b216a561cc3f6be6 (diff) | |
| parent | b1c500c3d4cb269aed254742501040c1c64367c2 (diff) | |
| download | pyramid-6918b285ba2db917b640a0d715bc70fecfd2fabe.tar.gz pyramid-6918b285ba2db917b640a0d715bc70fecfd2fabe.tar.bz2 pyramid-6918b285ba2db917b640a0d715bc70fecfd2fabe.zip | |
Merge pull request #7 from stevepiercy/drop-py2
miscellaneous grammar and syntax fixes
Diffstat (limited to 'docs/narr/i18n.rst')
| -rw-r--r-- | docs/narr/i18n.rst | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/docs/narr/i18n.rst b/docs/narr/i18n.rst index 3a4f5af5b..b8cd396c0 100644 --- a/docs/narr/i18n.rst +++ b/docs/narr/i18n.rst @@ -62,7 +62,7 @@ This creates a ``str``-like object that is a TranslationString. The first argument to :class:`~pyramid.i18n.TranslationString` is the ``msgid``; it is required. It represents the key into the translation mappings provided by a particular localization. The ``msgid`` argument must be a string. -The msgid may optionally contain *replacement markers*. For instance: +The ``msgid`` may optionally contain *replacement markers*. For instance: .. code-block:: python :linenos: @@ -80,14 +80,14 @@ may be supplied at the same time as the replacement marker itself: from pyramid.i18n import TranslationString ts = TranslationString('Add ${number}', mapping={'number':1}) -Any number of replacement markers can be present in the msgid value, any number +Any number of replacement markers can be present in the ``msgid`` value, any number of times. Only markers which can be replaced by the values in the *mapping* will be replaced at translation time. The others will not be interpolated and will be output literally. A translation string should also usually carry a *domain*. The domain represents a translation category to disambiguate it from other translations of -the same msgid, in case they conflict. +the same ``msgid``, in case they conflict. .. code-block:: python :linenos: @@ -99,7 +99,7 @@ the same msgid, in case they conflict. The above translation string named a domain of ``form``. A :term:`translator` function will often use the domain to locate the right translator file on the filesystem which contains translations for a given domain. In this case, if it -were trying to translate our msgid to German, it might try to find a +were trying to translate our ``msgid`` to German, it might try to find a translation from a :term:`gettext` file within a :term:`translation directory` like this one: |
