The recent move to Composer for Known (and eventually Known plugins) has given me the opportunity to improve the experience for plugin developers.

Previously, generating a .pot file for languages would require a script in Known’s central language directory. This meant all sorts of “relative path” hijinks in your Gruntfile.js, and was generally bad.

So, I’ve taken this opportunity to package up the script into its own project that can be installed via composer as a development dependency into your plugin project.

How to use

  1. Create your CoolProject, and add your translation string hooks, and load them as described here.
  2. In your project, add known-language-tools as a dependency using composer require mapkyca/known-language-tools --dev
  3. In the project directory you’ll find a Sample.package.json file. Copy this to your project root as package.json and edit accordingly. Note your project name should be the name of your project.
  4. In the project directory, you’ll find a Sample.Gruntfile.js. Again, copy this into your project root.
  5. Create a languages directory
  6. Run the grunt task, grunt build-lang (if grunt isn’t found, npm install --only=dev first.

Hope this is useful to you!

» Visit the project on Github...

Just a quick one, and primarily to help myself out, I put together a very quick and dirty Vagrant wrapper for Elgg development. I found myself repeating myself quite a bit when it comes to putting together build environments, and working with other people, so it made sense to put together a quick vagrant build to help out my team.

This project acts as a wrapper around whatever Elgg site you happen to be developing, and provides a stable install environment based on Ubuntu Xenial, mariadb and PHP 7.0.

I hope it’ll be useful to you!

» Visit the project on Github...

I’ve been doing a lot of development work recently for clients based on Known which involve, among other things, needing to do fairly involved things with data and ACLs.

Because of this, I was finding myself spending a lot of time trying to see what was actually written to entities by looking at the raw database. This was rather time consuming, and because of Known’s (very flexible but abstract) data model, was rather tricky.

So, I took advantage of Known’s console interface (which I fixed and extended in a recent pull request), to start putting together a collection of useful tools. To use, simply symlink to the appropriate directory from within you ConsolePlugins directory.

Be aware that you will need the current latest version of Known core from Github.

» Visit the project on Github...