우선순위/심각도 : 일반
플랫폼 : 전체
설명 : temporarily_closed_due_to_flags 알림이 서버의 로케일 대신에 생성되고 있습니다.
재현 단계 :
토픽을 생성하고
서버 로케일과 다른 로케일 설정을 가진 많은 사용자가 해당 토픽의 게시물을 플래그하도록 합니다. 그러면
@system이 생성하는 temporarily_closed_due_to_flags 알림(en_US 로케일에서 "This topic is temporarily closed for at least %{count} hour due to a large number of community flags."로 표시됨)이 서버의 로케일이 아닌 사용자의 로케일로 생성됩니다.
이 커밋에서 수정된 내용과 유사합니다.
committed 02:40PM - 17 Aug 20 UTC
Previously it was created with the locale of the user who created the final post… in the topic
아래 코드를 변경하면 수정될 것이라고 생각합니다.
# the threshold has been reached, we will close the topic waiting for intervention
topic.update_status(
"closed",
true,
Discourse.system_user,
message:
I18n.t("temporarily_closed_due_to_flags", count: SiteSetting.num_hours_to_close_topic),
)
1개의 좋아요
sam
(Sam Saffron)
8월 31, 2025, 11:38오후
2
네, 좋은 지적입니다. 아마도 마지막 플래거의 컨텍스트에서 실행되고 있는 것이지, 서버의 로컬라이제이션 컨텍스트는 아닌 것 같습니다.
간단하게:
locale: SiteSetting.default_locale
을 추가하면 해결됩니다.
몇 주 안에 이 문제를 해결할 예정입니다.
이 버그를 보고해 주셔서 감사합니다. 해당 PR에서 수정되었습니다
main ← default-locale-temporarily-close-flag
merged 07:34AM - 13 Oct 25 UTC
When a topic is automatically closed due to flags, the system message should alw… ays use the site's default locale rather than the current user's locale to ensure consistency for all users viewing the topic.
https://meta.discourse.org/t/temporarily-closed-due-to-flags-notice-not-in-servers-locale/381000/1
2개의 좋아요
이 주제는 4일 후 자동으로 닫혔습니다. 더 이상 답변을 할 수 없습니다.