Michal Kandulski schrieb:
> Hi!
>
> I've got some problems trying to use sphinx with Polish:
>
> 1. 'Index', 'Module Index' and 'Search Page' are still in English.
>
> In conf.py file:
>
> language = 'pl'
>
> In index.rst:
>
> * :ref:`genindex`
> * :ref:`modindex`
>
> and the html output is:
>
> <li><a class="reference external" href="genindex.html">
> <em>Index</em></a></li>
> <li><a class="reference external" href="modindex.html">
> <em>Module Index</em></a></li>
> <li><a class="reference external" href="search.html">
> <em>Search Page</em></a></li>
>
> I thought I found the bug in environment.py (lines 270--272):
>
> self.labels['genindex'] = ('genindex', '', 'Index')
> self.labels['modindex'] = ('modindex', '', 'Module Index')
> self.labels['search'] = ('search', '', 'Search Page')
>
> I turned them into:
>
> self.labels['genindex'] = ('genindex', '', _('Index'))
> self.labels['modindex'] = ('modindex', '', _('Module Index'))
> self.labels['search'] = ('search', '', _('Search Page'))
>
> and I get this:
>
> <li><a class="reference external" href="genindex.html">
> <em>Indeks</em></a></li>
> <li><a class="reference external" href="modindex.html">
> <em>Module Index</em></a></li>
> <li><a class="reference external" href="search.html">
> <em>Search Page</em></a></li>
>
> so 'Index' has changed into 'Indeks', but the rest hasn't changed!
> I don't get it.
I gather that this has been cleared up now? I've fixed the missing _() in SVN.
> 2. Section names in pdf output are in English (ONE, TWO, THREE etc.)
> It's something to to with latex. The word 'Chapter' is OK
> ('Rozdział') just the numbers (numerals) are wrong.
>
> What makes latex change chapter numbers into numerals? Can I turn
> it off somehow?
It's the "fncychap" style Sphinx uses by default. It is not
internationalized.
There's so much to customize in the LaTeX output; I wonder if it isn't time
for a new setting to customize everything Sphinx writes into the preamble.
Something like
latex_elements = {
'babel': '\\usepackage{polski}',
'fncychap': '\\usepackage[Lenny]{fncychap}',
'fontenc': '\\usepackage[OT1]{fontenc}',
'preamble': '...',
}
All these items would have the appropriate defaults, so that people not
wanting to customize don't have to do anything.
> 3. There's a latex package 'polski', which is more suitable than
> babel. I don't know how but it would be nice to be able to use it
> instead of babel.
>
> Of course I can use latex_preamble, but I'm not sure if it's OK to
> use package polski with babel (by now I can't find a way to turn
> of inclusion of babel).
Now that's great -- I thought babel was meant to make an end to all those
"german", "polski", whatever packages and unify them. :(
If you're telling me Polish should always use polski.sty instead of babel,
I can fix that.
Georg
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sphinx-dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/sphinx-dev?hl=en
-~----------~----~----~----~------~----~------~--~---