diff --git a/Makefile b/Makefile
index 9cda2f5ed..8279d17a4 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
.PHONY: build clean ui
-VERSION=1.3.6
+VERSION=1.4.0
BIN=answer
DIR_SRC=./cmd/answer
DOCKER_CMD=docker
@@ -8,7 +8,7 @@ DOCKER_CMD=docker
GO_ENV=CGO_ENABLED=0 GO111MODULE=on
Revision=$(shell git rev-parse --short HEAD 2>/dev/null || echo "")
GO_FLAGS=-ldflags="-X github.com/apache/incubator-answer/cmd.Version=$(VERSION) -X 'github.com/apache/incubator-answer/cmd.Revision=$(Revision)' -X 'github.com/apache/incubator-answer/cmd.Time=`date +%s`' -extldflags -static"
-GO=$(GO_ENV) $(shell which go)
+GO=$(GO_ENV) "$(shell which go)"
build: generate
@$(GO) build $(GO_FLAGS) -o $(BIN) $(DIR_SRC)
@@ -23,6 +23,8 @@ universal: generate
generate:
@$(GO) get github.com/google/wire/cmd/wire@v0.5.0
@$(GO) get github.com/golang/mock/mockgen@v1.6.0
+ @$(GO) get github.com/swaggo/swag/cmd/swag@v1.16.3
+ @$(GO) install github.com/swaggo/swag/cmd/swag@v1.16.3
@$(GO) install github.com/google/wire/cmd/wire@v0.5.0
@$(GO) install github.com/golang/mock/mockgen@v1.6.0
@$(GO) generate ./...
diff --git a/README.md b/README.md
index 0894a413e..7d7538050 100644
--- a/README.md
+++ b/README.md
@@ -23,7 +23,7 @@ To learn more about the project, visit [answer.apache.org](https://answer.apache
### Running with docker
```bash
-docker run -d -p 9080:80 -v answer-data:/data --name answer apache/answer:1.3.6
+docker run -d -p 9080:80 -v answer-data:/data --name answer apache/answer:1.4.0
```
For more information, see [Installation](https://answer.apache.org/docs/installation).
diff --git a/charts/templates/pvc.yaml b/charts/templates/pvc.yaml
index 5dfab8fca..640fb9fe0 100644
--- a/charts/templates/pvc.yaml
+++ b/charts/templates/pvc.yaml
@@ -20,7 +20,7 @@ kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: {{ include "answer.fullname" . }}-claim
- {{- with .Values.persistence.annotations }}
+ {{- with .Values.persistence.annotations }}
annotations:
{{ toYaml . | indent 4 }}
{{- end }}
@@ -39,4 +39,10 @@ spec:
resources:
requests:
storage: {{ .Values.persistence.size | quote }}
+ {{- with .Values.persistence.dataSource }}
+ dataSource:
+ name: {{ .name }}
+ kind: {{ .kind | default "VolumeSnapshot" }}
+ apiGroup: {{ .apiGroup | default "snapshot.storage.k8s.io" }}
+ {{- end }}
{{- end }}
\ No newline at end of file
diff --git a/charts/values.yaml b/charts/values.yaml
index 8bb36c46f..d932db848 100644
--- a/charts/values.yaml
+++ b/charts/values.yaml
@@ -68,7 +68,7 @@ env:
# Configure extra containers
extraContainers: []
- # - name: cloudsql-proxy
+ # - name: cloudsql-proxy
# image: gcr.io/cloud-sql-connectors/cloud-sql-proxy:2.1.2
# command:
# - /cloud-sql-proxy
@@ -91,6 +91,12 @@ persistence:
accessMode: ReadWriteOnce
size: 5Gi
annotations: {}
+ # To restore a PVC from a VolumeSnapshot, set the dataSource;
+ # the kind and apiGroup are optional and default to the shown values
+ dataSource: {}
+ # name: my-volume-snapshot
+ # kind: VolumeSnapshot
+ # apiGroup: snapshot.storage.k8s.io
imagePullSecrets: []
nameOverride: ""
diff --git a/cmd/answer/main.go b/cmd/answer/main.go
index ae1147090..fb91f5942 100644
--- a/cmd/answer/main.go
+++ b/cmd/answer/main.go
@@ -17,12 +17,19 @@
* under the License.
*/
+//go:generate go run github.com/swaggo/swag/cmd/swag init -g ./cmd/answer/main.go -d ../../ -o ../../docs
+
package main
import (
answercmd "github.com/apache/incubator-answer/cmd"
)
+// main godoc
+// @title "apache answer"
+// @description = "apache answer api"
+// @version = "v0.0.1"
+// @BasePath = "/"
// @securityDefinitions.apikey ApiKeyAuth
// @in header
// @name Authorization
diff --git a/cmd/command.go b/cmd/command.go
index b8d9c5611..65710e6b4 100644
--- a/cmd/command.go
+++ b/cmd/command.go
@@ -263,12 +263,17 @@ To run answer, use:
}
field := &cli.ConfigField{}
- for _, f := range configFields {
- switch f {
+ fmt.Println(configFields)
+ if len(configFields) > 0 {
+ switch configFields[0] {
case "allow_password_login":
field.AllowPasswordLogin = true
+ case "deactivate_plugin":
+ if len(configFields) > 1 {
+ field.DeactivatePluginSlugName = configFields[1]
+ }
default:
- fmt.Printf("field %s not support\n", f)
+ fmt.Printf("field %s not support\n", configFields[0])
}
}
err = cli.SetDefaultConfig(c.Data.Database, c.Data.Cache, field)
diff --git a/cmd/wire_gen.go b/cmd/wire_gen.go
index 4928a122b..d18355e3a 100644
--- a/cmd/wire_gen.go
+++ b/cmd/wire_gen.go
@@ -40,6 +40,9 @@ import (
"github.com/apache/incubator-answer/internal/repo/activity_common"
"github.com/apache/incubator-answer/internal/repo/answer"
"github.com/apache/incubator-answer/internal/repo/auth"
+ "github.com/apache/incubator-answer/internal/repo/badge"
+ "github.com/apache/incubator-answer/internal/repo/badge_award"
+ "github.com/apache/incubator-answer/internal/repo/badge_group"
"github.com/apache/incubator-answer/internal/repo/captcha"
"github.com/apache/incubator-answer/internal/repo/collection"
"github.com/apache/incubator-answer/internal/repo/comment"
@@ -71,6 +74,7 @@ import (
"github.com/apache/incubator-answer/internal/service/activity_queue"
"github.com/apache/incubator-answer/internal/service/answer_common"
auth2 "github.com/apache/incubator-answer/internal/service/auth"
+ badge2 "github.com/apache/incubator-answer/internal/service/badge"
collection2 "github.com/apache/incubator-answer/internal/service/collection"
"github.com/apache/incubator-answer/internal/service/collection_common"
comment2 "github.com/apache/incubator-answer/internal/service/comment"
@@ -78,6 +82,7 @@ import (
config2 "github.com/apache/incubator-answer/internal/service/config"
"github.com/apache/incubator-answer/internal/service/content"
"github.com/apache/incubator-answer/internal/service/dashboard"
+ "github.com/apache/incubator-answer/internal/service/event_queue"
export2 "github.com/apache/incubator-answer/internal/service/export"
"github.com/apache/incubator-answer/internal/service/follow"
meta2 "github.com/apache/incubator-answer/internal/service/meta"
@@ -172,7 +177,8 @@ func initApplication(debug bool, serverConf *conf.Server, dbConf *data.Database,
metaRepo := meta.NewMetaRepo(dataData)
metaCommonService := metacommon.NewMetaCommonService(metaRepo)
questionCommon := questioncommon.NewQuestionCommon(questionRepo, answerRepo, voteRepo, followRepo, tagCommonService, userCommon, collectionCommon, answerCommon, metaCommonService, configService, activityQueueService, revisionRepo, dataData)
- userService := content.NewUserService(userRepo, userActiveActivityRepo, activityRepo, emailService, authService, siteInfoCommonService, userRoleRelService, userCommon, userExternalLoginService, userNotificationConfigRepo, userNotificationConfigService, questionCommon)
+ eventQueueService := event_queue.NewEventQueueService()
+ userService := content.NewUserService(userRepo, userActiveActivityRepo, activityRepo, emailService, authService, siteInfoCommonService, userRoleRelService, userCommon, userExternalLoginService, userNotificationConfigRepo, userNotificationConfigService, questionCommon, eventQueueService)
captchaRepo := captcha.NewCaptchaRepo(dataData)
captchaService := action.NewCaptchaService(captchaRepo)
userController := controller.NewUserController(authService, userService, captchaService, emailService, siteInfoCommonService, userNotificationConfigService)
@@ -181,7 +187,7 @@ func initApplication(debug bool, serverConf *conf.Server, dbConf *data.Database,
objService := object_info.NewObjService(answerRepo, questionRepo, commentCommonRepo, tagCommonRepo, tagCommonService)
notificationQueueService := notice_queue.NewNotificationQueueService()
externalNotificationQueueService := notice_queue.NewNewQuestionNotificationQueueService()
- commentService := comment2.NewCommentService(commentRepo, commentCommonRepo, userCommon, objService, voteRepo, emailService, userRepo, notificationQueueService, externalNotificationQueueService, activityQueueService)
+ commentService := comment2.NewCommentService(commentRepo, commentCommonRepo, userCommon, objService, voteRepo, emailService, userRepo, notificationQueueService, externalNotificationQueueService, activityQueueService, eventQueueService)
rolePowerRelRepo := role.NewRolePowerRelRepo(dataData)
rolePowerRelService := role2.NewRolePowerRelService(rolePowerRelRepo, userRoleRelService)
rankService := rank2.NewRankService(userCommon, userRankRepo, objService, userRoleRelService, rolePowerRelService, configService)
@@ -189,20 +195,20 @@ func initApplication(debug bool, serverConf *conf.Server, dbConf *data.Database,
rateLimitMiddleware := middleware.NewRateLimitMiddleware(limitRepo)
commentController := controller.NewCommentController(commentService, rankService, captchaService, rateLimitMiddleware)
reportRepo := report.NewReportRepo(dataData, uniqueIDRepo)
+ tagService := tag2.NewTagService(tagRepo, tagCommonService, revisionService, followRepo, siteInfoCommonService, activityQueueService)
answerActivityRepo := activity.NewAnswerActivityRepo(dataData, activityRepo, userRankRepo, notificationQueueService)
answerActivityService := activity2.NewAnswerActivityService(answerActivityRepo, configService)
externalNotificationService := notification.NewExternalNotificationService(dataData, userNotificationConfigRepo, followRepo, emailService, userRepo, externalNotificationQueueService, userExternalLoginRepo, siteInfoCommonService)
reviewRepo := review.NewReviewRepo(dataData)
reviewService := review2.NewReviewService(reviewRepo, objService, userCommon, userRepo, questionRepo, answerRepo, userRoleRelService, externalNotificationQueueService, tagCommonService, questionCommon, notificationQueueService, siteInfoCommonService)
- questionService := content.NewQuestionService(questionRepo, answerRepo, tagCommonService, questionCommon, userCommon, userRepo, userRoleRelService, revisionService, metaCommonService, collectionCommon, answerActivityService, emailService, notificationQueueService, externalNotificationQueueService, activityQueueService, siteInfoCommonService, externalNotificationService, reviewService, configService)
- answerService := content.NewAnswerService(answerRepo, questionRepo, questionCommon, userCommon, collectionCommon, userRepo, revisionService, answerActivityService, answerCommon, voteRepo, emailService, userRoleRelService, notificationQueueService, externalNotificationQueueService, activityQueueService, reviewService)
+ questionService := content.NewQuestionService(activityRepo, questionRepo, answerRepo, tagCommonService, tagService, questionCommon, userCommon, userRepo, userRoleRelService, revisionService, metaCommonService, collectionCommon, answerActivityService, emailService, notificationQueueService, externalNotificationQueueService, activityQueueService, siteInfoCommonService, externalNotificationService, reviewService, configService, eventQueueService)
+ answerService := content.NewAnswerService(answerRepo, questionRepo, questionCommon, userCommon, collectionCommon, userRepo, revisionService, answerActivityService, answerCommon, voteRepo, emailService, userRoleRelService, notificationQueueService, externalNotificationQueueService, activityQueueService, reviewService, eventQueueService)
reportHandle := report_handle.NewReportHandle(questionService, answerService, commentService)
- reportService := report2.NewReportService(reportRepo, objService, userCommon, answerRepo, questionRepo, commentCommonRepo, reportHandle, configService)
+ reportService := report2.NewReportService(reportRepo, objService, userCommon, answerRepo, questionRepo, commentCommonRepo, reportHandle, configService, eventQueueService)
reportController := controller.NewReportController(reportService, rankService, captchaService)
contentVoteRepo := activity.NewVoteRepo(dataData, activityRepo, userRankRepo, notificationQueueService)
- voteService := content.NewVoteService(contentVoteRepo, configService, questionRepo, answerRepo, commentCommonRepo, objService)
+ voteService := content.NewVoteService(contentVoteRepo, configService, questionRepo, answerRepo, commentCommonRepo, objService, eventQueueService)
voteController := controller.NewVoteController(voteService, rankService, captchaService)
- tagService := tag2.NewTagService(tagRepo, tagCommonService, revisionService, followRepo, siteInfoCommonService, activityQueueService)
tagController := controller.NewTagController(tagService, tagCommonService, rankService)
followFollowRepo := activity.NewFollowRepo(dataData, uniqueIDRepo, activityRepo)
followService := follow.NewFollowService(followFollowRepo, followRepo, tagCommonRepo)
@@ -232,7 +238,8 @@ func initApplication(debug bool, serverConf *conf.Server, dbConf *data.Database,
controllerSiteInfoController := controller.NewSiteInfoController(siteInfoCommonService)
notificationRepo := notification2.NewNotificationRepo(dataData)
notificationCommon := notificationcommon.NewNotificationCommon(dataData, notificationRepo, userCommon, activityRepo, followRepo, objService, notificationQueueService, userExternalLoginRepo, siteInfoCommonService)
- notificationService := notification.NewNotificationService(dataData, notificationRepo, notificationCommon, revisionService, userRepo, reportRepo, reviewService)
+ badgeRepo := badge.NewBadgeRepo(dataData, uniqueIDRepo)
+ notificationService := notification.NewNotificationService(dataData, notificationRepo, notificationCommon, revisionService, userRepo, reportRepo, reviewService, badgeRepo)
notificationController := controller.NewNotificationController(notificationService, rankService)
dashboardService := dashboard.NewDashboardService(questionRepo, answerRepo, commentCommonRepo, voteRepo, userRepo, reportRepo, configService, siteInfoCommonService, serviceConf, reviewService, revisionRepo, dataData)
dashboardController := controller.NewDashboardController(dashboardService)
@@ -251,23 +258,32 @@ func initApplication(debug bool, serverConf *conf.Server, dbConf *data.Database,
permissionController := controller.NewPermissionController(rankService)
userPluginController := controller.NewUserPluginController(pluginCommonService)
reviewController := controller.NewReviewController(reviewService, rankService, captchaService)
- metaService := meta2.NewMetaService(metaCommonService, userCommon, answerRepo, questionRepo)
+ metaService := meta2.NewMetaService(metaCommonService, userCommon, answerRepo, questionRepo, eventQueueService)
metaController := controller.NewMetaController(metaService)
- answerAPIRouter := router.NewAnswerAPIRouter(langController, userController, commentController, reportController, voteController, tagController, followController, collectionController, questionController, answerController, searchController, revisionController, rankController, userAdminController, reasonController, themeController, siteInfoController, controllerSiteInfoController, notificationController, dashboardController, uploadController, activityController, roleController, pluginController, permissionController, userPluginController, reviewController, metaController)
+ badgeGroupRepo := badge_group.NewBadgeGroupRepo(dataData, uniqueIDRepo)
+ badgeAwardRepo := badge_award.NewBadgeAwardRepo(dataData, uniqueIDRepo)
+ eventRuleRepo := badge.NewEventRuleRepo(dataData)
+ badgeAwardService := badge2.NewBadgeAwardService(badgeAwardRepo, badgeRepo, userCommon, objService, notificationQueueService)
+ badgeEventService := badge2.NewBadgeEventService(dataData, eventQueueService, badgeRepo, eventRuleRepo, badgeAwardService)
+ badgeService := badge2.NewBadgeService(badgeRepo, badgeGroupRepo, badgeAwardRepo, badgeEventService)
+ badgeController := controller.NewBadgeController(badgeService, badgeAwardService)
+ controller_adminBadgeController := controller_admin.NewBadgeController(badgeService)
+ answerAPIRouter := router.NewAnswerAPIRouter(langController, userController, commentController, reportController, voteController, tagController, followController, collectionController, questionController, answerController, searchController, revisionController, rankController, userAdminController, reasonController, themeController, siteInfoController, controllerSiteInfoController, notificationController, dashboardController, uploadController, activityController, roleController, pluginController, permissionController, userPluginController, reviewController, metaController, badgeController, controller_adminBadgeController)
swaggerRouter := router.NewSwaggerRouter(swaggerConf)
uiRouter := router.NewUIRouter(controllerSiteInfoController, siteInfoCommonService)
authUserMiddleware := middleware.NewAuthUserMiddleware(authService, siteInfoCommonService)
avatarMiddleware := middleware.NewAvatarMiddleware(serviceConf, uploaderService)
shortIDMiddleware := middleware.NewShortIDMiddleware(siteInfoCommonService)
templateRenderController := templaterender.NewTemplateRenderController(questionService, userService, tagService, answerService, commentService, siteInfoCommonService, questionRepo)
- templateController := controller.NewTemplateController(templateRenderController, siteInfoCommonService)
+ templateController := controller.NewTemplateController(templateRenderController, siteInfoCommonService, eventQueueService, userService)
templateRouter := router.NewTemplateRouter(templateController, templateRenderController, siteInfoController, authUserMiddleware)
connectorController := controller.NewConnectorController(siteInfoCommonService, emailService, userExternalLoginService)
userCenterLoginService := user_external_login2.NewUserCenterLoginService(userRepo, userCommon, userExternalLoginRepo, userActiveActivityRepo, siteInfoCommonService)
userCenterController := controller.NewUserCenterController(userCenterLoginService, siteInfoCommonService)
captchaController := controller.NewCaptchaController()
embedController := controller.NewEmbedController()
- pluginAPIRouter := router.NewPluginAPIRouter(connectorController, userCenterController, captchaController, embedController)
+ renderController := controller.NewRenderController()
+ pluginAPIRouter := router.NewPluginAPIRouter(connectorController, userCenterController, captchaController, embedController, renderController)
ginEngine := server.NewHTTPServer(debug, staticRouter, answerAPIRouter, swaggerRouter, uiRouter, authUserMiddleware, avatarMiddleware, shortIDMiddleware, templateRouter, pluginAPIRouter, uiConf)
scheduledTaskManager := cron.NewScheduledTaskManager(siteInfoCommonService, questionService)
application := newApplication(serverConf, ginEngine, scheduledTaskManager)
diff --git a/dev/i18n/zh_CN.yaml b/dev/i18n/zh_CN.yaml
deleted file mode 100644
index 6613bfc22..000000000
--- a/dev/i18n/zh_CN.yaml
+++ /dev/null
@@ -1,2035 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-# The following fields are used for back-end
-backend:
- base:
- success:
- other: 成功。
- unknown:
- other: 未知错误。
- request_format_error:
- other: 请求格式错误。
- unauthorized_error:
- other: 未授权。
- database_error:
- other: 数据服务器错误。
- forbidden_error:
- other: 禁止访问。
- duplicate_request_error:
- other: 重复提交。
- action:
- report:
- other: 举报
- edit:
- other: 编辑
- delete:
- other: 删除
- close:
- other: 关闭
- reopen:
- other: 重新打开
- forbidden_error:
- other: 禁止访问。
- pin:
- other: 置顶
- hide:
- other: 列表隐藏
- unpin:
- other: 取消置顶
- show:
- other: 列表显示
- invite_someone_to_answer:
- other: 编辑
- undelete:
- other: 撤消删除
- role:
- name:
- user:
- other: 用户
- admin:
- other: 管理员
- moderator:
- other: 版主
- description:
- user:
- other: 默认没有特殊权限。
- admin:
- other: 拥有管理网站的全部权限。
- moderator:
- other: 拥有除访问后台管理以外的所有权限。
- privilege:
- level_1:
- description:
- other: 级别 1(少量声望要求,适合私有团队、群组)
- level_2:
- description:
- other: 级别 2(低声望要求,适合初启动的社区)
- level_3:
- description:
- other: 级别 3(高声望要求,适合成熟的社区)
- level_custom:
- description:
- other: 自定义等级
- rank_question_add_label:
- other: 提问
- rank_answer_add_label:
- other: 写答案
- rank_comment_add_label:
- other: 写评论
- rank_report_add_label:
- other: 举报
- rank_comment_vote_up_label:
- other: 点赞评论
- rank_link_url_limit_label:
- other: 每次发布超过 2 个链接
- rank_question_vote_up_label:
- other: 点赞问题
- rank_answer_vote_up_label:
- other: 点赞答案
- rank_question_vote_down_label:
- other: 点踩问题
- rank_answer_vote_down_label:
- other: 点踩答案
- rank_invite_someone_to_answer_label:
- other: 邀请回答
- rank_tag_add_label:
- other: 创建新标签
- rank_tag_edit_label:
- other: 编辑标签描述(需要审核)
- rank_question_edit_label:
- other: 编辑别人的问题(需要审核)
- rank_answer_edit_label:
- other: 编辑别人的答案(需要审核)
- rank_question_edit_without_review_label:
- other: 编辑别人的问题无需审核
- rank_answer_edit_without_review_label:
- other: 编辑别人的答案无需审核
- rank_question_audit_label:
- other: 审核问题编辑
- rank_answer_audit_label:
- other: 审核回答编辑
- rank_tag_audit_label:
- other: 审核标签编辑
- rank_tag_edit_without_review_label:
- other: 编辑标签描述无需审核
- rank_tag_synonym_label:
- other: 管理标签同义词
- email:
- other: 邮箱
- e_mail:
- other: 邮箱
- password:
- other: 密码
- pass:
- other: 密码
- original_text:
- other: 本帖
- email_or_password_wrong_error:
- other: 邮箱和密码不匹配。
- error:
- common:
- invalid_url:
- other: 无效的 URL。
- password:
- space_invalid:
- other: 密码不得含有空格。
- admin:
- cannot_update_their_password:
- other: 你无法修改自己的密码。
- cannot_edit_their_profile:
- other: 您不能修改您的个人资料。
- cannot_modify_self_status:
- other: 你无法修改自己的状态。
- email_or_password_wrong:
- other: 邮箱和密码不匹配。
- answer:
- not_found:
- other: 没有找到答案。
- cannot_deleted:
- other: 没有删除权限。
- cannot_update:
- other: 没有更新权限。
- question_closed_cannot_add:
- other: 问题已关闭,无法添加。
- comment:
- edit_without_permission:
- other: 不允许编辑评论。
- not_found:
- other: 评论未找到。
- cannot_edit_after_deadline:
- other: 评论时间太久,无法修改。
- email:
- duplicate:
- other: 邮箱已存在。
- need_to_be_verified:
- other: 邮箱需要验证。
- verify_url_expired:
- other: 邮箱验证的网址已过期,请重新发送邮件。
- illegal_email_domain_error:
- other: 此邮箱不在允许注册的邮箱域中。请使用其他邮箱尝试。
- lang:
- not_found:
- other: 语言文件未找到。
- object:
- captcha_verification_failed:
- other: 验证码错误。
- disallow_follow:
- other: 你不能关注。
- disallow_vote:
- other: 你不能投票。
- disallow_vote_your_self:
- other: 你不能为自己的帖子投票。
- not_found:
- other: 对象未找到。
- verification_failed:
- other: 验证失败。
- email_or_password_incorrect:
- other: 邮箱和密码不匹配。
- old_password_verification_failed:
- other: 旧密码验证失败。
- new_password_same_as_previous_setting:
- other: 新密码和旧密码相同。
- already_deleted:
- other: 该帖子已被删除。
- meta:
- object_not_found:
- other: Meta 对象未找到
- question:
- already_deleted:
- other: 该帖子已被删除。
- under_review:
- other: 您的帖子正在等待审核。它将在它获得批准后可见。
- not_found:
- other: 问题未找到。
- cannot_deleted:
- other: 没有删除权限。
- cannot_close:
- other: 没有关闭权限。
- cannot_update:
- other: 没有更新权限。
- rank:
- fail_to_meet_the_condition:
- other: 声望值未达到要求。
- vote_fail_to_meet_the_condition:
- other: 感谢投票。你至少需要 {{.Rank}} 声望才能投票。
- no_enough_rank_to_operate:
- other: 你至少需要 {{.Rank}} 声望才能执行此操作。
- report:
- handle_failed:
- other: 报告处理失败。
- not_found:
- other: 报告未找到。
- tag:
- already_exist:
- other: 标签已存在。
- not_found:
- other: 标签未找到。
- recommend_tag_not_found:
- other: 推荐标签不存在。
- recommend_tag_enter:
- other: 请选择至少一个必选标签。
- not_contain_synonym_tags:
- other: 不应包含同义词标签。
- cannot_update:
- other: 没有更新权限。
- is_used_cannot_delete:
- other: 你不能删除这个正在使用的标签。
- cannot_set_synonym_as_itself:
- other: 你不能将当前标签设为自己的同义词。
- smtp:
- config_from_name_cannot_be_email:
- other: 发件人名称不能是邮箱地址。
- theme:
- not_found:
- other: 主题未找到。
- revision:
- review_underway:
- other: 目前无法编辑,有一个版本在审阅队列中。
- no_permission:
- other: 无权限修改。
- user:
- external_login_missing_user_id:
- other: 第三方平台没有提供唯一的 UserID,所以你不能登录,请联系网站管理员。
- external_login_unbinding_forbidden:
- other: 请在移除此登录之前为你的账户设置登录密码。
- email_or_password_wrong:
- other:
- other: 邮箱和密码不匹配。
- not_found:
- other: 用户未找到。
- suspended:
- other: 用户已被封禁。
- username_invalid:
- other: 用户名无效。
- username_duplicate:
- other: 用户名已被使用。
- set_avatar:
- other: 头像设置错误。
- cannot_update_your_role:
- other: 你不能修改自己的角色。
- not_allowed_registration:
- other: 该网站暂未开放注册。
- not_allowed_login_via_password:
- other: 该网站暂不支持密码登录。
- access_denied:
- other: 拒绝访问
- page_access_denied:
- other: 您没有权限访问此页面。
- add_bulk_users_format_error:
- other: "发生错误,{{.Field}} 格式错误,在 '{{.Content}}' 行数 {{.Line}}. {{.ExtraMessage}}"
- add_bulk_users_amount_error:
- other: "一次性添加的用户数量应在 1-{{.MaxAmount}} 之间。"
- config:
- read_config_failed:
- other: 读取配置失败
- database:
- connection_failed:
- other: 数据库连接失败
- create_table_failed:
- other: 创建表失败
- install:
- create_config_failed:
- other: 无法创建 config.yaml 文件。
- upload:
- unsupported_file_format:
- other: 不支持的文件格式。
- site_info:
- config_not_found:
- other: 未找到网站的该配置信息。
- reason:
- spam:
- name:
- other: 垃圾信息
- desc:
- other: 这个帖子是一个广告,或是破坏性行为。它对当前的主题无帮助或无关。
- rude_or_abusive:
- name:
- other: 粗鲁或辱骂的
- desc:
- other:
- - 一个有理智的人都会认为这种内容不适合进行尊重性的讨论。
- - 论坛
- a_duplicate:
- name:
- other: 重复内容
- desc:
- other: 该问题有人问过,而且已经有了答案。
- placeholder:
- other: 输入已有的问题链接
- not_a_answer:
- name:
- other: 不是答案
- desc:
- other:
- - 这张贴作为答案,但它不会试图回答
- - 这可能是一个编辑、一个评论、另一个问题。
- - 或全部删除。
- no_longer_needed:
- name:
- other: 不再需要
- desc:
- other: 该评论已过时,对话性质或与此帖子无关。
- something:
- name:
- other: 其他原因
- desc:
- other: 此帖子需要工作人员注意,因为是上述所列以外的其他理由。
- placeholder:
- other: 让我们具体知道你关心的什么
- community_specific:
- name:
- other: 社区特定原因
- desc:
- other: 该问题不符合社区准则。
- not_clarity:
- name:
- other: 需要细节或澄清
- desc:
- other: 该问题目前涵盖多个问题。它应该侧重在一个问题上。
- looks_ok:
- name:
- other: 看起来没问题
- desc:
- other: 这个帖子是好的,不是低质量。
- needs_edit:
- name:
- other: 需要编辑,我已做了修改。
- desc:
- other: 改进和纠正你自己帖子中的问题。
- needs_close:
- name:
- other: 需要关闭
- desc:
- other: 关闭的问题不能回答,但仍然可以编辑、投票和评论。
- needs_delete:
- name:
- other: 需要删除
- desc:
- other: 该帖子将被删除。
- question:
- close:
- duplicate:
- name:
- other: 垃圾信息
- desc:
- other: 此问题以前就有人问过,而且已经有了答案。
- guideline:
- name:
- other: 社区特定原因
- desc:
- other: 该问题不符合社区准则。
- multiple:
- name:
- other: 需要细节或澄清
- desc:
- other:
- - 该问题目前涵盖多个问题。它应该侧重在一个问题上。
- - 只关注一个问题。
- other:
- name:
- other: 其他原因
- desc:
- other: 该帖子存在上面没有列出的另一个原因。
- operation_type:
- asked:
- other: 提问于
- answered:
- other: 回答于
- modified:
- other: 修改于
- deleted_title:
- other: 删除的问题
- notification:
- action:
- update_question:
- other: 更新了问题
- answer_the_question:
- other: 回答了问题
- update_answer:
- other: 更新了答案
- accept_answer:
- other: 采纳了答案
- comment_question:
- other: 评论了问题
- comment_answer:
- other: 评论了答案
- reply_to_you:
- other: 回复了你
- mention_you:
- other: 提到了你
- your_question_is_closed:
- other: 你的问题已被关闭
- your_question_was_deleted:
- other: 你的问题已被删除
- your_answer_was_deleted:
- other: 你的答案已被删除
- your_comment_was_deleted:
- other: 你的评论已被删除
- up_voted_question:
- other: 点赞问题
- down_voted_question:
- other: 点踩问题
- up_voted_answer:
- other: 点赞答案
- down_voted_answer:
- other: 点踩回答
- up_voted_comment:
- other: 点赞评论
- invited_you_to_answer:
- other: 邀请你回答
- email_tpl:
- change_email:
- title:
- other: "[{{.SiteName}}] 确认你的新邮箱地址"
- body:
- other: "请点击以下链接确认你在 {{.SiteName}} 上的新邮箱地址:
\n{{.ChangeEmailUrl}}
\n\n如果你没有请求此更改,请忽略此邮件。\n"
- new_answer:
- title:
- other: "[{{.SiteName}}] {{.DisplayName}} 回答了你的问题"
- body:
- other: "{{.QuestionTitle}}
\n\n{{.DisplayName}}:
\n
{{.AnswerSummary}}
我想你可能知道答案。
{{.CommentSummary}}
添加链接
<https://url.com>
[标题](https://url.com)
段落之间使用空行分隔
_斜体_ 或者 **粗体**
使用 4 个空格缩进代码
在行首添加 >
表示引用
反引号进行转义 `像 _这样_`
使用 ```
创建代码块
```
这是代码块
```
我们不允许 删除带有帖子的标签。
请先从帖子中移除此标签。
- tip_with_synonyms: >- -我们不允许 删除带有同义词的标签。
请先从此标签中删除同义词。
- tip: 确定要删除吗? - close: 关闭 - edit_tag: - title: 编辑标签 - default_reason: 编辑标签 - default_first_reason: 添加标签 - btn_save_edits: 保存更改 - btn_cancel: 取消 - dates: - long_date: MM 月 DD 日 - long_date_with_year: "YYYY 年 MM 月 DD 日" - long_date_with_time: "YYYY 年 MM 月 DD 日 HH:mm" - now: 刚刚 - x_seconds_ago: "{{count}} 秒前" - x_minutes_ago: "{{count}} 分钟前" - x_hours_ago: "{{count}} 小时前" - hour: 小时 - day: 天 - hours: 小时 - days: 日 - reaction: - heart: 爱心 - smile: 微笑 - frown: 愁 - btn_label: 添加或删除回应。 - undo_emoji: 撤销 {{ emoji }} 回应 - react_emoji: 用 {{ emoji }} 回应 - unreact_emoji: 撤销 {{ emoji }} - comment: - btn_add_comment: 添加评论 - reply_to: 回复 - btn_reply: 回复 - btn_edit: 编辑 - btn_delete: 删除 - btn_flag: 举报 - btn_save_edits: 保存更改 - btn_cancel: 取消 - show_more: "{{count}} 条剩余评论" - tip_question: >- - 使用评论提问更多信息或者提出改进意见。避免在评论里回答问题。 - tip_answer: >- - 使用评论对回答者进行回复,或者通知回答者你已更新了问题的内容。如果要补充或者完善问题的内容,请在原问题中更改。 - tip_vote: 它给帖子添加了一些有用的内容 - edit_answer: - title: 编辑回答 - default_reason: 编辑回答 - default_first_reason: 添加答案 - form: - fields: - revision: - label: 编辑历史 - answer: - label: 回答内容 - feedback: - characters: 内容长度至少 6 个字符 - edit_summary: - label: 编辑摘要 - placeholder: >- - 简单描述更改原因(更正拼写、修复语法、改进格式) - btn_save_edits: 保存更改 - btn_cancel: 取消 - tags: - title: 标签 - sort_buttons: - popular: 热门 - name: 名称 - newest: 最新 - button_follow: 关注 - button_following: 已关注 - tag_label: 个问题 - search_placeholder: 通过标签名称过滤 - no_desc: 此标签无描述。 - more: 更多 - ask: - title: 新增问题 - edit_title: 编辑问题 - default_reason: 编辑问题 - default_first_reason: 新增问题 - similar_questions: 相似问题 - form: - fields: - revision: - label: 修订版本 - title: - label: 标题 - placeholder: 请详细描述你的问题,想象你在问一个人 - msg: - empty: 标题不能为空。 - range: 标题最多 150 个字符 - body: - label: 内容 - msg: - empty: 内容不能为空。 - tags: - label: 标签 - msg: - empty: 必须选择一个标签 - answer: - label: 回答内容 - msg: - empty: 回答内容不能为空 - edit_summary: - label: 编辑备注 - placeholder: >- - 简单描述更改原因(更正拼写、修复语法、改进格式) - btn_post_question: 提交问题 - btn_save_edits: 保存更改 - answer_question: 回答自己的问题 - post_question&answer: 提交问题和回答 - tag_selector: - add_btn: 添加标签 - create_btn: 创建新标签 - search_tag: 搜索标签 - hint: "描述您的问题是关于什么,至少需要一个标签。" - no_result: 没有匹配的标签 - tag_required_text: 必选标签(至少一个) - header: - nav: - question: 问题 - tag: 标签 - user: 用户 - profile: 用户主页 - setting: 账号设置 - logout: 退出 - admin: 后台管理 - review: 审查 - bookmark: 收藏夹 - moderation: 管理 - search: - placeholder: 搜索 - footer: - build_on: >- - 由 <1>Apache Answer1> 提供动力 - 驱动问答社区的开源软件。你确定要提交一个新的回答吗?
作为替代,你可以通过编辑来完善和改进之前的回答。
- empty: 回答内容不能为空。 - characters: 内容长度至少 6 个字符。 - tips: - header_1: 感谢你的回答 - li1_1: 请务必确定在 回答问题。提供详细信息并分享你的研究。 - li1_2: 用参考资料或个人经历来支持你所做的任何陈述。 - header_2: 但是 请避免... - li2_1: 请求帮助,寻求澄清,或答复其他答案。 - reopen: - confirm_btn: 重新打开 - title: 重新打开这个帖子 - content: 确定要重新打开吗? - list: - confirm_btn: 列表显示 - title: 列表中显示这个帖子 - content: 确定要列表中显示这个帖子吗? - unlist: - confirm_btn: 列表隐藏 - title: 从列表中隐藏这个帖子 - content: 确定要从列表中隐藏这个帖子吗? - pin: - title: 置顶该帖子 - content: 你确定要全局置顶吗?这个帖子将出现在所有帖子列表的顶部。 - confirm_btn: 置顶 - delete: - title: 删除 - question: >- - 我们不建议 删除有回答的帖子。因为这样做会使得后来的读者无法从该帖子中获得帮助。如果删除过多有回答的帖子,你的账号将会被禁止提问。你确定要删除吗? - answer_accepted: >- -
我们不建议删除被采纳的回答。因为这样做会使得后来的读者无法从该帖子中获得帮助。
如果删除过多被采纳的回答,你的账号将会被禁止回答任何提问。你确定要删除吗? - other: 你确定要删除? - tip_answer_deleted: 该回答已被删除 - undelete_title: 撤销删除本帖 - undelete_desc: 你确定你要撤销删除吗? - btns: - confirm: 确认 - cancel: 取消 - edit: 编辑 - save: 保存 - delete: 删除 - undelete: 撤消删除 - list: 列表显示 - unlist: 列表隐藏 - unlisted: 已隐藏 - login: 登录 - signup: 注册 - logout: 退出 - verify: 验证 - add_question: 我要提问 - approve: 批准 - reject: 拒绝 - skip: 跳过 - discard_draft: 丢弃草稿 - pinned: 已置顶 - all: 全部 - question: 问题 - answer: 回答 - comment: 评论 - refresh: 刷新 - resend: 重新发送 - deactivate: 取消激活 - active: 激活 - suspend: 封禁 - unsuspend: 解禁 - close: 关闭 - reopen: 重新打开 - ok: 确定 - light: 浅色 - dark: 深色 - system_setting: 跟随系统 - default: 默认 - reset: 重置 - tag: 标签 - post_lowercase: 帖子 - filter: 筛选 - ignore: 忽略 - submit: 提交 - normal: 正常 - closed: 已关闭 - deleted: 已删除 - pending: 等待处理 - more: 更多 - search: - title: 搜索结果 - keywords: 关键词 - options: 选项 - follow: 关注 - following: 已关注 - counts: "{{count}} 个结果" - more: 更多 - sort_btns: - relevance: 相关性 - newest: 最新的 - active: 活跃的 - score: 评分 - more: 更多 - tips: - title: 高级搜索提示 - tag: "<1>[tag]1> 在指定标签中搜索" - user: "<1>user:username1> 根据作者搜索" - answer: "<1>answers:01> 搜索未回答的问题" - score: "<1>score:31> 评分 3+ 的帖子" - question: "<1>is:question1> 搜索问题" - is_answer: "<1>is:answer1> 搜索回答" - empty: 找不到任何相关的内容。