Fix strings in manual using |lang| not being translated

This commit is contained in:
Kovid Goyal 2016-03-03 20:19:12 +05:30
parent ca4282e24b
commit c1bdcf424d
7 changed files with 8 additions and 9 deletions

View File

@ -17,7 +17,7 @@ use the edited ebook as input for conversion into other formats in calibre.
This document will refer mainly to the conversion settings as found in the This document will refer mainly to the conversion settings as found in the
conversion dialog, pictured below. All these settings are also available via conversion dialog, pictured below. All these settings are also available via
command line interface to conversion, documented at :doc:`generated/|lang|/ebook-convert`. In command line interface to conversion, documented at :doc:`generated/en/ebook-convert`. In
calibre, you can obtain help on any individual setting by holding your mouse over calibre, you can obtain help on any individual setting by holding your mouse over
it, a tooltip will appear describing the setting. it, a tooltip will appear describing the setting.

View File

@ -22,7 +22,6 @@ include_pat = re.compile(r'^.. include:: (\S+.rst)', re.M)
def source_read_handler(app, docname, source): def source_read_handler(app, docname, source):
src = source[0] src = source[0]
src = src.replace(' generated/|lang|', ' generated/' + app.config.language).replace('|lang|', 'en')
if app.builder.name != 'gettext' and app.config.language != 'en': if app.builder.name != 'gettext' and app.config.language != 'en':
src = src.replace('generated/en/', 'generated/' + app.config.language + '/') src = src.replace('generated/en/', 'generated/' + app.config.language + '/')
# Sphinx does not call source_read_handle for the .. include directive # Sphinx does not call source_read_handle for the .. include directive

View File

@ -19,7 +19,7 @@ Design philosophy
calibre has its roots in the Unix world, which means that its design is highly modular. calibre has its roots in the Unix world, which means that its design is highly modular.
The modules interact with each other via well defined interfaces. This makes adding new features and fixing The modules interact with each other via well defined interfaces. This makes adding new features and fixing
bugs in calibre very easy, resulting in a frenetic pace of development. Because of its roots, calibre has a bugs in calibre very easy, resulting in a frenetic pace of development. Because of its roots, calibre has a
comprehensive command line interface for all its functions, documented in :doc:`generated/|lang|/cli-index`. comprehensive command line interface for all its functions, documented in :doc:`generated/en/cli-index`.
The modular design of calibre is expressed via ``Plugins``. There is a :ref:`tutorial <customize>` on writing calibre plugins. The modular design of calibre is expressed via ``Plugins``. There is a :ref:`tutorial <customize>` on writing calibre plugins.
For example, adding support for a new device to calibre typically involves writing less than a 100 lines of code in the form of For example, adding support for a new device to calibre typically involves writing less than a 100 lines of code in the form of

View File

@ -86,7 +86,7 @@ The Command Line Interface
.. toctree:: .. toctree::
:maxdepth: 2 :maxdepth: 2
generated/|lang|/cli-index generated/en/cli-index
Setting up a calibre development environment Setting up a calibre development environment
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

View File

@ -309,7 +309,7 @@ If you're satisfied with your recipe, and you feel there is enough demand to jus
.. seealso:: .. seealso::
:doc:`generated/|lang|/ebook-convert` :doc:`generated/en/ebook-convert`
The command line interface for all ebook conversion. The command line interface for all ebook conversion.

View File

@ -13,7 +13,7 @@ Once you've admired the list of books you just added to your heart's content, yo
If you want to read the book on your reader, connect it to the computer, wait till calibre detects it (10-20 seconds) and then click the "Send to device" button. Once the icon stops spinning again, disconnect your reader and read away! If you didn't convert the book in the previous step, calibre will auto convert it to the format your reader device understands. If you want to read the book on your reader, connect it to the computer, wait till calibre detects it (10-20 seconds) and then click the "Send to device" button. Once the icon stops spinning again, disconnect your reader and read away! If you didn't convert the book in the previous step, calibre will auto convert it to the format your reader device understands.
To get started with more advanced usage, you should read about :doc:`gui`. For even more power and versatility, learn the :doc:`generated/|lang|/cli-index`. You will find the list of :doc:`faq` useful as well. To get started with more advanced usage, you should read about :doc:`gui`. For even more power and versatility, learn the :doc:`generated/en/cli-index`. You will find the list of :doc:`faq` useful as well.
.. only:: online .. only:: online
@ -35,7 +35,7 @@ Sections
faq faq
tutorials tutorials
customize customize
generated/|lang|/cli-index generated/en/cli-index
develop develop
glossary glossary

View File

@ -345,7 +345,7 @@ Function classification
.. toctree:: .. toctree::
:maxdepth: 3 :maxdepth: 3
generated/|lang|/template_ref generated/en/template_ref
.. _general_mode: .. _general_mode:
@ -494,5 +494,5 @@ You might find the following tips useful.
.. toctree:: .. toctree::
:hidden: :hidden:
generated/|lang|/template_ref generated/en/template_ref