Add English locale template to extension stub

This commit is contained in:
Toby Zerner 2015-06-11 18:45:31 +09:30
parent 0ca7003a35
commit 65df4c3a33
2 changed files with 12 additions and 1 deletions

View File

@ -0,0 +1,2 @@
{{name}}:
# hello_world: Hello, world!

View File

@ -2,6 +2,8 @@
use Flarum\Support\ServiceProvider; use Flarum\Support\ServiceProvider;
use Flarum\Extend\ForumAssets; use Flarum\Extend\ForumAssets;
use Flarum\Extend\Locale;
use Flarum\Extend\ForumTranslations;
class {{classPrefix}}ServiceProvider extends ServiceProvider class {{classPrefix}}ServiceProvider extends ServiceProvider
{ {
@ -16,7 +18,14 @@ class {{classPrefix}}ServiceProvider extends ServiceProvider
new ForumAssets([ new ForumAssets([
__DIR__.'/../js/dist/extension.js', __DIR__.'/../js/dist/extension.js',
__DIR__.'/../less/extension.less' __DIR__.'/../less/extension.less'
]) ]),
(new Locale('en'))->translations(__DIR__.'/../locale/en.yml'),
new ForumTranslations([
// Add the keys of translations you would like to be available
// for use by the JS client application.
]),
); );
} }