Refactor commands for plugins

Fixes #509
Merge pull request #510 from franckstauffer/i18n

Refactor commands for plugins