Automatic translation updates using GlotPress + "traduttore" plugin

I thought i’d just pass on what weve just done on glotpress, not sure if its been covered.

So at Beaver Builder we use glotpress for our products and have a fairly good translation team … which is nice obviously! Now up until now whenever I build a product using gulp/grunt it would pull all the mo files direct from glotpress and they would be added in the plugin, then we just load the textdomain, old school style.

So the other day I came across this hidden gem: GitHub - wearerequired/traduttore: 🗼 A WordPress plugin to improve the I18N workflow for your own projects based on @GlotPress.

So how it works is this… you install the plugin in glotpress, and each product has a small php file, like the updater does…
When WP/CP checks if a plugin has a translation pack it pings our glotpress not wporg and fetches just the mo file… when you swap lang … again it just fetches that one file … its seamless!

The advantage here is they also allow incoming webhooks from github, so 3m after some code is pushed glotpress gets updated automagically… and as soon as a translator updates a set 3m later the end user gets an updated mo file… no more having to wait for me to release a plugin update, and best of all the plugin no longer has to ship 30 odd 300kb mo files!

edit: forgot to mention the slack integration!

7 Likes

I believe we should be able to do most of this kind of workflow with Crowdin or POEditor also. Our .po output will be stored on GitHub and our .mo files will probably be automatically generated from that and placed on our API servers.

We will definitely need to come up with a good strategy for pushing translation updates for multiple versions. We probably don’t want to push them every time a new string is translated, for example! It’d be good to discuss more of what you guys have already solved when we get to that :wink:

3 Likes