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