2019-11-05 13:43:49 -05:00
|
|
|
import Helper from "@ember/component/helper";
|
2020-05-13 16:23:41 -04:00
|
|
|
import I18n from "I18n";
|
2019-11-05 13:43:49 -05:00
|
|
|
|
2017-10-17 13:31:45 -04:00
|
|
|
function postActionTitle([id, nameKey]) {
|
|
|
|
let title = I18n.t(`admin.flags.short_names.${nameKey}`, {
|
|
|
|
defaultValue: null,
|
|
|
|
});
|
|
|
|
|
|
|
|
// TODO: We can remove this once other translations have been updated
|
|
|
|
if (!title) {
|
|
|
|
return I18n.t(`admin.flags.summary.action_type_${id}`, { count: 1 });
|
|
|
|
}
|
|
|
|
|
|
|
|
return title;
|
|
|
|
}
|
|
|
|
|
2019-11-05 13:43:49 -05:00
|
|
|
export default Helper.helper(postActionTitle);
|