On 23-04-2019 23:09, jfbu wrote:

> Le 21/04/2019 à 15:18, Geert Stappers a écrit :
>> On Sun, Apr 21, 2019 at 06:57:46AM -0500, George Feng wrote:
>>> On Sun, Apr 21, 2019 at 6:42 AM Geert Stappers wrote:
>>>> Hello,
>>>>
>>>> Here a dutch guy. The language of  my audiance and me is 'nl'.  In the
>>>> conf.py I do have
>>>>
>>>>   language = 'nl'
>>>>
>>>> When I do
>>>>
>>>>   make latexpdf
>>>>
>>>> there is  "chapter" in the generated layout, where I would like to get
>>>> the translated word.
>>>>
>>>>
>>>> Is it an incomplete translation that I'm facing?  If so, where to
>>>> update
>>>> the  ".po" ??
>>>>
>>>>
>>>> Is it me doing incomplete `make latexpdf`?  Should I add
>>>> parameter?  Or
>>>> prefix with something like 'SPHINX_LANG=nl'  ??
>>>>
>>>
>>>     You way try to add the corresponding language package (demo for
>>> Chinese)
>>> in the following way:
>>>
>>> latex_elements['preamble'] =  '\\usepackage{xeCJK}\n'
>>>
    ... previous attempt ...
>>
>
> Hi,
>
> nothing special should be needed apart from setting language to 'nl'
>
> Does your TeX installation support Dutch?
>
> I get HOOFDSTUK 1 both with Sphinx v1.8.5 and Sphinx v2.0.0,
> but using a full TeXLive install (2016).
>
> On a more partial one which does not have all language support
> I get no translation and the latex log in build repertory contains
> the warning:
>
> LaTeX Warning: Unused global option(s):
>     [dutch].
>
>
> Sphinx converts 'nl' to "dutch" for the LaTeX document which is
> the correct option for LaTeX babel (and is passed as documentclass
> option).
>
> Try running pdflatex directly on this file test.tex
>
> \documentclass[dutch]{report}
> \usepackage{babel}
> \begin{document}
> \chapter{Test}
> \end{document}
>
> and report what happens in PDF
>
>

still  "Chapter"  where indeed  "Hoofdstuk" should be.


Below detailed information.  Does it reveal clues to solve this
translation error??


Regards

Geert Stappers


gs0604@trancilo:/dev/shm/poc
$ cat test.tex
\documentclass[dutch]{report}
\usepackage{babel}
\begin{document}
\chapter{Test}
\end{document}
gs0604@trancilo:/dev/shm/poc
$ pdflatex test.tex
This is pdfTeX, Version 3.14159265-2.6-1.40.19 (TeX Live
2019/dev/Debian) (preloaded format=pdflatex)
 restricted \write18 enabled.
entering extended mode
(./test.tex
LaTeX2e <2018-12-01>
(/usr/share/texlive/texmf-dist/tex/latex/base/report.cls
Document Class: report 2018/09/03 v1.4i Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo))
(/usr/share/texlive/texmf-dist/tex/generic/babel/babel.sty
(/usr/share/texlive/texmf-dist/tex/generic/babel/switch.def)
(/usr/share/texlive/texmf-dist/tex/generic/babel/nil.ldf
(/usr/share/texlive/texmf-dist/tex/generic/babel/babel.def
(/usr/share/texlive/texmf-dist/tex/generic/babel/txtbabel.def))))

LaTeX Warning: Unused global option(s):
    [dutch].

(./test.aux)
Chapter 1.
[1{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}] (./test.aux)
)</usr/shar
e/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmbx12.pfb></usr/share/texl
ive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb>
Output written on test.pdf (1 page, 16981 bytes).
Transcript written on test.log.
gs0604@trancilo:/dev/shm/poc
$ pdftotext test.pdf -
Chapter 1

Test

1


gs0604@trancilo:/dev/shm/poc
$ sphinx-build --version
sphinx-build 1.8.4
gs0604@trancilo:/dev/shm/poc
$ echo $LANG
nl_NL.utf8
gs0604@trancilo:/dev/shm/poc
$


-- 
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 post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sphinx-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to