Skip to content

Commit

Permalink
Merge pull request #40 from tk0miya/39_docs
Browse files Browse the repository at this point in the history
Update docs (refs: #39)
  • Loading branch information
tk0miya committed Apr 19, 2020
2 parents b6b2323 + 4ec4e21 commit 3337c65
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
10 changes: 5 additions & 5 deletions doc/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Quick Start
Installation
============

Please install sphinx-intl with using pip (8.1.1 or later).
Please install sphinx-intl using pip (8.1.1 or later).

.. code-block:: bash
Expand All @@ -15,7 +15,7 @@ Please install sphinx-intl with using pip (8.1.1 or later).
QuickStart for sphinx translation
===================================

This section describe to translate with Sphinx_ and `sphinx-intl` command.
This section describe how to translate with Sphinx_ and `sphinx-intl` command.

1. Create your document by using Sphinx.

Expand All @@ -35,14 +35,14 @@ This section describe to translate with Sphinx_ and `sphinx-intl` command.

$ make gettext

This invoke the sphinx gettext builder that generates ``*.pot`` files under
This invokes the sphinx gettext builder that generates ``*.pot`` files under
``_build/gettext`` directory.

4. Setup/Update your po files under ``locale_dir``::

$ sphinx-intl update -p _build/gettext -l de -l ja

After this, you got these directories that contain po files:
After this, you get these directories that contain po files:

* `./locale/de/LC_MESSAGES/`
* `./locale/ja/LC_MESSAGES/`
Expand All @@ -62,7 +62,7 @@ This section describe to translate with Sphinx_ and `sphinx-intl` command.

That's all!

For more information, please refer :doc:`refs`.
For more information, please refer to :doc:`refs`.

.. _Sphinx: http://sphinx-doc.org

Expand Down
11 changes: 6 additions & 5 deletions doc/refs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Environment Variables
=====================

All command-line options can be set with environment variables using the
format SPHINXINTL_<UPPER_LONG_NAME> . Dashes (-) have to replaced with
format SPHINXINTL_<UPPER_LONG_NAME> . Dashes (-) have to be replaced with
underscores (_).

For example, to set the languages::
Expand All @@ -30,7 +30,7 @@ This is the same as passing the option to sphinx-intl directly::
Sphinx conf.py
==============

Add below settings to sphinx document's conf.py if not exists::
Add below settings to sphinx document's conf.py if they do not exists::

locale_dirs = ['locale/'] #for example
gettext_compact = False #optional
Expand All @@ -40,7 +40,8 @@ Makefile / make.bat
===================

`make gettext` will generate pot files into `_build/gettext` directory,
however pot files should be generated in the `locale/pot` is convenient.
You can be done by replacing `_build/gettext` with `locale/pot` in your
`Makefile` and/or `make.bat` that was generated by sphinx-quickstart.
however it is much convenient if pot files are generated into the
`locale/pot` directory. You can achieve this by replacing `_build/gettext`
with `locale/pot` in your `Makefile` and/or `make.bat` that was generated
by sphinx-quickstart.

2 changes: 1 addition & 1 deletion sphinx_intl/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ def update(locale_dir, pot_dir, language, line_width):
if not pot_dir:
pot_dir = os.path.join(locale_dir, 'pot')
if not os.path.exists(pot_dir):
msg = ("%(pot_dir)r is not exist. Please specify pot directory with "
msg = ("%(pot_dir)r does not exist. Please specify pot directory with "
"-p option, or preparing your pot files in %(pot_dir)r."
% locals())
raise click.BadParameter(msg, param_hint='pot_dir')
Expand Down

0 comments on commit 3337c65

Please sign in to comment.