On Wednesday, August 2, 2017 at 1:38:34 PM UTC-7, Nicolas MARTIN wrote: > > Certainly I'm not going to discuss with you on Trac or Python related > topics but I only see the Babel line on system information when the babel > folders are in the plugins directories. > Anyway finally this is not relevant if we need a Trac reinstallation to > finish Babel installation. > > I'm not sure if I will contact the admin about this. We can agree that the > most critical point for our Trac system at this moment is to upgrade and > not to reinstall and I will push for it. > > Even so, thanks for your support. I still learned a lot. >
The location you are installing Babel may not be the python interpreter that your Trac installation is using. Your Trac installation could be installed in a virutalenv, for instance. You could inspect your webserver configuration to confirm. I did some testing, building Babel as described here: http://babel.pocoo.org/en/latest/installation.html#living-on-the-edge I cleaned the python environment and restarted tracd after every test. 1. First a sanity check, installed using "python setup.py install" and confirmed that Translations are available. I had already compiled the catalogs in the copy of the source. 2. Built babel using "python setup.py bdist_egg" and copied to plugins directory. Babel appears on system info but Translations not available. This doesn't surprise me because Babel is not a plugin, it's a Trac dependency, and the Python interpreter won't find it in the plugin directory when loading Trac. 3. Same issue as (2) when using a wheel in the plugin directory, but also Trac cannot even load a plugin from the plugin dir when it's packaged as a wheel, since we haven't added support for that yet (should be coming in Trac 1.4). 4. Did the following: $ mkdir wheels $ pip download babel -d wheels $ pip install --no-cache-dir --find-links wheels babel Collecting babel Collecting pytz>=0a (from babel) Installing collected packages: pytz, babel Successfully installed babel-2.4.0 pytz-2017.2 These steps work fine, even if Trac was installed as a wheel or sdist (pip install --no-use-wheel trac) before installing Babel. However, if I install Trac from a cleaned copy of the source (python setup.py install) and then install Babel, Babel is shown as installed by "translations unavailable". This makes sense because the catalogs cannot be compiled without Babel. Whereas for my test in (1) I had the catalogs already compiled, in this case I did not. The catalogs are pre-compiled if installing from an sdist or wheel from PyPI. Summary: * Definitely don't put Babel in plugins directory * Whether you need to reinstall Trac depends on how Trac was installed. If it was installed from an OS package manager you are probably fine. * Be careful about where you are installing Babel. It needs to be installed in the same interpreter as Trac. Upgrading your Trac instance and reinstalling Babel sounds like a good idea. If you cannot upgrade or reinstall in the near future, I would investigate further where you are installing Babel and make sure it's the same Python environment that your Trac is installed in. - Ryan -- You received this message because you are subscribed to the Google Groups "Trac Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscr...@googlegroups.com. To post to this group, send email to trac-users@googlegroups.com. Visit this group at https://groups.google.com/group/trac-users. For more options, visit https://groups.google.com/d/optout.