Hi! I'm working on a project using Kotti framework which in turn uses Pyramid. It turned out that there's no way to override Kotti's translations in a project based on Kotti (https://github.com/Kotti/Kotti/issues/475). The way Kotti adds its translations should allow applications to override Kotti's translations according to Pyramid's documentation but documentation lies – see https://github.com/Pylons/pyramid/issues/1474. The workaround for Pyramid's bug seems to be simple – move the point when Kotti adds its translations until after all add-ons and application itself had already added their translations. (For anyone interested in real code this means moving a call `config.add_translation_dirs('kotti:locale')` (https://github.com/Kotti/Kotti/blob/1.2.2/kotti/__init__.py#L275) from line 275 to line 240. This change however, in case of application overriding Kotti's assets by means of `config.override_asset('kotti', 'app:kotti-overrides/') leads to Pyramid trying to look for directory with translations (called 'locale') inside override ('app:kotti-overrides/') which is meant for templates and other static files but not for translations. It appears Pyramid documentation does not talk about if and how does asset overriding mix with adding translations directories – see https://github.com/Pylons/pyramid/issues/2046. I tried to reproduce behavior I observe in my project using Kotti in a small code snippet (https://gist.github.com/piotr-dobrogost/4bdbefa6a74dbdcada82) where I use only Pyramid but it does not exhibit the same behavior and I don't know what I'm missing.
Before spending even more time trying to establish how things work I'd like to ask if anyone here knows how things were meant to work or how they should work in regard to mixing asset overriding and multiple translations directories? Regards, Piotr Dobrogost ps. I'd like to thank all the people from #pyramid IRC channel for their help with this issue. Nobody there could however answer how things are meant to work in such scenario thus I decided to write this post. -- You received this message because you are subscribed to the Google Groups "pylons-discuss" 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/pylons-discuss. For more options, visit https://groups.google.com/d/optout.
