On Fri, Jul 19, 2013 at 2:41 PM, Kalpa Welivitigoda <[email protected]>wrote:

>
>
>
> On Fri, Jul 19, 2013 at 2:27 PM, shirou <[email protected]> wrote:
>
>> Hi Kalpa,
>>
>> I had a same situation just yesterday.
>> My problem is the "translated" directory is on the top. When I moved
>> to under source directory, it works.
>>
>> Bad
>>
>> |-- Makefile
>> |-- build
>> |-- source
>> |   |-- conf.py
>> |   `-- index.rst
>> `-- translated
>>     `-- ja
>>         `-- LC_MESSAGES
>>             `-- index.mo
>>
>> Good
>>
>> |-- Makefile
>> |-- build
>> `-- source
>>     |-- conf.py
>>     |-- index.rst
>>     `-- translated
>>         `-- ja
>>             `-- LC_MESSAGES
>>                 `-- index.mo
>>
>> I wish it can help.
>>
>>
> wow that's great. it worked. I think it is better that the
> directory hierarchy is mentioned at http://sphinx-doc.org/intl.html
>
>
>> and, you can use sphinx-intl package[1] to setup and update directory
>> and .mo files.
>>
>> [1] https://pypi.python.org/pypi/sphinx-intl
>>
>>
> Thanks for the info, I'll go through it.
>
>

I did a small modification to my directory structure

|-- source
|   |-- content
|   |   `-- translated
|   |       `-- si
|   |           `-- LC_MESSAGES
|   |-- images

conf.py file is in source directory.
rst files are inside content directory.

I have set locale_dirs=['content/translated/'] in conf.py

when I generated the html files the translations are not there.

I tried moving the translated directory to source direcotry and
locale_dirs=['translated/'] still the translated strings are not there in
the html files.

Any help to get this working?


>
>> Regards,
>> WAKAYAMA Shirou
>>
>>
>> 2013/7/19 Kalpa Welivitigoda <[email protected]>:
>> > Hi,
>> >
>> > I am trying to translate rst content using sphinx-build. I have
>> generated
>> > the pot file, po file and the mo file is saved in the correct directory
>> as
>> > instructed at http://sphinx-doc.org/intl.html. But the output files of
>> > 'sphix-build -b html -Dlanguage=ru source html' do not contain the
>> > translated strings. Instead the original text (English) is there.
>> >
>> > I have set "locale_dirs = ['translated/']" in conf.py file. translated/
>> > directory contains the generated mo files as instructed at
>> > http://sphinx-doc.org/intl.html
>> >
>> > What would be the cause for not appearing translated strings in the
>> output
>> > html files?
>> >
>> > --
>> > Best Regards,
>> >
>> > Kalpa Welivitigoda
>> > Junior Treasurer | Electrical Engineering Society
>> > Undergraduate | Department of Electrical Engineering
>> > University of Moratuwa
>> > Sri Lanka
>> > http://about.me/callkalpa
>> >
>> > --
>> > 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 http://groups.google.com/group/sphinx-users.
>> > For more options, visit https://groups.google.com/groups/opt_out.
>> >
>> >
>>
>> --
>> 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 http://groups.google.com/group/sphinx-users.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>
>
> --
> Best Regards,
>
> Kalpa Welivitigoda
> Junior Treasurer | Electrical Engineering Society
> Undergraduate | Department of Electrical Engineering
> University of Moratuwa
> Sri Lanka
> http://about.me/callkalpa
>



-- 
Best Regards,

Kalpa Welivitigoda
Junior Treasurer | Electrical Engineering Society
Undergraduate | Department of Electrical Engineering
University of Moratuwa
Sri Lanka
http://about.me/callkalpa

-- 
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 http://groups.google.com/group/sphinx-users.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to