Add versionadded tags for new config values.

This commit is contained in:
Georg Brandl 2014-03-01 08:25:22 +01:00
parent d50c5efb1a
commit c403737ec3
3 changed files with 14 additions and 8 deletions

View File

@ -401,18 +401,23 @@ documentation on :ref:`intl` for details.
.. confval:: gettext_uuid .. confval:: gettext_uuid
If true, ``sphinx`` generates message catalogs with uuid information If true, Sphinx generates uuid information for version tracking in message
for ``pot`` files. If false, ``sphinx`` doesn't do it. catalogs.
The default is ``true``. The default is ``true``.
.. versionadded:: 1.3
.. confval:: gettext_location .. confval:: gettext_location
If true, ``sphinx`` generates message catalogs with location information If true, Sphinx generates location information for messages in message
for ``pot`` files. If false, ``sphinx`` doesn't do it. catalogs.
The default is ``true``. The default is ``true``.
.. versionadded:: 1.3
.. _html-options: .. _html-options:
Options for HTML output Options for HTML output

View File

@ -203,7 +203,8 @@ class MessageCatalogBuilder(I18nBuilder):
for source, line, _ in positions)) for source, line, _ in positions))
if self.config.gettext_uuid: if self.config.gettext_uuid:
# generate "# uuid1\n# uuid2\n ..." # generate "# uuid1\n# uuid2\n ..."
pofile.write(u"# %s\n" % "\n# ".join(uid for _, _, uid in positions)) pofile.write(u"# %s\n" % "\n# ".join(
uid for _, _, uid in positions))
# message contains *one* line of text ready for translation # message contains *one* line of text ready for translation
message = message.replace(u'\\', ur'\\'). \ message = message.replace(u'\\', ur'\\'). \

View File

@ -201,8 +201,8 @@ class Config(object):
# gettext options # gettext options
gettext_compact = (True, 'gettext'), gettext_compact = (True, 'gettext'),
gettext_location = (True, None), gettext_location = (True, 'gettext'),
gettext_uuid = (True, None), gettext_uuid = (True, 'gettext'),
# XML options # XML options
xml_pretty = (True, 'env'), xml_pretty = (True, 'env'),