Skip to content

A Q&A platform software for teams at any scales. Whether it's a community forum, help center, or knowledge management platform, you can always count on Apache Answer.

Merge branch 'main' into ai_0.3_fix_del

aichy126761944440c94
diff --cc i18n/en_US.yaml
index 2c0908ad,26bef9a4..c3ccf96a
--- a/i18n/en_US.yaml
+++ b/i18n/en_US.yaml
@@@ -1,147 -1,137 +1,137 @@@
- base:
- success:
- other: "Success."
- unknown:
- other: "Unknown error."
- request_format_error:
- other: "Request format is not valid."
- unauthorized_error:
- other: "Unauthorized."
- database_error:
- other: "Data server error."
+ # The following fields are used for back-end
+ backend:
+ base:
+ success:
+ other: "Success."
+ unknown:
+ other: "Unknown error."
+ request_format_error:
+ other: "Request format is not valid."
+ unauthorized_error:
+ other: "Unauthorized."
+ database_error:
+ other: "Data server error."
- email:
- other: "Email"
- password:
- other: "Password"
+ email:
+ other: "Email"
+ password:
+ other: "Password"
- email_or_password_wrong_error: &email_or_password_wrong
- other: "Email and password do not match."
+ email_or_password_wrong_error: &email_or_password_wrong
+ other: "Email and password do not match."
- error:
- admin:
- email_or_password_wrong: *email_or_password_wrong
- answer:
- not_found:
- other: "Answer do not found."
- comment:
- edit_without_permission:
- other: "Comment are not allowed to edit."
- not_found:
- other: "Comment not found."
- email:
- duplicate:
- other: "Email already exists."
- need_to_be_verified:
- other: "Email should be verified."
- verify_url_expired:
- other: "Email verified URL has expired, please resend the email."
- lang:
- not_found:
- other: "Language file not found."
- object:
- captcha_verification_failed:
- other: "Captcha wrong."
- disallow_follow:
- other: "You are not allowed to follow."
- disallow_vote:
- other: "You are not allowed to vote."
- disallow_vote_your_self:
- other: "You can't vote for your own post."
- not_found:
- other: "Object not found."
- verification_failed:
- other: "Verification failed."
- email_or_password_incorrect:
- other: "Email and password do not match."
- old_password_verification_failed:
- other: "The old password verification failed"
- new_password_same_as_previous_setting:
- other: "The new password is the same as the previous one."
- question:
- not_found:
- other: "Question not found."
- rank:
- fail_to_meet_the_condition:
- other: "Rank fail to meet the condition."
- report:
- handle_failed:
- other: "Report handle failed."
- not_found:
- other: "Report not found."
- tag:
- not_found:
- other: "Tag not found."
- recommend_tag_not_found:
- other: "Recommend Tag is not exist."
- not_contain_synonym_tags:
- other: "Should not contain synonym tags."
- theme:
- not_found:
- other: "Theme not found."
- user:
- email_or_password_wrong:
- other: *email_or_password_wrong
- not_found:
- other: "User not found."
- suspended:
- other: "User has been suspended."
- username_invalid:
- other: "Username is invalid."
- username_duplicate:
- other: "Username is already in use."
- set_avatar:
- other: "Avatar set failed."
+error:
+ admin:
+ email_or_password_wrong: *email_or_password_wrong
+ answer:
+ not_found:
+ other: "Answer do not found."
+ cannot_deleted:
+ other: "No permission to delete."
+ comment:
+ edit_without_permission:
+ other: "Comment are not allowed to edit."
+ not_found:
+ other: "Comment not found."
+ email:
+ duplicate:
+ other: "Email already exists."
+ need_to_be_verified:
+ other: "Email should be verified."
+ verify_url_expired:
+ other: "Email verified URL has expired, please resend the email."
+ lang:
+ not_found:
+ other: "Language file not found."
+ object:
+ captcha_verification_failed:
+ other: "Captcha wrong."
+ disallow_follow:
+ other: "You are not allowed to follow."
+ disallow_vote:
+ other: "You are not allowed to vote."
+ disallow_vote_your_self:
+ other: "You can't vote for your own post."
+ not_found:
+ other: "Object not found."
+ verification_failed:
+ other: "Verification failed."
+ email_or_password_incorrect:
+ other: "Email and password do not match."
+ old_password_verification_failed:
+ other: "The old password verification failed"
+ new_password_same_as_previous_setting:
+ other: "The new password is the same as the previous one."
+ question:
+ not_found:
+ other: "Question not found."
+ cannot_deleted:
+ other: "No permission to delete."
+ rank:
+ fail_to_meet_the_condition:
+ other: "Rank fail to meet the condition."
+ report:
+ handle_failed:
+ other: "Report handle failed."
+ not_found:
+ other: "Report not found."
+ tag:
+ not_found:
+ other: "Tag not found."
+ theme:
+ not_found:
+ other: "Theme not found."
+ user:
+ email_or_password_wrong:
+ other: *email_or_password_wrong
+ not_found:
+ other: "User not found."
+ suspended:
+ other: "User has been suspended."
+ username_invalid:
+ other: "Username is invalid."
+ username_duplicate:
+ other: "Username is already in use."
+ set_avatar:
+ other: "Avatar set failed."
- report:
- spam:
- name:
- other: "spam"
- description:
- other: "This post is an advertisement, or vandalism. It is not useful or relevant to the current topic."
- rude:
- name:
- other: "rude or abusive"
- description:
- other: "A reasonable person would find this content inappropriate for respectful discourse."
- duplicate:
- name:
- other: "a duplicate"
- description:
- other: "This question has been asked before and already has an answer."
- not_answer:
- name:
- other: "not an answer"
- description:
- other: "This was posted as an answer, but it does not attempt to answer the question. It should possibly be an edit, a comment, another question, or deleted altogether."
- not_need:
- name:
- other: "no longer needed"
- description:
- other: "This comment is outdated, conversational or not relevant to this post."
- other:
- name:
- other: "something else"
- description:
- other: "This post requires staff attention for another reason not listed above."
-
- question:
- close:
- duplicate:
+ config:
+ read_config_failed:
+ other: "Read config failed"
+ database:
+ connection_failed:
+ other: "Database connection failed"
+ create_table_failed:
+ other: "Create table failed"
+ install:
+ create_config_failed:
+ other: "Can’t create the config.yaml file."
+ report:
+ spam:
name:
other: "spam"
+ description:
+ other: "This post is an advertisement, or vandalism. It is not useful or relevant to the current topic."
+ rude:
+ name:
+ other: "rude or abusive"
+ description:
+ other: "A reasonable person would find this content inappropriate for respectful discourse."
+ duplicate:
+ name:
+ other: "a duplicate"
description:
other: "This question has been asked before and already has an answer."
- guideline:
+ not_answer:
name:
- other: "a community-specific reason"
+ other: "not an answer"
description:
- other: "This question doesn't meet a community guideline."
- multiple:
+ other: "This was posted as an answer, but it does not attempt to answer the question. It should possibly be an edit, a comment, another question, or deleted altogether."
+ not_need:
name:
- other: "needs details or clarity"
+ other: "no longer needed"
description:
- other: "This question currently includes multiple questions in one. It should focus on one problem only."
+ other: "This comment is outdated, conversational or not relevant to this post."
other:
name:
other: "something else"
diff --cc internal/base/reason/reason.go
index 68051269,23e7bae2..7ac8f556
--- a/internal/base/reason/reason.go
+++ b/internal/base/reason/reason.go
@@@ -14,12 -14,10 +14,12 @@@ const
)
const (
- EmailOrPasswordWrong = "error.user.email_or_password_wrong"
+ EmailOrPasswordWrong = "error.object.email_or_password_incorrect"
CommentNotFound = "error.comment.not_found"
QuestionNotFound = "error.question.not_found"
+ QuestionCannotDeleted = "error.question.cannot_deleted"
AnswerNotFound = "error.answer.not_found"
+ AnswerCannotDeleted = "error.answer.cannot_deleted"
CommentEditWithoutPermission = "error.comment.edit_without_permission"
DisallowVote = "error.object.disallow_vote"
DisallowFollow = "error.object.disallow_follow"