Merge pull request #1 from dcsjapan/extract-translations

Extract translations
This commit is contained in:
Toby Zerner 2015-11-29 17:06:47 +10:30
commit b7925e3242
2 changed files with 4 additions and 4 deletions

View File

@ -6,13 +6,13 @@ export default class AkismetSettingsModal extends SettingsModal {
}
title() {
return 'Akismet Settings';
return app.translator.trans('flarum-akismet.admin.akismet_settings.title');
}
form() {
return [
<div className="Form-group">
<label>API Key</label>
<label>{app.translator.trans('flarum-akismet.admin.akismet_settings.api_key_label')}</label>
<input className="FormControl" bidi={this.setting('flarum-akismet.api_key')}/>
</div>
];

View File

@ -10,14 +10,14 @@ app.initializers.add('flarum-akismet', () => {
const flags = post.flags();
if (flags && flags.some(flag => flag.type() === 'akismet')) {
items.get('approve').props.children = 'Not Spam';
items.get('approve').props.children = app.translator.trans('flarum-akismet.forum.post.not_spam_button');
}
}
});
override(CommentPost.prototype, 'flagReason', function(original, flag) {
if (flag.type() === 'akismet') {
return 'Akismet flagged as Spam';
return app.translator.trans('flarum-akismet.forum.post.akismet_flagged_text');
}
return original(flag);