German Output With lualatex

48 views
Skip to first unread message

Jan Ulrich Hasecke

unread,
Feb 28, 2018, 3:25:01 AM2/28/18
to sphinx-users
Hi all,

I don't get german chapternames etc. when I compile my project.

The problem seems to be that lualatex does not know the language ngerman.

I edited the tex-file until I get the desired output.

Here is the diff.

10c10
< \documentclass[letterpaper,10pt,ngerman]{sphinxmanual}
---
> \documentclass[letterpaper,10pt,german]{sphinxmanual}
21c21
< \setmainlanguage{ngerman}
---
> \setmainlanguage{german}
55,57c55,57
< \addto\captionsngerman{\renewcommand{\figurename}{Abb.}}
< \addto\captionsngerman{\renewcommand{\tablename}{Tab.}}
< \addto\captionsngerman{\renewcommand{\literalblockname}{Quellcode}}
---
> \addto\captionsgerman{\renewcommand{\figurename}{Abb.}}
> \addto\captionsgerman{\renewcommand{\tablename}{Tab.}}
> \addto\captionsgerman{\renewcommand{\literalblockname}{Quellcode}}
59,60c59,60
<
\addto\captionsngerman{\renewcommand{\literalblockcontinuedname}{Fortsetzung
der vorherigen Seite}}
<
\addto\captionsngerman{\renewcommand{\literalblockcontinuesname}{continues
on next page}}
---
>
\addto\captionsgerman{\renewcommand{\literalblockcontinuedname}{Fortsetzung
der vorherigen Seite}}
>
\addto\captionsgerman{\renewcommand{\literalblockcontinuesname}{Fortsetzung
auf der nächsten Seite}}
183c183

As you can see I switched from "ngerman" to "german".

And \literalblockcontinuesname is not set to a german string at all.

I think at least the latter issue is a bug.

Is there something special I have to set in conf.py to get the right output?


juh


--
Das ZEN von Pandoc
Bücher und E-Books einfach und professionell produzieren
http://www.amazon.de/Das-ZEN-von-Pandoc-professionell/dp/1505218799/
Paperback (232 Seiten) und E-Book

Komiya Takeshi

unread,
Mar 2, 2018, 11:25:19 AM3/2/18
to sphinx...@googlegroups.com
Hi,

The "ngerman" came from docutils implementation.
How about updating it from conf.py like following?
```
import docutils.writers.latex2e
docutils.writers.latex2e.Babel.language_codes['de'] = 'german'
```

>And \literalblockcontinuesname is not set to a german string at all.
>I think at least the latter issue is a bug.

Simply it's not translated yet. It seems some messages are not
translated to German.
We're always welcome your contributions :-)
http://www.sphinx-doc.org/en/master/devguide.html#locale-updates

Thanks,
Takeshi KOMIYA
> --
> 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 sphinx-users...@googlegroups.com.
> To post to this group, send email to sphinx...@googlegroups.com.
> Visit this group at https://groups.google.com/group/sphinx-users.
> For more options, visit https://groups.google.com/d/optout.

jfbu

unread,
Mar 2, 2018, 2:30:37 PM3/2/18
to sphinx...@googlegroups.com
Hi,

with lualatex Sphinx uses LaTeX package polyglossia
not LaTeX package babel (however if you override the
'babel' key of latex_elements you can force use of babel
in place of polyglossia; I do this for French)

Turns out polyglossia indeed does not recognize "ngerman"
(which is regrettable in terms of facilitating to LaTeX
users converting babel-using pdflatex sources to polyglossia-
lualatex sources) but handles "german" as babel
does for "ngerman", i.e. by default it does use the
hyphenation patterns for reformed (1996) orthography.

Simplest is to follow @tk0miya advice so that polyglossia
does get the "german" it expects

As per the non-translated strings I asked to join
the transifex German team, so I can push your suggestion
once I have the access rights ...

(or the German Sphinx translators will do it before that)

You can use the 'preamble' key of latex_elements to
insert your translations, without having to post-process
the TeX file. Your renewcommand's will overwrite those
inserted a bit earlier in the preamble from the LaTeX template.

Best,

Jean-François

jfbu

unread,
Mar 3, 2018, 4:59:47 AM3/3/18
to sphinx...@googlegroups.com
Le 02/03/2018 à 20:30, jfbu a écrit :
> 59,60c59,60
> <
> \addto\captionsngerman{\renewcommand{\literalblockcontinuedname}{Fortsetzung
> der vorherigen Seite}}
> <
> \addto\captionsngerman{\renewcommand{\literalblockcontinuesname}{continues
> on next page}}
> ---
>>
> \addto\captionsgerman{\renewcommand{\literalblockcontinuedname}{Fortsetzung
> der vorherigen Seite}}
>>
> \addto\captionsgerman{\renewcommand{\literalblockcontinuesname}{Fortsetzung
> auf der nächsten Seite}}
> 183c183
>
> As you can see I switched from "ngerman" to "german".
>
> And \literalblockcontinuesname is not set to a german string at all.
>
> I think at least the latter issue is a bug.
>
> Is there something special I have to set in conf.py to get the right output?
>
>
> juh


Hi,

the first string appeared also in the longtable template, hence
had already been translated. The second string was not translated
to German in time for 1.7.0/1.7.1 but I have done it now.

@Takeshi: are transifex translations integrated only at time
of major releases, or will 1.7.2 get this update? (sorry I forgot
the procedure)

Best,
Jean-François




Komiya Takeshi

unread,
Mar 5, 2018, 7:49:56 AM3/5/18
to sphinx...@googlegroups.com
>@Takeshi: are transifex translations integrated only at time
>of major releases, or will 1.7.2 get this update? (sorry I forgot
>the procedure)

Translations on transifex is synchronized with master branch.
So you should pick up them into 1.7 branch manually.

Thanks,

jfbu

unread,
Mar 5, 2018, 1:13:39 PM3/5/18
to sphinx...@googlegroups.com
Le 05/03/2018 à 13:49, Komiya Takeshi a écrit :
>> @Takeshi: are transifex translations integrated only at time
>> of major releases, or will 1.7.2 get this update? (sorry I forgot
>> the procedure)
>
> Translations on transifex is synchronized with master branch.
> So you should pick up them into 1.7 branch manually.

Hi, I have done it now on 1.7 branch for this particular string
and German language.

Thanks for reminding me of procedure!

Jean-François
Reply all
Reply to author
Forward
0 new messages