Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

i18n doesn't handle node.title correctly; contents, topic, admonition, table and section #4938

Closed
shimizukawa opened this issue May 6, 2018 · 1 comment

Comments

@shimizukawa
Copy link
Member

shimizukawa commented May 6, 2018

Original report is: https://groups.google.com/d/msg/sphinx-users/hdzuCi7AvRY/etw-3qWBBAAJ

Problem

There are two problems

  1. make gettext doesn't generate msgid for title of topic directive and contents directive

ex.

.. contents:: Contents Title

.. topic:: Topic Title
  1. make html with i18n catalog doesn't apply translated message if msgid starts with 1.

ex. index.rst

1. A Header
===========

.. admonition:: 1. Admonition Title

   Admonition body

.. topic:: 1. Topic Title

   Topic body

.. contents:: 1. Contents Title

.. table:: 1. Table Title

   +---+
   |Foo|
   +---+

Procedure to reproduce the problem

conf.py:

locale_dirs = ['./locale']
language = 'ru'
gettext_compact = False

commands:

make gettext
sphinx-intl update -l ru
# edit ./locale/ru/LC_MESSAGES/index.po
make html

Error logs / results

no errors

Expected results

All text in the index.rst are translated with using index.po catalog.

Reproducible project / your project

4938.zip

Environment info

  • OS: Any (Windows 10 for me)
  • Python version: 3.6.1
  • Sphinx version: 1.7.4
@shimizukawa shimizukawa added this to the 1.7.5 milestone May 6, 2018
@shimizukawa shimizukawa self-assigned this May 6, 2018
shimizukawa added a commit that referenced this issue May 6, 2018

Verified

This commit was signed with the committer’s verified signature.
shimizukawa added a commit that referenced this issue May 10, 2018
@shimizukawa
Copy link
Member Author

fixed

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant