New plugin: Babel

Ever wanted to edit all language definitions in one place: Babel may help you.

3 Likes

Iā€™ve fixed some bugs and added some additional features. Feedback welcome.

And more fixes and improvements. The usage of the plugin should now be hassle-free on Grav instances. Please report!

1 Like

Babel plugin updated and should work now correctly side by side and without the tntsearch plugin. Moreover itā€™s now php 8+ compatible.

Funny story: I didnā€™t even remember that Iā€™ve created this pluginā€¦

1 Like

Babel allows you to translate existing language definitions, it detects missing translations and can do this for everything, plugins, GRAV, themes, frontend and backendā€¦

Some screenshots that may explain better, what Babel can do for you:


I donā€™t do a lot with translations, but I can see thatā€™s an extremely clever and useful tool for many.

Getting translation coverage in themes and plugins has been manual and error-prone and somewhat annoying when Iā€™ve done it in the past. Congratulations!

Thx for the warm words and yes, thatā€™s what itā€™s all about, a tool for developers, site maintainersā€¦ Whatā€™s really incredible, I didnā€™t even remember that I wrote this tool. Iā€™ve been absent for some years and probably will fade away again. I would really appreciate to find maintainers, people willing to collaborate on the plugins Iā€™ve updated again:

  • Babel
  • Studioeditor

Babel was broken as my last update had been published six years ago and probably even back than it lacked some vitals, like correct composer.json and vendor directory, incredible. Thereā€™s no real quality management for plugins in the GRAV universe. Babel deserved to be published but not with these heavy glitches. Thatā€™s due to a rather small community compared to Drupal, etc. where Iā€™ve been active in the past as well.

Whatā€™s really needed is kind of a joint effort, you see many vital plugins on Drupal for example that are maintained by a group of developers. Many years ago I even provided the first backup plugin for GRAV which thankfully found its way into admin core.

u

1 Like

I was just wondering as I ate breakfast if thereā€™s a CLI for this plugin, at least for the listing part. I donā€™t mind setting up Admin, not really a massive fan of working in it, and really dislike the YAML it outputs. So I would probably use the output and edit the YAML manually. However, this is just some hypothetical fluent polyglot version of myself in a parallel universe. (I did a joke Australian translation to be used as a demo and for testing translations in a plugin I wrote, but never committed that. Think Steve Irwin, inspired by the ā€œCrikey!ā€ error message.)

I might add a feature request for this if itā€™s not already there.

Iā€™ve done that once or twice. I rediscover them paging through my Github repos.

Good to know. I often wait until I need something, but this could happen soon for each of these plugins. From memory, I think you wrote a Stripe plugin I was interested in once, too.

*sigh*

Iā€™ve been involved in Drupal, not recently though. First tried it around 2002. They did get the community stuff right and IMO that got them through that awful but necessary upgrade about ten years ago. None of the site owners were happy about paying for that and fair enough!

Iā€™ve mostly given up on official contributions to Grav. This forum is where I get the most satisfaction.

So letā€™s do it, letā€™s fall in love :smile: I will invite you as a collaborator for babel. A southern hemisphere guy, working with a northern hemisphere guyā€¦ heavily invited to do some cli stuffā€¦ And no offense taken if youā€™re not eager to accept the invitation.

u

1 Like

Sounds good, thank you. Youā€™ll see me get involved when I have a chance :slight_smile:

@saveva, An exception is thrown when hitting the ā€œIndex Babelā€ button. Exception is thrown by BabelIndexer line 176

$this->index = new PDO('sqlite:'.$this->config['storage'].$indexName);
  • Havenā€™t found anything about the requirement of Sqlite in this thread, or in the README
  • There is no default value in babel.yaml
  • In configuration blueprint, there is no ā€˜storageā€™ entry.
    NB. Many of the variables shown in babel.yaml do not have an equivalent in the blueprint.

If your tests on a clean install of Grav are running well, what might I be overlooking?

this is not loaded from yaml, thatā€™s fixed from Babel class in Babel.php. Will check again but I didnā€™t encounter any problems with this installing from scratch. Will give more feedback next week.

Installed a new GRAV instance via composer and installed admin and babel via composer as well. No problem at all. As I cannot reproduce the problem, did you run this on a fresh installation of GRAV? Whatā€™s the php version you are running on?

Thx.
u

In my opinion, problems encountered with this plugin should also be created as Github issues or discussions :slight_smile:

Agreed, if problem for @pamtbaau is persistent, itā€™s better to attack this as an issue.