4. GlotPress
• GlotPress is a collaborative, web-based software
translation tool
• GlotPress will let you, or an entire team, to translate their
favourite software
• It is as open-source like WordPress is
5. Features
• Different roles: Translators, Validators and Admins
• Translate strings
• Validate strings
• Manage strings by reject/approve them
• Having a glossary with common words
• Import/Export different formats
11. The history
• Started in April 2008 by Nikolay Bachiyski.
• Uses BackPress as a framework.
• And it’s OOP developed.
• March 2013 I started managing GlotPress.
• In 2014 we had our first GSoC project.
13. OOP
• Uses BackPress which has a lot of useful classes (and
functions).
• And we build on top of that our features like routers,
formats and things.
• Those three type of objects always need to extend the
generic class.
• The generic classes have shared functionality or abstract
methods the derived class needs.
14. GP_Thing
• Because of the generic classes we can make our code
more readable.
• You can define in a thing which fields are required to
create a new item.
• A thing is a project, user, translations etc.
• GP_Glossary file has only 42 lines of code and has all
validations in place.
15. The use of functions
• We still use them a lot like WordPress does for in themes.
• A lot of them are copied over from WordPress.
• This is a great thing cause if you are using GlotPress
yourself you can “easily” add a feature to GlotPress
because the hook system is in place.
• And so many other great features you use when building
for WordPress
16. CLI
• GlotPress has a lot of scripts that you can or must use.
• Like adding a new admin is a must due missing user
management. Will have an add user script soon.
• Or things like import/export originals or translations.
• It creates possibilities to build automatic tasks
19. Current Status
downloadable packages
• 141 locales with a wp_locale
• 41 locales are up to date
• 15 locales are still on 4.1
• 8 locales are one major version behind
• 16 locales are behind by two or more major version
• 61 locales don’t have a package
• 40 locales have a language pack
• Oldest version is 2.8.5.
21. For future
• More integrated in the WordPress environment
• Soon it will include all plugins and themes
• Currently ~10.000 plugins are translatable
25. Upcoming features
• Decline with feedback
• User dashboard
• Notifications
• Improved workflow
• New theme
https://github.com/GlotPress/New-Default-Theme
27. Use it yourself
• Using it for your own themes, plugins or projects
• Almost as easy to extend as WordPress
• It has a grunt plugin to download translations easily
28. Grunt
THE JAVASCRIPT TASK RUNNER
http://gruntjs.com
• Running tasks by using CLI
• Easy to use, harder to configure
• Extendable with your own plugins
• Uses npm for plugin management
30. GP_Plugin
• Has a set of useful methods based on your defined id.
• get_option, update_option
• add_action, add_filter
• remove_action, remove_filter
31. The base of your plugin
<?php
class My_First_Plugin extends GP_Plugin {
public $id = 'my-first-plugin';
public function __construct() {
}
}
GP::$plugins->my_first_plugin = new My_First_Plugin;
32. Plugins out there
• https://github.com/Yoast/glotpress-seo
• https://github.com/Yoast/i18n-module
• https://github.com/markoheijnen/GlotPress-APCu-Cache
• https://github.com/markoheijnen/GlotPress-Analytics
• https://github.com/markoheijnen/GlotPress-child-theme
• Private project: GlotPress Updater
36. Tools we use
• We do have a certain amount of Unit tests Travis to run
our unit tests
• https://scrutinizer-ci.com/g/GlotPress/GlotPress/ for
Code quality scans
• https://coveralls.io/ for code coverage history and stats
37. Thank you for listening
Questions?
@markoheijnen
markoheijnen.com