discourse/app/assets/javascripts/admin/routes/admin-watched-words-action.js
Robin Ward eab560fe2a
DEV: import I18n instead of global usage (#9768)
Co-authored-by: Mark VanLandingham <markvanlan@gmail.com>
Co-authored-by: Robin Ward <robin.ward@gmail.com>

Co-authored-by: Mark VanLandingham <markvanlan@gmail.com>
2020-05-13 16:23:41 -04:00

21 lines
578 B
JavaScript

import I18n from "I18n";
import EmberObject from "@ember/object";
import DiscourseRoute from "discourse/routes/discourse";
export default DiscourseRoute.extend({
model(params) {
this.controllerFor("adminWatchedWordsAction").set(
"actionNameKey",
params.action_id
);
let filteredContent = this.controllerFor("adminWatchedWordsAction").get(
"filteredContent"
);
return EmberObject.create({
nameKey: params.action_id,
name: I18n.t("admin.watched_words.actions." + params.action_id),
words: filteredContent
});
}
});