From 4d3df2eaf79afbce856afae0deb39f830e6a68b9 Mon Sep 17 00:00:00 2001 From: dcsjapan Date: Sun, 29 Nov 2015 15:01:42 +0900 Subject: [PATCH] Extract translations - Adds app.translator calls for forum and admin interfaces. - Locale file to follow later. --- .../akismet/js/admin/src/components/AkismetSettingsModal.js | 4 ++-- extensions/akismet/js/forum/src/main.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/extensions/akismet/js/admin/src/components/AkismetSettingsModal.js b/extensions/akismet/js/admin/src/components/AkismetSettingsModal.js index 3e1854c25..d0bac73b0 100644 --- a/extensions/akismet/js/admin/src/components/AkismetSettingsModal.js +++ b/extensions/akismet/js/admin/src/components/AkismetSettingsModal.js @@ -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 [
- +
]; diff --git a/extensions/akismet/js/forum/src/main.js b/extensions/akismet/js/forum/src/main.js index 607cc2768..c3f07fc06 100644 --- a/extensions/akismet/js/forum/src/main.js +++ b/extensions/akismet/js/forum/src/main.js @@ -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);