Add missing translation for the reason flag (#30)

This commit is contained in:
Lucas Fernandes 2021-10-25 14:56:17 -03:00 committed by GitHub
parent 62345237ac
commit bae89a2f44

View File

@ -104,7 +104,7 @@ export default function() {
Post.prototype.flagReason = function(flag) {
if (flag.type() === 'user') {
const user = flag.user();
const reason = flag.reason();
const reason = flag.reason() ? app.translator.trans(`flarum-flags.forum.flag_post.reason_${flag.reason()}_label`) : null;
const detail = flag.reasonDetail();
const time = humanTime(flag.createdAt());