On Tue, Jan 27, 2009 at 1:53 PM, Christian Boos <[email protected]> wrote: > > Jorge Vargas wrote: >> Hello, >> >> Please let me know if this isn't the place for this. >> >> I just installed trac multirepo branch + mercurial plugin, and I'm >> loving it awesome work and I hope this becomes the main branch for the >> upcomming 0.12 release. That said I think I found a bug, but I'm not >> 100% sure. after the new i18n was added the following line was >> introduced. >> >> Hello Christian > > Did you actually face an installation issue? If yes, was it the same as > http://trac.edgewall.org/ticket/7877? > actually yes that was the same error (I should have search trac first, although I wasn't sure if tickets for this branch/mercurial where supposed to go in there)
>> locale_dir = pkg_resources.resource_filename(__name__,'../locale') >> >> I see two problems with this. >> #1 __name__ is not supported in zipped eggs, which is the recommended >> installation method for trac plugins. >> > > I don't think Babel can deal with zipped eggs, so translated plugins > should be marked as zip-unsafe for now (if that works at all, cf. > problem above). > biggest problem right now is that the instructions at actually tell you to build an egg. http://trac.edgewall.org/wiki/MultipleRepositorySupport so it's broken and you are supposed to use it that way :) >> #2 I believe the ../locale syntax isn't supported by said function. >> >> ideally the first param should be the package name and the second only >> "locale" but to be honest I don't know much of pkg_resources api to be >> sure which will be the correct value. >> > > Honestly, same goes for me, I simply picked that line from > trac/utils/translations.py. As it worked fine for Trac itself, I figured > it would for plugins as well (and indeed it does work for me). > it does not work for me as a zipped egg becuase __name__ is mangled inside the eggs. As you said zipsafe will probably fix it but then the "traditional" way of installing trac plugins will be broken. I believe something along the lines of pkg_resources('tracext.hg','locale') should fix it but I'm simply not sure. I'll try to consult with someone I know that knows setuptools... Thanks > -- Christian > > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Trac Development" 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/trac-dev?hl=en -~----------~----~----~----~------~----~------~--~---
