summaryrefslogtreecommitdiff
path: root/doc/extdev
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2020-04-11 15:44:07 +0900
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2020-04-11 15:44:07 +0900
commiteb46db036f67ff054ea0e9d3faeca836bfb81c1e (patch)
tree86472799147a8b0f109293114bee67dd2f9c02e8 /doc/extdev
parentfd7c1d76b65965e3646074d5a5bde61e62fc9a91 (diff)
downloadsphinx-git-eb46db036f67ff054ea0e9d3faeca836bfb81c1e.tar.gz
doc: Fix indentation
Diffstat (limited to 'doc/extdev')
-rw-r--r--doc/extdev/i18n.rst24
1 files changed, 12 insertions, 12 deletions
diff --git a/doc/extdev/i18n.rst b/doc/extdev/i18n.rst
index a3232b857..75ef36cc5 100644
--- a/doc/extdev/i18n.rst
+++ b/doc/extdev/i18n.rst
@@ -35,25 +35,25 @@ In practice, you have to:
:func:`sphinx.locale.get_translation` function, usually renamed ``_()``,
e.g.:
- .. code-block:: python
- :caption: src/__init__.py
+ .. code-block:: python
+ :caption: src/__init__.py
- from sphinx.locale import get_translation
+ from sphinx.locale import get_translation
- MESSAGE_CATALOG_NAME = 'myextension'
- _ = get_translation(MESSAGE_CATALOG_NAME)
+ MESSAGE_CATALOG_NAME = 'myextension'
+ _ = get_translation(MESSAGE_CATALOG_NAME)
- translated_text = _('Hello Sphinx!')
+ translated_text = _('Hello Sphinx!')
#. Set up your extension to be aware of its dedicated translations:
- .. code-block:: python
- :caption: src/__init__.py
+ .. code-block:: python
+ :caption: src/__init__.py
- def setup(app):
- package_dir = path.abspath(path.dirname(__file__))
- locale_dir = os.path.join(package_dir, 'locales')
- app.add_message_catalog(MESSAGE_CATALOG_NAME, locale_dir)
+ def setup(app):
+ package_dir = path.abspath(path.dirname(__file__))
+ locale_dir = os.path.join(package_dir, 'locales')
+ app.add_message_catalog(MESSAGE_CATALOG_NAME, locale_dir)
#. Generate message catalog template ``*.pot`` file, usually in ``locale/``
source directory, for example via `Babel`_: