These are chat archives for translate/dev

28th
Sep 2017
Martin Ruckli
@martinruckli_twitter
Sep 28 2017 07:06
Hi there :)
Martin Ruckli
@martinruckli_twitter
Sep 28 2017 07:18
I’m planning on integrating pootle into my applications. I was wondering how I best start on doing the following:
I want my applications to register themselves by calling a specific url (e.g. http://pootleserver/project/register) by that I’m able to see which applications are running and consuming translations.
When I edit translations of a project I would like to be able to then select a registered application to „refresh“ the translations by calling a specific endpoint in it (to be provided by my application, which triggers a reload of the translations from the backing git).
Alternatively I would also like to have a polling mechanism from my application, if for some reason the callback from pootle is not possible (e.g. Firewall restrictions).
Do you have any pointer for me where I should start and if this is possible with the current plugin system?
phlax
@phlax
Sep 28 2017 07:27
@martinruckli_twitter in terms of endpoints to action syncing to/from git
thats not something pootle already does out of the box but wouldnt be too hard to build that on
Martin Ruckli
@martinruckli_twitter
Sep 28 2017 07:47
I don't want to trigger the sync to/from git. I want my application to get notified after a user says "publish and reload in application x" (inside pootle)
phlax
@phlax
Sep 28 2017 07:48
we just added a new method for publish/reload of translation strings
but its not triggered by user action (at least not through the web)
its triggered on command line - or as scheduled (cron etc)
in terms of hooking something up to call an endpoint in other application in response to those events
that would be easier still, but again not something it does straight out of the box
in terms of enabling this with current plugin system - i think this could be handled by django signals to trigger specific code/callbacks etc
Martin Ruckli
@martinruckli_twitter
Sep 28 2017 07:57
yeah, sure... As long as i can somehow develop it and it is not completely against the idea of pootle :)
phlax
@phlax
Sep 28 2017 07:58
if im clear what events you need to listen to its trivial to add
Martin Ruckli
@martinruckli_twitter
Sep 28 2017 08:07
well, then I'll have a look and if I'm able to what I want I'll also create a PR . Maybe someone else can use it as well :)
phlax
@phlax
Sep 28 2017 08:07
cool, ping if i can help at all
Martin Ruckli
@martinruckli_twitter
Sep 28 2017 08:18
sure. Thanks! This might take some days to get done though
Johannes Marbach
@Johennes
Sep 28 2017 11:38
I think I'm done on #6747 now. Can you guys LMK when it's ok to merge in. Also, will this make it into the 2.8.x line?
Jose J. Martinez
@jjmcarrascosa
Sep 28 2017 13:26
ping @phlax !
phlax
@phlax
Sep 28 2017 14:50
hi @Johennes it wont make it into 2.8 - which is kinda bugfix only - is that a problem ?
hi @jjmcarrascosa - gotta run just now but ill be about tomorrow
Johannes Marbach
@Johennes
Sep 28 2017 15:08
@phlax Makes sense. Any broad idea on when 2.9 will come out?
phlax
@phlax
Sep 28 2017 18:16
@Johennes there a couple of bugs posted - but not so difficult to fix
biggest blocker really was 2.9 rc getting some deployment testing
phlax
@phlax
Sep 28 2017 18:35
@Johennes there are a couple of linting errors here https://travis-ci.org/translate/pootle/jobs/280823425#L600
you can check the test run any time you push to a PR here https://travis-ci.org/translate/pootle/pull_requests