Trac l10n not available after setup.py develop

26 views
Skip to first unread message

Olemis Lang

unread,
May 7, 2013, 2:40:45 PM5/7/13
to trac-dev
After installing Trac with setup.py develop translations are not
available . Nevertheless I noticed that there are some l10n distribute
commands at hand ...

{{{
#!sh

$ /srv/venv/python/trac/trac-mq/bin/python setup.py --help-commands
[...]

Extra commands:
update_catalog_tracini update message catalogs from a POT file
setopt set an option in setup.cfg or another config file
check_catalog_tracini check message catalog files, like `msgfmt --check`
saveopts save supplied options to setup.cfg or
other config file
update_catalog_js update message catalogs from a POT file
compile_catalog_js compile message catalogs to binary MO files
init_catalog_tracini create a new catalog based on a POT file
rotate delete older distributions, keeping N newest files
check_catalog check message catalog files, like `msgfmt --check`
install_egg_info Install an .egg-info directory for the package
compile_catalog compile message catalogs to binary MO files
generate_messages_js generate message javascript files from
binary MO files
extract_messages_tracini extract localizable strings from the project code
extract_messages_js extract localizable strings from the project code
develop install package in 'development mode'
egg_info create a distribution's .egg-info directory
upload_docs Upload documentation to PyPI
extract_messages extract localizable strings from the project code
check_catalog_js check message catalog files, like `msgfmt --check`
update_catalog update message catalogs from a POT file
alias define a shortcut to invoke one or more commands
easy_install Find/get/install Python packages
init_catalog_js create a new catalog based on a POT file
test run unit tests after in-place build
build_sphinx Build Sphinx documentation
bdist_egg create an "egg" distribution
init_catalog create a new catalog based on a POT file
compile_catalog_tracini compile message catalogs to binary MO files

[...]

}}}

They are so many and it's a bit confusing to me . How could I use
them to generate supported translations ?

Thanks in advance .

--
Regards,

Olemis.

Apache™ Bloodhound contributor
http://issues.apache.org/bloodhound

Blog ES: http://simelo-es.blogspot.com/
Blog EN: http://simelo-en.blogspot.com/

Featured article:

Steffen Hoffmann

unread,
May 8, 2013, 3:54:29 AM5/8/13
to trac...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 07.05.2013 20:40, Olemis Lang wrote:
> After installing Trac with setup.py develop translations are not
> available . Nevertheless I noticed that there are some l10n distribute
> commands at hand ...

Sure you installed Babel [1] before? That is the required, yet optional
external dependency. Missing it to install _before_ Trac would knowingly
[2] lead to the situation you describe here.

Steffen Hoffmann


[1] http://babel.edgewall.org/
[2] http://trac.edgewall.org/ticket/9439#comment:19
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAlGKBLAACgkQ31DJeiZFuHdqQwCgolc8VKUIfFZ7RpU5ABhAi3cO
8tIAoJRgyVlDtJbj7qB4GLjQbMwLTVTq
=rtRs
-----END PGP SIGNATURE-----

Olaf Meeuwissen

unread,
May 8, 2013, 4:21:27 AM5/8/13
to trac...@googlegroups.com
Steffen Hoffmann writes:

> On 07.05.2013 20:40, Olemis Lang wrote:
>> After installing Trac with setup.py develop translations are not
>> available . Nevertheless I noticed that there are some l10n distribute
>> commands at hand ...
>
> Sure you installed Babel [1] before? That is the required, yet optional
> external dependency. Missing it to install _before_ Trac would knowingly
> [2] lead to the situation you describe here.

Even with Babel installed _before_ installing Trac, you will not be
able to run a localized version according to the note at the end of

http://trac.edgewall.org/wiki/TracInstall#Usingeasy_install
Hope this helps,
--
Olaf Meeuwissen, LPIC-2 FLOSS Engineer -- AVASYS CORPORATION
FSF Associate Member #1962 Help support software freedom
http://www.fsf.org/jf?referrer=1962

Olemis Lang

unread,
May 8, 2013, 11:21:46 AM5/8/13
to trac...@googlegroups.com
On 5/8/13, Olaf Meeuwissen <olaf.me...@avasys.jp> wrote:
> Steffen Hoffmann writes:
>> On 07.05.2013 20:40, Olemis Lang wrote:
>>> After installing Trac with setup.py develop translations are not
>>> available . Nevertheless I noticed that there are some l10n distribute
>>> commands at hand ...
>>
>> Sure you installed Babel [1] before? That is the required, yet optional
>> external dependency. Missing it to install _before_ Trac would knowingly
>> [2] lead to the situation you describe here.
>
> Even with Babel installed _before_ installing Trac, you will not be
> able to run a localized version according to the note at the end of
>
> http://trac.edgewall.org/wiki/TracInstall#Usingeasy_install
>

I confirm I did install Babel before Trac , and it still doesn't
generate i18n files .
I'll take a look , thanks :)

Olemis Lang

unread,
May 8, 2013, 11:34:21 AM5/8/13
to trac...@googlegroups.com
On 5/8/13, Olemis Lang <ole...@gmail.com> wrote:
> On 5/8/13, Olaf Meeuwissen <olaf.me...@avasys.jp> wrote:
>> Steffen Hoffmann writes:
[...]
>
>>> [1] http://babel.edgewall.org/
>>> [2] http://trac.edgewall.org/ticket/9439#comment:19
>>
>> Hope this helps,
>>
>
> I'll take a look , thanks :)
>

Well actually it does not quite fit into my original message .
easy_install will setup.py install Trac et al. and my question is
about achieving the same result with Trac package in editable state
(i.e. setup.py develop) . Is that possible ? What is the exact l10n
dist command sequence executed by setup.py install that are not
performed by setup.py develop ?

Remy Blank

unread,
May 8, 2013, 2:04:01 PM5/8/13
to trac...@googlegroups.com
Olemis Lang wrote:
> Well actually it does not quite fit into my original message .
> easy_install will setup.py install Trac et al. and my question is
> about achieving the same result with Trac package in editable state
> (i.e. setup.py develop) . Is that possible ? What is the exact l10n
> dist command sequence executed by setup.py install that are not
> performed by setup.py develop ?

make compile

should do the trick. Look at the top of Makefile for more targets.

-- Remy

signature.asc

Olemis Lang

unread,
May 9, 2013, 11:53:38 AM5/9/13
to trac...@googlegroups.com
AFAICS , the whole story is

{{{
#!sh

$ make compile
$ python setup.py generate_messages_js

}}}

Now it works . Thanks .

Remy Blank

unread,
May 9, 2013, 12:25:17 PM5/9/13
to trac...@googlegroups.com
Olemis Lang wrote:
> AFAICS , the whole story is
>
> {{{
> #!sh
>
> $ make compile
> $ python setup.py generate_messages_js
>
> }}}

Mmh... I thought that the JS messages were also compiled with "make
compile", but indeed that doesn't seem to be the case. I think that's a
bug in Makefile, as "make compile-fr" does compile JS messages.

-- Remy

signature.asc
Reply all
Reply to author
Forward
0 new messages