selase
(Selase Krakani)
12 سبتمبر 2025، 6:24م
4
يبدو أن هذا خطأ في كيفية إنشاء flag_reason هنا:
def account_deleted(email, reviewable)
post_action_type_id =
reviewable.reviewable_scores.first&.reviewable_score_type ||
PostActionTypeView.new.types[:spam]
build_email(
email,
template: "user_notifications.account_deleted",
flag_reason: I18n.t("flag_reasons.#{PostActionTypeView.new.types[post_action_type_id]}"),
)
end
PostActionTypeView.new.types لا يتضمن علامة :needs_approval (التي يتم إنشاؤها في التدفق الموصوف). لهذا السبب، ينتقل مفتاح الترجمة إلى flag_reasons. (بدون لاحقة)، مما يؤدي إلى إرجاع قسم YAML بأكمله بدلاً من إدخال واحد. لهذا السبب يوجد تجزئة Ruby بدلاً من سبب العلامة.
flag_reasons:
off_topic: "Your post was flagged as **off-topic**: the community feels it is not a good fit for the topic, as currently defined by the title and the first post."
inappropriate: "Your post was flagged as **inappropriate**: the community feels it is offensive, abusive, to be hateful conduct or a violation of [our community guidelines](%{base_path}/guidelines)."
illegal: "Your post was flagged as **illegal**: the community thinks it might be breaking the law."
spam: "Your post was flagged as **spam**: the community feels it is an advertisement, something that is overly promotional in nature instead of being useful or relevant to the topic as expected."
notify_moderators: "Your post was flagged **for moderator attention**: the community feels something about the post requires manual intervention by a staff member."
responder:
off_topic: "The post was flagged as **off-topic**: the community feels it is not a good fit for the topic, as currently defined by the title and the first post."
inappropriate: "The post was flagged as **inappropriate**: the community feels it is offensive, abusive, to be hateful conduct or a violation of [our community guidelines](%{base_path}/guidelines)."
spam: "The post was flagged as **spam**: the community feels it is an advertisement, something that is overly promotional in nature instead of being useful or relevant to the topic as expected."
notify_moderators: "The post was flagged **for moderator attention**: the community feels something about the post requires manual intervention by a staff member."
وبالمثل، من المحتمل أن يؤثر هذا على العلامات المخصصة أيضًا، حيث ستكون ترجماتها مفقودة أيضًا.
7 إعجابات