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

docbuild: Japanese characters creeping into other parts of Sage documentation #31936

Closed
jhpalmieri opened this issue Jun 8, 2021 · 14 comments
Closed

Comments

@jhpalmieri
Copy link
Member

Japanese characters creep into various parts of Sage documentation. For example, the table of contents in the (English) Sage developer's guide (html) has headings in Japanese, and when building the PDF version of it/a_tour_of_sage, I see this error:

    ! Package inputenc Error: Unicode character リ (U+30EA)

Indeed, the file local/share/doc/sage/latex/it/a_tour_of_sage/a_tour_of_sage.tex has the line

    \renewcommand{\releasename}{リリース}

and also a few lines earlier

    \date{2021年06月08日}

and at the bottom

    \renewcommand{\indexname}{索引}

These lines are the same as in ja/a_tour_of_sage/a_tour_of_sage.tex.

Depends on #31948

CC: @zlscherr @kiwifb @kliem @mkoeppe

Component: documentation

Issue created by migration from https://trac.sagemath.org/ticket/31936

@jhpalmieri jhpalmieri added this to the sage-9.4 milestone Jun 8, 2021
@jhpalmieri

This comment has been minimized.

@slel
Copy link
Member

slel commented Jun 8, 2021

comment:2

Since maybe Sage 9.3, some interface elements of
the (English language) (html) developer guide appear
in Japanese for me in Sage built from source.

Comparing the online version and my local version
of the "Git setup" page for instance:

the correspondence is as follows.

Menu headers in the left menu:

  • Table of Contents - 目次
  • Previous topic - 前のトピックへ
  • Next topic - 次のトピックへ
  • This Page - このページ
  • Quick search - クイック検索

Navigation menu (top right and bottom right):

  • previous - 前へ
  • next - 次へ
  • index - 索引

@jhpalmieri

This comment has been minimized.

@jhpalmieri
Copy link
Member Author

comment:3

Oh, I see that too. Ticket summary changed.

@jhpalmieri jhpalmieri changed the title doc-pdf fails: Japanese characters creeping into Italian tour of Sage docbuild: Japanese characters creeping into other parts of Sage documentation Jun 9, 2021
@jhpalmieri
Copy link
Member Author

comment:4

The Sphinx upgrade #31696 doesn't help.

@dimpase
Copy link
Member

dimpase commented Jun 9, 2021

comment:5

I cannot reproduce this on (Gentoo) Linux. Everything looks fine.
On the other hand, I see it (Japanese menus) on macOS 11.4, too.

@dimpase
Copy link
Member

dimpase commented Jun 9, 2021

comment:6

#30551 changed various locale settings, perhaps it's the culprit.

@jhpalmieri
Copy link
Member Author

comment:7

The problem is #31344, in particular commit b4ceee5.

@kiwifb
Copy link
Member

kiwifb commented Jun 10, 2021

comment:9

Do we have some kind of race condition between languages? Does the problem persists when building serially?

@jhpalmieri
Copy link
Member Author

comment:10

If I unset MAKE, I think that makes it build serially, and I still see the problem. I wonder if it comes from lines like this in src/doc/ja/a_tour_of_sage/conf.py:

from sage.docs.conf import release, latex_elements
from sage.docs.conf import *  # NOQA

and similar lines in other conf.py files. Could modifications to configuration variables get passed between different builds?

@mkoeppe
Copy link
Contributor

mkoeppe commented Jun 10, 2021

comment:11

Replying to @jhpalmieri:

The problem is #31344, in particular commit b4ceee5.

Nice catch. Previously the different languages were isolated in separate processes via build_many, now they run serially in the same Python process, so there's a potential for state to persist.

@mkoeppe
Copy link
Contributor

mkoeppe commented Jun 10, 2021

comment:12

#31948 (Reimplement parallel docbuild using make) could be a solution; or a simpler workaround using os.system (or similar) to run the separate documents serially in separate processes.

@mkoeppe
Copy link
Contributor

mkoeppe commented Jun 14, 2021

Dependencies: #31948

@jhpalmieri
Copy link
Member Author

comment:14

I think that #31948 fixes this. Once that's merged and tested, we should close this ticket.

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

No branches or pull requests

5 participants