Hi Takeshi > Could you file an issue to GitHub and share reproducible (minimal) example please? Then I'll investigate it.
> Thanks, > Takeshi KOMIYA Done. i18n: Translated msgid strings in content files not merged into HTML output #35 Thanks, Mark On Sat, Oct 12, 2019 at 1:20 AM Komiya Takeshi <[email protected]> wrote: > Hi, > > Could you file an issue to GitHub and share reproducible (minimal) > example please? Then I'll investigate it. > > Thanks, > Takeshi KOMIYA > > 2019年10月11日(金) 4:10 'Mark Peters' via sphinx-users > <[email protected]>: > > > > When I downgrade my environment and use Python 2.7 tools to build > translated output (into German), Sphinx successfully replaces the strings > in my RST files with the corresponding strings in my PO files in the HTML > output: > > > > Python 2.7 > > Sphinx 1.8.4 > > Sphinx-intl 0.9.9 > > > > However, when I switch back to the Python 3 tools, Sphinx does replace > the strings in my RTD theme sphinx.po file but does not replace the strings > in my RST content files (index.po, <filename>.po): > > > > Python 3.5 > > Sphinx 2.2.0 > > Sphinx-intl 2.0.0 > > > > I don't see any earlier reports of similar issues. Any idea what could > be going on? The msgid strings in my PO files line up with the strings in > my RST files, so that isn't the issue. > > > > Thanks in advance for any help. > > > > Mark > > > > > > On Thursday, October 3, 2019 at 12:56:10 PM UTC-4, Mark Peters wrote: > >> > >> Since upgrading from Sphinx 1.8 to 2.1, the translated strings in the > PO files in my /locale/<language>/LC_MESSAGES/ directory are no longer > merged into the HTML output. However, the translated strings for my RTD > theme are merged into the output. I've upgraded my copy of sphinx-intl to > v2.0.0 in case that was the issue; it isn't. > >> > >> I'm following the same process as before the Sphinx upgrade: > >> > >> 1. Run make gettext to produce a set of POT files. > >> 2. Run sphinx-intl update -p build/locale -l de (to produce PO files > for German translation). > >> 3. Translate the strings. For example: > >> > >> #: ../../source/index.rst:8 > >> msgid "English string" > >> msgstr "German string" > >> > >> 4. Run the command to build my HTML output: > >> > >> make -e SPHINXOPTS="-D language='de' -D > locale_dirs='locale/,_themes/rtd_theme/locale/' -D html_theme='rtd_theme'" > BUILDDIR="build/de" clean html > >> > >> Sphinx creates the MO files from my PO files. The HTML output shows the > translated strings for my theme but not for my content files. > >> > >> Any idea how I could troubleshoot this issue? > >> > >> Thanks in advance for any suggestions. > >> > >> Mark > >> > > -- > > You received this message because you are subscribed to the Google > Groups "sphinx-users" group. > > To unsubscribe from this group and stop receiving emails from it, send > an email to [email protected]. > > To view this discussion on the web visit > https://groups.google.com/d/msgid/sphinx-users/e700652f-2951-4d89-8ce5-c1cc7c0a58b9%40googlegroups.com > . > > -- > You received this message because you are subscribed to a topic in the > Google Groups "sphinx-users" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/sphinx-users/Z9fN9BUQHyQ/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/sphinx-users/CAFmkQAMnjfhhjeoY53_rqcHZXN-qTFuC-ZAfmr%2BsF4Ur0A0iww%40mail.gmail.com > . > -- Mark Peters Sr Technical Writer MOBILE +1 410 292 <http://tel+15555555512>4719 EMAIL [email protected] <[email protected]> Snowflake Inc. Baltimore, MD 21214 -- You received this message because you are subscribed to the Google Groups "sphinx-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/sphinx-users/CABBFTYa5q9K9_6JR54Sft9toEdQwkM0vdNcV_xNvBe4dXktASA%40mail.gmail.com.
