mirror of
https://github.com/flarum/framework.git
synced 2024-11-26 10:14:16 +08:00
Merge pull request #1 from dcsjapan/extract-translations
Extract translations
This commit is contained in:
commit
b7925e3242
|
@ -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>
|
||||
];
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue
Block a user