Short description of problem:
When trying to publish a translated book using the non-default config takes the TOC entry name from the default Book_Info file, regardless of whether it's included or not.
The Fedora Installation Guide and Fedora Installation Quick Start Guide share the same repository. When building, using the default publican.cfg config builds the full IG, and an alternate config - quickstart.cfg - builds the Quick Start Guide.
The quickstart.cfg config specifies the book's mainfile as Installation_Quick_Start_Guide.xml. This XML links (xi:include) Article_Info.xml containing book information such as its title.
Now, I want to publish the Czech translation of the Quick Start Guide to docs.fedoraproject.org, embedding the site's TOC (--embedtoc). The Article_Info.xml file is translated in cs-CZ/Article_Info.po, and the title string looks like this:
#. Tag: title
msgid "Installation Quick Start Guide"
msgstr "Stručná příručka instalace"
The Book_Info file, which is only included in the full Installation Guide and NOT in the Quick Start Guide, has the title string untranslated:
#. Tag: title
msgid "Installation Guide"
When I attempt to publish the cs-CZ version of the Quick Start Guide, the book builds correctly and its title is translated, the string being taken from cs-CZ/Article_Info.po. However, the TOC entry ignores this and takes the title specified in cs-CZ/Book_Info.po, which is untranslated, and the TOC therefore displays the guide as "Installation Guide", instead of "Stručná příručka instalace". Translating the title string in cs-CZ/Book_Info.xml and building again changes this entry. (tried it on Publican 4.0 on Fedora 19; apparently Publican 2.8 does not display the TOC entry in the locally built file)
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. clone install-guide.git, checkout branch F20
2. publican build --publish --embedtoc --langs=cs-CZ --formats=html-single --config=quickstart.cfg
3. open publish/cs-CZ/Fedora/20/html-single/Installation_Quick_Start_Guide/index.html
4. on the top of the html file, check the table of contents entry
the TOC entry at the top of the file reads "Installation Guide" - the title string in cs-CZ/Book_Info.po. This file is not included anywhere in this variant of the guide. The actual book title as it shows on the title page is correctly taken from cs-CZ/Article_Info.po, only the TOC entry is wrong.
the TOC entry reads "Stručná příručka instalace" - the string that the title is translated to in cs-CZ/Article_Info.po
I'm reportig this for Publican 4, but the bug appears in Publican 2.8 as well. This is a big issue, because right now Publican 2.8 is necessary for publishing documents to docs.fedoraproject.org - newer Publican versions break the site.
I think I forgot to clarify: in the default locale (en-US), building the book with --config=quickstart.cfg works normally, the TOC entry is generated from the title in en-US/Article_Info.xml as it should be. The problem described above only happens when building a different locale.
Hi Petr, it looks like a configuration issue to me.
Can you try adding the following line to quickstart.cfg and testing it?
Hi Jeff, you're right. Setting the type to Article fixes the issue - so I guess we can close this.