From 11f63de2cdd547b019c11c784d9ee9aa2864faf4 Mon Sep 17 00:00:00 2001 From: aichy126 <16996097+aichy126@users.noreply.github.com> Date: Mon, 20 Mar 2023 18:17:26 +0800 Subject: [PATCH 01/32] fix markdown --- pkg/converter/markdown.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/converter/markdown.go b/pkg/converter/markdown.go index f6e76c45..f3eef836 100644 --- a/pkg/converter/markdown.go +++ b/pkg/converter/markdown.go @@ -33,7 +33,7 @@ func Markdown2HTML(source string) string { return source } html := buf.String() - filter := bluemonday.NewPolicy() + filter := bluemonday.UGCPolicy() html = filter.Sanitize(html) return html } From 9e8debc3518367bccafc39f4aa0a549bff3a8203 Mon Sep 17 00:00:00 2001 From: aichy126 <16996097+aichy126@users.noreply.github.com> Date: Tue, 21 Mar 2023 16:22:58 +0800 Subject: [PATCH 02/32] update short id --- internal/controller/answer_controller.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/internal/controller/answer_controller.go b/internal/controller/answer_controller.go index 93803c0e..55b3895e 100644 --- a/internal/controller/answer_controller.go +++ b/internal/controller/answer_controller.go @@ -81,6 +81,7 @@ func (ac *AnswerController) RemoveAnswer(ctx *gin.Context) { // @Success 200 {string} string "" func (ac *AnswerController) Get(ctx *gin.Context) { id := ctx.Query("id") + id = uid.DeShortID(id) userID := middleware.GetLoginUserIDFromContext(ctx) info, questionInfo, has, err := ac.answerService.Get(ctx, id, userID) @@ -181,6 +182,7 @@ func (ac *AnswerController) Update(ctx *gin.Context) { return } req.UserID = middleware.GetLoginUserIDFromContext(ctx) + req.QuestionID = uid.DeShortID(req.QuestionID) canList, err := ac.rankService.CheckOperationPermissions(ctx, req.UserID, []string{ permission.AnswerEdit, @@ -232,6 +234,7 @@ func (ac *AnswerController) AnswerList(ctx *gin.Context) { } req.UserID = middleware.GetLoginUserIDFromContext(ctx) + req.QuestionID = uid.DeShortID(req.QuestionID) canList, err := ac.rankService.CheckOperationPermissions(ctx, req.UserID, []string{ permission.AnswerEdit, @@ -272,6 +275,8 @@ func (ac *AnswerController) Accepted(ctx *gin.Context) { } req.UserID = middleware.GetLoginUserIDFromContext(ctx) + req.AnswerID = uid.DeShortID(req.AnswerID) + req.QuestionID = uid.DeShortID(req.QuestionID) can, err := ac.rankService.CheckOperationPermission(ctx, req.UserID, permission.AnswerAccept, req.QuestionID) if err != nil { handler.HandleResponse(ctx, err, nil) @@ -301,6 +306,7 @@ func (ac *AnswerController) AdminSetAnswerStatus(ctx *gin.Context) { if handler.BindAndCheck(ctx, req) { return } + req.AnswerID = uid.DeShortID(req.AnswerID) req.UserID = middleware.GetLoginUserIDFromContext(ctx) From ac3f2f047ee00b4edaea7530e570ab67ff87cd6a Mon Sep 17 00:00:00 2001 From: aichy126 <16996097+aichy126@users.noreply.github.com> Date: Thu, 23 Mar 2023 11:52:28 +0800 Subject: [PATCH 03/32] remove exif --- go.mod | 13 ++++++++++--- go.sum | 26 ++++++++++++++++++++++---- internal/service/uploader/upload.go | 19 +++++++++++++++++++ 3 files changed, 51 insertions(+), 7 deletions(-) diff --git a/go.mod b/go.mod index db9780ca..6f600f4c 100644 --- a/go.mod +++ b/go.mod @@ -27,6 +27,7 @@ require ( github.com/mojocn/base64Captcha v1.3.5 github.com/ory/dockertest/v3 v3.9.1 github.com/robfig/cron/v3 v3.0.1 + github.com/scottleedavis/go-exif-remove v0.0.0-20230314195146-7e059d593405 github.com/segmentfault/pacman v1.0.3 github.com/segmentfault/pacman/contrib/cache/memory v0.0.0-20221219081300-f734f4a16aa0 github.com/segmentfault/pacman/contrib/conf/viper v0.0.0-20221018072427-a15dd1434e05 @@ -41,7 +42,7 @@ require ( github.com/tidwall/gjson v1.14.4 github.com/yuin/goldmark v1.4.13 golang.org/x/crypto v0.1.0 - golang.org/x/net v0.2.0 + golang.org/x/net v0.7.0 gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df gopkg.in/yaml.v3 v3.0.1 modernc.org/sqlite v1.14.2 @@ -64,14 +65,20 @@ require ( github.com/docker/docker v20.10.7+incompatible // indirect github.com/docker/go-connections v0.4.0 // indirect github.com/docker/go-units v0.4.0 // indirect + github.com/dsoprea/go-exif v0.0.0-20190901173045-3ce78807c90f // indirect + github.com/dsoprea/go-jpeg-image-structure v0.0.0-20190422055009-d6f9ba25cf48 // indirect + github.com/dsoprea/go-logging v0.0.0-20190624164917-c4f10aab7696 // indirect + github.com/dsoprea/go-png-image-structure v0.0.0-20190624104353-c9b28dcdc5c8 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/gin-contrib/sse v0.1.0 // indirect + github.com/go-errors/errors v1.0.1 // indirect github.com/go-openapi/jsonpointer v0.19.5 // indirect github.com/go-openapi/jsonreference v0.20.0 // indirect github.com/go-openapi/spec v0.20.7 // indirect github.com/go-openapi/swag v0.22.3 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 // indirect + github.com/golang/geo v0.0.0-20190812012225-f41920e961ce // indirect github.com/golang/snappy v0.0.4 // indirect github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect github.com/gorilla/css v1.0.0 // indirect @@ -121,8 +128,8 @@ require ( go.uber.org/zap v1.23.0 // indirect golang.org/x/image v0.1.0 // indirect golang.org/x/mod v0.6.0 // indirect - golang.org/x/sys v0.2.0 // indirect - golang.org/x/text v0.5.0 // indirect + golang.org/x/sys v0.5.0 // indirect + golang.org/x/text v0.7.0 // indirect golang.org/x/tools v0.2.0 // indirect google.golang.org/protobuf v1.28.1 // indirect gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc // indirect diff --git a/go.sum b/go.sum index abbc8e1a..02402218 100644 --- a/go.sum +++ b/go.sum @@ -143,6 +143,14 @@ github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKoh github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/dsoprea/go-exif v0.0.0-20190901173045-3ce78807c90f h1:vqfYiZ+xF0xJvl9SZ1kovmMgKjaGZIz/Hn8JDQdyd9A= +github.com/dsoprea/go-exif v0.0.0-20190901173045-3ce78807c90f/go.mod h1:DmMpU91/Ax6BAwoRkjgRCr2rmgEgS4tsmatfV7M+U+c= +github.com/dsoprea/go-jpeg-image-structure v0.0.0-20190422055009-d6f9ba25cf48 h1:9zARagUAxQJjibcDy+0+koUMR6sbX38L49Bk2Vni628= +github.com/dsoprea/go-jpeg-image-structure v0.0.0-20190422055009-d6f9ba25cf48/go.mod h1:H1hAaFyv9cRV1ywoHvaqVoNSThBvWZ0JarRBcV+FSnE= +github.com/dsoprea/go-logging v0.0.0-20190624164917-c4f10aab7696 h1:VGFnZAcLwPpt1sHlAxml+pGLZz9A2s+K/s1YNhPC91Y= +github.com/dsoprea/go-logging v0.0.0-20190624164917-c4f10aab7696/go.mod h1:Nm/x2ZUNRW6Fe5C3LxdY1PyZY5wmDv/s5dkPJ/VB3iA= +github.com/dsoprea/go-png-image-structure v0.0.0-20190624104353-c9b28dcdc5c8 h1:SVQfy5rBFZXzvGkU2MZ0RzpS912/1sJrEJ+FMmeaC9U= +github.com/dsoprea/go-png-image-structure v0.0.0-20190624104353-c9b28dcdc5c8/go.mod h1:Bf0nmcDFFRQBjZwr9qY6c0zTxKQa+Q8YWZmlYxXGxY0= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= @@ -173,6 +181,8 @@ github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm github.com/gin-gonic/gin v1.7.0/go.mod h1:jD2toBW3GZUr5UMcdrwQA10I7RuaFOl/SGeDjXkfUtY= github.com/gin-gonic/gin v1.8.1 h1:4+fr/el88TOO3ewCmQr8cx/CtZ/umlIRIs5M4NTNjf8= github.com/gin-gonic/gin v1.8.1/go.mod h1:ji8BvRH1azfM+SYow9zQ6SZMvR8qOMZHmsCuWR9tTTk= +github.com/go-errors/errors v1.0.1 h1:LUHzmkK3GUKUrL/1gfBUxAHzcev3apQlezX/+O7ma6w= +github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= @@ -229,6 +239,8 @@ github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69 github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0= github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 h1:DACJavvAHhabrF08vX0COfcOBJRhZ8lUbR+ZWIs0Y5g= github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= +github.com/golang/geo v0.0.0-20190812012225-f41920e961ce h1:rqIKPpIcEgiNn0KYNFYD34TbMO86l4woyhNzSP+Oegs= +github.com/golang/geo v0.0.0-20190812012225-f41920e961ce/go.mod h1:QZ0nwyI2jOfgRAoBvP+ab5aRr7c9x7lhGEJrKvBwjWI= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -605,6 +617,8 @@ github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQD github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= +github.com/scottleedavis/go-exif-remove v0.0.0-20230314195146-7e059d593405 h1:2ieGkj4z/YPXVyQ2ayZUg3GwE1pYWd5f1RB6DzAOXKM= +github.com/scottleedavis/go-exif-remove v0.0.0-20230314195146-7e059d593405/go.mod h1:rIxVzVLKlBwLxO+lC+k/I4HJfRQcemg/f/76Xmmzsec= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/seccomp/libseccomp-golang v0.9.2-0.20210429002308-3879420cc921/go.mod h1:JA8cRccbGaA1s33RQf7Y1+q9gHmZX1yB/z9WDN1C6fg= github.com/segmentfault/pacman v1.0.3 h1:/K8LJHQMiCaCIvC/e8GQITpYTEG6RH4KTLTZjPTghl4= @@ -851,8 +865,9 @@ golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.2.0 h1:sZfSu1wtKLGlWI4ZZayP0ck9Y73K1ynO6gqzTdBVdPU= golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= +golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= +golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -945,12 +960,14 @@ golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.2.0 h1:ljd4t30dBnAvMZaQCevtY0xLLD0A+bRZXbgLMLU1F/A= golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= +golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -960,8 +977,8 @@ golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.5.0 h1:OLmvp0KP+FVG99Ct/qFiL/Fhk4zp4QQnZ7b2U+5piUM= -golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= +golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -1144,6 +1161,7 @@ gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc h1:2gG gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc/go.mod h1:m7x9LTH6d71AHyAX77c9yqWCCa3UKHcVEj9y7hAtKDk= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= diff --git a/internal/service/uploader/upload.go b/internal/service/uploader/upload.go index f438e7dd..980e82e2 100644 --- a/internal/service/uploader/upload.go +++ b/internal/service/uploader/upload.go @@ -4,6 +4,7 @@ import ( "bytes" "fmt" "io" + "io/ioutil" "mime/multipart" "net/http" "os" @@ -19,6 +20,7 @@ import ( "github.com/answerdev/answer/pkg/uid" "github.com/disintegration/imaging" "github.com/gin-gonic/gin" + exifremove "github.com/scottleedavis/go-exif-remove" "github.com/segmentfault/pacman/errors" ) @@ -192,6 +194,7 @@ func (us *UploaderService) uploadFile(ctx *gin.Context, file *multipart.FileHead return "", errors.InternalServer(reason.UnknownError).WithError(err).WithStack() } defer src.Close() + Dexif(filePath, filePath) if !checker.IsSupportedImageFile(src, filepath.Ext(fileSubPath)) { return "", errors.BadRequest(reason.UploadFileUnsupportedFileFormat) @@ -200,3 +203,19 @@ func (us *UploaderService) uploadFile(ctx *gin.Context, file *multipart.FileHead url = fmt.Sprintf("%s/uploads/%s", siteGeneral.SiteUrl, fileSubPath) return url, nil } + +func Dexif(filepath string, destpath string) error { + img, err := ioutil.ReadFile(filepath) + if err != nil { + return err + } + noExifBytes, err := exifremove.Remove(img) + if err != nil { + return err + } + err = os.WriteFile(destpath, noExifBytes, 0644) + if err != nil { + return err + } + return nil +} From 4ee1614e95fb24d4ec31ac9e605982c1dd95fc15 Mon Sep 17 00:00:00 2001 From: LinkinStars Date: Thu, 23 Mar 2023 12:15:12 +0800 Subject: [PATCH 04/32] feat(admin): return forbidden when normal user enter admin page. --- internal/base/middleware/auth.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/base/middleware/auth.go b/internal/base/middleware/auth.go index b2150e38..ed941c0f 100644 --- a/internal/base/middleware/auth.go +++ b/internal/base/middleware/auth.go @@ -124,7 +124,7 @@ func (am *AuthUserMiddleware) AdminAuth() gin.HandlerFunc { } userInfo, err := am.authService.GetAdminUserCacheInfo(ctx, token) if err != nil { - handler.HandleResponse(ctx, errors.Unauthorized(reason.UnauthorizedError), nil) + handler.HandleResponse(ctx, errors.Forbidden(reason.UnauthorizedError), nil) ctx.Abort() return } From 89738b8898b6e2d43e2a59396befbdff74e0692b Mon Sep 17 00:00:00 2001 From: aichy126 <16996097+aichy126@users.noreply.github.com> Date: Fri, 24 Mar 2023 11:49:23 +0800 Subject: [PATCH 05/32] add Revision --- cmd/answer/main.go | 1 + docs/docs.go | 3 +++ docs/swagger.json | 3 +++ docs/swagger.yaml | 2 ++ internal/base/constant/constant.go | 3 ++- internal/controller/siteinfo_controller.go | 3 ++- internal/controller/template_controller.go | 1 + internal/schema/dashboard_schema.go | 1 + internal/schema/siteinfo_schema.go | 2 ++ internal/service/dashboard/dashboard_service.go | 2 ++ ui/template/header.html | 2 +- 11 files changed, 20 insertions(+), 3 deletions(-) diff --git a/cmd/answer/main.go b/cmd/answer/main.go index 626eb2b2..06f8c47b 100644 --- a/cmd/answer/main.go +++ b/cmd/answer/main.go @@ -53,6 +53,7 @@ func runApp() { panic(err) } constant.Version = Version + constant.Revision = Revision schema.AppStartTime = time.Now() defer cleanup() diff --git a/docs/docs.go b/docs/docs.go index 6955ff5f..d1fa0a96 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -7230,6 +7230,9 @@ const docTemplate = `{ "login": { "$ref": "#/definitions/schema.SiteLoginResp" }, + "revision": { + "type": "string" + }, "site_seo": { "$ref": "#/definitions/schema.SiteSeoReq" }, diff --git a/docs/swagger.json b/docs/swagger.json index 962004ee..1ade7434 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -7218,6 +7218,9 @@ "login": { "$ref": "#/definitions/schema.SiteLoginResp" }, + "revision": { + "type": "string" + }, "site_seo": { "$ref": "#/definitions/schema.SiteSeoReq" }, diff --git a/docs/swagger.yaml b/docs/swagger.yaml index 88129421..6c17b0c8 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -1354,6 +1354,8 @@ definitions: $ref: '#/definitions/schema.SiteInterfaceResp' login: $ref: '#/definitions/schema.SiteLoginResp' + revision: + type: string site_seo: $ref: '#/definitions/schema.SiteSeoReq' theme: diff --git a/internal/base/constant/constant.go b/internal/base/constant/constant.go index 40990b93..a71d1a9c 100644 --- a/internal/base/constant/constant.go +++ b/internal/base/constant/constant.go @@ -30,7 +30,8 @@ const ( // object TagID AnswerList // key equal database's table name var ( - Version string = "" + Version string = "" + Revision string = "" PathIgnoreMap map[string]bool diff --git a/internal/controller/siteinfo_controller.go b/internal/controller/siteinfo_controller.go index b2a95bdf..b0ec1315 100644 --- a/internal/controller/siteinfo_controller.go +++ b/internal/controller/siteinfo_controller.go @@ -31,7 +31,7 @@ func NewSiteinfoController(siteInfoService *siteinfo_common.SiteInfoCommonServic // @Router /answer/api/v1/siteinfo [get] func (sc *SiteinfoController) GetSiteInfo(ctx *gin.Context) { var err error - resp := &schema.SiteInfoResp{Version: constant.Version} + resp := &schema.SiteInfoResp{Version: constant.Version, Revision: constant.Revision} resp.General, err = sc.siteInfoService.GetSiteGeneral(ctx) if err != nil { log.Error(err) @@ -103,6 +103,7 @@ func (sc *SiteinfoController) GetManifestJson(ctx *gin.Context) { resp := &schema.GetManifestJsonResp{ ManifestVersion: 3, Version: constant.Version, + Revision: constant.Revision, ShortName: "Answer", Name: "Answer.dev", Icons: map[string]string{ diff --git a/internal/controller/template_controller.go b/internal/controller/template_controller.go index aa9e702a..b57df849 100644 --- a/internal/controller/template_controller.go +++ b/internal/controller/template_controller.go @@ -471,6 +471,7 @@ func (tc *TemplateController) html(ctx *gin.Context, code int, tpl string, siteI data["HeaderCode"] = siteInfo.CustomCssHtml.CustomHeader data["FooterCode"] = siteInfo.CustomCssHtml.CustomFooter data["Version"] = constant.Version + data["Revision"] = constant.Revision _, ok := data["path"] if !ok { data["path"] = "" diff --git a/internal/schema/dashboard_schema.go b/internal/schema/dashboard_schema.go index 1ed09010..88afed90 100644 --- a/internal/schema/dashboard_schema.go +++ b/internal/schema/dashboard_schema.go @@ -27,6 +27,7 @@ type DashboardInfo struct { type DashboardInfoVersion struct { Version string `json:"version"` + Revision string `json:"revision"` RemoteVersion string `json:"remote_version"` } diff --git a/internal/schema/siteinfo_schema.go b/internal/schema/siteinfo_schema.go index 19f3d9fb..4f786009 100644 --- a/internal/schema/siteinfo_schema.go +++ b/internal/schema/siteinfo_schema.go @@ -170,6 +170,7 @@ type SiteInfoResp struct { CustomCssHtml *SiteCustomCssHTMLResp `json:"custom_css_html"` SiteSeo *SiteSeoReq `json:"site_seo"` Version string `json:"version"` + Revision string `json:"revision"` } type TemplateSiteInfoResp struct { General *SiteGeneralResp `json:"general"` @@ -225,6 +226,7 @@ type GetSMTPConfigResp struct { type GetManifestJsonResp struct { ManifestVersion int `json:"manifest_version"` Version string `json:"version"` + Revision string `json:"revision"` ShortName string `json:"short_name"` Name string `json:"name"` Icons map[string]string `json:"icons"` diff --git a/internal/service/dashboard/dashboard_service.go b/internal/service/dashboard/dashboard_service.go index e47645fe..d8fcc8cb 100644 --- a/internal/service/dashboard/dashboard_service.go +++ b/internal/service/dashboard/dashboard_service.go @@ -90,6 +90,7 @@ func (ds *DashboardService) StatisticalByCache(ctx context.Context) (*schema.Das startTime := time.Now().Unix() - schema.AppStartTime.Unix() dashboardInfo.AppStartTime = fmt.Sprintf("%d", startTime) dashboardInfo.VersionInfo.Version = constant.Version + dashboardInfo.VersionInfo.Revision = constant.Revision return dashboardInfo, nil } @@ -194,6 +195,7 @@ func (ds *DashboardService) Statistical(ctx context.Context) (*schema.DashboardI dashboardInfo.AppStartTime = fmt.Sprintf("%d", startTime) dashboardInfo.TimeZone = siteInfoInterface.TimeZone dashboardInfo.VersionInfo.Version = constant.Version + dashboardInfo.VersionInfo.Revision = constant.Revision dashboardInfo.VersionInfo.RemoteVersion = ds.RemoteVersion(ctx) return dashboardInfo, nil } diff --git a/ui/template/header.html b/ui/template/header.html index 5b654c56..f43213ad 100644 --- a/ui/template/header.html +++ b/ui/template/header.html @@ -6,7 +6,7 @@ {{.title}} - + {{if .keywords }}{{end}} From 9d3b391820187a5b9faed1a13baa873c64a4a197 Mon Sep 17 00:00:00 2001 From: aichy126 <16996097+aichy126@users.noreply.github.com> Date: Fri, 24 Mar 2023 11:53:18 +0800 Subject: [PATCH 06/32] update question --- internal/controller/question_controller.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/controller/question_controller.go b/internal/controller/question_controller.go index a12a7523..1c36e974 100644 --- a/internal/controller/question_controller.go +++ b/internal/controller/question_controller.go @@ -159,6 +159,7 @@ func (qc *QuestionController) GetQuestion(ctx *gin.Context) { handler.HandleResponse(ctx, err, nil) return } + info.ID = uid.EnShortID(info.ID) handler.HandleResponse(ctx, nil, info) } From 629a917f4d2d5ee056e933bafcb0bf0b82994051 Mon Sep 17 00:00:00 2001 From: aichy126 <16996097+aichy126@users.noreply.github.com> Date: Fri, 24 Mar 2023 11:58:05 +0800 Subject: [PATCH 07/32] update question --- internal/service/question_common/question.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/internal/service/question_common/question.go b/internal/service/question_common/question.go index 8e33c43e..f8c40cf5 100644 --- a/internal/service/question_common/question.go +++ b/internal/service/question_common/question.go @@ -414,6 +414,11 @@ func (qs *QuestionCommon) RemoveQuestion(ctx context.Context, req *schema.Remove if !has { return nil } + + if questionInfo.Status == entity.QuestionStatusDeleted { + return nil + } + questionInfo.Status = entity.QuestionStatusDeleted err = qs.questionRepo.UpdateQuestionStatus(ctx, questionInfo) if err != nil { From 82307f9c6bd1efa0df0c9aa206dc68b822ae2121 Mon Sep 17 00:00:00 2001 From: aichy126 <16996097+aichy126@users.noreply.github.com> Date: Fri, 24 Mar 2023 12:21:09 +0800 Subject: [PATCH 08/32] update revision --- internal/controller/revision_controller.go | 9 ++++++++- internal/entity/revision_entity.go | 2 ++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/internal/controller/revision_controller.go b/internal/controller/revision_controller.go index dfac4519..bbfd3139 100644 --- a/internal/controller/revision_controller.go +++ b/internal/controller/revision_controller.go @@ -5,6 +5,7 @@ import ( "github.com/answerdev/answer/internal/base/handler" "github.com/answerdev/answer/internal/base/middleware" "github.com/answerdev/answer/internal/base/reason" + "github.com/answerdev/answer/internal/entity" "github.com/answerdev/answer/internal/schema" "github.com/answerdev/answer/internal/service" "github.com/answerdev/answer/internal/service/permission" @@ -52,7 +53,13 @@ func (rc *RevisionController) GetRevisionList(ctx *gin.Context) { } resp, err := rc.revisionListService.GetRevisionList(ctx, req) - handler.HandleResponse(ctx, err, resp) + list := make([]schema.GetRevisionResp, 0) + for _, item := range resp { + if item.Status == entity.RevisioNnormalStatus || item.Status == entity.RevisionReviewPassStatus { + list = append(list, item) + } + } + handler.HandleResponse(ctx, err, list) } // GetUnreviewedRevisionList godoc diff --git a/internal/entity/revision_entity.go b/internal/entity/revision_entity.go index 46bfd228..34edc7f8 100644 --- a/internal/entity/revision_entity.go +++ b/internal/entity/revision_entity.go @@ -5,6 +5,8 @@ import ( ) const ( + // RevisioNnormalStatus this revision is Nnormal + RevisioNnormalStatus = 0 // RevisionUnreviewedStatus this revision is unreviewed RevisionUnreviewedStatus = 1 // RevisionReviewPassStatus this revision is reviewed and approved by operator From e1195a183a4e8fcb763dc69fd53c7de94b651eef Mon Sep 17 00:00:00 2001 From: aichy126 <16996097+aichy126@users.noreply.github.com> Date: Fri, 24 Mar 2023 12:32:39 +0800 Subject: [PATCH 09/32] update question --- internal/service/object_info/object_info.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/service/object_info/object_info.go b/internal/service/object_info/object_info.go index ab961d26..5fbf55f7 100644 --- a/internal/service/object_info/object_info.go +++ b/internal/service/object_info/object_info.go @@ -11,6 +11,7 @@ import ( questioncommon "github.com/answerdev/answer/internal/service/question_common" tagcommon "github.com/answerdev/answer/internal/service/tag_common" "github.com/answerdev/answer/pkg/obj" + "github.com/answerdev/answer/pkg/uid" "github.com/segmentfault/pacman/errors" ) @@ -50,6 +51,7 @@ func (os *ObjService) GetUnreviewedRevisionInfo(ctx context.Context, objectID st if err != nil { return nil, err } + questionInfo.ID = uid.EnShortID(questionInfo.ID) if !exist { break } @@ -85,6 +87,7 @@ func (os *ObjService) GetUnreviewedRevisionInfo(ctx context.Context, objectID st if !exist { break } + questionInfo.ID = uid.EnShortID(questionInfo.ID) objInfo = &schema.UnreviewedRevisionInfoInfo{ ObjectID: answerInfo.ID, Title: questionInfo.Title, From dc068485566ab5357b80e76c437e1e42f190eac6 Mon Sep 17 00:00:00 2001 From: aichy126 <16996097+aichy126@users.noreply.github.com> Date: Fri, 24 Mar 2023 14:41:59 +0800 Subject: [PATCH 10/32] update tag --- internal/service/tag_common/tag_common.go | 41 +++++++++++++++++++---- 1 file changed, 35 insertions(+), 6 deletions(-) diff --git a/internal/service/tag_common/tag_common.go b/internal/service/tag_common/tag_common.go index c1a418c1..d0864e12 100644 --- a/internal/service/tag_common/tag_common.go +++ b/internal/service/tag_common/tag_common.go @@ -85,13 +85,42 @@ func (ts *TagCommonService) SearchTagLike(ctx context.Context, req *schema.Searc return } ts.TagsFormatRecommendAndReserved(ctx, tags) + mainTagId := make([]string, 0) for _, tag := range tags { - item := schema.SearchTagLikeResp{} - item.SlugName = tag.SlugName - item.DisplayName = tag.DisplayName - item.Recommend = tag.Recommend - item.Reserved = tag.Reserved - resp = append(resp, item) + if tag.MainTagID != 0 { + mainTagId = append(mainTagId, converter.IntToString(tag.MainTagID)) + } + } + mainTagList, err := ts.tagCommonRepo.GetTagListByIDs(ctx, mainTagId) + if err != nil { + return + } + mainTagMap := make(map[string]*entity.Tag) + for _, tag := range mainTagList { + mainTagMap[tag.ID] = tag + } + for _, tag := range tags { + if tag.MainTagID != 0 { + _, ok := mainTagMap[converter.IntToString(tag.MainTagID)] + if ok { + tag.SlugName = mainTagMap[converter.IntToString(tag.MainTagID)].SlugName + tag.DisplayName = mainTagMap[converter.IntToString(tag.MainTagID)].DisplayName + tag.Reserved = mainTagMap[converter.IntToString(tag.MainTagID)].Reserved + tag.Recommend = mainTagMap[converter.IntToString(tag.MainTagID)].Recommend + } + } + } + RepetitiveTag := make(map[string]bool) + for _, tag := range tags { + if _, ok := RepetitiveTag[tag.SlugName]; !ok { + item := schema.SearchTagLikeResp{} + item.SlugName = tag.SlugName + item.DisplayName = tag.DisplayName + item.Recommend = tag.Recommend + item.Reserved = tag.Reserved + resp = append(resp, item) + RepetitiveTag[tag.SlugName] = true + } } return resp, nil } From d3d049a9b3120cef7ed0d0292521547100487c1a Mon Sep 17 00:00:00 2001 From: aichy126 <16996097+aichy126@users.noreply.github.com> Date: Fri, 24 Mar 2023 15:12:23 +0800 Subject: [PATCH 11/32] update question --- internal/service/answer_service.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/internal/service/answer_service.go b/internal/service/answer_service.go index 38e0826f..39433b81 100644 --- a/internal/service/answer_service.go +++ b/internal/service/answer_service.go @@ -326,6 +326,7 @@ func (as *AnswerService) UpdateAccepted(ctx context.Context, req *schema.AnswerA if err != nil { return err } + newAnswerInfo.ID = uid.DeShortID(newAnswerInfo.ID) if !newAnswerInfoexist { return errors.BadRequest(reason.AnswerNotFound) } @@ -335,12 +336,13 @@ func (as *AnswerService) UpdateAccepted(ctx context.Context, req *schema.AnswerA if err != nil { return err } + questionInfo.ID = uid.DeShortID(questionInfo.ID) if !exist { return errors.BadRequest(reason.QuestionNotFound) } - if questionInfo.UserID != req.UserID { - return fmt.Errorf("no permission to set answer") - } + // if questionInfo.UserID != req.UserID { + // return fmt.Errorf("no permission to set answer") + // } if questionInfo.AcceptedAnswerID == req.AnswerID { return nil } @@ -351,6 +353,7 @@ func (as *AnswerService) UpdateAccepted(ctx context.Context, req *schema.AnswerA if err != nil { return err } + oldAnswerInfo.ID = uid.DeShortID(oldAnswerInfo.ID) } err = as.answerRepo.UpdateAccepted(ctx, req.AnswerID, req.QuestionID) From 45f2f06698373064792013ecdc2cd7f3710b32db Mon Sep 17 00:00:00 2001 From: aichy126 <16996097+aichy126@users.noreply.github.com> Date: Fri, 24 Mar 2023 15:51:32 +0800 Subject: [PATCH 12/32] update vote --- i18n/en_US.yaml | 2 ++ i18n/zh_CN.yaml | 2 ++ internal/base/handler/handler.go | 8 ++++++++ internal/base/reason/reason.go | 1 + internal/controller/vote_controller.go | 17 +++++++++++++---- 5 files changed, 26 insertions(+), 4 deletions(-) diff --git a/i18n/en_US.yaml b/i18n/en_US.yaml index b4121379..eaa06739 100644 --- a/i18n/en_US.yaml +++ b/i18n/en_US.yaml @@ -100,6 +100,8 @@ backend: rank: fail_to_meet_the_condition: other: Rank fail to meet the condition. + vote_fail_to_meet_the_condition: + other: Thanks for the feedback. You need at least {{ rank }} reputation to cast a vote. report: handle_failed: other: Report handle failed. diff --git a/i18n/zh_CN.yaml b/i18n/zh_CN.yaml index abd710dc..f4fca2ea 100644 --- a/i18n/zh_CN.yaml +++ b/i18n/zh_CN.yaml @@ -99,6 +99,8 @@ backend: rank: fail_to_meet_the_condition: other: 级别不符合条件 + vote_fail_to_meet_the_condition: + other: 感谢您的投票。您至少需要{{ rank }}声望才能投票。 report: handle_failed: other: 报告处理失败 diff --git a/internal/base/handler/handler.go b/internal/base/handler/handler.go index c3b6025e..22784a81 100644 --- a/internal/base/handler/handler.go +++ b/internal/base/handler/handler.go @@ -3,6 +3,7 @@ package handler import ( "errors" "net/http" + "strings" "github.com/answerdev/answer/internal/base/constant" "github.com/answerdev/answer/internal/base/reason" @@ -73,3 +74,10 @@ func BindAndCheckReturnErr(ctx *gin.Context, data interface{}) (errFields []*val errFields, _ = validator.GetValidatorByLang(lang).Check(data) return errFields } + +func MsgWithParameter(msg string, list map[string]string) string { + for k, v := range list { + msg = strings.Replace(msg, "{{ "+k+" }}", v, -1) + } + return msg +} diff --git a/internal/base/reason/reason.go b/internal/base/reason/reason.go index 2e4c8c82..5f9e316a 100644 --- a/internal/base/reason/reason.go +++ b/internal/base/reason/reason.go @@ -48,6 +48,7 @@ const ( TagIsUsedCannotDelete = "error.tag.is_used_cannot_delete" TagAlreadyExist = "error.tag.already_exist" RankFailToMeetTheCondition = "error.rank.fail_to_meet_the_condition" + VoteRankFailToMeetTheCondition = "error.rank.vote_fail_to_meet_the_condition" ThemeNotFound = "error.theme.not_found" LangNotFound = "error.lang.not_found" ReportHandleFailed = "error.report.handle_failed" diff --git a/internal/controller/vote_controller.go b/internal/controller/vote_controller.go index e36fd08c..46fe8e32 100644 --- a/internal/controller/vote_controller.go +++ b/internal/controller/vote_controller.go @@ -1,9 +1,12 @@ package controller import ( + "fmt" + "github.com/answerdev/answer/internal/base/handler" "github.com/answerdev/answer/internal/base/middleware" "github.com/answerdev/answer/internal/base/reason" + "github.com/answerdev/answer/internal/base/translator" "github.com/answerdev/answer/internal/schema" "github.com/answerdev/answer/internal/service" "github.com/answerdev/answer/internal/service/rank" @@ -41,13 +44,16 @@ func (vc *VoteController) VoteUp(ctx *gin.Context) { } req.ObjectID = uid.DeShortID(req.ObjectID) req.UserID = middleware.GetLoginUserIDFromContext(ctx) - can, _, err := vc.rankService.CheckVotePermission(ctx, req.UserID, req.ObjectID, true) + can, rank, err := vc.rankService.CheckVotePermission(ctx, req.UserID, req.ObjectID, true) if err != nil { handler.HandleResponse(ctx, err, nil) return } if !can { - handler.HandleResponse(ctx, errors.Forbidden(reason.RankFailToMeetTheCondition), nil) + lang := handler.GetLang(ctx) + msg := translator.Tr(lang, reason.VoteRankFailToMeetTheCondition) + msg = handler.MsgWithParameter(msg, map[string]string{"rank": fmt.Sprintf("%d", rank)}) + handler.HandleResponse(ctx, errors.Forbidden(reason.VoteRankFailToMeetTheCondition).WithMsg(msg), nil) return } @@ -78,13 +84,16 @@ func (vc *VoteController) VoteDown(ctx *gin.Context) { } req.ObjectID = uid.DeShortID(req.ObjectID) req.UserID = middleware.GetLoginUserIDFromContext(ctx) - can, _, err := vc.rankService.CheckVotePermission(ctx, req.UserID, req.ObjectID, false) + can, rank, err := vc.rankService.CheckVotePermission(ctx, req.UserID, req.ObjectID, false) if err != nil { handler.HandleResponse(ctx, err, nil) return } if !can { - handler.HandleResponse(ctx, errors.Forbidden(reason.RankFailToMeetTheCondition), nil) + lang := handler.GetLang(ctx) + msg := translator.Tr(lang, reason.VoteRankFailToMeetTheCondition) + msg = handler.MsgWithParameter(msg, map[string]string{"rank": fmt.Sprintf("%d", rank)}) + handler.HandleResponse(ctx, errors.Forbidden(reason.VoteRankFailToMeetTheCondition).WithMsg(msg), nil) return } From f93beb51caaff54ec1d85bb94606194247218bf8 Mon Sep 17 00:00:00 2001 From: aichy126 <16996097+aichy126@users.noreply.github.com> Date: Fri, 24 Mar 2023 16:39:08 +0800 Subject: [PATCH 13/32] update tag --- internal/repo/tag_common/tag_common_repo.go | 8 +++++--- internal/service/tag_common/tag_common.go | 6 ++++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/internal/repo/tag_common/tag_common_repo.go b/internal/repo/tag_common/tag_common_repo.go index 0c357c32..02e1c6ae 100644 --- a/internal/repo/tag_common/tag_common_repo.go +++ b/internal/repo/tag_common/tag_common_repo.go @@ -2,6 +2,7 @@ package tag_common import ( "context" + "fmt" "github.com/answerdev/answer/internal/base/data" "github.com/answerdev/answer/internal/base/pager" @@ -45,7 +46,7 @@ func (tr *tagCommonRepo) GetTagListByIDs(ctx context.Context, ids []string) (tag // GetTagBySlugName get tag by slug name func (tr *tagCommonRepo) GetTagBySlugName(ctx context.Context, slugName string) (tagInfo *entity.Tag, exist bool, err error) { tagInfo = &entity.Tag{} - session := tr.data.DB.Where("slug_name = ?", slugName) + session := tr.data.DB.Where("slug_name = LOWER(?)", slugName) session.Where(builder.Eq{"status": entity.TagStatusAvailable}) exist, err = session.Get(tagInfo) if err != nil { @@ -60,7 +61,7 @@ func (tr *tagCommonRepo) GetTagListByName(ctx context.Context, name string, hasR cond := &entity.Tag{} session := tr.data.DB.Where("") if name != "" { - session.Where("slug_name LIKE ? or display_name LIKE ?", name+"%", name+"%") + session.Where("slug_name LIKE LOWER(?) or display_name LIKE ?", name+"%", name+"%") } else { session.UseBool("recommend") cond.Recommend = true @@ -106,6 +107,7 @@ func (tr *tagCommonRepo) GetReservedTagList(ctx context.Context) (tagList []*ent // GetTagListByNames get tag list all like name func (tr *tagCommonRepo) GetTagListByNames(ctx context.Context, names []string) (tagList []*entity.Tag, err error) { + tagList = make([]*entity.Tag, 0) session := tr.data.DB.In("slug_name", names).UseBool("recommend", "reserved") // session.Where(builder.Eq{"status": entity.TagStatusAvailable}) @@ -140,7 +142,7 @@ func (tr *tagCommonRepo) GetTagPage(ctx context.Context, page, pageSize int, tag session := tr.data.DB.NewSession() if len(tag.SlugName) > 0 { - session.Where(builder.Or(builder.Like{"slug_name", tag.SlugName}, builder.Like{"display_name", tag.SlugName})) + session.Where(builder.Or(builder.Like{"slug_name", fmt.Sprintf("LOWER(%s)", tag.SlugName)}, builder.Like{"display_name", tag.SlugName})) tag.SlugName = "" } session.Where(builder.Eq{"status": entity.TagStatusAvailable}) diff --git a/internal/service/tag_common/tag_common.go b/internal/service/tag_common/tag_common.go index d0864e12..c136838e 100644 --- a/internal/service/tag_common/tag_common.go +++ b/internal/service/tag_common/tag_common.go @@ -262,8 +262,10 @@ func (ts *TagCommonService) AddTag(ctx context.Context, req *schema.AddTagReq) ( if exist { return nil, errors.BadRequest(reason.TagAlreadyExist) } + SlugName := strings.ReplaceAll(req.SlugName, " ", "-") + SlugName = strings.ToLower(SlugName) tagInfo := &entity.Tag{ - SlugName: strings.ReplaceAll(req.SlugName, " ", "-"), + SlugName: SlugName, DisplayName: req.DisplayName, OriginalText: req.OriginalText, ParsedText: req.ParsedText, @@ -564,7 +566,7 @@ func (ts *TagCommonService) ObjectChangeTag(ctx context.Context, objectTagData * thisObjTagNameList := make([]string, 0) thisObjTagIDList := make([]string, 0) for _, t := range objectTagData.Tags { - // t.SlugName = strings.ToLower(t.SlugName) + t.SlugName = strings.ToLower(t.SlugName) thisObjTagNameList = append(thisObjTagNameList, t.SlugName) } From 7495f068dfcc5f5c5924c24877c0edd930a33107 Mon Sep 17 00:00:00 2001 From: LinkinStars Date: Sun, 26 Mar 2023 17:26:16 +0800 Subject: [PATCH 14/32] Fix(role): Fix an issue that admin could not be set correctly under sqlite (#284) * fix(role): use session in transaction * refactor(role): rename remove user tokens function --- internal/repo/auth/auth.go | 4 ++-- internal/repo/role/user_role_rel_repo.go | 6 +++--- internal/service/auth/auth.go | 8 ++++---- internal/service/user_admin/user_backyard.go | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/internal/repo/auth/auth.go b/internal/repo/auth/auth.go index d290afcb..bcc51212 100644 --- a/internal/repo/auth/auth.go +++ b/internal/repo/auth/auth.go @@ -147,8 +147,8 @@ func (ar *authRepo) AddUserTokenMapping(ctx context.Context, userID, accessToken return ar.data.Cache.SetString(ctx, key, string(content), constant.UserTokenCacheTime) } -// RemoveAllUserTokens Log out all users under this user id -func (ar *authRepo) RemoveAllUserTokens(ctx context.Context, userID string) { +// RemoveUserTokens Log out all users under this user id +func (ar *authRepo) RemoveUserTokens(ctx context.Context, userID string) { key := constant.UserTokenMappingCacheKey + userID resp, _ := ar.data.Cache.GetString(ctx, key) mapping := make(map[string]bool, 0) diff --git a/internal/repo/role/user_role_rel_repo.go b/internal/repo/role/user_role_rel_repo.go index 85d6564b..9398a5d9 100644 --- a/internal/repo/role/user_role_rel_repo.go +++ b/internal/repo/role/user_role_rel_repo.go @@ -28,15 +28,15 @@ func NewUserRoleRelRepo(data *data.Data) role.UserRoleRelRepo { func (ur *userRoleRelRepo) SaveUserRoleRel(ctx context.Context, userID string, roleID int) (err error) { _, err = ur.data.DB.Transaction(func(session *xorm.Session) (interface{}, error) { item := &entity.UserRoleRel{UserID: userID} - exist, err := ur.data.DB.Get(item) + exist, err := session.Get(item) if err != nil { return nil, err } if exist { item.RoleID = roleID - _, err = ur.data.DB.ID(item.ID).Update(item) + _, err = session.ID(item.ID).Update(item) } else { - _, err = ur.data.DB.Insert(&entity.UserRoleRel{UserID: userID, RoleID: roleID}) + _, err = session.Insert(&entity.UserRoleRel{UserID: userID, RoleID: roleID}) } if err != nil { return nil, err diff --git a/internal/service/auth/auth.go b/internal/service/auth/auth.go index 75f67944..618ef5bd 100644 --- a/internal/service/auth/auth.go +++ b/internal/service/auth/auth.go @@ -20,7 +20,7 @@ type AuthRepo interface { SetAdminUserCacheInfo(ctx context.Context, accessToken string, userInfo *entity.UserCacheInfo) error RemoveAdminUserCacheInfo(ctx context.Context, accessToken string) (err error) AddUserTokenMapping(ctx context.Context, userID, accessToken string) (err error) - RemoveAllUserTokens(ctx context.Context, userID string) + RemoveUserTokens(ctx context.Context, userID string) } // AuthService kit service @@ -85,9 +85,9 @@ func (as *AuthService) AddUserTokenMapping(ctx context.Context, userID, accessTo return as.authRepo.AddUserTokenMapping(ctx, userID, accessToken) } -// RemoveAllUserTokens Log out all users under this user id -func (as *AuthService) RemoveAllUserTokens(ctx context.Context, userID string) { - as.authRepo.RemoveAllUserTokens(ctx, userID) +// RemoveUserTokens Log out all users under this user id +func (as *AuthService) RemoveUserTokens(ctx context.Context, userID string) { + as.authRepo.RemoveUserTokens(ctx, userID) } //Admin diff --git a/internal/service/user_admin/user_backyard.go b/internal/service/user_admin/user_backyard.go index 8a4e337d..6897d8d2 100644 --- a/internal/service/user_admin/user_backyard.go +++ b/internal/service/user_admin/user_backyard.go @@ -116,7 +116,7 @@ func (us *UserAdminService) UpdateUserRole(ctx context.Context, req *schema.Upda return err } - us.authService.RemoveAllUserTokens(ctx, req.UserID) + us.authService.RemoveUserTokens(ctx, req.UserID) return } @@ -179,7 +179,7 @@ func (us *UserAdminService) UpdateUserPassword(ctx context.Context, req *schema. return err } // logout this user - us.authService.RemoveAllUserTokens(ctx, req.UserID) + us.authService.RemoveUserTokens(ctx, req.UserID) return } From 0fa75771d2dd41f6ba112ba229772c838e73a0e9 Mon Sep 17 00:00:00 2001 From: Jozef Rebjak Date: Mon, 27 Mar 2023 05:25:44 +0200 Subject: [PATCH 15/32] lang: add sk_SK translation (#267) * lang: sk_SK init fom en_US * lang: translate backend to sk_SK * translated to the dates, without editor * add translations * add translations * add slovak to i18n.yaml --- i18n/i18n.yaml | 3 + i18n/sk_SK.yaml | 1411 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 1414 insertions(+) create mode 100644 i18n/sk_SK.yaml diff --git a/i18n/i18n.yaml b/i18n/i18n.yaml index a0b7a80f..5e9ca174 100644 --- a/i18n/i18n.yaml +++ b/i18n/i18n.yaml @@ -39,3 +39,6 @@ language_options: - label: "Tiếng Việt" value: "vi_VN" progress: 0 + - label: "Slovak" + value: "sk_SK" + progress: 100 diff --git a/i18n/sk_SK.yaml b/i18n/sk_SK.yaml new file mode 100644 index 00000000..1674afd8 --- /dev/null +++ b/i18n/sk_SK.yaml @@ -0,0 +1,1411 @@ +# The following fields are used for back-end + +backend: + base: + success: + other: Úspech. + unknown: + other: Neznáma chyba. + request_format_error: + other: Formát žiadosti nie je platný. + unauthorized_error: + other: Neoprávnené. + database_error: + other: Chyba dátového servera. + role: + name: + user: + other: Užívateľ + admin: + other: Správca + moderator: + other: Moderátor + description: + user: + other: Predvolené bez špeciálneho prístupu. + admin: + other: Má plnú moc a prístup k stránke. + moderator: + other: Má prístup ku všetkým príspevkom okrem nastavení správcu. + email: + other: E-mail + password: + other: Heslo + email_or_password_wrong_error: + other: E-mail a heslo sa nezhodujú. + error: + admin: + cannot_update_their_password: + other: Svoje heslo nemôžete upraviť. + cannot_modify_self_status: + other: Nemôžete upraviť svoj stav. + email_or_password_wrong: + other: E-mail a heslo sa nezhodujú. + answer: + not_found: + other: Odpoveď sa nenašla. + cannot_deleted: + other: Žiadne povolenie na odstránenie. + cannot_update: + other: Žiadne povolenie na aktualizáciu. + comment: + edit_without_permission: + other: Komentár nie je dovolené upravovať. + not_found: + other: Komentár sa nenašiel. + cannot_edit_after_deadline: + other: Čas na úpravu komentára bol príliš dlhý. + email: + duplicate: + other: E-mail už existuje. + need_to_be_verified: + other: E-mail by sa mal overiť. + verify_url_expired: + other: Platnosť overenej adresy URL e-mailu vypršala, pošlite e-mail znova. + lang: + not_found: + other: Jazykový súbor sa nenašiel. + object: + captcha_verification_failed: + other: Captcha zle. + disallow_follow: + other: Nemáte dovolené sledovať. + disallow_vote: + other: Nemáte povolené hlasovať. + disallow_vote_your_self: + other: Nemôžete hlasovať za svoj vlastný príspevok. + not_found: + other: Objekt sa nenašiel. + verification_failed: + other: Overenie zlyhalo. + email_or_password_incorrect: + other: E-mail a heslo sa nezhodujú. + old_password_verification_failed: + other: Overenie starého hesla zlyhalo + new_password_same_as_previous_setting: + other: Nové heslo je rovnaké ako predchádzajúce. + question: + already_deleted: + other: Tento príspevok bol odstránený. + not_found: + other: Otázka sa nenašla. + cannot_deleted: + other: Žiadne povolenie na odstránenie. + cannot_close: + other: Žiadne povolenie na uzavretie. + cannot_update: + other: Žiadne povolenie na aktualizáciu. + rank: + fail_to_meet_the_condition: + other: Poradie nespĺňa podmienku. + report: + handle_failed: + other: Spracovanie prehľadu zlyhalo. + not_found: + other: Prehľad sa nenašiel. + tag: + not_found: + other: Značka sa nenašla. + recommend_tag_not_found: + other: Značka Odporúčania neexistuje + recommend_tag_enter: + other: Zadajte aspoň jednu požadovanú značku. + not_contain_synonym_tags: + other: Nemal by obsahovať synonymické značky. + cannot_update: + other: Žiadne povolenie na aktualizáciu. + is_used_cannot_delete: + other: Nemôžete odstrániť značku, ktorá sa používa + cannot_set_synonym_as_itself: + other: Synonymum aktuálnej značky nemôžete nastaviť ako samotnú. + smtp: + config_from_name_cannot_be_email: + other: Meno odosielateľa nemôže byť e-mailová adresa. + theme: + not_found: + other: Téma sa nenašla. + revision: + review_underway: + other: Momentálne nie je možné upravovať, vo fronte na kontrolu je verzia. + no_permission: + other: Žiadne povolenie na revíziu. + user: + email_or_password_wrong: + other: + other: E-mail a heslo sa nezhodujú. + not_found: + other: Používateľ nenájdený. + suspended: + other: Používateľ bol pozastavený. + username_invalid: + other: Používateľské meno je neplatné. + username_duplicate: + other: Používateľské meno sa už používa. + set_avatar: + other: Nastavenie avatara zlyhalo. + cannot_update_your_role: + other: Svoju rolu nemôžete zmeniť. + not_allowed_registration: + other: V súčasnosti nie je stránka otvorená na registráciu + config: + read_config_failed: + other: Read Config zlyhal + database: + connection_failed: + other: Databázové pripojenie zlyhalo + create_table_failed: + other: Vytvorenie tabuľky zlyhalo + install: + create_config_failed: + other: Nie je možné vytvoriť súbor config.yaml. + upload: + unsupported_file_format: + other: Nepodporovaný formát súboru. + report: + spam: + name: + other: nevyžiadaná pošta + desc: + other: Tento príspevok je reklama alebo vandalizmus. Nie je to užitočné ani relevantné + pre aktuálnu tému. + rude: + name: + other: hrubý alebo urážlivý + desc: + other: Rozumný človek by považoval tento obsah za nevhodný na zdvorilý prejav. + duplicate: + name: + other: duplikát + desc: + other: Táto otázka už bola položená a už má odpoveď. + not_answer: + name: + other: nie odpoveď + desc: + other: Toto bolo uverejnené ako odpoveď, ale nepokúša sa odpovedať + na otázku. Možno by to mala byť úprava, komentár, iná otázka, + alebo úplne vymazané. + not_need: + name: + other: už nie sú potrebné + desc: + other: Tento komentár je zastaraný, konverzačný alebo nesúvisí s týmto príspevkom. + other: + name: + other: niečo iné + desc: + other: Tento príspevok si vyžaduje pozornosť zamestnancov z iného dôvodu, ktorý nie je uvedený vyššie. + question: + close: + duplicate: + name: + other: nevyžiadaná pošta + desc: + other: Táto otázka už bola položená a už má odpoveď. + guideline: + name: + other: dôvod špecifický pre komunitu + desc: + other: Táto otázka nespĺňa pokyny pre komunitu. + multiple: + name: + other: potrebuje podrobnosti alebo jasnosť + desc: + other: Táto otázka momentálne obsahuje viacero otázok v jednej. Malo by + sa zamerať len na jeden problém. + other: + name: + other: niečo iné + desc: + other: Tento príspevok vyžaduje iný dôvod, ktorý nie je uvedený vyššie. + operation_type: + asked: + other: požiadaný + answered: + other: zodpovedaný + modified: + other: upravený + notification: + action: + update_question: + other: aktualizovaná otázka + answer_the_question: + other: zodpovedaná otázka + update_answer: + other: aktualizovaná odpoveď + accept_answer: + other: prijatá odpoveď + comment_question: + other: komentovaná otázka + comment_answer: + other: komentovaná odpoveď + reply_to_you: + other: odpovedal vám + mention_you: + other: spomenul vás + your_question_is_closed: + other: Vaša otázka bola uzavretá + your_question_was_deleted: + other: Vaša otázka bola odstránená + your_answer_was_deleted: + other: Vaša odpoveď bola odstránená + your_comment_was_deleted: + other: Váš komentár bol odstránený + +# The following fields are used for interface presentation(Front-end) +ui: + how_to_format: + title: Ako formátovať + desc: >- +
  • Vytvorenie odkazov

    <https://url.com>

    [Title](https://url.com)
  • vložiť návratky medzi odseky

  • _italic_ or **bold**

  • odsadenie kódu o 4 medzery

  • citovať podľa + umiestnenie > na začiatok riadku

  • backtick označenie `ako _this_`

  • vytvorte kódové ploty s `

    ```
    code here
    ```
+ pagination: + prev: Predch + next: Ďalšie + page_title: + question: Otázka + questions: Otázky + tag: Značka + tags: Značky + tag_wiki: značka wiki + edit_tag: Upraviť značku + ask_a_question: Pridať otázku + edit_question: Úpraviť otázku + edit_answer: Úpraviť odpoveť + search: Vyhľadávanie + posts_containing: Príspevky obsahujúce + settings: Nastavenie + notifications: Oznámenia + login: Prihlásiť sa + sign_up: Prihlásiť Se + account_recovery: Obnovenie účtu + account_activation: Aktivácia účtu + confirm_email: Potvrď e-mail + account_suspended: Účet pozastavený + admin: Admin + change_email: Upraviť e-mail + install: Answer Inštalácia + upgrade: Answer Upgrade + maintenance: Údržba webových stránok + users: Užívatelia + notifications: + title: Oznámenia + inbox: Doručená pošta + achievement: Úspechy + all_read: Označiť všetko ako prečítané + show_more: Zobraziť viac + suspended: + title: Váš účet bol pozastavený + until_time: "Váš účet bol pozastavený do {{ time }}." + forever: Tento používateľ bol navždy pozastavený. + end: Nespĺňate pokyny pre komunitu. + editor: + blockquote: + text: Blockquote + bold: + text: Strong + chart: + text: Chart + flow_chart: Flow chart + sequence_diagram: Sequence diagram + class_diagram: Class diagram + state_diagram: State diagram + entity_relationship_diagram: Entity relationship diagram + user_defined_diagram: User defined diagram + gantt_chart: Gantt chart + pie_chart: Pie chart + code: + text: Code Sample + add_code: Add code sample + form: + fields: + code: + label: Code + msg: + empty: Code cannot be empty. + language: + label: Language + placeholder: Automatic detection + btn_cancel: Cancel + btn_confirm: Add + formula: + text: Formula + options: + inline: Inline formula + block: Block formula + heading: + text: Heading + options: + h1: Heading 1 + h2: Heading 2 + h3: Heading 3 + h4: Heading 4 + h5: Heading 5 + h6: Heading 6 + help: + text: Help + hr: + text: Horizontal Rule + image: + text: Image + add_image: Add image + tab_image: Upload image + form_image: + fields: + file: + label: Image File + btn: Select image + msg: + empty: File cannot be empty. + only_image: Only image files are allowed. + max_size: File size cannot exceed 4MB. + desc: + label: Description + tab_url: Image URL + form_url: + fields: + url: + label: Image URL + msg: + empty: Image URL cannot be empty. + name: + label: Description + btn_cancel: Cancel + btn_confirm: Add + uploading: Uploading + indent: + text: Indent + outdent: + text: Outdent + italic: + text: Emphasis + link: + text: Hyperlink + add_link: Add hyperlink + form: + fields: + url: + label: URL + msg: + empty: URL cannot be empty. + name: + label: Description + btn_cancel: Cancel + btn_confirm: Add + ordered_list: + text: Numbered List + unordered_list: + text: Bulleted List + table: + text: Table + heading: Heading + cell: Cell + close_modal: + title: Tento príspevok uzatváram ako... + btn_cancel: Zrušiť + btn_submit: Potvrdiť + remark: + empty: Nemôže byť prázdny. + msg: + empty: Vyberte dôvod. + report_modal: + flag_title: Označujem, aby som tento príspevok nahlásil ako ... + close_title: Tento príspevok zatváram ako ... + review_question_title: Kontrola otázky + review_answer_title: Kontrola odpovede + review_comment_title: Kontrola komentára + btn_cancel: Zrušiť + btn_submit: Potvrdiť + remark: + empty: Nemôže byť prázdny. + msg: + empty: Vyberte dôvod. + tag_modal: + title: Vytvorte novú značku + form: + fields: + display_name: + label: Zobrazovaný názov + msg: + empty: Zobrazovaný názov nemôže byť prázdny. + range: Zobrazovaný názov do 35 znakov. + slug_name: + label: URL Slug + desc: 'Musíte použiť znakovú sadu "a-z", "0-9", "+ # - ."' + msg: + empty: URL slug nemôže byť prázdny. + range: URL slug do 35 znakov. + character: URL slug obsahuje nepovolenú znakovú sadu. + desc: + label: Opis + btn_cancel: Zrušiť + btn_submit: Potvrdiť + tag_info: + created_at: Vytvorená + edited_at: Upravená + history: História + synonyms: + title: Synonymá + text: Nasledujúce značky budú premapované na + empty: Nenašli sa žiadne synonymá. + btn_add: Pridajte synonymum + btn_edit: Upraviť + btn_save: Uložiť + synonyms_text: Nasledujúce značky budú premapované na + delete: + title: Odstrániť túto značku + tip_with_posts: >- +

Nepovoľujeme odstraňovať značku s príspevkami.

+

Najskôr odstráňte túto značku z príspevkov.

+ tip_with_synonyms: >- +

Nepovoľujeme odstraňovať značku so synonymami.

+

Najskôr odstráňte z tejto značky synonymá.

+ tip: Naozaj chcete odstrániť? + close: Zavrieť + edit_tag: + title: Upraviť značku + default_reason: Upraviť značku + form: + fields: + revision: + label: Revízia + display_name: + label: Zobrazovaný názov + slug_name: + label: URL Slug + info: 'Musíte použiť znakovú sadu "a-z", "0-9", "+ # - ."' + desc: + label: Opis + edit_summary: + label: Zhrnutie + placeholder: >- + Stručne vysvetlite svoje zmeny (opravený pravopis, opravená gramatika, + vylepšené formátovanie) + btn_save_edits: Uložiť úpravy + btn_cancel: Zrušiť + dates: + long_date: MMM D + long_date_with_year: "MMM D, YYYY" + long_date_with_time: "MMM D, YYYY [o] HH:mm" + now: teraz + x_seconds_ago: "pred {{count}}s" + x_minutes_ago: "pred {{count}}m" + x_hours_ago: "pred {{count}}h" + hour: hodina + day: deň + comment: + btn_add_comment: Pridať komentár + reply_to: Reply to + btn_reply: Reply + btn_edit: Upraviť + btn_delete: Zmazať + btn_flag: Flag + btn_save_edits: Uložiť zmeny + btn_cancel: Zrušiť + show_more: Zobraziť viac komentárov + tip_question: >- + Use comments to ask for more information or suggest improvements. Avoid + answering questions in comments. + tip_answer: >- + Use comments to reply to other users or notify them of changes. If you are + adding new information, edit your post instead of commenting. + edit_answer: + title: Uprav odpoveď + default_reason: Uprav odpoveď + form: + fields: + revision: + label: Revízia + answer: + label: Odpoveď + feedback: + characters: Obsah musí mať dĺžku najmenej 6 znakov. + edit_summary: + label: Upraviť zhrnutie + placeholder: >- + Stručne vysvetlite svoje zmeny (opravený pravopis, opravená gramatika, + vylepšené formátovanie) + btn_save_edits: Uložiť úpravy + btn_cancel: Zrušiť + tags: + title: Značky + sort_buttons: + popular: Populárne + name: názov + newest: najnovšie + button_follow: Sledovať + button_following: Sledované + tag_label: otázky + search_placeholder: Filter podľa názvu značky + no_desc: Značka nemá popis. + more: Viac + ask: + title: Pridať otázku + edit_title: Upraviť otázku + default_reason: Upraviť otázku + similar_questions: Podobné otázky + form: + fields: + revision: + label: Revízia + title: + label: Názov + placeholder: Buďte konkrétny a predstavte si, že kladiete otázku inej osobe + msg: + empty: Názov nemôže byť prázdny. + range: Názov má viac ako 150 znakov -- + body: + label: Telo + msg: + empty: Telo nemôže byť prázdne. + tags: + label: Značky -- + msg: + empty: Značky nemôžu byť prázdne. + answer: + label: Odpoveď + msg: + empty: Odpoveď nemôže byť prázdna. + edit_summary: + label: Upraviť zhrnutie + placeholder: >- + Stručne vysvetlite svoje zmeny (opravený pravopis, opravená gramatika, + vylepšené formátovanie) + btn_post_question: Pošlite svoju otázku + btn_save_edits: Uložiť úpravy + answer_question: Odpovedzte na svoju vlastnú otázku + post_question&answer: Pošlite svoju otázku a odpoveď + tag_selector: + add_btn: Pridať značku + create_btn: Vytvoriť novú značku + search_tag: Vyhľadať značku -- + hint: „Popíšte, o čom je vaša otázka, vyžaduje sa aspoň jedna značka.“ + no_result: Žiadne značky sa neyhodujú + tag_required_text: Požadovaná značka (aspoň jedna) + header: + nav: + question: Otázky + tag: Značky + user: Užívatelia + profile: Profil + setting: Nastavenia + logout: Odhlásiť sa + admin: Správca + review: Preskúmanie + search: + placeholder: Vyhľadávanie + footer: + build_on: >- + Postavený na <1> Answer - open-source software, ktorý poháňa Q&A + komunity.
Vyrobené s láskou © {{cc}}. + upload_img: + name: Zmena + loading: načítavanie... + pic_auth_code: + title: captcha + placeholder: Zadajte vyššie uvedený text + msg: + empty: Captcha nemôže byť prázdna. + inactive: + first: >- + Ste takmer na konci! Poslali sme Vám aktivačný mail na adresu {{mail}}. + K aktivácií účtu postupujte prosím podľa pokynov v e-maily. + info: "Ak neprichádza, skontrolujte priečinok spamu." + another: >- + Poslali sme vám ďalší aktivačný e-mail na adresu {{mail}}. Môže to trvať niekoľko minút; Nezabudnite skontrolovať priečinok spamu. + btn_name: Opätovne odoslať aktivačný e-mail + change_btn_name: Zmeniť e-mail + msg: + empty: Nemôže byť prázdny. + login: + page_title: Vitajte na stránke {{site_name}} + login_to_continue: Pre pokračovanie sa prihláste + info_sign: Nemáte účet? <1>Sign up + info_login: Máte už účet? <1>Log in + agreements: Registráciou súhlasíte s <1>zásadami ochrany osobných údajov a <3>podmienkami služby. + forgot_pass: Zabudli ste heslo? + name: + label: Prihlasovacie meno + msg: + empty: Prihlasovacie meno nemôže byť prázdne. + range: Prihlasovacie meno nesmie mať viac ako 30 znakov. + email: + label: E-mail + msg: + empty: E-mail nemôže byť prázdny. + password: + label: Heslo + msg: + empty: Heslo nemôže byť prázdne. + different: Heslá zadané na oboch stranách sú nekonzistentné + account_forgot: + page_title: Zabudli ste heslo + btn_name: Pošlite mi e-mail na obnovenie + send_success: >- + Ak sa účet zhoduje s {{mail}}, tak by ste mali čoskoro dostať e-mail s pokynmi, ako resetovať svoje heslo. + email: + label: E-mail + msg: + empty: E-mail nemôže byť prázdny. + change_email: + page_title: Vitajte na stránke {{site_name}} + btn_cancel: Zrušiť + btn_update: Aktualizovať e-mailovú adresu + send_success: >- + Ak sa účet zhoduje s {{mail}}, tak by ste mali čoskoro dostať e-mail s pokynmi, ako resetovať svoje heslo. + email: + label: Nový e-mail + msg: + empty: E-mail nemôže byť prázdny. + password_reset: + page_title: Resetovanie hesla + btn_name: Obnoviť heslo + reset_success: >- + Úspešne ste zmenili svoje heslo; Budete presmerovaný na prihlásenie. + link_invalid: >- + Ospravedlňujeme sa, tento odkaz na obnovenie hesla už nie je platný. Možno už došlo k resetovaniu vašho hesla? + password: + label: Heslo + msg: + empty: Heslo nemôže byť prázdne. + length: Dĺžka musí byť medzi 8 a 32 + different: Heslá zadané na oboch stranách sú nekonzistentné + password_confirm: + label: Potvrďte nové heslo + settings: + page_title: Nastavenia + nav: + profile: Profil + notification: Oznámenia + account: Účet + interface: Rozhranie + profile: + heading: Profil + btn_name: Uložiť + display_name: + label: Zobrazované meno + msg: Zobrazované meno nemôže byť prázdne. + msg_range: Zobrazované meno nesmie mať viac ako 30 znakov. + username: + label: Užívateľské meno + caption: Ľudia vás môžu spomenúť ako "@username". + msg: Užívateľské meno nemôže byť prázdne. + msg_range: Používateľské meno nesmie mať viac ako 30 znakov. + character: 'Musí použiť súpravu znakov "a-z", "0-9", " - . _"' + avatar: + label: Profilová fotka + gravatar: Gravatar + gravatar_text: Fotku môžete zmeniť na <1>gravatar.com + custom: Vlastný + btn_refresh: Obnoviť + custom_text: Môžete nahrať svoju fotku. + default: Systém + msg: Nahrajte avatara prosím + bio: + label: O mne + website: + label: Webová stránka + placeholder: "https://example.com" + msg: Nesprávny formát webovej stránky + location: + label: Poloha + placeholder: "Mesto, Krajina" + notification: + heading: Oznámenia + email: + label: E-mailové upozornenia + radio: "Odpovede na vaše otázky, komentáre a ďalšie" + account: + heading: Účet + change_email_btn: Zmeniť e-mail + change_pass_btn: Zmeniť heslo + change_email_info: >- + Na túto adresu sme poslali e-mail. Postupujte podľa inštrukcií. + email: + label: E-mail + msg: E-mail nemôže byť prázdny. + password_title: Heslo + current_pass: + label: Súčasné heslo + msg: + empty: Aktuálne heslo nemôže byť prázdne. + length: Dĺžka musí byť medzi 8 a 32. + different: Zadané heslá sa nezhodujú. + new_pass: + label: Nové heslo + pass_confirm: + label: Potvrďiť nové heslo + interface: + heading: Rozhranie + lang: + label: Jazyk rozhrania + text: Jazyk používateľského rozhrania. Zmení sa pri obnove stránky. + toast: + update: aktualizácia úspešna + update_password: Heslo bolo úspešne zmenené. + flag_success: Ďakujeme za označenie. + forbidden_operate_self: Zakázané pracovať na sebe + review: Vaša revízia sa zobrazí po preskúmaní. + related_question: + title: Súvisiace otázky + btn: Pridať otázku + answers: odpovede + question_detail: + Asked: Opýtané + asked: opýtané + update: Aktualizované + edit: upravené + Views: Videné + Follow: Sledovať + Following: Sledované + answered: zodpovedaný + closed_in: Uzatvorené + show_exist: Ukázať existujúcu otázku. + answers: + title: Odpovede + score: Skóre + newest: Najnovšie + btn_accept: Súhlasiť + btn_accepted: Prijaté + write_answer: + title: Vaša odpoveď + btn_name: Pošlite svoju odpoveď + add_another_answer: Pridajte ďalšiu odpoveď + confirm_title: Pokračovať v odpovedi + continue: Pokračovať + confirm_info: >- +

Ste si istí, že chcete pridať ďalšiu odpoveď?

Mohli by ste namiesto toho použiť + úpravu na vylepšenie svojej už existujúcej odpovede.

+ empty: Odpoveď nemôže byť prázdna. + characters: Minimálna dĺžka obsahu musí byť 6 znakov. + reopen: + title: Znovu otvoriť tento príspevok + content: Ste si istý, že ho chcete znovu otvoriť? + success: Tento príspevok bol znovu otvorený + delete: + title: Odstrániť tento príspevok + question: >- + Neodporúčame mazanie otázok s odpoveďmi pretože + týmto oberáte budúcich čitateľov o tieto vedomostí.

Opakované mazanie + zodpovedaných otázok môže mať za následok zablokovanie možnosti kladenia otázok z vášho účtu. + Ste si istí, že chcete otázku odstrániť? + answer_accepted: >- +

Neodporúčame odstránenie akceptovanej odpovede pretože + týmto oberáte budúcich čitateľov o tieto vedomostí.

Opakované mazanie + akceptovaných odpovedí môže mať za následok zablokovanie možnosti odpovedať z vášho účtu. + Ste si istí, že chcete odstrániť odpoveď? + other: Ste si istí, že ju chcete odstrániť? + tip_question_deleted: Tento príspevok bol odstránený + tip_answer_deleted: Táto odpoveď bola odstránená + btns: + confirm: Potvrdiť + cancel: Zrušiť + save: Uložiť + delete: Vymazať + login: Prihlásiť sa + signup: Registrovať sa + logout: Odhlásiť sa + verify: Preveriť + add_question: Pridať otázku + approve: Schváliť + reject: Odmietnuť + skip: Preskočiť + discard_draft: Zahodiť koncept + search: + title: Výsledky vyhľadávania + keywords: Kľúčové slová + options: možnosti + follow: Sledovať + following: Sledované + counts: "{{count}} výsledky" + more: Viac + sort_btns: + relevance: Relevantnosť + newest: Najnovšie + active: Aktívne + score: Skóre + more: Viac + tips: + title: Tipy na pokročilé vyhľadávanie + tag: "<1>[tag] vyhľadávať v rámci značky" + user: "<1>user:username hľadať podľa autora" + answer: "<1>answers:0 nezodpovedané otázky" + score: "<1>score:3 Príspevky so skóre 3+" + question: "<1>is:question hľadať otázky" + is_answer: "<1>is:answer hľadať odpovede" + empty: Nemohli sme nič nájsť.
Vyskúšajte iné alebo menej špecifické kľúčové slová. + share: + name: Zdieľať + copy: Skopírovať odkaz + via: Zdieľajte príspevok cez... + copied: Skopírované + facebook: Zdieľať na Facebooku + twitter: Zdieľať na Twitteri + cannot_vote_for_self: Nemôžete hlasovať za svoj vlastný príspevok + modal_confirm: + title: Chyba... + account_result: + page_title: Vitajte na stránke {{site_name}} + success: Váš nový účet je potvrdený; Budete presmerovaný na domovskú stránku. + link: Pokračovať na domovskú stránku + invalid: >- + Ospravedlňujeme sa, tento odkaz na potvrdenie účtu už nie je platný. Váš profil už možno je aktívny. + confirm_new_email: Váš e-mail bol aktualizovaný. + confirm_new_email_invalid: >- + Ospravedlňujeme sa, tento potvrdzovací odkaz už nie je platný. Váš e-mail je už môžno zmenený. + unsubscribe: + page_title: Zrušiť odber + success_title: Úspešne zrušenie odberu + success_desc: Boli ste úspešne odstránený zo zoznamu odoberateľov a nebudete od nás dostávať žiadne ďalšie e-maily. + link: Zmeniť nastavenia + question: + following_tags: Nasledujúce značky + edit: Upraviť + save: Uložiť + follow_tag_tip: Postupujte podľa značiek a upravte si zoznam otázok. + hot_questions: Najlepšie otázky + all_questions: Všetky otázky + x_questions: "{{ count }} otázky/otázok" + x_answers: "{{ count }} odpovede/odpovedí" + questions: Otázky + answers: Odpovede + newest: Najnovšie + active: Aktívne + frequent: Časté + score: Skóre + unanswered: Nezodpovedané + modified: upravené + answered: zodpovedané + asked: opýtané + closed: uzatvorené + follow_a_tag: Sledovať značku + more: Viac + personal: + overview: Prehľad + answers: Odpovede + answer: odpoveď + questions: Otázky + question: otázka + bookmarks: Záložky + reputation: Reputácia + comments: Komentáre + votes: Hlasovanie + newest: Najnovšie + score: Skóre + edit_profile: Upraviť profil + visited_x_days: "Navštívené {{ count }} dni" + viewed: Videné + joined: Pripojené + last_login: Videné + about_me: O mne + about_me_empty: "// Dobrý deň, svet!" + top_answers: Najlepšie odpovede + top_questions: Najlepšie otázky + stats: Štatistiky + list_empty: Nenašli sa žiadne príspevky.
Chceli by ste vybrať inú kartu? + accepted: Prijaté + answered: zodpovedané + asked: opýtané + upvote: hlasovať za + downvote: hlasovať proti + mod_short: mod + mod_long: Moderátori + x_reputation: reputácia + x_votes: Získané hlasy + x_answers: odpovede + x_questions: otázky + install: + title: Odpoveď + next: Ďalšie + done: hotovo + config_yaml_error: Nie je možné vytvoriť súbor config.yaml. + lang: + label: Vyberte jazyk + db_type: + label: Databázový engine + db_username: + label: Užívateľské meno + placeholder: root + msg: Užívateľské meno nemôže byť prázdne. + db_password: + label: Heslo + placeholder: root + msg: Heslo nemôže byť prázdne. + db_host: + label: Hostiteľ databázy + placeholder: "db:3306" + msg: Hostiteľ databázy nemôže byť prázdny. + db_name: + label: Názov databázy + placeholder: odpoveď + msg: Názov databázy nemôže byť prázdny. + db_file: + label: Databázový súbor + placeholder: /data/answer.db + msg: Databázový súbor nemôže byť prázdny. + config_yaml: + title: Vytvoriť config.yaml + label: Vytvorený súbor Config.yaml. + desc: >- + Môžete vytvoriť <1>config.yaml súbor manuálne v + <1>/var/wwww/xxx/ adresári a vložte do neho nasledujúci text. + info: Potom, čo ste to urobili, kliknite na tlačidlo „Ďalej“. + site_information: Informácie o stránke + admin_account: Správca + site_name: + label: Názov stránky + msg: Názov stránky nemôže byť prázdny. + site_url: + label: URL stránky + text: Adresa vašej stránky. + msg: + empty: URL stránky nemôže byť prázdny. + incorrect: Nesprávny formát adresy URL. + contact_email: + label: kontaktný e-mail + text: E-mailová adresa kontaktu zodpovedného za túto stránku. + msg: + empty: Kontaktný e-mail nemôže byť prázdny. + incorrect: Nesprávny formát kontaktného e-mailu. + admin_name: + label: Meno + msg: Meno nemôže byť prázdne. + admin_password: + label: Heslo + text: >- + Na prihlásenie budete potrebovať toto heslo. Uložte si ho na bezpečné miesto. + msg: Heslo nemôže byť prázdne. + admin_email: + label: E-mail + text: Na prihlásenie budete potrebovať tento e-mail. + msg: + empty: E-mail nemôže byť prázdny. + incorrect: Nesprávny formát e-mailu + ready_title: Vaša odpoveď je pripravená! + ready_desc: >- + Ak niekedy budete chcieť zmeniť viac nastavení, navštívte stránku <1>admin section; + Nájdete ju v ponuke stránok. + good_luck: „Bavte sa a veľa šťastia!“ + warn_title: Upozornenie + warn_desc: >- + Súbor <1>config.yaml už existuje. Ak v tomto súbore potrebujete resetovať niektorú z konfiguračných položiek, najskôr ho odstráňte. + install_now: Môžete skúsiť <1>installing now. + installed: Už nainštalované + installed_desc: >- + Zdá sa, že ste už aplikáciu answer nainštalovali. Ak chcete aplikáciu preinštalovať, najprv vymažte staré tabuľky z databázy. + db_failed: Databázové pripojenie zlyhalo + db_failed_desc: >- + To buď znamená, že informácia o databáze v súbore <1>config.yaml sú nesprávna alebo že sa nepodarilo nadviazať kontakt s databázovým serverom. To môže znamenať, že databázový server vášho hostiteľa nefunguje. + counts: + views: videnia + votes: hlasy + answers: odpovede + accepted: prijaté + page_404: + http_error: HTTP Error 404 + desc: "Žiaľ, táto stránka neexistuje." + back_home: Späť na domovskú stránku + page_50X: + http_error: HTTP Error 500 + desc: Na serveri sa vyskytla chyba a nebolo možné dokončiť vašu požiadavku. + back_home: Späť na domovskú stránku + page_maintenance: + desc: "Prebieha údržba, čoskoro sa vrátime." + nav_menus: + dashboard: Nástenka + contents: Obsah + questions: Otázky + answers: Odpovede + users: Užívatelia + flags: Vlajky + settings: Nastavenia + general: Všeobecné + interface: Rozhranie + smtp: SMTP + branding: Branding + legal: legálne + write: písať + tos: Podmienky služby + privacy: Súkromie + seo: SEO + customize: Prispôsobiť + themes: Témy + css-html: CSS/HTML + login: Prihlásiť sa + admin: + admin_header: + title: Admin + dashboard: + title: Nástenka + welcome: Vitajte v Administrátorovi odpovedí! + site_statistics: Štatistiky stránky + questions: "Otázky:" + answers: "Odpovede:" + comments: "Komentáre:" + votes: "Hlasy:" + active_users: "Aktívni používatelia:" + flags: "Vlajky:" + site_health_status: Site Health Status + version: "Verzia:" + https: "HTTPS:" + uploading_files: "Nahrávanie súborov:" + smtp: "SMTP:" + timezone: "Časové pásmo:" + system_info: Systémové informácie + storage_used: "Použité úložisko:" + uptime: "Uptime:" + answer_links: Odkazy na odpovede + documents: Dokumenty + feedback: Spätná väzba + support: Podpora + review: Preskúmanie + config: Konfigurácia + update_to: Aktualizovať na + latest: Posledné + check_failed: Skontrolovať zlyhanie + "yes": "Áno" + "no": "Nie" + not_allowed: Nepovolené + allowed: Povolené + enabled: Povolené + disabled: Zablokované + flags: + title: Vlajky + pending: Prebiehajúce + completed: Dokončené + flagged: Označené + created: Vytvorené + action: Akcia + review: Preskúmanie + change_modal: + title: Zmeňte stav používateľa na... + btn_cancel: Zrušiť + btn_submit: Odovzdať + normal_name: normálne + normal_desc: Normálny používateľ môže klásť a odpovedať na otázky. + suspended_name: pozastavené + suspended_desc: Pozastavený používateľ sa nemôže prihlásiť. + deleted_name: vymazané + deleted_desc: "Odstrániť profil, autentifikačné združenia." + inactive_name: neaktívne + inactive_desc: Neaktívny užívateľ musí znovu overiť svoj e-mail. + confirm_title: Odstráňte tohto používateľa + confirm_content: Ste si istí, že chcete tohto používateľa odstrániť? Táto akcia sa nedá zmeniť + confirm_btn: Vymazať + msg: + empty: Vyberte dôvod. + status_modal: + title: "Zmena {{ type }} stav na..." + normal_name: normálne + normal_desc: Normálny príspevok je k dispozícii pre všetkých. + closed_name: Uzavreté + closed_desc: "Na uzavretú otázku nemôžete odpovedať, ale stále ju môžete upravovať, hlasovať a komentovať." + deleted_name: Vymazané + deleted_desc: Získaná a stratená reputácia sa obnoví. + btn_cancel: Zrušiť + btn_submit: Odovdať + btn_next: Ďalšie + user_role_modal: + title: Zmeňte rolu používateľa na... + btn_cancel: Zrušiť + btn_submit: Odovzdať + users: + title: Používatelia + name: Meno + email: E-mail + reputation: Reputácia + created_at: Čas vytvorenia + delete_at: Čas vymazania + suspend_at: Čas pozastavenia + status: Stav + role: Rola + action: Akcia + change: Zmena + all: Všetko + staff: Personál + inactive: Neaktívne + suspended: Pozastavené + deleted: Vymazané + normal: Normálné + Moderator: Moderátor + Admin: Admin + User: Používateľ + filter: + placeholder: "Filter podľa mena, používateľ: ID" + set_new_password: Nastaviť nové heslo + change_status: Zmentiť stavu + change_role: Zmeniť rolu + show_logs: Zobraziť protokoly + add_user: Pridať používateľa + new_password_modal: + title: Nastaviť nové heslo + form: + fields: + password: + label: Heslo + text: Používateľ bude odhlásený a bude sa musieť znova prihlásiť. + msg: Heslo musí mať dĺžku 8-32 znakov. + btn_cancel: Zrušiť + btn_submit: Odovzdať + user_modal: + title: Pridať nového používateľa + form: + fields: + display_name: + label: Zobraziť meno + msg: Zobrazené meno musí mať dlhú dĺžku 3-30 znakov. + email: + label: E-mail + msg: E-mail nie je platný. + password: + label: Heslo + msg: Heslo musí mať dĺžku 8-32 znakov. + + btn_cancel: Zrušiť + btn_submit: Odovzdať + + questions: + page_title: Otázky + normal: Normalne + closed: Uzatvorené + deleted: Vymazané + post: poslané + votes: Hlasy + answers: Odpovede + created: Vytvorené + status: Stav + action: Akcia + change: Zmena + filter: + placeholder: "Filter podľa názvu, otázka:id" + answers: + page_title: Odpovede + normal: Normalne + deleted: Vymazané + post: Poslané + votes: Hlasy + created: Vytvorené + status: Stav + action: Akcia + change: Zmena + filter: + placeholder: "Filter podľa názvu, odpoveď:id" + general: + page_title: Všeobecné + name: + label: Názov stránky + msg: Názov stránky nemôže byť prázdny. + text: "Názov tejto stránky, ako sa používa v titulnej značke." + site_url: + label: URL stránky + msg: URL stránky nemôže byť prázdne. + validate: Prosím vložte platnú URL. + text: Adresa vašej stránky. + short_desc: + label: Krátky popis stránky + msg: Krátky popis stránky nemôže byť prázdny. + text: "Krátky popis, ako sa používa v titulnej značke na domovskej stránke." + desc: + label: Popis stránky + msg: Popis stránky nemôže byť prázdny. + text: "Popíšte túto stránku jednou vetou, ako sa používa v značke meta description." + contact_email: + label: Kontaktný e-mail + msg: Kontaktný e-mail nemôže byť prázdny. + validate: Kontaktný e-mail je neplatný. + text: E-mailová adresa kontaktu zodpovedného za túto stránku. + interface: + page_title: Rozhranie + language: + label: Jazyk rozhrania + msg: Jazyk rozhrania nemôže byť prázdny. + text: Jazyk používateľského rozhrania. Zmení sa po obnovení stránky. + time_zone: + label: Časové pásmo + msg: Časové pásmo nemôže byť prázdne. + text: Vyberte si mesto v rovnakom časovom pásme v akom ste vy. + smtp: + page_title: SMTP + from_email: + label: E-mail odosielateľa + msg: E-mail odosielateľa nemôže byť prázdny. + text: E-mailová adresa, z ktorej sa odosielajú e-maily. + from_name: + label: Meno odosielateľa + msg: Meno odosielateľa nemôže byť prázdne. + text: Meno, z ktorého sa odosielajú e-maily. + smtp_host: + label: Hostiteľ SMTP + msg: Hostiteľ SMTP nemôže byť prázdny. + text: Váš mailový server. + encryption: + label: Šifrovanie + msg: Šifrovanie nemôže byť prázdne. + text: Pre väčšinu serverov je SSL odporúčaná možnosť. + ssl: SSL + none: Žiadne + smtp_port: + label: SMTP Port + msg: Port SMTP musí byť číslo z intervalu 1 ~ 65535. + text: Port na váš e-mailový server. + smtp_username: + label: Používateľské meno SMTP + msg: Používateľské meno SMTP nemôže byť prázdne. + smtp_password: + label: Heslo SMTP + msg: Heslo SMTP nemôže byť prázdne. + test_email_recipient: + label: Prijemcovia testovacieho e-mailu + text: Zadajte e-mailovú adresu, na ktorú sa budú odosielať testy. + msg: Príjemcovia testovacieho e-mailu sú neplatní + smtp_authentication: + label: Povoliť autentifikáciu + title: Autentifikácia SMTP + msg: Autentifikácia SMTP nemôže byť prázdna. + "yes": "Áno" + "no": "Nie" + branding: + page_title: Branding + logo: + label: Logo + msg: Logo nemôže byť prázdne. + text: Obrázok loga v ľavej hornej časti vašej stránky. Použite široký obdĺžnikový obrázok s výškou 56 a pomerom strán väčším ako 3:1. Ak nezadáte nič, tak sa zobrazí text názvu stránky. + mobile_logo: + label: Logo mobilu + text: Logo použité na mobilnej verzii vášho webu. Použite široký obdĺžnikový obrázok s výškou 56. Ak pole ponecháte prázdne, použije sa obrázok z nastavenia „logo“. + square_icon: + label: Štvorcová ikona + msg: Ikona štvorca nemôže byť prázdna. + text: Obrázok použitý ako základ pre ikony metadát. V ideálnom prípade by mal byť väčšií ako 512 x 512. + favicon: + label: favicon + text: Favicon pre váš web. Ak chcete cez CDN fungovať správne, musí byť vo formáte png. Veľkosť sa zmení na 32 x 32. Ak nebude nič zadané, použije sa „štvorcová ikona“. + legal: + page_title: Legálne + terms_of_service: + label: Podmienky služby + text: "Tu môžete pridať obsah zmluvných podmienok. Ak už máte dokument umiestnený inde, uveďte tu celú URL adresu." + privacy_policy: + label: Zásady ochrany osobných údajov + text: "Tu môžete pridať obsah zásad ochrany osobných údajov. Ak už máte dokument umiestnený inde, uveďte tu celú URL adresu." + write: + page_title: Písať + recommend_tags: + label: Odporúčané značky + text: "Vyššie zadajte tag slug, jednu značku na riadok." + required_tag: + title: Požadovaná značka + label: Nastavte odporúčanú značku podľa potreby + text: "Každá nová otázka musí mať aspoň jedenu odporúčaciu značku." + reserved_tags: + label: Vyhradené značky + text: "Vyhradené značky môže k príspevku pridať iba moderátor" + seo: + page_title: SEO + permalink: + label: trvalý odkaz + text: Vlastné štruktúry URL môžu zlepšiť použiteľnosť a doprednú kompatibilitu vašich odkazov. + robots: + label: robots.txt + text: Toto natrvalo prepíše všetky nastavenia súvisiace so stránkou. + themes: + page_title: Témy + themes: + label: Témy + text: Vyberte existujúcu tému. + navbar_style: + label: Štýl navigačnej lišty + text: Vyberte existujúcu tému. + primary_color: + label: Primárna farba + text: Upraviť farby používané vašími motívmi + css_and_html: + page_title: CSS and HTML + custom_css: + label: Vlastné CSS + text: Toto sa vloží ako + head: + label: Head + text: Toto sa vloží pred + header: + label: Hlavička + text: Toto sa vloží po + footer: + label: Päta + text: Toto sa vloží pred . + login: + page_title: Prihlásenie + membership: + title: Členstvo + label: Povoliť nové registrácie + text: Vypnúť, aby sa zabránilo vytvorenie nového účtu hocikým. + private: + title: Súkromné + label: Vyžaduje sa prihlásenie + text: Do tejto komunity majú prístup iba prihlásení používatelia + + form: + optional: (voliteľné) + empty: nemôže byť prázdne + invalid: je neplatné + btn_submit: Uložiť + not_found_props: "Požadovaná vlastnosť {{ key }} nebola nájdená." + page_review: + review: Preskúmanie + proposed: navrhované + question_edit: Úprava otázky + answer_edit: Úprava odpovede + tag_edit: Úprava značky + edit_summary: Upraviť súhrn + edit_question: Upraviť otázku + edit_answer: Upraviť odpoveď + edit_tag: Upraviť značku + empty: Nezostali žiadne úlohy kontroly. + timeline: + undeleted: zrušené zmazanie + deleted: vymazané + downvote: hlasovať proti + upvote: hlasovať za + accept: akceptované + cancelled: zrušené + commented: komentované + rollback: rollback + edited: zmenené + answered: odpovedané + asked: spýtané + closed: uzavreté + reopened: znovu otvorené + created: vytvorené + title: "História pre" + tag_title: "Časová os pre" + show_votes: "Zobraziť hlasy" + n_or_a: N/A + title_for_question: "Časová os pre" + title_for_answer: "Časová os odpovede pre {{ title }} od {{ author }}" + title_for_tag: "Časová os pre značku" + datetime: Dátum a čas + type: Typ + by: Od + comment: Komentár + no_data: "Nič sa nám nepodarilo nájsť." + users: + title: Použivatelia + users_with_the_most_reputation: Používatelia s najvyšším skóre reputácie + users_with_the_most_vote: Používatelia, ktorí hlasovali najviac + staffs: Zamestnanci našej komunity + reputation: reputácia + votes: hlasy + prompt: + leave_page: Ste si istý, že chcete opustiť stránku? + changes_not_save: Vaše zmeny nemusia byť uložené. + draft: + discard_confirm: Naozaj chcete zahodiť svoj koncept? + messages: + post_deleted: Tento príspevok bol odstránený. From 30f180740f152eca9088635313e6bd43a8daee18 Mon Sep 17 00:00:00 2001 From: Fen Date: Mon, 27 Mar 2023 14:19:37 +0800 Subject: [PATCH 16/32] New Crowdin updates (#287) * New translations en_US.yaml (French) * New translations en_US.yaml (Spanish) * New translations en_US.yaml (German) * New translations en_US.yaml (Italian) * New translations en_US.yaml (Japanese) * New translations en_US.yaml (Korean) * New translations en_US.yaml (Portuguese) * New translations en_US.yaml (Russian) * New translations en_US.yaml (Slovak) * New translations en_US.yaml (Turkish) * New translations en_US.yaml (Chinese Simplified) * New translations en_US.yaml (Chinese Traditional) * New translations en_US.yaml (Vietnamese) * New translations en_US.yaml (Indonesian) * lang: add sk_SK translation (#267) * lang: sk_SK init fom en_US * lang: translate backend to sk_SK * translated to the dates, without editor * add translations * add translations * add slovak to i18n.yaml * New translations en_US.yaml (French) * New translations en_US.yaml (Spanish) * New translations en_US.yaml (German) * New translations en_US.yaml (Italian) * New translations en_US.yaml (Japanese) * New translations en_US.yaml (Korean) * New translations en_US.yaml (Slovak) --------- Co-authored-by: Jozef Rebjak --- i18n/de_DE.yaml | 11 ++++++ i18n/es_ES.yaml | 11 ++++++ i18n/fr_FR.yaml | 11 ++++++ i18n/id_ID.yaml | 13 ++++++- i18n/it_IT.yaml | 11 ++++++ i18n/ja_JP.yaml | 11 ++++++ i18n/ko_KR.yaml | 11 ++++++ i18n/pt_PT.yaml | 13 ++++++- i18n/ru_RU.yaml | 13 ++++++- i18n/sk_SK.yaml | 98 +++++++++++++++++++------------------------------ i18n/tr_TR.yaml | 13 ++++++- i18n/vi_VN.yaml | 13 ++++++- i18n/zh_CN.yaml | 13 ++++++- i18n/zh_TW.yaml | 13 ++++++- 14 files changed, 187 insertions(+), 68 deletions(-) diff --git a/i18n/de_DE.yaml b/i18n/de_DE.yaml index c754187b..0af33e9c 100644 --- a/i18n/de_DE.yaml +++ b/i18n/de_DE.yaml @@ -47,6 +47,8 @@ backend: other: Keine Berechtigung zum Löschen. cannot_update: other: Keine Berechtigung zum Aktualisieren. + question_closed_cannot_add: + other: Questions are closed and cannot be added. comment: edit_without_permission: other: Kommentar kann nicht bearbeitet werden. @@ -103,6 +105,8 @@ backend: not_found: other: Report not found. tag: + already_exist: + other: Tag already exists. not_found: other: Schlagwort nicht gefunden. recommend_tag_not_found: @@ -261,6 +265,7 @@ ui: tag: Schlagwort tags: Schlagwörter tag_wiki: tag wiki + create_tag: Create Tag edit_tag: Edit Tag ask_a_question: Add Question edit_question: Edit Question @@ -281,6 +286,8 @@ ui: upgrade: Answer Upgrade maintenance: Website Maintenance users: Users + http_404: HTTP Error 404 + http_50X: HTTP Error 500 notifications: title: Notifications inbox: Inbox @@ -433,6 +440,7 @@ ui: label: Description btn_cancel: Cancel btn_submit: Submit + btn_post: Post new tag tag_info: created_at: Created edited_at: Edited @@ -1198,6 +1206,9 @@ ui: label: Timezone msg: Timezone cannot be empty. text: Choose a city in the same timezone as you. + avatar: + label: Default Avatar + text: For users without a custom avatar of their own. smtp: page_title: SMTP from_email: diff --git a/i18n/es_ES.yaml b/i18n/es_ES.yaml index 06c98663..3d29087d 100644 --- a/i18n/es_ES.yaml +++ b/i18n/es_ES.yaml @@ -47,6 +47,8 @@ backend: other: Sin permiso para eliminar. cannot_update: other: Sin permiso para actualizar. + question_closed_cannot_add: + other: Questions are closed and cannot be added. comment: edit_without_permission: other: Edición del comentario no permitida. @@ -103,6 +105,8 @@ backend: not_found: other: Informe no encontrado. tag: + already_exist: + other: Tag already exists. not_found: other: Etiqueta no encontrada. recommend_tag_not_found: @@ -282,6 +286,7 @@ ui: tag: Etiqueta tags: Etiquetas tag_wiki: tag wiki + create_tag: Create Tag edit_tag: Editar etiqueta ask_a_question: Añadir Pregunta edit_question: Editar Pregunta @@ -302,6 +307,8 @@ ui: upgrade: Actualización de Answer maintenance: Mantenimiento del sitio web users: Usuarios + http_404: HTTP Error 404 + http_50X: HTTP Error 500 notifications: title: Notificaciones inbox: Buzón de entrada @@ -454,6 +461,7 @@ ui: label: Description btn_cancel: Cancelar btn_submit: Enviar + btn_post: Post new tag tag_info: created_at: Creado edited_at: Editado @@ -1223,6 +1231,9 @@ ui: label: Timezone msg: Timezone cannot be empty. text: Choose a city in the same timezone as you. + avatar: + label: Default Avatar + text: For users without a custom avatar of their own. smtp: page_title: SMTP from_email: diff --git a/i18n/fr_FR.yaml b/i18n/fr_FR.yaml index a353ddeb..b368ccf0 100644 --- a/i18n/fr_FR.yaml +++ b/i18n/fr_FR.yaml @@ -47,6 +47,8 @@ backend: other: Pas de permission pour supprimer. cannot_update: other: Pas de permission pour mettre à jour. + question_closed_cannot_add: + other: Questions are closed and cannot be added. comment: edit_without_permission: other: Les commentaires ne sont pas autorisés à être modifiés. @@ -103,6 +105,8 @@ backend: not_found: other: Rapport non trouvé. tag: + already_exist: + other: Tag already exists. not_found: other: Tag non trouvé. recommend_tag_not_found: @@ -261,6 +265,7 @@ ui: tag: Étiquette tags: Étiquettes tag_wiki: tag wiki + create_tag: Create Tag edit_tag: Modifier l'étiquette ask_a_question: Ajouter une question edit_question: Modifier la question @@ -281,6 +286,8 @@ ui: upgrade: Mise à jour d'Answer maintenance: Maintenance du site users: Utilisateurs + http_404: HTTP Error 404 + http_50X: HTTP Error 500 notifications: title: Notifications inbox: Boîte de réception @@ -433,6 +440,7 @@ ui: label: Description btn_cancel: Annuler btn_submit: Valider + btn_post: Post new tag tag_info: created_at: Créé edited_at: Modifié @@ -1198,6 +1206,9 @@ ui: label: Fuseau Horaire msg: Le fuseau horaire ne peut pas être vide. text: Choisissez une ville dans le même fuseau horaire que vous. + avatar: + label: Default Avatar + text: For users without a custom avatar of their own. smtp: page_title: SMTP from_email: diff --git a/i18n/id_ID.yaml b/i18n/id_ID.yaml index 710fe388..a3010e5d 100644 --- a/i18n/id_ID.yaml +++ b/i18n/id_ID.yaml @@ -47,6 +47,8 @@ backend: other: Tidak memiliki izin untuk menghapus. cannot_update: other: Tidak memiliki izin untuk memperbaharui. + question_closed_cannot_add: + other: Questions are closed and cannot be added. comment: edit_without_permission: other: Komentar tidak boleh diedit. @@ -103,6 +105,8 @@ backend: not_found: other: Laporan tidak ditemukan. tag: + already_exist: + other: Tag already exists. not_found: other: Tag tidak ditemukan. recommend_tag_not_found: @@ -261,6 +265,7 @@ ui: tag: Tag tags: Tags tag_wiki: tag wiki + create_tag: Create Tag edit_tag: Ubah Tag ask_a_question: Tambahkan Pertanyaan edit_question: Sunting Pertanyaan @@ -281,6 +286,8 @@ ui: upgrade: Meng-upgrade Answer maintenance: Pemeliharaan Website users: Pengguna + http_404: HTTP Error 404 + http_50X: HTTP Error 500 notifications: title: Pemberitahuan inbox: Kotak Masuk @@ -424,7 +431,7 @@ ui: range: Display name up to 35 characters. slug_name: label: URL Slug - desc: 'Must use the character set "a-z", "0-9", "+ # - ."' + desc: URL slug up to 35 characters. msg: empty: URL slug cannot be empty. range: URL slug up to 35 characters. @@ -433,6 +440,7 @@ ui: label: Description btn_cancel: Cancel btn_submit: Submit + btn_post: Post new tag tag_info: created_at: Dibuat edited_at: Disunting @@ -1198,6 +1206,9 @@ ui: label: Timezone msg: Timezone cannot be empty. text: Choose a city in the same timezone as you. + avatar: + label: Default Avatar + text: For users without a custom avatar of their own. smtp: page_title: SMTP from_email: diff --git a/i18n/it_IT.yaml b/i18n/it_IT.yaml index 6e62187e..51004ba5 100644 --- a/i18n/it_IT.yaml +++ b/i18n/it_IT.yaml @@ -47,6 +47,8 @@ backend: other: Permesso per cancellare mancante. cannot_update: other: Nessun permesso per l'aggiornamento. + question_closed_cannot_add: + other: Questions are closed and cannot be added. comment: edit_without_permission: other: Non si hanno di privilegi sufficienti per modificare il commento @@ -103,6 +105,8 @@ backend: not_found: other: Report non trovato tag: + already_exist: + other: Tag already exists. not_found: other: Etichetta non trovata recommend_tag_not_found: @@ -261,6 +265,7 @@ ui: tag: Tag tags: Tags tag_wiki: tag wiki + create_tag: Create Tag edit_tag: Modifica Tag ask_a_question: Aggiungi una domanda edit_question: Modifica Domanda @@ -281,6 +286,8 @@ ui: upgrade: Answer Upgrade maintenance: Website Maintenance users: Users + http_404: HTTP Error 404 + http_50X: HTTP Error 500 notifications: title: Notifications inbox: Inbox @@ -433,6 +440,7 @@ ui: label: Description btn_cancel: Cancel btn_submit: Submit + btn_post: Post new tag tag_info: created_at: Created edited_at: Edited @@ -1198,6 +1206,9 @@ ui: label: Timezone msg: Timezone cannot be empty. text: Choose a city in the same timezone as you. + avatar: + label: Default Avatar + text: For users without a custom avatar of their own. smtp: page_title: SMTP from_email: diff --git a/i18n/ja_JP.yaml b/i18n/ja_JP.yaml index 079d180e..ee25d02a 100644 --- a/i18n/ja_JP.yaml +++ b/i18n/ja_JP.yaml @@ -47,6 +47,8 @@ backend: other: No permission to delete. cannot_update: other: No permission to update. + question_closed_cannot_add: + other: Questions are closed and cannot be added. comment: edit_without_permission: other: Comment are not allowed to edit. @@ -103,6 +105,8 @@ backend: not_found: other: Report not found. tag: + already_exist: + other: Tag already exists. not_found: other: Tag not found. recommend_tag_not_found: @@ -261,6 +265,7 @@ ui: tag: Tag tags: Tags tag_wiki: tag wiki + create_tag: Create Tag edit_tag: Edit Tag ask_a_question: Add Question edit_question: Edit Question @@ -281,6 +286,8 @@ ui: upgrade: Answer Upgrade maintenance: Website Maintenance users: Users + http_404: HTTP Error 404 + http_50X: HTTP Error 500 notifications: title: Notifications inbox: Inbox @@ -433,6 +440,7 @@ ui: label: Description btn_cancel: Cancel btn_submit: Submit + btn_post: Post new tag tag_info: created_at: Created edited_at: Edited @@ -1198,6 +1206,9 @@ ui: label: Timezone msg: Timezone cannot be empty. text: Choose a city in the same timezone as you. + avatar: + label: Default Avatar + text: For users without a custom avatar of their own. smtp: page_title: SMTP from_email: diff --git a/i18n/ko_KR.yaml b/i18n/ko_KR.yaml index 079d180e..ee25d02a 100644 --- a/i18n/ko_KR.yaml +++ b/i18n/ko_KR.yaml @@ -47,6 +47,8 @@ backend: other: No permission to delete. cannot_update: other: No permission to update. + question_closed_cannot_add: + other: Questions are closed and cannot be added. comment: edit_without_permission: other: Comment are not allowed to edit. @@ -103,6 +105,8 @@ backend: not_found: other: Report not found. tag: + already_exist: + other: Tag already exists. not_found: other: Tag not found. recommend_tag_not_found: @@ -261,6 +265,7 @@ ui: tag: Tag tags: Tags tag_wiki: tag wiki + create_tag: Create Tag edit_tag: Edit Tag ask_a_question: Add Question edit_question: Edit Question @@ -281,6 +286,8 @@ ui: upgrade: Answer Upgrade maintenance: Website Maintenance users: Users + http_404: HTTP Error 404 + http_50X: HTTP Error 500 notifications: title: Notifications inbox: Inbox @@ -433,6 +440,7 @@ ui: label: Description btn_cancel: Cancel btn_submit: Submit + btn_post: Post new tag tag_info: created_at: Created edited_at: Edited @@ -1198,6 +1206,9 @@ ui: label: Timezone msg: Timezone cannot be empty. text: Choose a city in the same timezone as you. + avatar: + label: Default Avatar + text: For users without a custom avatar of their own. smtp: page_title: SMTP from_email: diff --git a/i18n/pt_PT.yaml b/i18n/pt_PT.yaml index 4b4f8e73..c4c33abc 100644 --- a/i18n/pt_PT.yaml +++ b/i18n/pt_PT.yaml @@ -47,6 +47,8 @@ backend: other: Sem permissão para remover. cannot_update: other: Sem permissão para atualizar. + question_closed_cannot_add: + other: Questions are closed and cannot be added. comment: edit_without_permission: other: Não é possível alterar comentários. @@ -103,6 +105,8 @@ backend: not_found: other: Relatório não encontrado. tag: + already_exist: + other: Tag already exists. not_found: other: Marcador não encontrado. recommend_tag_not_found: @@ -261,6 +265,7 @@ ui: tag: Tag tags: Tags tag_wiki: tag wiki + create_tag: Create Tag edit_tag: Edit Tag ask_a_question: Add Question edit_question: Edit Question @@ -281,6 +286,8 @@ ui: upgrade: Atualização do Answer maintenance: Manutenção do website users: Usuários + http_404: HTTP Error 404 + http_50X: HTTP Error 500 notifications: title: Notificações inbox: Caixa de entrada @@ -424,7 +431,7 @@ ui: range: Display name up to 35 characters. slug_name: label: URL Slug - desc: 'Must use the character set "a-z", "0-9", "+ # - ."' + desc: URL slug up to 35 characters. msg: empty: URL slug cannot be empty. range: URL slug up to 35 characters. @@ -433,6 +440,7 @@ ui: label: Description btn_cancel: Cancel btn_submit: Submit + btn_post: Post new tag tag_info: created_at: Created edited_at: Edited @@ -1198,6 +1206,9 @@ ui: label: Timezone msg: Timezone cannot be empty. text: Choose a city in the same timezone as you. + avatar: + label: Default Avatar + text: For users without a custom avatar of their own. smtp: page_title: SMTP from_email: diff --git a/i18n/ru_RU.yaml b/i18n/ru_RU.yaml index e383ff31..29fbd6c5 100644 --- a/i18n/ru_RU.yaml +++ b/i18n/ru_RU.yaml @@ -47,6 +47,8 @@ backend: other: Недостаточно прав для удаления. cannot_update: other: Нет прав для обновления. + question_closed_cannot_add: + other: Questions are closed and cannot be added. comment: edit_without_permission: other: Комментарий не может редактироваться. @@ -103,6 +105,8 @@ backend: not_found: other: Отчет не найден. tag: + already_exist: + other: Tag already exists. not_found: other: Тег не найден. recommend_tag_not_found: @@ -261,6 +265,7 @@ ui: tag: Тэг tags: Теги tag_wiki: wiki тэг + create_tag: Create Tag edit_tag: Изменить тег ask_a_question: Добавить вопрос edit_question: Редактировать вопрос @@ -281,6 +286,8 @@ ui: upgrade: Обновить ответ maintenance: Обслуживание сайта users: Пользователи + http_404: HTTP Error 404 + http_50X: HTTP Error 500 notifications: title: Уведомления inbox: Входящие @@ -424,7 +431,7 @@ ui: range: Отображаемое имя до 35 символов. slug_name: label: Идентификатор URL - desc: 'Необходимо использовать набор символов "a-z", "0-9", "+ # - ."' + desc: URL slug up to 35 characters. msg: empty: URL slug не может быть пустым. range: URL slug до 35 символов. @@ -433,6 +440,7 @@ ui: label: Description btn_cancel: Отмена btn_submit: Отправить + btn_post: Post new tag tag_info: created_at: Создано edited_at: Отредактировано @@ -1198,6 +1206,9 @@ ui: label: Timezone msg: Timezone cannot be empty. text: Choose a city in the same timezone as you. + avatar: + label: Default Avatar + text: For users without a custom avatar of their own. smtp: page_title: SMTP from_email: diff --git a/i18n/sk_SK.yaml b/i18n/sk_SK.yaml index 1674afd8..976fae2e 100644 --- a/i18n/sk_SK.yaml +++ b/i18n/sk_SK.yaml @@ -1,5 +1,4 @@ -# The following fields are used for back-end - +#The following fields are used for back-end backend: base: success: @@ -48,6 +47,8 @@ backend: other: Žiadne povolenie na odstránenie. cannot_update: other: Žiadne povolenie na aktualizáciu. + question_closed_cannot_add: + other: Questions are closed and cannot be added. comment: edit_without_permission: other: Komentár nie je dovolené upravovať. @@ -104,6 +105,8 @@ backend: not_found: other: Prehľad sa nenašiel. tag: + already_exist: + other: Tag already exists. not_found: other: Značka sa nenašla. recommend_tag_not_found: @@ -166,8 +169,7 @@ backend: name: other: nevyžiadaná pošta desc: - other: Tento príspevok je reklama alebo vandalizmus. Nie je to užitočné ani relevantné - pre aktuálnu tému. + other: Tento príspevok je reklama alebo vandalizmus. Nie je to užitočné ani relevantné pre aktuálnu tému. rude: name: other: hrubý alebo urážlivý @@ -182,9 +184,7 @@ backend: name: other: nie odpoveď desc: - other: Toto bolo uverejnené ako odpoveď, ale nepokúša sa odpovedať - na otázku. Možno by to mala byť úprava, komentár, iná otázka, - alebo úplne vymazané. + other: Toto bolo uverejnené ako odpoveď, ale nepokúša sa odpovedať na otázku. Možno by to mala byť úprava, komentár, iná otázka, alebo úplne vymazané. not_need: name: other: už nie sú potrebné @@ -211,8 +211,7 @@ backend: name: other: potrebuje podrobnosti alebo jasnosť desc: - other: Táto otázka momentálne obsahuje viacero otázok v jednej. Malo by - sa zamerať len na jeden problém. + other: Táto otázka momentálne obsahuje viacero otázok v jednej. Malo by sa zamerať len na jeden problém. other: name: other: niečo iné @@ -251,21 +250,12 @@ backend: other: Vaša odpoveď bola odstránená your_comment_was_deleted: other: Váš komentár bol odstránený - -# The following fields are used for interface presentation(Front-end) +#The following fields are used for interface presentation(Front-end) ui: how_to_format: title: Ako formátovať desc: >- -
  • Vytvorenie odkazov

    <https://url.com>

    [Title](https://url.com)
  • vložiť návratky medzi odseky

  • _italic_ or **bold**

  • odsadenie kódu o 4 medzery

  • citovať podľa - umiestnenie > na začiatok riadku

  • backtick označenie `ako _this_`

  • vytvorte kódové ploty s `

    ```
    code here
    ```
+
  • Vytvorenie odkazov

    <https://url.com>

    [Title](https://url.com)
  • vložiť návratky medzi odseky

  • _italic_ or **bold**

  • odsadenie kódu o 4 medzery

  • citovať podľa umiestnenie > na začiatok riadku

  • backtick označenie `ako _this_`

  • vytvorte kódové ploty s `

    ```
    code here
    ```
pagination: prev: Predch next: Ďalšie @@ -275,6 +265,7 @@ ui: tag: Značka tags: Značky tag_wiki: značka wiki + create_tag: Create Tag edit_tag: Upraviť značku ask_a_question: Pridať otázku edit_question: Úpraviť otázku @@ -295,6 +286,8 @@ ui: upgrade: Answer Upgrade maintenance: Údržba webových stránok users: Užívatelia + http_404: HTTP Error 404 + http_50X: HTTP Error 500 notifications: title: Oznámenia inbox: Doručená pošta @@ -447,6 +440,7 @@ ui: label: Opis btn_cancel: Zrušiť btn_submit: Potvrdiť + btn_post: Post new tag tag_info: created_at: Vytvorená edited_at: Upravená @@ -462,11 +456,9 @@ ui: delete: title: Odstrániť túto značku tip_with_posts: >- -

Nepovoľujeme odstraňovať značku s príspevkami.

-

Najskôr odstráňte túto značku z príspevkov.

+

Nepovoľujeme odstraňovať značku s príspevkami.

Najskôr odstráňte túto značku z príspevkov.

tip_with_synonyms: >- -

Nepovoľujeme odstraňovať značku so synonymami.

-

Najskôr odstráňte z tejto značky synonymá.

+

Nepovoľujeme odstraňovať značku so synonymami.

Najskôr odstráňte z tejto značky synonymá.

tip: Naozaj chcete odstrániť? close: Zavrieť edit_tag: @@ -486,8 +478,7 @@ ui: edit_summary: label: Zhrnutie placeholder: >- - Stručne vysvetlite svoje zmeny (opravený pravopis, opravená gramatika, - vylepšené formátovanie) + Stručne vysvetlite svoje zmeny (opravený pravopis, opravená gramatika, vylepšené formátovanie) btn_save_edits: Uložiť úpravy btn_cancel: Zrušiť dates: @@ -511,11 +502,9 @@ ui: btn_cancel: Zrušiť show_more: Zobraziť viac komentárov tip_question: >- - Use comments to ask for more information or suggest improvements. Avoid - answering questions in comments. + Use comments to ask for more information or suggest improvements. Avoid answering questions in comments. tip_answer: >- - Use comments to reply to other users or notify them of changes. If you are - adding new information, edit your post instead of commenting. + Use comments to reply to other users or notify them of changes. If you are adding new information, edit your post instead of commenting. edit_answer: title: Uprav odpoveď default_reason: Uprav odpoveď @@ -530,8 +519,7 @@ ui: edit_summary: label: Upraviť zhrnutie placeholder: >- - Stručne vysvetlite svoje zmeny (opravený pravopis, opravená gramatika, - vylepšené formátovanie) + Stručne vysvetlite svoje zmeny (opravený pravopis, opravená gramatika, vylepšené formátovanie) btn_save_edits: Uložiť úpravy btn_cancel: Zrušiť tags: @@ -576,8 +564,7 @@ ui: edit_summary: label: Upraviť zhrnutie placeholder: >- - Stručne vysvetlite svoje zmeny (opravený pravopis, opravená gramatika, - vylepšené formátovanie) + Stručne vysvetlite svoje zmeny (opravený pravopis, opravená gramatika, vylepšené formátovanie) btn_post_question: Pošlite svoju otázku btn_save_edits: Uložiť úpravy answer_question: Odpovedzte na svoju vlastnú otázku @@ -586,7 +573,7 @@ ui: add_btn: Pridať značku create_btn: Vytvoriť novú značku search_tag: Vyhľadať značku -- - hint: „Popíšte, o čom je vaša otázka, vyžaduje sa aspoň jedna značka.“ + hint: "„Popíšte, o čom je vaša otázka, vyžaduje sa aspoň jedna značka.“" no_result: Žiadne značky sa neyhodujú tag_required_text: Požadovaná značka (aspoň jedna) header: @@ -603,8 +590,7 @@ ui: placeholder: Vyhľadávanie footer: build_on: >- - Postavený na <1> Answer - open-source software, ktorý poháňa Q&A - komunity.
Vyrobené s láskou © {{cc}}. + Postavený na <1> Answer - open-source software, ktorý poháňa Q&A komunity.
Vyrobené s láskou © {{cc}}. upload_img: name: Zmena loading: načítavanie... @@ -615,8 +601,7 @@ ui: empty: Captcha nemôže byť prázdna. inactive: first: >- - Ste takmer na konci! Poslali sme Vám aktivačný mail na adresu {{mail}}. - K aktivácií účtu postupujte prosím podľa pokynov v e-maily. + Ste takmer na konci! Poslali sme Vám aktivačný mail na adresu {{mail}}. K aktivácií účtu postupujte prosím podľa pokynov v e-maily. info: "Ak neprichádza, skontrolujte priečinok spamu." another: >- Poslali sme vám ďalší aktivačný e-mail na adresu {{mail}}. Môže to trvať niekoľko minút; Nezabudnite skontrolovať priečinok spamu. @@ -671,6 +656,7 @@ ui: Úspešne ste zmenili svoje heslo; Budete presmerovaný na prihlásenie. link_invalid: >- Ospravedlňujeme sa, tento odkaz na obnovenie hesla už nie je platný. Možno už došlo k resetovaniu vašho hesla? + to_login: Continue to log in page password: label: Heslo msg: @@ -781,8 +767,7 @@ ui: confirm_title: Pokračovať v odpovedi continue: Pokračovať confirm_info: >- -

Ste si istí, že chcete pridať ďalšiu odpoveď?

Mohli by ste namiesto toho použiť - úpravu na vylepšenie svojej už existujúcej odpovede.

+

Ste si istí, že chcete pridať ďalšiu odpoveď?

Mohli by ste namiesto toho použiť úpravu na vylepšenie svojej už existujúcej odpovede.

empty: Odpoveď nemôže byť prázdna. characters: Minimálna dĺžka obsahu musí byť 6 znakov. reopen: @@ -792,15 +777,9 @@ ui: delete: title: Odstrániť tento príspevok question: >- - Neodporúčame mazanie otázok s odpoveďmi pretože - týmto oberáte budúcich čitateľov o tieto vedomostí.

Opakované mazanie - zodpovedaných otázok môže mať za následok zablokovanie možnosti kladenia otázok z vášho účtu. - Ste si istí, že chcete otázku odstrániť? + Neodporúčame mazanie otázok s odpoveďmi pretože týmto oberáte budúcich čitateľov o tieto vedomostí.

Opakované mazanie zodpovedaných otázok môže mať za následok zablokovanie možnosti kladenia otázok z vášho účtu. Ste si istí, že chcete otázku odstrániť? answer_accepted: >- -

Neodporúčame odstránenie akceptovanej odpovede pretože - týmto oberáte budúcich čitateľov o tieto vedomostí.

Opakované mazanie - akceptovaných odpovedí môže mať za následok zablokovanie možnosti odpovedať z vášho účtu. - Ste si istí, že chcete odstrániť odpoveď? +

Neodporúčame odstránenie akceptovanej odpovede pretože týmto oberáte budúcich čitateľov o tieto vedomostí.

Opakované mazanie akceptovaných odpovedí môže mať za následok zablokovanie možnosti odpovedať z vášho účtu. Ste si istí, že chcete odstrániť odpoveď? other: Ste si istí, že ju chcete odstrániť? tip_question_deleted: Tento príspevok bol odstránený tip_answer_deleted: Táto odpoveď bola odstránená @@ -954,8 +933,7 @@ ui: title: Vytvoriť config.yaml label: Vytvorený súbor Config.yaml. desc: >- - Môžete vytvoriť <1>config.yaml súbor manuálne v - <1>/var/wwww/xxx/ adresári a vložte do neho nasledujúci text. + Môžete vytvoriť <1>config.yaml súbor manuálne v <1>/var/wwww/xxx/ adresári a vložte do neho nasledujúci text. info: Potom, čo ste to urobili, kliknite na tlačidlo „Ďalej“. site_information: Informácie o stránke admin_account: Správca @@ -990,9 +968,8 @@ ui: incorrect: Nesprávny formát e-mailu ready_title: Vaša odpoveď je pripravená! ready_desc: >- - Ak niekedy budete chcieť zmeniť viac nastavení, navštívte stránku <1>admin section; - Nájdete ju v ponuke stránok. - good_luck: „Bavte sa a veľa šťastia!“ + Ak niekedy budete chcieť zmeniť viac nastavení, navštívte stránku <1>admin section; Nájdete ju v ponuke stránok. + good_luck: "„Bavte sa a veľa šťastia!“" warn_title: Upozornenie warn_desc: >- Súbor <1>config.yaml už existuje. Ak v tomto súbore potrebujete resetovať niektorú z konfiguračných položiek, najskôr ho odstráňte. @@ -1167,10 +1144,8 @@ ui: password: label: Heslo msg: Heslo musí mať dĺžku 8-32 znakov. - btn_cancel: Zrušiť btn_submit: Odovzdať - questions: page_title: Otázky normal: Normalne @@ -1231,6 +1206,9 @@ ui: label: Časové pásmo msg: Časové pásmo nemôže byť prázdne. text: Vyberte si mesto v rovnakom časovom pásme v akom ste vy. + avatar: + label: Default Avatar + text: For users without a custom avatar of their own. smtp: page_title: SMTP from_email: @@ -1286,7 +1264,7 @@ ui: text: Obrázok použitý ako základ pre ikony metadát. V ideálnom prípade by mal byť väčšií ako 512 x 512. favicon: label: favicon - text: Favicon pre váš web. Ak chcete cez CDN fungovať správne, musí byť vo formáte png. Veľkosť sa zmení na 32 x 32. Ak nebude nič zadané, použije sa „štvorcová ikona“. + text: Favicon pre váš web. Ak chcete cez CDN fungovať správne, musí byť vo formáte png. Veľkosť sa zmení na 32 x 32. Ak nebude nič zadané, použije sa „štvorcová ikona“. legal: page_title: Legálne terms_of_service: @@ -1345,12 +1323,11 @@ ui: membership: title: Členstvo label: Povoliť nové registrácie - text: Vypnúť, aby sa zabránilo vytvorenie nového účtu hocikým. + text: Vypnúť, aby sa zabránilo vytvorenie nového účtu hocikým. private: title: Súkromné label: Vyžaduje sa prihlásenie text: Do tejto komunity majú prístup iba prihlásení používatelia - form: optional: (voliteľné) empty: nemôže byť prázdne @@ -1408,4 +1385,5 @@ ui: draft: discard_confirm: Naozaj chcete zahodiť svoj koncept? messages: - post_deleted: Tento príspevok bol odstránený. + post_deleted: Tento príspevok bol odstránený. + diff --git a/i18n/tr_TR.yaml b/i18n/tr_TR.yaml index cb5703a2..edd94157 100644 --- a/i18n/tr_TR.yaml +++ b/i18n/tr_TR.yaml @@ -47,6 +47,8 @@ backend: other: Silme izni yok. cannot_update: other: Düzenleme izni yok. + question_closed_cannot_add: + other: Questions are closed and cannot be added. comment: edit_without_permission: other: Yorum düzenleme izni yok. @@ -103,6 +105,8 @@ backend: not_found: other: Rapor bulunamadı. tag: + already_exist: + other: Tag already exists. not_found: other: Etiket bulunamadı. recommend_tag_not_found: @@ -261,6 +265,7 @@ ui: tag: Etiket tags: Etiketler tag_wiki: tag wiki + create_tag: Create Tag edit_tag: Etiketi Düzenle ask_a_question: Soru Ekle edit_question: Soruyu Düzenle @@ -281,6 +286,8 @@ ui: upgrade: Answer Upgrade maintenance: Website Bakımı users: Kullanıcı + http_404: HTTP Error 404 + http_50X: HTTP Error 500 notifications: title: Bildirimler inbox: Gelen Kutusu @@ -424,7 +431,7 @@ ui: range: Display name up to 35 characters. slug_name: label: URL Slug - desc: 'Must use the character set "a-z", "0-9", "+ # - ."' + desc: URL slug up to 35 characters. msg: empty: URL slug cannot be empty. range: URL slug up to 35 characters. @@ -433,6 +440,7 @@ ui: label: Description btn_cancel: İptal Et btn_submit: Gönder + btn_post: Post new tag tag_info: created_at: Oluşturuldu edited_at: Düzenlendi @@ -1198,6 +1206,9 @@ ui: label: Timezone msg: Timezone cannot be empty. text: Choose a city in the same timezone as you. + avatar: + label: Default Avatar + text: For users without a custom avatar of their own. smtp: page_title: SMTP from_email: diff --git a/i18n/vi_VN.yaml b/i18n/vi_VN.yaml index 079d180e..3cc7e462 100644 --- a/i18n/vi_VN.yaml +++ b/i18n/vi_VN.yaml @@ -47,6 +47,8 @@ backend: other: No permission to delete. cannot_update: other: No permission to update. + question_closed_cannot_add: + other: Questions are closed and cannot be added. comment: edit_without_permission: other: Comment are not allowed to edit. @@ -103,6 +105,8 @@ backend: not_found: other: Report not found. tag: + already_exist: + other: Tag already exists. not_found: other: Tag not found. recommend_tag_not_found: @@ -261,6 +265,7 @@ ui: tag: Tag tags: Tags tag_wiki: tag wiki + create_tag: Create Tag edit_tag: Edit Tag ask_a_question: Add Question edit_question: Edit Question @@ -281,6 +286,8 @@ ui: upgrade: Answer Upgrade maintenance: Website Maintenance users: Users + http_404: HTTP Error 404 + http_50X: HTTP Error 500 notifications: title: Notifications inbox: Inbox @@ -424,7 +431,7 @@ ui: range: Display name up to 35 characters. slug_name: label: URL Slug - desc: 'Must use the character set "a-z", "0-9", "+ # - ."' + desc: URL slug up to 35 characters. msg: empty: URL slug cannot be empty. range: URL slug up to 35 characters. @@ -433,6 +440,7 @@ ui: label: Description btn_cancel: Cancel btn_submit: Submit + btn_post: Post new tag tag_info: created_at: Created edited_at: Edited @@ -1198,6 +1206,9 @@ ui: label: Timezone msg: Timezone cannot be empty. text: Choose a city in the same timezone as you. + avatar: + label: Default Avatar + text: For users without a custom avatar of their own. smtp: page_title: SMTP from_email: diff --git a/i18n/zh_CN.yaml b/i18n/zh_CN.yaml index abd710dc..d6c4425f 100644 --- a/i18n/zh_CN.yaml +++ b/i18n/zh_CN.yaml @@ -48,7 +48,7 @@ backend: cannot_update: other: 没有更新权限。 question_closed_cannot_add: - other: 问题已关闭不可以新增回答 + other: Questions are closed and cannot be added. comment: edit_without_permission: other: 不允许编辑评论。 @@ -105,6 +105,8 @@ backend: not_found: other: 报告未找到 tag: + already_exist: + other: Tag already exists. not_found: other: 标签未找到 recommend_tag_not_found: @@ -263,6 +265,7 @@ ui: tag: 标签 tags: 标签 tag_wiki: 标签 wiki + create_tag: Create Tag edit_tag: 编辑标签 ask_a_question: 提问题 edit_question: 编辑问题 @@ -283,6 +286,8 @@ ui: upgrade: Answer 升级 maintenance: 网站维护 users: 用户 + http_404: HTTP Error 404 + http_50X: HTTP Error 500 notifications: title: 通知 inbox: 收件箱 @@ -426,7 +431,7 @@ ui: range: 显示名称不能超过 35 个字符。 slug_name: label: URL 固定链接 - desc: '必须由 "a-z", "0-9", "+ # - ." 组成' + desc: URL slug up to 35 characters. msg: empty: URL 固定链接不能为空。 range: URL 固定链接不能超过 35 个字符。 @@ -435,6 +440,7 @@ ui: label: 描述 btn_cancel: 取消 btn_submit: 提交 + btn_post: Post new tag tag_info: created_at: 创建于 edited_at: 编辑于 @@ -1200,6 +1206,9 @@ ui: label: 时区 msg: 时区不能为空。 text: 选择一个与您相同时区的城市。 + avatar: + label: Default Avatar + text: For users without a custom avatar of their own. smtp: page_title: SMTP from_email: diff --git a/i18n/zh_TW.yaml b/i18n/zh_TW.yaml index 58bb99b5..8e73f0e1 100644 --- a/i18n/zh_TW.yaml +++ b/i18n/zh_TW.yaml @@ -47,6 +47,8 @@ backend: other: 沒有刪除權限。 cannot_update: other: 沒有更新權限。 + question_closed_cannot_add: + other: Questions are closed and cannot be added. comment: edit_without_permission: other: 不允許編輯評論。 @@ -103,6 +105,8 @@ backend: not_found: other: 找不到報告。 tag: + already_exist: + other: Tag already exists. not_found: other: 找不到標籤。 recommend_tag_not_found: @@ -261,6 +265,7 @@ ui: tag: 標籤 tags: 標籤 tag_wiki: 標籤 wiki + create_tag: Create Tag edit_tag: 編輯標籤 ask_a_question: 提問題 edit_question: 編輯問題 @@ -281,6 +286,8 @@ ui: upgrade: Answer 升級 maintenance: 網站維護 users: 用戶 + http_404: HTTP Error 404 + http_50X: HTTP Error 500 notifications: title: 通知 inbox: 收件夾 @@ -424,7 +431,7 @@ ui: range: 顯示名稱不能超過 35 個字符。 slug_name: label: URL 固定連結 - desc: '必須由 "a-z", "0-9", "+ # - ." 組成' + desc: URL slug up to 35 characters. msg: empty: URL 固定連結不能為空。 range: URL 固定連結不能超過 35 個字元。 @@ -433,6 +440,7 @@ ui: label: 描述 btn_cancel: 取消 btn_submit: 提交 + btn_post: Post new tag tag_info: created_at: 創建於 edited_at: 編輯於 @@ -1198,6 +1206,9 @@ ui: label: 時區 msg: 時區不能為空。 text: 選擇一個與您相同時區的城市。 + avatar: + label: Default Avatar + text: For users without a custom avatar of their own. smtp: page_title: SMTP from_email: From 9b7fdf77f1bb12f297e640edeb13a6f33e12ec60 Mon Sep 17 00:00:00 2001 From: aichy126 <16996097+aichy126@users.noreply.github.com> Date: Mon, 3 Apr 2023 12:20:00 +0800 Subject: [PATCH 17/32] update goreleaser --- .goreleaser.yaml | 4 ++-- internal/service/comment/comment_service.go | 1 - pkg/htmltext/htmltext_test.go | 1 - 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index cf61b678..149a7495 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -15,7 +15,7 @@ builds: - id: build main: ./cmd/answer/. binary: answer - ldflags: -s -w -X main.Version={{.Version}} -X main.Revision={{.ShortCommit}} -X main.Time={{.Date}} -X main.BuildUser=goreleaser + ldflags: -s -w -X github.com/answerdev/answer/cmd.Version={{.Version}} -X github.com/answerdev/answer/cmd.Revision={{.ShortCommit}} -X github.com/answerdev/answer/cmd.Time={{.Date}} -X main.BuildUser=goreleaser flags: -v goos: - linux @@ -26,7 +26,7 @@ builds: - id: build-windows main: ./cmd/answer/. binary: answer - ldflags: -s -w -X main.Version={{.Version}} -X main.Revision={{.ShortCommit}} -X main.Time={{.Date}} -X main.BuildUser=goreleaser + ldflags: -s -w -X github.com/answerdev/answer/cmd.Version={{.Version}} -X github.com/answerdev/answer/cmd.Revision={{.ShortCommit}} -X github.com/answerdev/answer/cmd.Time={{.Date}} -X main.BuildUser=goreleaser flags: -v goos: - windows diff --git a/internal/service/comment/comment_service.go b/internal/service/comment/comment_service.go index 38595229..4c9aa0d7 100644 --- a/internal/service/comment/comment_service.go +++ b/internal/service/comment/comment_service.go @@ -448,7 +448,6 @@ func (cs *CommentService) GetCommentPersonalWithPage(ctx context.Context, req *s if err != nil { log.Error(err) } else { - spew.Dump("==", objInfo) commentResp.ObjectType = objInfo.ObjectType commentResp.Title = objInfo.Title commentResp.UrlTitle = htmltext.UrlTitle(objInfo.Title) diff --git a/pkg/htmltext/htmltext_test.go b/pkg/htmltext/htmltext_test.go index f67a20db..ae52cc1a 100644 --- a/pkg/htmltext/htmltext_test.go +++ b/pkg/htmltext/htmltext_test.go @@ -64,6 +64,5 @@ func TestUrlTitle(t *testing.T) { for _, title := range list { formatTitle := UrlTitle(title) spew.Dump(formatTitle) - } } From 219bc317d062aca7c09ddf90db8974f15b78ee55 Mon Sep 17 00:00:00 2001 From: aichy126 <16996097+aichy126@users.noreply.github.com> Date: Mon, 3 Apr 2023 14:24:46 +0800 Subject: [PATCH 18/32] update question --- internal/service/question_common/question.go | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/internal/service/question_common/question.go b/internal/service/question_common/question.go index f8c40cf5..a0d039fc 100644 --- a/internal/service/question_common/question.go +++ b/internal/service/question_common/question.go @@ -335,12 +335,15 @@ func (qs *QuestionCommon) FormatQuestionsPage( } else { item.Tags = make([]*schema.TagResp, 0) } - userInfo := userInfoMap[item.Operator.ID] - if userInfo != nil { - item.Operator.DisplayName = userInfo.DisplayName - item.Operator.Username = userInfo.Username - item.Operator.Rank = userInfo.Rank + userInfo, ok := userInfoMap[item.Operator.ID] + if ok { + if userInfo != nil { + item.Operator.DisplayName = userInfo.DisplayName + item.Operator.Username = userInfo.Username + item.Operator.Rank = userInfo.Rank + } } + } return formattedQuestions, nil } From 150432835b03be7683f069b221c1f66469919a0a Mon Sep 17 00:00:00 2001 From: LinkinStars Date: Tue, 4 Apr 2023 15:13:32 +0800 Subject: [PATCH 19/32] feat(user): return user info when changed email --- internal/controller/user_controller.go | 4 +-- internal/service/user_service.go | 49 ++++++++++++++++++++------ 2 files changed, 41 insertions(+), 12 deletions(-) diff --git a/internal/controller/user_controller.go b/internal/controller/user_controller.go index a1489e41..4fb7f8a6 100644 --- a/internal/controller/user_controller.go +++ b/internal/controller/user_controller.go @@ -529,9 +529,9 @@ func (uc *UserController) UserChangeEmailVerify(ctx *gin.Context) { return } - err := uc.userService.UserChangeEmailVerify(ctx, req.Content) + resp, err := uc.userService.UserChangeEmailVerify(ctx, req.Content) uc.actionService.ActionRecordDel(ctx, schema.ActionRecordTypeEmail, ctx.ClientIP()) - handler.HandleResponse(ctx, err, nil) + handler.HandleResponse(ctx, err, resp) } // UserRanking get user ranking diff --git a/internal/service/user_service.go b/internal/service/user_service.go index 5aef83ef..f6a6f093 100644 --- a/internal/service/user_service.go +++ b/internal/service/user_service.go @@ -535,37 +535,66 @@ func (us *UserService) UserChangeEmailSendCode(ctx context.Context, req *schema. } // UserChangeEmailVerify user change email verify code -func (us *UserService) UserChangeEmailVerify(ctx context.Context, content string) (err error) { +func (us *UserService) UserChangeEmailVerify(ctx context.Context, content string) (resp *schema.GetUserResp, err error) { data := &schema.EmailCodeContent{} err = data.FromJSONString(content) if err != nil { - return errors.BadRequest(reason.EmailVerifyURLExpired) + return nil, errors.BadRequest(reason.EmailVerifyURLExpired) } _, exist, err := us.userRepo.GetByEmail(ctx, data.Email) if err != nil { - return err + return nil, err } if exist { - return errors.BadRequest(reason.EmailDuplicate) + return nil, errors.BadRequest(reason.EmailDuplicate) } - _, exist, err = us.userRepo.GetByUserID(ctx, data.UserID) + userInfo, exist, err := us.userRepo.GetByUserID(ctx, data.UserID) if err != nil { - return err + return nil, err } if !exist { - return errors.BadRequest(reason.UserNotFound) + return nil, errors.BadRequest(reason.UserNotFound) } err = us.userRepo.UpdateEmail(ctx, data.UserID, data.Email) if err != nil { - return errors.BadRequest(reason.UserNotFound) + return nil, errors.BadRequest(reason.UserNotFound) } err = us.userRepo.UpdateEmailStatus(ctx, data.UserID, entity.EmailStatusAvailable) if err != nil { - return err + return nil, err } - return nil + + roleID, err := us.userRoleService.GetUserRole(ctx, userInfo.ID) + if err != nil { + log.Error(err) + } + + resp = &schema.GetUserResp{} + resp.GetFromUserEntity(userInfo) + userCacheInfo := &entity.UserCacheInfo{ + UserID: userInfo.ID, + EmailStatus: entity.EmailStatusAvailable, + UserStatus: userInfo.Status, + RoleID: roleID, + } + resp.AccessToken, err = us.authService.SetUserCacheInfo(ctx, userCacheInfo) + if err != nil { + return nil, err + } + // User verified email will update user email status. So user status cache should be updated. + if err = us.authService.SetUserStatus(ctx, userCacheInfo); err != nil { + return nil, err + } + resp.RoleID = userCacheInfo.RoleID + if resp.RoleID == role.RoleAdminID { + err = us.authService.SetAdminUserCacheInfo(ctx, resp.AccessToken, &entity.UserCacheInfo{UserID: userInfo.ID}) + if err != nil { + return nil, err + } + } + return resp, nil } // getSiteUrl get site url From 2536703f3291b5185a336639aa6476f3d09bf10e Mon Sep 17 00:00:00 2001 From: aichy126 <16996097+aichy126@users.noreply.github.com> Date: Tue, 4 Apr 2023 16:54:28 +0800 Subject: [PATCH 20/32] update question --- cmd/answer/wire_gen.go | 2 +- docs/docs.go | 74 +++++++++++++ docs/swagger.json | 74 +++++++++++++ docs/swagger.yaml | 51 +++++++++ internal/controller/answer_controller.go | 1 - internal/controller/question_controller.go | 117 +++++++++++++++++++- internal/router/answer_api_router.go | 1 + internal/schema/question_schema.go | 27 +++++ internal/service/comment/comment_service.go | 1 - 9 files changed, 343 insertions(+), 5 deletions(-) diff --git a/cmd/answer/wire_gen.go b/cmd/answer/wire_gen.go index aafd3dc4..bbb6e1ec 100644 --- a/cmd/answer/wire_gen.go +++ b/cmd/answer/wire_gen.go @@ -165,8 +165,8 @@ func initApplication(debug bool, serverConf *conf.Server, dbConf *data.Database, questionActivityRepo := activity.NewQuestionActivityRepo(dataData, activityRepo, userRankRepo) answerActivityService := activity2.NewAnswerActivityService(answerActivityRepo, questionActivityRepo) questionService := service.NewQuestionService(questionRepo, tagCommonService, questionCommon, userCommon, revisionService, metaService, collectionCommon, answerActivityService, dataData) - questionController := controller.NewQuestionController(questionService, rankService) answerService := service.NewAnswerService(answerRepo, questionRepo, questionCommon, userCommon, collectionCommon, userRepo, revisionService, answerActivityService, answerCommon, voteRepo, emailService, userRoleRelService) + questionController := controller.NewQuestionController(questionService, answerService, rankService) dashboardService := dashboard.NewDashboardService(questionRepo, answerRepo, commentCommonRepo, voteRepo, userRepo, reportRepo, configRepo, siteInfoCommonService, serviceConf, dataData) answerController := controller.NewAnswerController(answerService, rankService, dashboardService) searchParser := search_parser.NewSearchParser(tagCommonService, userCommon) diff --git a/docs/docs.go b/docs/docs.go index d1fa0a96..4622228b 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -3063,6 +3063,45 @@ const docTemplate = `{ } } }, + "/answer/api/v1/question/answer": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "add question and answer", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "Question" + ], + "summary": "add question and answer", + "parameters": [ + { + "description": "question", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/schema.QuestionAddByAnswer" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/handler.RespBody" + } + } + } + } + }, "/answer/api/v1/question/closemsglist": { "get": { "security": [ @@ -6751,6 +6790,41 @@ const docTemplate = `{ } } }, + "schema.QuestionAddByAnswer": { + "type": "object", + "required": [ + "answer_content", + "content", + "tags", + "title" + ], + "properties": { + "answer_content": { + "type": "string", + "maxLength": 65535, + "minLength": 6 + }, + "content": { + "description": "content", + "type": "string", + "maxLength": 65535, + "minLength": 6 + }, + "tags": { + "description": "tags", + "type": "array", + "items": { + "$ref": "#/definitions/schema.TagItem" + } + }, + "title": { + "description": "question title", + "type": "string", + "maxLength": 150, + "minLength": 6 + } + } + }, "schema.QuestionPageReq": { "type": "object", "properties": { diff --git a/docs/swagger.json b/docs/swagger.json index 1ade7434..240e543f 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -3051,6 +3051,45 @@ } } }, + "/answer/api/v1/question/answer": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "add question and answer", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "Question" + ], + "summary": "add question and answer", + "parameters": [ + { + "description": "question", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/schema.QuestionAddByAnswer" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/handler.RespBody" + } + } + } + } + }, "/answer/api/v1/question/closemsglist": { "get": { "security": [ @@ -6739,6 +6778,41 @@ } } }, + "schema.QuestionAddByAnswer": { + "type": "object", + "required": [ + "answer_content", + "content", + "tags", + "title" + ], + "properties": { + "answer_content": { + "type": "string", + "maxLength": 65535, + "minLength": 6 + }, + "content": { + "description": "content", + "type": "string", + "maxLength": 65535, + "minLength": 6 + }, + "tags": { + "description": "tags", + "type": "array", + "items": { + "$ref": "#/definitions/schema.TagItem" + } + }, + "title": { + "description": "question title", + "type": "string", + "maxLength": 150, + "minLength": 6 + } + } + }, "schema.QuestionPageReq": { "type": "object", "properties": { diff --git a/docs/swagger.yaml b/docs/swagger.yaml index 6c17b0c8..7aa79508 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -1019,6 +1019,33 @@ definitions: - tags - title type: object + schema.QuestionAddByAnswer: + properties: + answer_content: + maxLength: 65535 + minLength: 6 + type: string + content: + description: content + maxLength: 65535 + minLength: 6 + type: string + tags: + description: tags + items: + $ref: '#/definitions/schema.TagItem' + type: array + title: + description: question title + maxLength: 150 + minLength: 6 + type: string + required: + - answer_content + - content + - tags + - title + type: object schema.QuestionPageReq: properties: orderCond: @@ -3796,6 +3823,30 @@ paths: summary: update question tags: - Question + /answer/api/v1/question/answer: + post: + consumes: + - application/json + description: add question and answer + parameters: + - description: question + in: body + name: data + required: true + schema: + $ref: '#/definitions/schema.QuestionAddByAnswer' + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/handler.RespBody' + security: + - ApiKeyAuth: [] + summary: add question and answer + tags: + - Question /answer/api/v1/question/closemsglist: get: consumes: diff --git a/internal/controller/answer_controller.go b/internal/controller/answer_controller.go index 55b3895e..93d34f5b 100644 --- a/internal/controller/answer_controller.go +++ b/internal/controller/answer_controller.go @@ -138,7 +138,6 @@ func (ac *AnswerController) Add(ctx *gin.Context) { return } if !has { - // todo !has handler.HandleResponse(ctx, nil, nil) return } diff --git a/internal/controller/question_controller.go b/internal/controller/question_controller.go index 1c36e974..cefa075a 100644 --- a/internal/controller/question_controller.go +++ b/internal/controller/question_controller.go @@ -14,18 +14,28 @@ import ( "github.com/answerdev/answer/pkg/converter" "github.com/answerdev/answer/pkg/uid" "github.com/gin-gonic/gin" + "github.com/jinzhu/copier" "github.com/segmentfault/pacman/errors" ) // QuestionController question controller type QuestionController struct { questionService *service.QuestionService + answerService *service.AnswerService rankService *rank.RankService } // NewQuestionController new controller -func NewQuestionController(questionService *service.QuestionService, rankService *rank.RankService) *QuestionController { - return &QuestionController{questionService: questionService, rankService: rankService} +func NewQuestionController( + questionService *service.QuestionService, + answerService *service.AnswerService, + rankService *rank.RankService, +) *QuestionController { + return &QuestionController{ + questionService: questionService, + answerService: answerService, + rankService: rankService, + } } // RemoveQuestion delete question @@ -281,6 +291,109 @@ func (qc *QuestionController) AddQuestion(ctx *gin.Context) { handler.HandleResponse(ctx, err, resp) } +// AddQuestionByAnswer add question +// @Summary add question and answer +// @Description add question and answer +// @Tags Question +// @Accept json +// @Produce json +// @Security ApiKeyAuth +// @Param data body schema.QuestionAddByAnswer true "question" +// @Success 200 {object} handler.RespBody +// @Router /answer/api/v1/question/answer [post] +func (qc *QuestionController) AddQuestionByAnswer(ctx *gin.Context) { + req := &schema.QuestionAddByAnswer{} + errFields := handler.BindAndCheckReturnErr(ctx, req) + if ctx.IsAborted() { + return + } + req.UserID = middleware.GetLoginUserIDFromContext(ctx) + + canList, err := qc.rankService.CheckOperationPermissions(ctx, req.UserID, []string{ + permission.QuestionAdd, + permission.QuestionEdit, + permission.QuestionDelete, + permission.QuestionClose, + permission.QuestionReopen, + permission.TagUseReservedTag, + }) + if err != nil { + handler.HandleResponse(ctx, err, nil) + return + } + req.CanAdd = canList[0] + req.CanEdit = canList[1] + req.CanDelete = canList[2] + req.CanClose = canList[3] + req.CanReopen = canList[4] + req.CanUseReservedTag = canList[5] + if !req.CanAdd { + handler.HandleResponse(ctx, errors.Forbidden(reason.RankFailToMeetTheCondition), nil) + return + } + questionReq := new(schema.QuestionAdd) + err = copier.Copy(questionReq, req) + if err != nil { + handler.HandleResponse(ctx, errors.Forbidden(reason.RequestFormatError), nil) + return + } + errList, err := qc.questionService.CheckAddQuestion(ctx, questionReq) + if err != nil { + errlist, ok := errList.([]*validator.FormErrorField) + if ok { + errFields = append(errFields, errlist...) + } + } + + if len(errFields) > 0 { + handler.HandleResponse(ctx, errors.BadRequest(reason.RequestFormatError), errFields) + return + } + + resp, err := qc.questionService.AddQuestion(ctx, questionReq) + if err != nil { + errlist, ok := resp.([]*validator.FormErrorField) + if ok { + errFields = append(errFields, errlist...) + } + } + + if len(errFields) > 0 { + handler.HandleResponse(ctx, errors.BadRequest(reason.RequestFormatError), errFields) + return + } + //add the question id to the answer + questionInfo, ok := resp.(*schema.QuestionInfo) + if ok { + answerReq := &schema.AnswerAddReq{} + answerReq.QuestionID = uid.DeShortID(questionInfo.ID) + answerReq.UserID = middleware.GetLoginUserIDFromContext(ctx) + answerReq.Content = req.AnswerContent + answerReq.HTML = req.AnswerHTML + answerID, err := qc.answerService.Insert(ctx, answerReq) + if err != nil { + handler.HandleResponse(ctx, err, nil) + return + } + info, questionInfo, has, err := qc.answerService.Get(ctx, answerID, req.UserID) + if err != nil { + handler.HandleResponse(ctx, err, nil) + return + } + if !has { + handler.HandleResponse(ctx, nil, nil) + return + } + handler.HandleResponse(ctx, err, gin.H{ + "info": info, + "question": questionInfo, + }) + return + } + + handler.HandleResponse(ctx, err, resp) +} + // UpdateQuestion update question // @Summary update question // @Description update question diff --git a/internal/router/answer_api_router.go b/internal/router/answer_api_router.go index dc3c271d..3ff5f873 100644 --- a/internal/router/answer_api_router.go +++ b/internal/router/answer_api_router.go @@ -186,6 +186,7 @@ func (a *AnswerAPIRouter) RegisterAnswerAPIRouter(r *gin.RouterGroup) { // question r.POST("/question", a.questionController.AddQuestion) + r.POST("/question/answer", a.questionController.AddQuestionByAnswer) r.PUT("/question", a.questionController.UpdateQuestion) r.DELETE("/question", a.questionController.RemoveQuestion) r.PUT("/question/status", a.questionController.CloseQuestion) diff --git a/internal/schema/question_schema.go b/internal/schema/question_schema.go index c743577b..19a2c3fd 100644 --- a/internal/schema/question_schema.go +++ b/internal/schema/question_schema.go @@ -63,6 +63,33 @@ func (req *QuestionAdd) Check() (errFields []*validator.FormErrorField, err erro return nil, nil } +type QuestionAddByAnswer struct { + // question title + Title string `validate:"required,notblank,gte=6,lte=150" json:"title"` + // content + Content string `validate:"required,notblank,gte=6,lte=65535" json:"content"` + // html + HTML string `json:"-"` + AnswerContent string `validate:"required,notblank,gte=6,lte=65535" json:"answer_content"` + AnswerHTML string `json:"-"` + // tags + Tags []*TagItem `validate:"required,dive" json:"tags"` + // user id + UserID string `json:"-"` + QuestionPermission +} + +func (req *QuestionAddByAnswer) Check() (errFields []*validator.FormErrorField, err error) { + req.HTML = converter.Markdown2HTML(req.Content) + req.AnswerHTML = converter.Markdown2HTML(req.AnswerContent) + for _, tag := range req.Tags { + if len(tag.OriginalText) > 0 { + tag.ParsedText = converter.Markdown2HTML(tag.OriginalText) + } + } + return nil, nil +} + type QuestionPermission struct { // whether user can add it CanAdd bool `json:"-"` diff --git a/internal/service/comment/comment_service.go b/internal/service/comment/comment_service.go index 4c9aa0d7..1b65c48d 100644 --- a/internal/service/comment/comment_service.go +++ b/internal/service/comment/comment_service.go @@ -20,7 +20,6 @@ import ( "github.com/answerdev/answer/pkg/encryption" "github.com/answerdev/answer/pkg/htmltext" "github.com/answerdev/answer/pkg/uid" - "github.com/davecgh/go-spew/spew" "github.com/jinzhu/copier" "github.com/segmentfault/pacman/errors" "github.com/segmentfault/pacman/log" From fd703ea50f6e26a605a2a39e08e454e726bd8605 Mon Sep 17 00:00:00 2001 From: aichy126 <16996097+aichy126@users.noreply.github.com> Date: Tue, 4 Apr 2023 17:20:41 +0800 Subject: [PATCH 21/32] fix --- internal/service/question_service.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/service/question_service.go b/internal/service/question_service.go index 8193eeaa..5c4b2f3f 100644 --- a/internal/service/question_service.go +++ b/internal/service/question_service.go @@ -572,6 +572,7 @@ func (qs *QuestionService) UpdateQuestion(ctx context.Context, req *schema.Quest // It's not you or the administrator that needs to be reviewed if !canUpdate { revisionDTO.Status = entity.RevisionUnreviewedStatus + revisionDTO.UserID = req.UserID //use revision userid } else { //Direct modification revisionDTO.Status = entity.RevisionReviewPassStatus From 60fcd7480569813fa362ff8403fc1bb7a3a902c4 Mon Sep 17 00:00:00 2001 From: aichy126 <16996097+aichy126@users.noreply.github.com> Date: Tue, 4 Apr 2023 18:39:21 +0800 Subject: [PATCH 22/32] update markdown --- pkg/converter/markdown.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/converter/markdown.go b/pkg/converter/markdown.go index f3eef836..0e5c983a 100644 --- a/pkg/converter/markdown.go +++ b/pkg/converter/markdown.go @@ -34,6 +34,7 @@ func Markdown2HTML(source string) string { } html := buf.String() filter := bluemonday.UGCPolicy() + filter.AllowStyling() html = filter.Sanitize(html) return html } From a5a57a343b4609688175d3836ab58ca4e7df9dbe Mon Sep 17 00:00:00 2001 From: aichy126 <16996097+aichy126@users.noreply.github.com> Date: Fri, 7 Apr 2023 18:26:46 +0800 Subject: [PATCH 23/32] update markdown --- pkg/converter/markdown.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/converter/markdown.go b/pkg/converter/markdown.go index 0e5c983a..97a469d4 100644 --- a/pkg/converter/markdown.go +++ b/pkg/converter/markdown.go @@ -35,6 +35,8 @@ func Markdown2HTML(source string) string { html := buf.String() filter := bluemonday.UGCPolicy() filter.AllowStyling() + filter.RequireNoFollowOnLinks(false) + filter.RequireParseableURLs(false) html = filter.Sanitize(html) return html } @@ -111,6 +113,7 @@ func (r *DangerousHTMLRenderer) renderLink(w util.BufWriter, source []byte, node n := node.(*ast.Link) if entering && r.renderLinkIsUrl(string(n.Destination)) { _, _ = w.WriteString(" Date: Mon, 10 Apr 2023 11:06:29 +0800 Subject: [PATCH 24/32] update shortID --- pkg/uid/sid.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/uid/sid.go b/pkg/uid/sid.go index 50988ed2..2e9f5117 100644 --- a/pkg/uid/sid.go +++ b/pkg/uid/sid.go @@ -48,7 +48,7 @@ func EnShortID(id string) string { if ShortIDSwitch { num, err := strconv.ParseInt(id, 10, 64) if err != nil { - return "" + return id } return NumToShortID(num) } From 234d24086871fec3acea623827da812acaf0db8e Mon Sep 17 00:00:00 2001 From: aichy126 <16996097+aichy126@users.noreply.github.com> Date: Mon, 10 Apr 2023 11:16:48 +0800 Subject: [PATCH 25/32] update short id --- internal/service/activity/activity.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/internal/service/activity/activity.go b/internal/service/activity/activity.go index 4fe151b9..f971583b 100644 --- a/internal/service/activity/activity.go +++ b/internal/service/activity/activity.go @@ -18,6 +18,7 @@ import ( usercommon "github.com/answerdev/answer/internal/service/user_common" "github.com/answerdev/answer/pkg/converter" "github.com/answerdev/answer/pkg/obj" + "github.com/answerdev/answer/pkg/uid" "github.com/segmentfault/pacman/log" ) @@ -91,6 +92,10 @@ func (as *ActivityService) GetObjectTimeline(ctx context.Context, req *schema.Ge item.CancelledAt = act.CancelledAt.Unix() } + if item.ObjectType == constant.QuestionObjectType || item.ObjectType == constant.AnswerObjectType { + item.ObjectID = uid.EnShortID(act.ObjectID) + } + // database save activity type is number, change to activity type string is like "question.asked". // so we need to cut the front part of '.' _, item.ActivityType, _ = strings.Cut(config.ID2KeyMapping[act.ActivityType], ".") From e0fe3f29ed662c6059106c9925cfc5a60057db56 Mon Sep 17 00:00:00 2001 From: LinkinStars Date: Mon, 10 Apr 2023 15:20:01 +0800 Subject: [PATCH 26/32] feat(permission): add i18n for permission action --- i18n/en_US.yaml | 11 +++++++++++ i18n/zh_CN.yaml | 11 +++++++++++ internal/service/permission/answer_permission.go | 9 ++++++--- internal/service/permission/comment_permission.go | 9 ++++++--- internal/service/permission/permission_name.go | 8 ++++++++ internal/service/permission/question_permission.go | 13 ++++++++----- internal/service/permission/tag_permission.go | 10 +++++++--- 7 files changed, 57 insertions(+), 14 deletions(-) diff --git a/i18n/en_US.yaml b/i18n/en_US.yaml index b4121379..3fbf5fab 100644 --- a/i18n/en_US.yaml +++ b/i18n/en_US.yaml @@ -12,6 +12,17 @@ backend: other: Unauthorized. database_error: other: Data server error. + action: + report: + other: Flag + edit: + other: Edit + delete: + other: Delete + close: + other: Close + reopen: + other: Reopen role: name: user: diff --git a/i18n/zh_CN.yaml b/i18n/zh_CN.yaml index abd710dc..285ca712 100644 --- a/i18n/zh_CN.yaml +++ b/i18n/zh_CN.yaml @@ -11,6 +11,17 @@ backend: other: 未授权。 database_error: other: 数据服务器错误。 + action: + report: + other: 举报 + edit: + other: 编辑 + delete: + other: 删除 + close: + other: 关闭 + reopen: + other: 重新打开 role: name: user: diff --git a/internal/service/permission/answer_permission.go b/internal/service/permission/answer_permission.go index 57913c99..7a1a6eb5 100644 --- a/internal/service/permission/answer_permission.go +++ b/internal/service/permission/answer_permission.go @@ -3,24 +3,27 @@ package permission import ( "context" + "github.com/answerdev/answer/internal/base/handler" + "github.com/answerdev/answer/internal/base/translator" "github.com/answerdev/answer/internal/schema" ) // GetAnswerPermission get answer permission func GetAnswerPermission(ctx context.Context, userID string, creatorUserID string, canEdit, canDelete bool) ( actions []*schema.PermissionMemberAction) { + lang := handler.GetLangByCtx(ctx) actions = make([]*schema.PermissionMemberAction, 0) if len(userID) > 0 { actions = append(actions, &schema.PermissionMemberAction{ Action: "report", - Name: "Flag", + Name: translator.Tr(lang, reportActionName), Type: "reason", }) } if canEdit || userID == creatorUserID { actions = append(actions, &schema.PermissionMemberAction{ Action: "edit", - Name: "Edit", + Name: translator.Tr(lang, editActionName), Type: "edit", }) } @@ -28,7 +31,7 @@ func GetAnswerPermission(ctx context.Context, userID string, creatorUserID strin if canDelete || userID == creatorUserID { actions = append(actions, &schema.PermissionMemberAction{ Action: "delete", - Name: "Delete", + Name: translator.Tr(lang, deleteActionName), Type: "confirm", }) } diff --git a/internal/service/permission/comment_permission.go b/internal/service/permission/comment_permission.go index 7f8839ae..d721c1d6 100644 --- a/internal/service/permission/comment_permission.go +++ b/internal/service/permission/comment_permission.go @@ -5,17 +5,20 @@ import ( "time" "github.com/answerdev/answer/internal/base/constant" + "github.com/answerdev/answer/internal/base/handler" + "github.com/answerdev/answer/internal/base/translator" "github.com/answerdev/answer/internal/schema" ) // GetCommentPermission get comment permission func GetCommentPermission(ctx context.Context, userID string, creatorUserID string, createdAt time.Time, canEdit, canDelete bool) (actions []*schema.PermissionMemberAction) { + lang := handler.GetLangByCtx(ctx) actions = make([]*schema.PermissionMemberAction, 0) if len(userID) > 0 { actions = append(actions, &schema.PermissionMemberAction{ Action: "report", - Name: "Flag", + Name: translator.Tr(lang, reportActionName), Type: "reason", }) } @@ -23,7 +26,7 @@ func GetCommentPermission(ctx context.Context, userID string, creatorUserID stri if canEdit || (userID == creatorUserID && time.Now().Before(deadline)) { actions = append(actions, &schema.PermissionMemberAction{ Action: "edit", - Name: "Edit", + Name: translator.Tr(lang, editActionName), Type: "edit", }) } @@ -31,7 +34,7 @@ func GetCommentPermission(ctx context.Context, userID string, creatorUserID stri if canDelete || userID == creatorUserID { actions = append(actions, &schema.PermissionMemberAction{ Action: "delete", - Name: "Delete", + Name: translator.Tr(lang, deleteActionName), Type: "reason", }) } diff --git a/internal/service/permission/permission_name.go b/internal/service/permission/permission_name.go index 45c91278..4a62ec86 100644 --- a/internal/service/permission/permission_name.go +++ b/internal/service/permission/permission_name.go @@ -36,3 +36,11 @@ const ( TagAudit = "tag.audit" TagUseReservedTag = "tag.use_reserved_tag" ) + +const ( + reportActionName = "action.report" + editActionName = "action.edit" + deleteActionName = "action.delete" + closeActionName = "action.close" + reopenActionName = "action.reopen" +) diff --git a/internal/service/permission/question_permission.go b/internal/service/permission/question_permission.go index 4d1e1a42..1321af45 100644 --- a/internal/service/permission/question_permission.go +++ b/internal/service/permission/question_permission.go @@ -3,6 +3,8 @@ package permission import ( "context" + "github.com/answerdev/answer/internal/base/handler" + "github.com/answerdev/answer/internal/base/translator" "github.com/answerdev/answer/internal/schema" ) @@ -10,39 +12,40 @@ import ( func GetQuestionPermission(ctx context.Context, userID string, creatorUserID string, canEdit, canDelete, canClose, canReopen bool) ( actions []*schema.PermissionMemberAction) { + lang := handler.GetLangByCtx(ctx) actions = make([]*schema.PermissionMemberAction, 0) if len(userID) > 0 { actions = append(actions, &schema.PermissionMemberAction{ Action: "report", - Name: "Flag", + Name: translator.Tr(lang, reportActionName), Type: "reason", }) } if canEdit || userID == creatorUserID { actions = append(actions, &schema.PermissionMemberAction{ Action: "edit", - Name: "Edit", + Name: translator.Tr(lang, editActionName), Type: "edit", }) } if canClose { actions = append(actions, &schema.PermissionMemberAction{ Action: "close", - Name: "Close", + Name: translator.Tr(lang, closeActionName), Type: "confirm", }) } if canReopen { actions = append(actions, &schema.PermissionMemberAction{ Action: "reopen", - Name: "Reopen", + Name: translator.Tr(lang, reopenActionName), Type: "confirm", }) } if canDelete || userID == creatorUserID { actions = append(actions, &schema.PermissionMemberAction{ Action: "delete", - Name: "Delete", + Name: translator.Tr(lang, deleteActionName), Type: "confirm", }) } diff --git a/internal/service/permission/tag_permission.go b/internal/service/permission/tag_permission.go index b4b156b4..d06ea92b 100644 --- a/internal/service/permission/tag_permission.go +++ b/internal/service/permission/tag_permission.go @@ -3,17 +3,20 @@ package permission import ( "context" + "github.com/answerdev/answer/internal/base/handler" + "github.com/answerdev/answer/internal/base/translator" "github.com/answerdev/answer/internal/schema" ) // GetTagPermission get tag permission func GetTagPermission(ctx context.Context, canEdit, canDelete bool) ( actions []*schema.PermissionMemberAction) { + lang := handler.GetLangByCtx(ctx) actions = make([]*schema.PermissionMemberAction, 0) if canEdit { actions = append(actions, &schema.PermissionMemberAction{ Action: "edit", - Name: "Edit", + Name: translator.Tr(lang, editActionName), Type: "edit", }) } @@ -21,7 +24,7 @@ func GetTagPermission(ctx context.Context, canEdit, canDelete bool) ( if canDelete { actions = append(actions, &schema.PermissionMemberAction{ Action: "delete", - Name: "Delete", + Name: translator.Tr(lang, deleteActionName), Type: "reason", }) } @@ -31,11 +34,12 @@ func GetTagPermission(ctx context.Context, canEdit, canDelete bool) ( // GetTagSynonymPermission get tag synonym permission func GetTagSynonymPermission(ctx context.Context, canEdit bool) ( actions []*schema.PermissionMemberAction) { + lang := handler.GetLangByCtx(ctx) actions = make([]*schema.PermissionMemberAction, 0) if canEdit { actions = append(actions, &schema.PermissionMemberAction{ Action: "edit", - Name: "Edit", + Name: translator.Tr(lang, editActionName), Type: "edit", }) } From 5fc73a327764d11ef431348f1c18bf1781d0779d Mon Sep 17 00:00:00 2001 From: aichy126 <16996097+aichy126@users.noreply.github.com> Date: Mon, 10 Apr 2023 15:20:44 +0800 Subject: [PATCH 27/32] update seo template --- internal/base/server/http_funcmap.go | 22 ++++++++++++++++++++++ internal/controller/template_controller.go | 3 +++ pkg/converter/markdown.go | 1 + ui/template/comment.html | 2 +- ui/template/question-detail.html | 4 ++-- ui/template/tag-detail.html | 2 +- 6 files changed, 30 insertions(+), 4 deletions(-) diff --git a/internal/base/server/http_funcmap.go b/internal/base/server/http_funcmap.go index c5f58f45..8116842a 100644 --- a/internal/base/server/http_funcmap.go +++ b/internal/base/server/http_funcmap.go @@ -9,6 +9,7 @@ import ( "time" "github.com/answerdev/answer/internal/base/translator" + "github.com/answerdev/answer/internal/controller" "github.com/answerdev/answer/internal/schema" "github.com/answerdev/answer/pkg/converter" "github.com/answerdev/answer/pkg/day" @@ -41,6 +42,9 @@ var funcMap = template.FuncMap{ "templateHTML": func(data string) template.HTML { return template.HTML(data) }, + "formatLinkNofollow": func(data string) template.HTML { + return template.HTML(FormatLinkNofollow(data)) + }, "translator": func(la i18n.Language, data string, params ...interface{}) string { trans := translator.GlobalTrans.Tr(la, data) @@ -116,3 +120,21 @@ var funcMap = template.FuncMap{ return htmltext.UrlTitle(title) }, } + +func FormatLinkNofollow(html string) string { + var hrefRegexp = regexp.MustCompile("(?m).*?") + match := hrefRegexp.FindAllString(html, -1) + if match != nil { + for _, v := range match { + hasNofollow := strings.Contains(v, "rel=\"nofollow\"") + hasSiteUrl := strings.Contains(v, controller.SiteUrl) + if !hasSiteUrl { + if !hasNofollow { + nofollowUrl := strings.Replace(v, "
- {{templateHTML .ParsedText}} + {{formatLinkNofollow .ParsedText}}
diff --git a/ui/template/question-detail.html b/ui/template/question-detail.html index b1866d1c..ad46ca6b 100644 --- a/ui/template/question-detail.html +++ b/ui/template/question-detail.html @@ -28,7 +28,7 @@ {{end}}
- {{templateHTML .detail.HTML}} + {{formatLinkNofollow .detail.HTML}}
@@ -98,7 +98,7 @@ {{range .answers}}
- {{templateHTML .HTML}} + {{formatLinkNofollow .HTML}}
diff --git a/ui/template/tag-detail.html b/ui/template/tag-detail.html index 1ed561e3..511e63d3 100644 --- a/ui/template/tag-detail.html +++ b/ui/template/tag-detail.html @@ -8,7 +8,7 @@ >{{$.tag.SlugName}} -

{{templateHTML $.tag.ParsedText}}

+

{{formatLinkNofollow $.tag.ParsedText}}

From ae3be43fefb63581c775297e4d00bcbe0097feee Mon Sep 17 00:00:00 2001 From: PurseChicken Date: Mon, 10 Apr 2023 02:19:56 -0700 Subject: [PATCH 28/32] Chart refactoring (#311) --- charts/.helmignore | 23 +++++ charts/Chart.yaml | 4 +- charts/README.md | 75 +++++++++++++- charts/templates/_helpers.tpl | 15 ++- charts/templates/config.yaml | 9 -- charts/templates/deployment.yaml | 88 ++++++++++++++++ charts/templates/hpa.yaml | 28 +++++ charts/templates/ingress.yaml | 61 +++++++++++ charts/templates/pvc.yaml | 25 +++++ charts/templates/service.yaml | 10 +- charts/templates/serviceaccount.yaml | 12 +++ charts/templates/statefulset.yaml | 31 ------ charts/values.yaml | 148 ++++++++++++++++++++++++++- 13 files changed, 477 insertions(+), 52 deletions(-) create mode 100644 charts/.helmignore delete mode 100644 charts/templates/config.yaml create mode 100644 charts/templates/deployment.yaml create mode 100644 charts/templates/hpa.yaml create mode 100644 charts/templates/ingress.yaml create mode 100644 charts/templates/pvc.yaml create mode 100644 charts/templates/serviceaccount.yaml delete mode 100644 charts/templates/statefulset.yaml diff --git a/charts/.helmignore b/charts/.helmignore new file mode 100644 index 00000000..0e8a0eb3 --- /dev/null +++ b/charts/.helmignore @@ -0,0 +1,23 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/charts/Chart.yaml b/charts/Chart.yaml index 187c32fc..b3fe70eb 100644 --- a/charts/Chart.yaml +++ b/charts/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: answer -description: a simple answer deployments for kubernetes +description: A simple answer deployments for kubernetes type: application version: 0.1.0 -appVersion: "0.1.0" \ No newline at end of file +appVersion: "1.0.7" \ No newline at end of file diff --git a/charts/README.md b/charts/README.md index e4d7d1cc..f47b7028 100644 --- a/charts/README.md +++ b/charts/README.md @@ -1,2 +1,75 @@ -# Helm Charts for Answer project +# answer +An open-source knowledge-based community software. You can use it quickly to build Q&A community for your products, customers, teams, and more. +## Prerequisites + +- Kubernetes 1.20+ +## Configuration + +The following table lists the configurable parameters of the answer chart and their default values. + +| Parameter | Description | Default | +| --------- | ----------- | ------- | +| `replicaCount` | Number of answer replicas | `1` | +| `image.repository` | Image repository | `answerdev/answer` | +| `image.pullPolicy` | Image pull policy | `Always` | +| `image.tag` | Image tag | `latest` | +| `env` | Optional environment variables for answer | `LOG_LEVEL: INFO` | +| `extraContainers` | Optional sidecar containers to run along side answer | `[]` | +| `persistence.enabled` | Enable or disable persistence for the /data volume | `true` | +| `persistence.accessMode` | Specify the access mode of the persistent volume | `ReadWriteOnce` | +| `persistence.size` | The size of the persistent volume | `5Gi` | +| `persistence.annotations` | Annotations to add to the volume claim | `{}` | +| `imagePullSecrets` | Reference to one or more secrets to be used when pulling images | `[]` | +| `nameOverride` | nameOverride replaces the name of the chart in the Chart.yaml file, when this is used to construct Kubernetes object names. | | +| `fullnameOverride` | fullnameOverride completely replaces the generated name. | | +| `serviceAccount.create` | If `true`, create a new service account | `true` | +| `serviceAccount.annotations` | Annotations to add to the service account | `{}` | +| `serviceAccount.name` | Service account to be used. If not set and `serviceAccount.create` is `true`, a name is generated using the fullname template | | +| `podAnnotations` | Annotations to add to the answer pod | `{}` | +| `podSecurityContext` | Security context for the answer pod | `{}` refer to [Default Security Contexts](#default-security-contexts) | +| `securityContext` | Security context for the answer container | `{}` refer to [Default Security Contexts](#default-security-contexts) | +| `service.type` | The type of service to be used | `ClusterIP` | +| `service.port` | The port that the service should listen on for requests. Also used as the container port. | `80` | +| `ingress.enabled` | Enable or disable ingress. | `false` | +| `resources` | CPU/memory resource requests/limits | `{}` | +| `autoscaling.enabled` | Enable or disable pod autoscaling. If enabled, replicas are disabled. | `false` | +| `nodeSelector` | Node labels for pod assignment | `{}` | +| `tolerations` | Node tolerations for pod assignment | `[]` | +| `affinity` | Node affinity for pod assignment | `{}` | + +### Default Security Contexts + +The default pod-level and container-level security contexts, below, adhere to the [restricted](https://kubernetes.io/docs/concepts/security/pod-security-standards/#restricted) Pod Security Standards policies. + +Default pod-level securityContext: +```yaml +runAsNonRoot: true +seccompProfile: + type: RuntimeDefault +``` + +Default containerSecurityContext: +```yaml +allowPrivilegeEscalation: false +capabilities: + drop: + - ALL +``` +### Installing with a Values file + +```console +$ helm install answer -f values.yaml . +``` +> **Tip**: You can use the default [values.yaml] + +## TODO + +Publish the chart to Artifacthub and add proper installation instructions. E.G. +> **NOTE**: This is not currently a valid installation option. + +```console +$ helm repo add answerdev https://charts.answer.dev/ +$ helm repo update +$ helm install answerdev/answer -n mynamespace +``` \ No newline at end of file diff --git a/charts/templates/_helpers.tpl b/charts/templates/_helpers.tpl index cfdf84d7..5b039579 100644 --- a/charts/templates/_helpers.tpl +++ b/charts/templates/_helpers.tpl @@ -34,7 +34,7 @@ Create chart name and version as used by the chart label. Common labels */}} {{- define "answer.labels" -}} -helm.sh/chart: {{ .Release.Name }} +helm.sh/chart: {{ include "answer.chart" . }} {{ include "answer.selectorLabels" . }} {{- if .Chart.AppVersion }} app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} @@ -46,6 +46,17 @@ app.kubernetes.io/managed-by: {{ .Release.Service }} Selector labels */}} {{- define "answer.selectorLabels" -}} -app.kubernetes.io/name: answer +app.kubernetes.io/name: {{ include "answer.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} {{- end }} + +{{/* +Create the name of the service account to use +*/}} +{{- define "answer.serviceAccountName" -}} +{{- if .Values.serviceAccount.create }} +{{- default (include "answer.fullname" .) .Values.serviceAccount.name }} +{{- else }} +{{- default "default" .Values.serviceAccount.name }} +{{- end }} +{{- end }} diff --git a/charts/templates/config.yaml b/charts/templates/config.yaml deleted file mode 100644 index 24fd733e..00000000 --- a/charts/templates/config.yaml +++ /dev/null @@ -1,9 +0,0 @@ ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: answer-config - namespace: {{ .Values.namespace | default "default" | quote }} -data: - default.yaml: |- - # diff --git a/charts/templates/deployment.yaml b/charts/templates/deployment.yaml new file mode 100644 index 00000000..ced91e4e --- /dev/null +++ b/charts/templates/deployment.yaml @@ -0,0 +1,88 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "answer.fullname" . }} + labels: + {{- include "answer.labels" . | nindent 4 }} +spec: + {{- if not .Values.autoscaling.enabled }} + replicas: {{ .Values.replicaCount }} + {{- end }} + selector: + matchLabels: + {{- include "answer.selectorLabels" . | nindent 6 }} + template: + metadata: + {{- with .Values.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "answer.selectorLabels" . | nindent 8 }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + serviceAccountName: {{ include "answer.serviceAccountName" . }} + securityContext: + {{- toYaml .Values.podSecurityContext | nindent 8 }} + containers: + - name: {{ .Chart.Name }} + securityContext: + {{- toYaml .Values.securityContext | nindent 12 }} + image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + ports: + - name: http + containerPort: {{ .Values.service.port }} + protocol: TCP + livenessProbe: + httpGet: + path: / + port: http + readinessProbe: + httpGet: + path: / + port: http + resources: + {{- toYaml .Values.resources | nindent 12 }} + {{- if .Values.env }} + env: + {{- range .Values.env }} + - name: {{ .name }} + {{- if .value | quote }} + value: {{ .value | quote }} + {{- end }} + {{- if .valueFrom }} + valueFrom: + {{- toYaml .valueFrom | nindent 16 }} + {{- end }} + {{- end }} + {{- end }} + volumeMounts: + - name: data + mountPath: "/data" + {{- if .Values.extraContainers }} + {{- toYaml .Values.extraContainers | nindent 8 }} + {{- end }} + volumes: + - name: data + {{- if .Values.persistence.enabled }} + persistentVolumeClaim: + claimName: {{ include "answer.fullname" . }}-claim + {{- else }} + emptyDir: {} + {{- end -}} + {{- with .Values.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} \ No newline at end of file diff --git a/charts/templates/hpa.yaml b/charts/templates/hpa.yaml new file mode 100644 index 00000000..53687b82 --- /dev/null +++ b/charts/templates/hpa.yaml @@ -0,0 +1,28 @@ +{{- if .Values.autoscaling.enabled }} +apiVersion: autoscaling/v2beta1 +kind: HorizontalPodAutoscaler +metadata: + name: {{ include "answer.fullname" . }} + labels: + {{- include "answer.labels" . | nindent 4 }} +spec: + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: {{ include "answer.fullname" . }} + minReplicas: {{ .Values.autoscaling.minReplicas }} + maxReplicas: {{ .Values.autoscaling.maxReplicas }} + metrics: + {{- if .Values.autoscaling.targetCPUUtilizationPercentage }} + - type: Resource + resource: + name: cpu + targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} + {{- end }} + {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} + - type: Resource + resource: + name: memory + targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} + {{- end }} +{{- end }} diff --git a/charts/templates/ingress.yaml b/charts/templates/ingress.yaml new file mode 100644 index 00000000..fd3de613 --- /dev/null +++ b/charts/templates/ingress.yaml @@ -0,0 +1,61 @@ +{{- if .Values.ingress.enabled -}} +{{- $fullName := include "answer.fullname" . -}} +{{- $svcPort := .Values.service.port -}} +{{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }} + {{- if not (hasKey .Values.ingress.annotations "kubernetes.io/ingress.class") }} + {{- $_ := set .Values.ingress.annotations "kubernetes.io/ingress.class" .Values.ingress.className}} + {{- end }} +{{- end }} +{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}} +apiVersion: networking.k8s.io/v1 +{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} +apiVersion: networking.k8s.io/v1beta1 +{{- else -}} +apiVersion: extensions/v1beta1 +{{- end }} +kind: Ingress +metadata: + name: {{ $fullName }} + labels: + {{- include "answer.labels" . | nindent 4 }} + {{- with .Values.ingress.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + {{- if and .Values.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }} + ingressClassName: {{ .Values.ingress.className }} + {{- end }} + {{- if .Values.ingress.tls }} + tls: + {{- range .Values.ingress.tls }} + - hosts: + {{- range .hosts }} + - {{ . | quote }} + {{- end }} + secretName: {{ .secretName }} + {{- end }} + {{- end }} + rules: + {{- range .Values.ingress.hosts }} + - host: {{ .host | quote }} + http: + paths: + {{- range .paths }} + - path: {{ .path }} + {{- if and .pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }} + pathType: {{ .pathType }} + {{- end }} + backend: + {{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }} + service: + name: {{ $fullName }} + port: + number: {{ $svcPort }} + {{- else }} + serviceName: {{ $fullName }} + servicePort: {{ $svcPort }} + {{- end }} + {{- end }} + {{- end }} +{{- end }} diff --git a/charts/templates/pvc.yaml b/charts/templates/pvc.yaml new file mode 100644 index 00000000..7e510033 --- /dev/null +++ b/charts/templates/pvc.yaml @@ -0,0 +1,25 @@ +{{- if .Values.persistence.enabled }} +kind: PersistentVolumeClaim +apiVersion: v1 +metadata: + name: {{ include "answer.fullname" . }}-claim + {{- with .Values.persistence.annotations }} + annotations: + {{ toYaml . | indent 4 }} + {{- end }} + labels: + {{- include "answer.labels" . | nindent 4 }} +spec: + {{- if .Values.persistence.storageClass }} + {{- if (eq "-" .Values.persistence.storageClass) }} + storageClassName: "" + {{- else }} + storageClassName: "{{ .Values.persistence.storageClass }}" + {{- end }} + {{- end }} + accessModes: + - {{ .Values.persistence.accessMode | quote }} + resources: + requests: + storage: {{ .Values.persistence.size | quote }} +{{- end }} \ No newline at end of file diff --git a/charts/templates/service.yaml b/charts/templates/service.yaml index b5db58f8..4f587446 100644 --- a/charts/templates/service.yaml +++ b/charts/templates/service.yaml @@ -1,17 +1,15 @@ ---- apiVersion: v1 kind: Service metadata: name: {{ include "answer.fullname" . }} labels: {{- include "answer.labels" . | nindent 4 }} - namespace: {{ .Values.namespace | default "default" | quote }} spec: - type: ClusterIP + type: {{ .Values.service.type }} ports: - - name: answer - port: 80 - targetPort: 80 + - port: {{ .Values.service.port }} + targetPort: http protocol: TCP + name: http selector: {{- include "answer.selectorLabels" . | nindent 4 }} diff --git a/charts/templates/serviceaccount.yaml b/charts/templates/serviceaccount.yaml new file mode 100644 index 00000000..7f4fc535 --- /dev/null +++ b/charts/templates/serviceaccount.yaml @@ -0,0 +1,12 @@ +{{- if .Values.serviceAccount.create -}} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ include "answer.serviceAccountName" . }} + labels: + {{- include "answer.labels" . | nindent 4 }} + {{- with .Values.serviceAccount.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +{{- end }} diff --git a/charts/templates/statefulset.yaml b/charts/templates/statefulset.yaml deleted file mode 100644 index ac6a6be8..00000000 --- a/charts/templates/statefulset.yaml +++ /dev/null @@ -1,31 +0,0 @@ ---- -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: answer - namespace: {{ .Values.namespace | default "default" | quote }} -spec: - selector: - matchLabels: - {{- include "answer.labels" . | nindent 6 }} - serviceName: answer - replicas: 1 - template: - metadata: - labels: - {{- include "answer.labels" . | nindent 8 }} - spec: - containers: - - name: answer - image: nginx:stable - ports: - - containerPort: 80 - name: answer-ui - volumeMounts: - - name: config - mountPath: "/etc/answer.yaml" - subPath: default.yaml - volumes: - - name: config - configMap: - name: answer-config diff --git a/charts/values.yaml b/charts/values.yaml index 9065ca5b..74b15dcc 100644 --- a/charts/values.yaml +++ b/charts/values.yaml @@ -1 +1,147 @@ -namespace: default +# Default values for answer. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +replicaCount: 1 + +image: + repository: answerdev/answer + pullPolicy: Always + # Overrides the image tag whose default is the chart appVersion. + tag: "latest" + +# Environment variables +# Configure environment variables below +# https://answer.dev/docs/env +env: + - name: LOG_LEVEL + # [DEBUG INFO WARN ERROR] + value: "INFO" + # uncomment the below values to use AUTO_INSTALL and not have to go through the setup process. + # Once used to do the initial setup, these variables wont be used moving forward. + # You must at a minimum comment AUTO_INSTALL after initial setup to prevent an error about the database already being initiated. + # - name: AUTO_INSTALL + # value: "true" + # - name: DB_TYPE + # value: "sqlite3" + # # DB_FILE Only for sqlite3 + # - name: DB_FILE + # value: "/data/answer.db" + # - name: LANGUAGE + # value: "en-US" + # - name: SITE_NAME + # value: "MyAnswer" + # - name: SITE_URL + # value: "http://localhost:80" + # - name: CONTACT_EMAIL + # value: "support@mydomain.com" + # - name: ADMIN_NAME + # # lowercase + # value: "myadmin" + # - name: ADMIN_PASSWORD + # # 32 Characters MAX + # value: "MyInsecurePasswordInTheRepo!" + # # Use valueFrom to use a secret + # # valueFrom: + # # secretKeyRef: + # # key: answer-admin-password + # # name: answer-secrets + # - name: ADMIN_EMAIL + # value: "myAdmin@mydomain.com" + +# Configure extra containers +extraContainers: [] + # - name: cloudsql-proxy + # image: gcr.io/cloud-sql-connectors/cloud-sql-proxy:2.1.2 + # command: + # - /cloud-sql-proxy + # args: + # - project:region:instance + # - --port=5432 + # - --auto-iam-authn + # ports: + # - containerPort: 5432 + +# Persistence for the /data volume +# Without persistence, your uploads and config.yaml will not be remembered between restarts. +persistence: + enabled: true + # If set to "-", storageClassName: "", which disables dynamic provisioning + # If undefined (the default) or set to null, no storageClassName spec is + # set, choosing the default provisioner. (gp2 on AWS, standard on + # GKE, AWS & OpenStack) + # storageClass: "-" + accessMode: ReadWriteOnce + size: 5Gi + annotations: {} + +imagePullSecrets: [] +nameOverride: "" +fullnameOverride: "" + +serviceAccount: + # Specifies whether a service account should be created + create: true + # Annotations to add to the service account + annotations: {} + # The name of the service account to use. + # If not set and create is true, a name is generated using the fullname template + name: "" + +podAnnotations: {} + +podSecurityContext: {} + # fsGroup: 2000 + +securityContext: {} + # capabilities: + # drop: + # - ALL + # readOnlyRootFilesystem: true + # runAsNonRoot: true + # runAsUser: 1000 + +service: + type: ClusterIP + port: 80 + +ingress: + enabled: false + className: "" + annotations: {} + # kubernetes.io/ingress.class: nginx + # kubernetes.io/tls-acme: "true" + hosts: + - host: answer.local + paths: + - path: / + pathType: ImplementationSpecific + tls: [] + # - secretName: answer-tls + # hosts: + # - answer.local + +resources: {} + # We usually recommend not to specify default resources and to leave this as a conscious + # choice for the user. This also increases chances charts run on environments with little + # resources, such as Minikube. If you do want to specify resources, uncomment the following + # lines, adjust them as necessary, and remove the curly braces after 'resources:'. + # limits: + # cpu: 100m + # memory: 128Mi + # requests: + # cpu: 100m + # memory: 128Mi + +autoscaling: + enabled: false + minReplicas: 1 + maxReplicas: 100 + targetCPUUtilizationPercentage: 80 + # targetMemoryUtilizationPercentage: 80 + +nodeSelector: {} + +tolerations: [] + +affinity: {} \ No newline at end of file From b1de76e22754493c720cdaf665521eb0ef47b91d Mon Sep 17 00:00:00 2001 From: LinkinStars Date: Tue, 11 Apr 2023 10:30:40 +0800 Subject: [PATCH 29/32] docs(makefile): upgrade 1.0.8 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 50c79f68..5fb96f68 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ .PHONY: build clean ui -VERSION=1.0.7 +VERSION=1.0.8 BIN=answer DIR_SRC=./cmd/answer DOCKER_CMD=docker From e919f2327279b8223487d9173ea6f40ff8784fd0 Mon Sep 17 00:00:00 2001 From: Fen Date: Tue, 11 Apr 2023 10:37:34 +0800 Subject: [PATCH 30/32] New Crowdin updates (#317) * New translations en_US.yaml (French) * New translations en_US.yaml (German) * New translations en_US.yaml (Japanese) * New translations en_US.yaml (Portuguese) * New translations en_US.yaml (Slovak) * New translations en_US.yaml (Turkish) * New translations en_US.yaml (Chinese Simplified) * New translations en_US.yaml (Welsh) --- i18n/cy_GB.yaml | 1389 +++++++++++++++++++++++++++++++++++++++++++++++ i18n/de_DE.yaml | 1084 ++++++++++++++++++------------------ i18n/fr_FR.yaml | 34 +- i18n/ja_JP.yaml | 172 +++--- i18n/pt_PT.yaml | 10 +- i18n/sk_SK.yaml | 108 ++-- i18n/tr_TR.yaml | 2 +- i18n/zh_CN.yaml | 44 +- 8 files changed, 2116 insertions(+), 727 deletions(-) create mode 100644 i18n/cy_GB.yaml diff --git a/i18n/cy_GB.yaml b/i18n/cy_GB.yaml new file mode 100644 index 00000000..755bc7b4 --- /dev/null +++ b/i18n/cy_GB.yaml @@ -0,0 +1,1389 @@ +#The following fields are used for back-end +backend: + base: + success: + other: Llwyddiant. + unknown: + other: Gwall anhysbys. + request_format_error: + other: Nid yw fformat y cais yn ddilys. + unauthorized_error: + other: Anawdurdodedig. + database_error: + other: Gwall gweinydd data. + role: + name: + user: + other: Defnyddiwr + admin: + other: Gweinyddwr + moderator: + other: Aroglygydd + description: + user: + other: Diofyn heb unrhyw fynediad arbennig. + admin: + other: Bod â'r pŵer llawn i gael mynediad i'r safle. + moderator: + other: Mae ganddo fynediad i bob post ac eithrio gosodiadau gweinyddol. + email: + other: Ebost + password: + other: Cyfrinair + email_or_password_wrong_error: + other: Nid yw e-bost a chyfrinair yn cyfateb. + error: + admin: + cannot_update_their_password: + other: Ni allwch addasu eich cyfrinair. + cannot_modify_self_status: + other: Ni allwch addasu eich statws. + email_or_password_wrong: + other: Nid yw e-bost a chyfrinair yn cyfateb. + answer: + not_found: + other: Ateb heb ei ddarganfod. + cannot_deleted: + other: Dim caniatâd i ddileu. + cannot_update: + other: Dim caniatâd i ddiweddaru. + question_closed_cannot_add: + other: Mae cwestiynau ar gau ac ni ellir eu hychwanegu. + comment: + edit_without_permission: + other: Nid oes modd golygu sylwadau. + not_found: + other: Sylw heb ei ganfod. + cannot_edit_after_deadline: + other: Mae'r amser sylwadau wedi bod yn rhy hir i'w addasu. + email: + duplicate: + other: E-bost yn bodoli eisoes. + need_to_be_verified: + other: Dylid gwirio e-bost. + verify_url_expired: + other: Mae'r URL wedi'i wirio gan e-bost wedi dod i ben, anfonwch yr e-bost eto. + lang: + not_found: + other: Ffeil iaith heb ei chanfod. + object: + captcha_verification_failed: + other: Captcha anghywir. + disallow_follow: + other: Ni chaniateir i chi ddilyn. + disallow_vote: + other: Ni chaniateir i chi pleidleisio. + disallow_vote_your_self: + other: Ni allwch bleidleisio dros eich post eich hun. + not_found: + other: Heb ganfod y gwrthrych. + verification_failed: + other: Methodd y dilysu. + email_or_password_incorrect: + other: Nid yw e-bost a chyfrinair yn cyfateb. + old_password_verification_failed: + other: Methodd yr hen ddilysiad cyfrinair + new_password_same_as_previous_setting: + other: Mae'r cyfrinair newydd yr un fath â'r un blaenorol. + question: + already_deleted: + other: Mae'r postiad hwn wedi'i ddileu. + not_found: + other: Cwestiwn heb ei ganfod. + cannot_deleted: + other: Dim caniatâd i ddileu. + cannot_close: + other: Dim caniatâd i cau. + cannot_update: + other: Dim caniatâd i ddiweddaru. + rank: + fail_to_meet_the_condition: + other: Rank yn methu â bodloni'r amod. + report: + handle_failed: + other: Methodd handlen yr adroddiad. + not_found: + other: Heb ganfod yr adroddiad. + tag: + already_exist: + other: Tag yn bodoli eisoes. + not_found: + other: Tag heb ei ddarganfod. + recommend_tag_not_found: + other: Nid yw Tag argymell yn bodoli. + recommend_tag_enter: + other: Rhowch o leiaf un tag gofynnol. + not_contain_synonym_tags: + other: Ni ddylai gynnwys tagiau cyfystyr. + cannot_update: + other: Dim caniatâd i ddiweddaru. + is_used_cannot_delete: + other: Ni allwch ddileu tag sy'n cael ei ddefnyddio + cannot_set_synonym_as_itself: + other: Ni allwch osod cyfystyr y tag cyfredol fel ei hun. + smtp: + config_from_name_cannot_be_email: + other: Ni all yr 'Enw O' fod yn gyfeiriad e-bost. + theme: + not_found: + other: Thema heb ei ddarganfod. + revision: + review_underway: + other: Methu â golygu ar hyn o bryd, mae fersiwn yn y ciw adolygu. + no_permission: + other: Dim caniatâd i adolygu. + user: + email_or_password_wrong: + other: + other: Nid yw e-bost a chyfrinair yn cyfateb. + not_found: + other: Defnyddwr heb ei ddarganfod. + suspended: + other: Mae'r defnyddiwr hwn wedi'i atal. + username_invalid: + other: Mae'r enw defnyddiwr yn annilys. + username_duplicate: + other: Cymerwyd yr enw defnyddiwr eisoes. + set_avatar: + other: Methodd gwneud avatar. + cannot_update_your_role: + other: Ni allwch addasu eich rôl. + not_allowed_registration: + other: Ar hyn o bryd nid yw'r safle ar agor i'w gofrestru + config: + read_config_failed: + other: Wedi methu darllen y ffurfwedd + database: + connection_failed: + other: Methodd cysylltiad cronfa ddata + create_table_failed: + other: Methwyd creu tabl + install: + create_config_failed: + other: Methu creu'r ffeil config.yaml. + upload: + unsupported_file_format: + other: Fformat ffeil anghydnaws. + report: + spam: + name: + other: sbam + desc: + other: Mae'r swydd hon yn hysbyseb, neu fandaliaeth. Nid yw'n ddefnyddiol nac yn berthnasol i'r pwnc cyfredol. + rude: + name: + other: anghwrtais neu sarhaus + desc: + other: Byddai person rhesymol yn gweld y cynnwys hwn yn amhriodol ar gyfer trafodaeth barchus. + duplicate: + name: + other: dyblyg + desc: + other: Mae'r cwestiwn hwn wedi'i ofyn o'r blaen ac mae ganddo ateb yn barod. + not_answer: + name: + other: nid ateb + desc: + other: Postiwyd hwn fel ateb, ond nid yw'n ceisio ateb y cwestiwn. Mae'n bosibl y dylai fod yn olygiad, yn sylwad, yn gwestiwn arall, neu'n cael ei ddileu yn gyfan gwbl. + not_need: + name: + other: nad oes ei angen yn pellach + desc: + other: Mae'r sylw hwn yn hen ffasiwn, yn sgyrsiol neu ddim yn berthnasol i'r post hwn. + other: + name: + other: rhywbeth arall + desc: + other: Mae'r swydd hon angen sylw staff am reswm arall nad yw wedi'i restru uchod. + question: + close: + duplicate: + name: + other: sbam + desc: + other: Mae'r cwestiwn hwn wedi'i ofyn o'r blaen ac mae ganddo ateb yn barod. + guideline: + name: + other: rheswm cymunedol-benodol + desc: + other: Nid yw'r cwestiwn hwn yn bodloni canllaw cymunedol. + multiple: + name: + other: angen manylion neu eglurder + desc: + other: Mae'r cwestiwn hwn ar hyn o bryd yn cynnwys cwestiynau lluosog mewn un. Dylai ganolbwyntio ar un broblem yn unig. + other: + name: + other: rhywbeth arall + desc: + other: Mae'r swydd hon angen reswm arall nad yw wedi'i restru uchod. + operation_type: + asked: + other: gofynnodd + answered: + other: atebodd + modified: + other: wedi newid + notification: + action: + update_question: + other: cwestiwn wedi'i ddiweddaru + answer_the_question: + other: cwestiwn wedi ei ateb + update_answer: + other: ateb wedi'i ddiweddaru + accept_answer: + other: ateb derbyniol + comment_question: + other: cwestiwn a wnaed + comment_answer: + other: ateb a wnaed + reply_to_you: + other: atebodd i chi + mention_you: + other: wedi sôn amdanoch + your_question_is_closed: + other: Mae eich cwestiwn wedi’i gau + your_question_was_deleted: + other: Mae eich cwestiwn wedi’i dileu + your_answer_was_deleted: + other: Mae eich ateb wedi’i dileu + your_comment_was_deleted: + other: Mae eich sylw wedi’i dileu +#The following fields are used for interface presentation(Front-end) +ui: + how_to_format: + title: Sut i Fformatio + desc: >- +
  • i wneud cysylltiadau

    <https://url.com>

    [Title](https://url.com)
  • rhoi toriad llinell rhwng paragraffau

  • _italig_ or **bold**

  • cod mewnoliad gan 4 bylchau

  • dyfyniad trwy osod > ar ddechrau'r llinell

  • backtic yn dianc`fel_hyn_`

  • creu ffensys cod gyda backticks `

    ```
    cod yma
    ```
+ pagination: + prev: Cynt + next: Nesaf + page_title: + question: Cwestiwn + questions: Cwestiynau + tag: Tag + tags: Tagiau + tag_wiki: wici tag + create_tag: Creu Tag + edit_tag: Golygu Tag + ask_a_question: Ychwanegu Cwestiwn + edit_question: Golygu Cwestiwn + edit_answer: Golygu Ateb + search: Chwiliwch + posts_containing: Postiadau yn cynnwys + settings: Gosodiadau + notifications: Hysbysiadau + login: Mewngofnodi + sign_up: Cofrestru + account_recovery: Adfer Cyfrif + account_activation: Ysgogi Cyfrif + confirm_email: Cadarnhau e-bost + account_suspended: Cyfrif wedi'i atal + admin: Gweinyddu + change_email: Addasu E-bost + install: Ateb Gosod + upgrade: Ateb Uwchraddio + maintenance: Cynnal a Chadw Gwefan + users: Defnyddwyr + http_404: Gwall HTTP 404 + http_50X: Gwall HTTP 500 + notifications: + title: Hysbysiadau + inbox: Mewnflwch + achievement: Llwyddiannau + all_read: Marciwch y cyfan fel wedi'i ddarllen + show_more: Dangos mwy + suspended: + title: Mae'ch Cyfrif wedi'i Atal + until_time: "Cafodd eich cyfrif ei atal tan {{ time }}." + forever: Cafodd y defnyddiwr hwn ei atal am byth. + end: Nid ydych yn bodloni canllaw cymunedol. + editor: + blockquote: + text: Dyfyniad + bold: + text: Cryf + chart: + text: Siart + flow_chart: Siart llif + sequence_diagram: Diagram dilyniant + class_diagram: Diagram dosbarth + state_diagram: Diagram cyflwr + entity_relationship_diagram: Diagram perthynas endid + user_defined_diagram: Diagram wedi'i ddiffinio gan y defnyddiwr + gantt_chart: Siart Gantt + pie_chart: Siart cylch + code: + text: Sampl côd + add_code: Ychwanegu sampl côd + form: + fields: + code: + label: Côd + msg: + empty: Ni all côd fod yn wag. + language: + label: Iaith + placeholder: Synhwyriad awtomatig + btn_cancel: Canslo + btn_confirm: Ychwanegu + formula: + text: Fformiwla + options: + inline: Fformiwla mewn-lein + block: Fformiwla bloc + heading: + text: Pennawd + options: + h1: Pennawd 1 + h2: Pennawd 2 + h3: Pennawd 3 + h4: Pennawd 4 + h5: Pennawd 5 + h6: Pennawd 6 + help: + text: Cymorth + hr: + text: Llinell lorweddol + image: + text: Delwedd + add_image: Ychwanegu delwedd + tab_image: Uwchlwytho delwedd + form_image: + fields: + file: + label: Ffeil Delwedd + btn: Dewis delwedd + msg: + empty: Ni all ffeil fod yn wag. + only_image: Dim ond ffeiliau delwedd a ganiateir. + max_size: Ni all maint y ffeil fod yn fwy na 4MB. + desc: + label: Disgrifiad + tab_url: URL delwedd + form_url: + fields: + url: + label: URL delwedd + msg: + empty: Ni all URL delwedd fod yn wag. + name: + label: Disgrifiad + btn_cancel: Canslo + btn_confirm: Ychwanegu + uploading: Wrthi'n uwchlwytho + indent: + text: Mewnoliad + outdent: + text: Alloliad + italic: + text: Pwyslais + link: + text: Hypergyswllt + add_link: Ychwanegu hypergyswllt + form: + fields: + url: + label: URL + msg: + empty: Ni all URL fod yn wag. + name: + label: Disgrifiad + btn_cancel: Cancel + btn_confirm: Add + ordered_list: + text: Numbered List + unordered_list: + text: Bulleted List + table: + text: Table + heading: Heading + cell: Cell + close_modal: + title: I am closing this post as... + btn_cancel: Cancel + btn_submit: Submit + remark: + empty: Cannot be empty. + msg: + empty: Please select a reason. + report_modal: + flag_title: I am flagging to report this post as... + close_title: I am closing this post as... + review_question_title: Review question + review_answer_title: Review answer + review_comment_title: Review comment + btn_cancel: Cancel + btn_submit: Submit + remark: + empty: Cannot be empty. + msg: + empty: Please select a reason. + tag_modal: + title: Create new tag + form: + fields: + display_name: + label: Display Name + msg: + empty: Display name cannot be empty. + range: Display name up to 35 characters. + slug_name: + label: URL Slug + desc: URL slug up to 35 characters. + msg: + empty: URL slug cannot be empty. + range: URL slug up to 35 characters. + character: URL slug contains unallowed character set. + desc: + label: Description + btn_cancel: Cancel + btn_submit: Submit + btn_post: Post new tag + tag_info: + created_at: Created + edited_at: Edited + history: History + synonyms: + title: Synonyms + text: The following tags will be remapped to + empty: No synonyms found. + btn_add: Add a synonym + btn_edit: Edit + btn_save: Save + synonyms_text: The following tags will be remapped to + delete: + title: Delete this tag + tip_with_posts: >- +

We do not allowed deleting tag with posts.

Please remove this tag from the posts first.

+ tip_with_synonyms: >- +

We do not allowed deleting tag with synonyms.

Please remove the synonyms from this tag first.

+ tip: Are you sure you wish to delete? + close: Close + edit_tag: + title: Edit Tag + default_reason: Edit tag + form: + fields: + revision: + label: Revision + display_name: + label: Display Name + slug_name: + label: URL Slug + info: 'Must use the character set "a-z", "0-9", "+ # - ."' + desc: + label: Description + edit_summary: + label: Edit Summary + placeholder: >- + Briefly explain your changes (corrected spelling, fixed grammar, improved formatting) + btn_save_edits: Save edits + btn_cancel: Cancel + dates: + long_date: MMM D + long_date_with_year: "MMM D, YYYY" + long_date_with_time: "MMM D, YYYY [at] HH:mm" + now: now + x_seconds_ago: "{{count}}s ago" + x_minutes_ago: "{{count}}m ago" + x_hours_ago: "{{count}}h ago" + hour: hour + day: day + comment: + btn_add_comment: Add comment + reply_to: Reply to + btn_reply: Reply + btn_edit: Edit + btn_delete: Delete + btn_flag: Flag + btn_save_edits: Save edits + btn_cancel: Cancel + show_more: Show more comments + tip_question: >- + Use comments to ask for more information or suggest improvements. Avoid answering questions in comments. + tip_answer: >- + Use comments to reply to other users or notify them of changes. If you are adding new information, edit your post instead of commenting. + edit_answer: + title: Edit Answer + default_reason: Edit answer + form: + fields: + revision: + label: Revision + answer: + label: Answer + feedback: + characters: content must be at least 6 characters in length. + edit_summary: + label: Edit Summary + placeholder: >- + Briefly explain your changes (corrected spelling, fixed grammar, improved formatting) + btn_save_edits: Save edits + btn_cancel: Cancel + tags: + title: Tags + sort_buttons: + popular: Popular + name: Name + newest: newest + button_follow: Follow + button_following: Following + tag_label: questions + search_placeholder: Filter by tag name + no_desc: The tag has no description. + more: More + ask: + title: Add Question + edit_title: Edit Question + default_reason: Edit question + similar_questions: Similar questions + form: + fields: + revision: + label: Revision + title: + label: Title + placeholder: Be specific and imagine you're asking a question to another person + msg: + empty: Title cannot be empty. + range: Title up to 150 characters + body: + label: Body + msg: + empty: Body cannot be empty. + tags: + label: Tags + msg: + empty: Tags cannot be empty. + answer: + label: Answer + msg: + empty: Answer cannot be empty. + edit_summary: + label: Edit Summary + placeholder: >- + Briefly explain your changes (corrected spelling, fixed grammar, improved formatting) + btn_post_question: Post your question + btn_save_edits: Save edits + answer_question: Answer your own question + post_question&answer: Post your question and answer + tag_selector: + add_btn: Add tag + create_btn: Create new tag + search_tag: Search tag + hint: "Describe what your question is about, at least one tag is required." + no_result: No tags matched + tag_required_text: Required tag (at least one) + header: + nav: + question: Questions + tag: Tags + user: Users + profile: Profile + setting: Settings + logout: Log out + admin: Admin + review: Review + search: + placeholder: Search + footer: + build_on: >- + Built on <1> Answer - the open-source software that powers Q&A communities.
Made with love © {{cc}}. + upload_img: + name: Change + loading: loading... + pic_auth_code: + title: Captcha + placeholder: Type the text above + msg: + empty: Captcha cannot be empty. + inactive: + first: >- + You're almost done! We sent an activation mail to {{mail}}. Please follow the instructions in the mail to activate your account. + info: "If it doesn't arrive, check your spam folder." + another: >- + We sent another activation email to you at {{mail}}. It might take a few minutes for it to arrive; be sure to check your spam folder. + btn_name: Resend activation email + change_btn_name: Change email + msg: + empty: Cannot be empty. + login: + page_title: Welcome to {{site_name}} + login_to_continue: Log in to continue + info_sign: Don't have an account? <1>Sign up + info_login: Already have an account? <1>Log in + agreements: By registering, you agree to the <1>privacy policy and <3>terms of service. + forgot_pass: Forgot password? + name: + label: Name + msg: + empty: Name cannot be empty. + range: Name up to 30 characters. + email: + label: Email + msg: + empty: Email cannot be empty. + password: + label: Password + msg: + empty: Password cannot be empty. + different: The passwords entered on both sides are inconsistent + account_forgot: + page_title: Forgot Your Password + btn_name: Send me recovery email + send_success: >- + If an account matches {{mail}}, you should receive an email with instructions on how to reset your password shortly. + email: + label: Email + msg: + empty: Email cannot be empty. + change_email: + page_title: Welcome to {{site_name}} + btn_cancel: Cancel + btn_update: Update email address + send_success: >- + If an account matches {{mail}}, you should receive an email with instructions on how to reset your password shortly. + email: + label: New Email + msg: + empty: Email cannot be empty. + password_reset: + page_title: Password Reset + btn_name: Reset my password + reset_success: >- + You successfully changed your password; you will be redirected to the log in page. + link_invalid: >- + Sorry, this password reset link is no longer valid. Perhaps your password is already reset? + to_login: Continue to log in page + password: + label: Password + msg: + empty: Password cannot be empty. + length: The length needs to be between 8 and 32 + different: The passwords entered on both sides are inconsistent + password_confirm: + label: Confirm New Password + settings: + page_title: Settings + nav: + profile: Profile + notification: Notifications + account: Account + interface: Interface + profile: + heading: Profile + btn_name: Save + display_name: + label: Display Name + msg: Display name cannot be empty. + msg_range: Display name up to 30 characters. + username: + label: Username + caption: People can mention you as "@username". + msg: Username cannot be empty. + msg_range: Username up to 30 characters. + character: 'Must use the character set "a-z", "0-9", " - . _"' + avatar: + label: Profile Image + gravatar: Gravatar + gravatar_text: You can change image on <1>gravatar.com + custom: Custom + btn_refresh: Refresh + custom_text: You can upload your image. + default: System + msg: Please upload an avatar + bio: + label: About Me + website: + label: Website + placeholder: "https://example.com" + msg: Website incorrect format + location: + label: Location + placeholder: "City, Country" + notification: + heading: Notifications + email: + label: Email Notifications + radio: "Answers to your questions, comments, and more" + account: + heading: Account + change_email_btn: Change email + change_pass_btn: Change password + change_email_info: >- + We've sent an email to that address. Please follow the confirmation instructions. + email: + label: Email + msg: Email cannot be empty. + password_title: Password + current_pass: + label: Current Password + msg: + empty: Current Password cannot be empty. + length: The length needs to be between 8 and 32. + different: The two entered passwords do not match. + new_pass: + label: New Password + pass_confirm: + label: Confirm New Password + interface: + heading: Interface + lang: + label: Interface Language + text: User interface language. It will change when you refresh the page. + toast: + update: update success + update_password: Password changed successfully. + flag_success: Thanks for flagging. + forbidden_operate_self: Forbidden to operate on yourself + review: Your revision will show after review. + related_question: + title: Related Questions + btn: Add question + answers: answers + question_detail: + Asked: Asked + asked: asked + update: Modified + edit: edited + Views: Viewed + Follow: Follow + Following: Following + answered: answered + closed_in: Closed in + show_exist: Show existing question. + answers: + title: Answers + score: Score + newest: Newest + btn_accept: Accept + btn_accepted: Accepted + write_answer: + title: Your Answer + btn_name: Post your answer + add_another_answer: Add another answer + confirm_title: Continue to answer + continue: Continue + confirm_info: >- +

Are you sure you want to add another answer?

You could use the edit link to refine and improve your existing answer, instead.

+ empty: Answer cannot be empty. + characters: content must be at least 6 characters in length. + reopen: + title: Reopen this post + content: Are you sure you want to reopen? + success: This post has been reopened + delete: + title: Delete this post + question: >- + We do not recommend deleting questions with answers because doing so deprives future readers of this knowledge.

Repeated deletion of answered questions can result in your account being blocked from asking. Are you sure you wish to delete? + answer_accepted: >- +

We do not recommend deleting accepted answer because doing so deprives future readers of this knowledge.

Repeated deletion of accepted answers can result in your account being blocked from answering. Are you sure you wish to delete? + other: Are you sure you wish to delete? + tip_question_deleted: This post has been deleted + tip_answer_deleted: This answer has been deleted + btns: + confirm: Confirm + cancel: Cancel + save: Save + delete: Delete + login: Log in + signup: Sign up + logout: Log out + verify: Verify + add_question: Add question + approve: Approve + reject: Reject + skip: Skip + discard_draft: Discard draft + search: + title: Search Results + keywords: Keywords + options: Options + follow: Follow + following: Following + counts: "{{count}} Results" + more: More + sort_btns: + relevance: Relevance + newest: Newest + active: Active + score: Score + more: More + tips: + title: Advanced Search Tips + tag: "<1>[tag] search withing a tag" + user: "<1>user:username search by author" + answer: "<1>answers:0 unanswered questions" + score: "<1>score:3 posts with a 3+ score" + question: "<1>is:question search questions" + is_answer: "<1>is:answer search answers" + empty: We couldn't find anything.
Try different or less specific keywords. + share: + name: Share + copy: Copy link + via: Share post via... + copied: Copied + facebook: Share to Facebook + twitter: Share to Twitter + cannot_vote_for_self: You can't vote for your own post + modal_confirm: + title: Error... + account_result: + page_title: Welcome to {{site_name}} + success: Your new account is confirmed; you will be redirected to the home page. + link: Continue to homepage + invalid: >- + Sorry, this account confirmation link is no longer valid. Perhaps your account is already active? + confirm_new_email: Your email has been updated. + confirm_new_email_invalid: >- + Sorry, this confirmation link is no longer valid. Perhaps your email was already changed? + unsubscribe: + page_title: Unsubscribe + success_title: Unsubscribe Successful + success_desc: You have been successfully removed from this subscriber list and won't receive any further emails from us. + link: Change settings + question: + following_tags: Following Tags + edit: Edit + save: Save + follow_tag_tip: Follow tags to curate your list of questions. + hot_questions: Hot Questions + all_questions: All Questions + x_questions: "{{ count }} Questions" + x_answers: "{{ count }} answers" + questions: Questions + answers: Answers + newest: Newest + active: Active + frequent: Frequent + score: Score + unanswered: Unanswered + modified: modified + answered: answered + asked: asked + closed: closed + follow_a_tag: Follow a tag + more: More + personal: + overview: Overview + answers: Answers + answer: answer + questions: Questions + question: question + bookmarks: Bookmarks + reputation: Reputation + comments: Comments + votes: Votes + newest: Newest + score: Score + edit_profile: Edit Profile + visited_x_days: "Visited {{ count }} days" + viewed: Viewed + joined: Joined + last_login: Seen + about_me: About Me + about_me_empty: "// Hello, World !" + top_answers: Top Answers + top_questions: Top Questions + stats: Stats + list_empty: No posts found.
Perhaps you'd like to select a different tab? + accepted: Accepted + answered: answered + asked: asked + upvote: upvote + downvote: downvote + mod_short: Mod + mod_long: Moderators + x_reputation: reputation + x_votes: votes received + x_answers: answers + x_questions: questions + install: + title: Answer + next: Next + done: Done + config_yaml_error: Can't create the config.yaml file. + lang: + label: Please Choose a Language + db_type: + label: Database Engine + db_username: + label: Username + placeholder: root + msg: Username cannot be empty. + db_password: + label: Password + placeholder: root + msg: Password cannot be empty. + db_host: + label: Database Host + placeholder: "db:3306" + msg: Database Host cannot be empty. + db_name: + label: Database Name + placeholder: answer + msg: Database Name cannot be empty. + db_file: + label: Database File + placeholder: /data/answer.db + msg: Database File cannot be empty. + config_yaml: + title: Create config.yaml + label: The config.yaml file created. + desc: >- + You can create the <1>config.yaml file manually in the <1>/var/wwww/xxx/ directory and paste the following text into it. + info: After you've done that, click "Next" button. + site_information: Site Information + admin_account: Admin Account + site_name: + label: Site Name + msg: Site Name cannot be empty. + site_url: + label: Site URL + text: The address of your site. + msg: + empty: Site URL cannot be empty. + incorrect: Site URL incorrect format. + contact_email: + label: Contact Email + text: Email address of key contact responsible for this site. + msg: + empty: Contact Email cannot be empty. + incorrect: Contact Email incorrect format. + admin_name: + label: Name + msg: Name cannot be empty. + admin_password: + label: Password + text: >- + You will need this password to log in. Please store it in a secure location. + msg: Password cannot be empty. + admin_email: + label: Email + text: You will need this email to log in. + msg: + empty: Email cannot be empty. + incorrect: Email incorrect format. + ready_title: Your Answer is Ready! + ready_desc: >- + If you ever feel like changing more settings, visit <1>admin section; find it in the site menu. + good_luck: "Have fun, and good luck!" + warn_title: Warning + warn_desc: >- + The file <1>config.yaml already exists. If you need to reset any of the configuration items in this file, please delete it first. + install_now: You may try <1>installing now. + installed: Already installed + installed_desc: >- + You appear to have already installed. To reinstall please clear your old database tables first. + db_failed: Database connection failed + db_failed_desc: >- + This either means that the database information in your <1>config.yaml file is incorrect or that contact with the database server could not be established. This could mean your host’s database server is down. + counts: + views: views + votes: votes + answers: answers + accepted: Accepted + page_404: + http_error: HTTP Error 404 + desc: "Unfortunately, this page doesn't exist." + back_home: Back to homepage + page_50X: + http_error: HTTP Error 500 + desc: The server encountered an error and could not complete your request. + back_home: Back to homepage + page_maintenance: + desc: "We are under maintenance, we'll be back soon." + nav_menus: + dashboard: Dashboard + contents: Contents + questions: Questions + answers: Answers + users: Users + flags: Flags + settings: Settings + general: General + interface: Interface + smtp: SMTP + branding: Branding + legal: Legal + write: Write + tos: Terms of Service + privacy: Privacy + seo: SEO + customize: Customize + themes: Themes + css-html: CSS/HTML + login: Login + admin: + admin_header: + title: Admin + dashboard: + title: Dashboard + welcome: Welcome to Answer Admin! + site_statistics: Site Statistics + questions: "Questions:" + answers: "Answers:" + comments: "Comments:" + votes: "Votes:" + active_users: "Active users:" + flags: "Flags:" + site_health_status: Site Health Status + version: "Version:" + https: "HTTPS:" + uploading_files: "Uploading files:" + smtp: "SMTP:" + timezone: "Timezone:" + system_info: System Info + storage_used: "Storage used:" + uptime: "Uptime:" + answer_links: Answer Links + documents: Documents + feedback: Feedback + support: Support + review: Review + config: Config + update_to: Update to + latest: Latest + check_failed: Check failed + "yes": "Yes" + "no": "No" + not_allowed: Not allowed + allowed: Allowed + enabled: Enabled + disabled: Disabled + flags: + title: Flags + pending: Pending + completed: Completed + flagged: Flagged + created: Created + action: Action + review: Review + change_modal: + title: Change user status to... + btn_cancel: Cancel + btn_submit: Submit + normal_name: normal + normal_desc: A normal user can ask and answer questions. + suspended_name: suspended + suspended_desc: A suspended user can't log in. + deleted_name: deleted + deleted_desc: "Delete profile, authentication associations." + inactive_name: inactive + inactive_desc: An inactive user must re-validate their email. + confirm_title: Delete this user + confirm_content: Are you sure you want to delete this user? This is permanent! + confirm_btn: Delete + msg: + empty: Please select a reason. + status_modal: + title: "Change {{ type }} status to..." + normal_name: normal + normal_desc: A normal post available to everyone. + closed_name: closed + closed_desc: "A closed question can't answer, but still can edit, vote and comment." + deleted_name: deleted + deleted_desc: All reputation gained and lost will be restored. + btn_cancel: Cancel + btn_submit: Submit + btn_next: Next + user_role_modal: + title: Change user role to... + btn_cancel: Cancel + btn_submit: Submit + users: + title: Users + name: Name + email: Email + reputation: Reputation + created_at: Created Time + delete_at: Deleted Time + suspend_at: Suspended Time + status: Status + role: Role + action: Action + change: Change + all: All + staff: Staff + inactive: Inactive + suspended: Suspended + deleted: Deleted + normal: Normal + Moderator: Moderator + Admin: Admin + User: User + filter: + placeholder: "Filter by name, user:id" + set_new_password: Set new password + change_status: Change status + change_role: Change role + show_logs: Show logs + add_user: Add user + new_password_modal: + title: Set new password + form: + fields: + password: + label: Password + text: The user will be logged out and need to login again. + msg: Password must be at 8-32 characters in length. + btn_cancel: Cancel + btn_submit: Submit + user_modal: + title: Add new user + form: + fields: + display_name: + label: Display Name + msg: Display Name must be at 3-30 characters in length. + email: + label: Email + msg: Email is not valid. + password: + label: Password + msg: Password must be at 8-32 characters in length. + btn_cancel: Cancel + btn_submit: Submit + questions: + page_title: Questions + normal: Normal + closed: Closed + deleted: Deleted + post: Post + votes: Votes + answers: Answers + created: Created + status: Status + action: Action + change: Change + filter: + placeholder: "Filter by title, question:id" + answers: + page_title: Answers + normal: Normal + deleted: Deleted + post: Post + votes: Votes + created: Created + status: Status + action: Action + change: Change + filter: + placeholder: "Filter by title, answer:id" + general: + page_title: General + name: + label: Site Name + msg: Site name cannot be empty. + text: "The name of this site, as used in the title tag." + site_url: + label: Site URL + msg: Site url cannot be empty. + validate: Please enter a valid URL. + text: The address of your site. + short_desc: + label: Short Site Description + msg: Short site description cannot be empty. + text: "Short description, as used in the title tag on homepage." + desc: + label: Site Description + msg: Site description cannot be empty. + text: "Describe this site in one sentence, as used in the meta description tag." + contact_email: + label: Contact Email + msg: Contact email cannot be empty. + validate: Contact email is not valid. + text: Email address of key contact responsible for this site. + interface: + page_title: Interface + language: + label: Interface Language + msg: Interface language cannot be empty. + text: User interface language. It will change when you refresh the page. + time_zone: + label: Timezone + msg: Timezone cannot be empty. + text: Choose a city in the same timezone as you. + avatar: + label: Default Avatar + text: For users without a custom avatar of their own. + smtp: + page_title: SMTP + from_email: + label: From Email + msg: From email cannot be empty. + text: The email address which emails are sent from. + from_name: + label: From Name + msg: From name cannot be empty. + text: The name which emails are sent from. + smtp_host: + label: SMTP Host + msg: SMTP host cannot be empty. + text: Your mail server. + encryption: + label: Encryption + msg: Encryption cannot be empty. + text: For most servers SSL is the recommended option. + ssl: SSL + none: None + smtp_port: + label: SMTP Port + msg: SMTP port must be number 1 ~ 65535. + text: The port to your mail server. + smtp_username: + label: SMTP Username + msg: SMTP username cannot be empty. + smtp_password: + label: SMTP Password + msg: SMTP password cannot be empty. + test_email_recipient: + label: Test Email Recipients + text: Provide email address that will receive test sends. + msg: Test email recipients is invalid + smtp_authentication: + label: Enable authentication + title: SMTP Authentication + msg: SMTP authentication cannot be empty. + "yes": "Yes" + "no": "No" + branding: + page_title: Branding + logo: + label: Logo + msg: Logo cannot be empty. + text: The logo image at the top left of your site. Use a wide rectangular image with a height of 56 and an aspect ratio greater than 3:1. If left blank, the site title text will be shown. + mobile_logo: + label: Mobile Logo + text: The logo used on mobile version of your site. Use a wide rectangular image with a height of 56. If left blank, the image from the "logo" setting will be used. + square_icon: + label: Square Icon + msg: Square icon cannot be empty. + text: Image used as the base for metadata icons. Should ideally be larger than 512x512. + favicon: + label: Favicon + text: A favicon for your site. To work correctly over a CDN it must be a png. Will be resized to 32x32. If left blank, "square icon" will be used. + legal: + page_title: Legal + terms_of_service: + label: Terms of Service + text: "You can add terms of service content here. If you already have a document hosted elsewhere, provide the full URL here." + privacy_policy: + label: Privacy Policy + text: "You can add privacy policy content here. If you already have a document hosted elsewhere, provide the full URL here." + write: + page_title: Write + recommend_tags: + label: Recommend Tags + text: "Please input tag slug above, one tag per line." + required_tag: + title: Required Tag + label: Set recommend tag as required + text: "Every new question must have at least one recommend tag." + reserved_tags: + label: Reserved Tags + text: "Reserved tags can only be added to a post by moderator." + seo: + page_title: SEO + permalink: + label: Permalink + text: Custom URL structures can improve the usability, and forward-compatibility of your links. + robots: + label: robots.txt + text: This will permanently override any related site settings. + themes: + page_title: Themes + themes: + label: Themes + text: Select an existing theme. + navbar_style: + label: Navbar Style + text: Select an existing theme. + primary_color: + label: Primary Color + text: Modify the colors used by your themes + css_and_html: + page_title: CSS and HTML + custom_css: + label: Custom CSS + text: This will insert as + head: + label: Head + text: This will insert before + header: + label: Header + text: This will insert after + footer: + label: Footer + text: This will insert before . + login: + page_title: Login + membership: + title: Membership + label: Allow new registrations + text: Turn off to prevent anyone from creating a new account. + private: + title: Private + label: Login required + text: Only logged in users can access this community. + form: + optional: (optional) + empty: cannot be empty + invalid: is invalid + btn_submit: Save + not_found_props: "Required property {{ key }} not found." + page_review: + review: Review + proposed: proposed + question_edit: Question edit + answer_edit: Answer edit + tag_edit: Tag edit + edit_summary: Edit summary + edit_question: Edit question + edit_answer: Edit answer + edit_tag: Edit tag + empty: No review tasks left. + timeline: + undeleted: undeleted + deleted: deleted + downvote: downvote + upvote: upvote + accept: accept + cancelled: cancelled + commented: commented + rollback: rollback + edited: edited + answered: answered + asked: asked + closed: closed + reopened: reopened + created: created + title: "History for" + tag_title: "Timeline for" + show_votes: "Show votes" + n_or_a: N/A + title_for_question: "Timeline for" + title_for_answer: "Timeline for answer to {{ title }} by {{ author }}" + title_for_tag: "Timeline for tag" + datetime: Datetime + type: Type + by: By + comment: Comment + no_data: "We couldn't find anything." + users: + title: Users + users_with_the_most_reputation: Users with the highest reputation scores + users_with_the_most_vote: Users who voted the most + staffs: Our community staff + reputation: reputation + votes: votes + prompt: + leave_page: Are you sure you want to leave the page? + changes_not_save: Your changes may not be saved. + draft: + discard_confirm: Are you sure you want to discard your draft? + messages: + post_deleted: This post has been deleted. + diff --git a/i18n/de_DE.yaml b/i18n/de_DE.yaml index 0af33e9c..9ff6b7d0 100644 --- a/i18n/de_DE.yaml +++ b/i18n/de_DE.yaml @@ -6,15 +6,15 @@ backend: unknown: other: Unbekannter Fehler. request_format_error: - other: Request format is not valid. + other: Format der Anfrage ist ungültig. unauthorized_error: other: Nicht autorisiert. database_error: - other: Data server error. + other: Datenbank-Fehler. role: name: user: - other: Nutzer + other: Benutzer admin: other: Admin moderator: @@ -23,7 +23,7 @@ backend: user: other: Standard ohne speziellen Zugriff. admin: - other: Have the full power to access the site. + other: Haben Sie die volle Berechtigung, auf die Website zuzugreifen. moderator: other: Hat Zugriff auf alle Beiträge außer Admin-Einstellungen. email: @@ -31,38 +31,38 @@ backend: password: other: Passwort email_or_password_wrong_error: - other: E-Mail und Password stimmen nicht überein. + other: E-Mail und Passwort stimmen nicht überein. error: admin: cannot_update_their_password: - other: You cannot modify your password. + other: Sie können Ihr Passwort nicht ändern. cannot_modify_self_status: - other: You cannot modify your status. + other: Sie können Ihren Status nicht ändern. email_or_password_wrong: other: E-Mail und Password stimmen nicht überein. answer: not_found: - other: Answer do not found. + other: Antwort nicht gefunden. cannot_deleted: other: Keine Berechtigung zum Löschen. cannot_update: other: Keine Berechtigung zum Aktualisieren. question_closed_cannot_add: - other: Questions are closed and cannot be added. + other: Fragen sind geschlossen und können nicht hinzugefügt werden. comment: edit_without_permission: other: Kommentar kann nicht bearbeitet werden. not_found: other: Kommentar wurde nicht gefunden. cannot_edit_after_deadline: - other: The comment time has been too long to modify. + other: Die Kommentarzeit war zu lang, um sie zu ändern. email: duplicate: other: E-Mail existiert bereits. need_to_be_verified: other: E-Mail muss überprüft werden. verify_url_expired: - other: Email verified URL has expired, please resend the email. + other: E-Mail-verifizierte URL ist abgelaufen, bitte senden Sie die E-Mail erneut. lang: not_found: other: Sprachdatei nicht gefunden. @@ -70,131 +70,131 @@ backend: captcha_verification_failed: other: Captcha ist falsch. disallow_follow: - other: You are not allowed to follow. + other: Sie dürfen nicht folgen. disallow_vote: - other: You are not allowed to vote. + other: Sie dürfen nicht abstimmen. disallow_vote_your_self: - other: You can't vote for your own post. + other: Sie können nicht für Ihren eigenen Beitrag stimmen. not_found: - other: Object not found. + other: Objekt nicht gefunden. verification_failed: other: Verifizierung fehlgeschlagen. email_or_password_incorrect: - other: E-Mail und Password stimmen nicht überein. + other: E-Mail und Passwort stimmen nicht überein. old_password_verification_failed: - other: The old password verification failed + other: Die Überprüfung des alten Passworts ist fehlgeschlagen new_password_same_as_previous_setting: other: Das neue Passwort ist das gleiche wie das vorherige Passwort. question: already_deleted: - other: This post has been deleted. + other: Dieser Beitrag wurde gelöscht. not_found: other: Frage nicht gefunden. cannot_deleted: other: Keine Berechtigung zum Löschen. cannot_close: - other: No permission to close. + other: Keine Erlaubnis zum Schließen. cannot_update: other: Keine Berechtigung zum Aktualisieren. rank: fail_to_meet_the_condition: - other: Rank fail to meet the condition. + other: Rang erfüllt die Bedingung nicht. report: handle_failed: - other: Report handle failed. + other: Berichtshandle fehlgeschlagen. not_found: - other: Report not found. + other: Report nicht gefunden. tag: already_exist: - other: Tag already exists. + other: Tag existiert bereits. not_found: - other: Schlagwort nicht gefunden. + other: Tag nicht gefunden. recommend_tag_not_found: - other: Recommend Tag is not exist. + other: Empfehlungs-Tag ist nicht vorhanden. recommend_tag_enter: - other: Please enter at least one required tag. + other: Bitte geben Sie mindestens ein erforderliches Tag ein. not_contain_synonym_tags: - other: Should not contain synonym tags. + other: Sollte keine Synonym-Tags enthalten. cannot_update: - other: No permission to update. + other: Keine Berechtigung zum Aktualisieren. is_used_cannot_delete: - other: You cannot delete a tag that is in use + other: Sie können kein Schlagwort löschen, das verwendet wird cannot_set_synonym_as_itself: - other: You cannot set the synonym of the current tag as itself. + other: Sie können das Synonym des aktuellen Tags nicht als sich selbst festlegen. smtp: config_from_name_cannot_be_email: - other: The From Name cannot be a email address. + other: Der Absendername kann keine E-Mail-Adresse sein. theme: not_found: - other: Theme not found. + other: Design nicht gefunden. revision: review_underway: - other: Can't edit currently, there is a version in the review queue. + other: Kann momentan nicht bearbeiten, es gibt eine Version in der Warteschlange. no_permission: - other: No permission to Revision. + other: Keine Berechtigung zum Revision. user: email_or_password_wrong: other: - other: Email and password do not match. + other: E-Mail und Passwort stimmen nicht überein. not_found: - other: User not found. + other: Benutzer nicht gefunden. suspended: - other: User has been suspended. + other: Benutzer wurde gesperrt. username_invalid: - other: Username is invalid. + other: Benutzername ist ungültig. username_duplicate: - other: Username is already in use. + other: Benutzername wird bereits verwendet. set_avatar: - other: Avatar set failed. + other: Avatar setzen fehlgeschlagen. cannot_update_your_role: - other: You cannot modify your role. + other: Du kannst deine Rolle nicht ändern. not_allowed_registration: - other: Currently the site is not open for registration + other: Derzeit ist die Website nicht zur Registrierung geöffnet config: read_config_failed: - other: Read config failed + other: Lesekonfiguration fehlgeschlagen database: connection_failed: - other: Database connection failed + other: Datenbankverbindung fehlgeschlagen create_table_failed: - other: Create table failed + other: Tabelle erstellen fehlgeschlagen install: create_config_failed: - other: Can't create the config.yaml file. + other: Kann die config.yaml-Datei nicht erstellen. upload: unsupported_file_format: - other: Unsupported file format. + other: Dateiformat nicht unterstützt. report: spam: name: other: spam desc: - other: This post is an advertisement, or vandalism. It is not useful or relevant to the current topic. + other: Dieser Beitrag ist eine Werbung oder Vandalismus. Er ist nicht nützlich oder relevant für das aktuelle Thema. rude: name: - other: rude or abusive + other: unhöflich oder beleidigend desc: - other: A reasonable person would find this content inappropriate for respectful discourse. + other: Eine vernünftige Person würde diesen Inhalt für respektvoll diskutierten Diskurs für unangemessen halten. duplicate: name: - other: a duplicate + other: ein Duplikat desc: - other: This question has been asked before and already has an answer. + other: Diese Frage ist bereits gestellt worden und hat bereits eine Antwort. not_answer: name: - other: not an answer + other: keine Antwort desc: - 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. + other: Dies wurde als Antwort veröffentlicht, aber es versucht nicht, die Frage zu beantworten. Es sollte möglicherweise eine Bearbeitung, ein Kommentar, eine andere Frage oder komplett gelöscht werden. not_need: name: - other: no longer needed + other: nicht mehr benötigt desc: - other: This comment is outdated, conversational or not relevant to this post. + other: Dieser Kommentar ist veraltet, Konversation oder nicht relevant für diesen Beitrag. other: name: - other: something else + other: etwas anderes desc: - other: This post requires staff attention for another reason not listed above. + other: Dieser Beitrag benötigt die Aufmerksamkeit des Personals aus einem anderen Grund, der oben nicht aufgeführt ist. question: close: duplicate: @@ -204,58 +204,58 @@ backend: other: Diese Frage ist bereits gestellt worden und hat bereits eine Antwort. guideline: name: - other: a community-specific reason + other: ein Community-spezifischer Grund desc: - other: This question doesn't meet a community guideline. + other: Diese Frage entspricht nicht einer Gemeinschaftsrichtlinie. multiple: name: - other: needs details or clarity + other: benötigt Details oder Klarheit desc: - other: This question currently includes multiple questions in one. It should focus on one problem only. + other: Diese Frage enthält derzeit mehrere Fragen in einem. Sie sollte sich nur auf ein Problem konzentrieren. other: name: - other: something else + other: etwas anderes desc: - other: This post requires another reason not listed above. + other: Dieser Beitrag erfordert einen anderen Grund, der oben nicht aufgeführt ist. operation_type: asked: - other: asked + other: gefragt answered: - other: answered + other: beantwortet modified: - other: modified + other: geändert notification: action: update_question: - other: updated question + other: aktualisierte Frage answer_the_question: - other: answered question + other: beantwortete Frage update_answer: - other: updated answer + other: aktualisierte Antwort accept_answer: - other: accepted answer + other: akzeptierte Antwort comment_question: - other: commented question + other: kommentierte Frage comment_answer: - other: commented answer + other: kommentierte Antwort reply_to_you: - other: replied to you + other: hat Ihnen geantwortet mention_you: - other: mentioned you + other: erwähnte Sie your_question_is_closed: - other: Your question has been closed + other: Ihre Frage wurde geschlossen your_question_was_deleted: - other: Your question has been deleted + other: Ihre Frage wurde gelöscht your_answer_was_deleted: - other: Your answer has been deleted + other: Ihre Antwort wurde gelöscht your_comment_was_deleted: - other: Your comment has been deleted + other: Ihr Kommentar wurde gelöscht #The following fields are used for interface presentation(Front-end) ui: how_to_format: - title: How to Format + title: So formatieren Sie desc: >- -
  • to make links

    <https://url.com>

    [Title](https://url.com)
  • put returns between paragraphs

  • _italic_ or **bold**

  • indent code by 4 spaces

  • quote by placing > at start of line

  • backtick escapes `like _this_`

  • create code fences with backticks `

    ```
    code here
    ```
+
  • um Links zu erstellen

    <https://url.com>

    [Title](https://url.com)
  • put gibt zurück zwischen Absätzen

  • _italic_ oder **fett**

  • Code um 4 Leerzeichen einrücken

  • Zitat durch Platzieren von > am Zeilenanfang

  • Backtick-Escapes `like _this_`

  • erzeuge Codezäune mit Backticks `

    ```
    code hier
    ```
pagination: prev: Zurück next: Weiter @@ -264,365 +264,365 @@ ui: questions: Fragen tag: Schlagwort tags: Schlagwörter - tag_wiki: tag wiki - create_tag: Create Tag - edit_tag: Edit Tag - ask_a_question: Add Question - edit_question: Edit Question - edit_answer: Edit Answer - search: Suche - posts_containing: Posts containing + tag_wiki: tag Wiki + create_tag: Tag erstellen + edit_tag: Tag bearbeiten + ask_a_question: Frage hinzufügen + edit_question: Frage bearbeiten + edit_answer: Antwort bearbeiten + search: Suchen + posts_containing: Beiträge enthalten settings: Einstellungen - notifications: Notifications + notifications: Benachrichtigungen login: Anmelden sign_up: Registrieren - account_recovery: Account Recovery - account_activation: Account Activation - confirm_email: Confirm Email - account_suspended: Account Suspended - admin: Admin - change_email: Modify Email - install: Answer Installation - upgrade: Answer Upgrade - maintenance: Website Maintenance - users: Users - http_404: HTTP Error 404 - http_50X: HTTP Error 500 + account_recovery: Konto-Wiederherstellung + account_activation: Account Aktivierung + confirm_email: Bestätigungs-E-Mail + account_suspended: Konto gesperrt + admin: Verwaltung + change_email: E-Mails ändern + install: Installation beantworten + upgrade: Antwort-Upgrade + maintenance: Website-Pflege + users: Benutzer + http_404: HTTP-Fehler 404 + http_50X: HTTP-Fehler 500 notifications: - title: Notifications - inbox: Inbox - achievement: Achievements - all_read: Mark all as read - show_more: Show more + title: Benachrichtigungen + inbox: Posteingang + achievement: Erfolge + all_read: Alle als gelesen markieren + show_more: Mehr Anzeigen suspended: - title: Your Account has been Suspended - until_time: "Your account was suspended until {{ time }}." - forever: This user was suspended forever. - end: You don't meet a community guideline. + title: Dein Konto wurde gesperrt + until_time: "Ihr Konto wurde bis {{ time }} gesperrt." + forever: Dieser Benutzer wurde für immer gesperrt. + end: Du erfüllst keine Community-Richtlinie. editor: blockquote: - text: Blockquote + text: Blockzitat bold: - text: Strong + text: Stark chart: - text: Chart - flow_chart: Flow chart - sequence_diagram: Sequence diagram - class_diagram: Class diagram - state_diagram: State diagram - entity_relationship_diagram: Entity relationship diagram - user_defined_diagram: User defined diagram - gantt_chart: Gantt chart - pie_chart: Pie chart + text: Bestenliste + flow_chart: Flussdiagramm + sequence_diagram: Sequenzdiagramm + class_diagram: Klassen Diagramm + state_diagram: Zustandsdiagramm + entity_relationship_diagram: Entity-Relationship-Diagramm + user_defined_diagram: Benutzerdefiniertes Diagramm + gantt_chart: Gantt-Diagramm + pie_chart: Kuchendiagramm code: - text: Code Sample - add_code: Add code sample + text: Code Beispiel + add_code: Code-Beispiel hinzufügen form: fields: code: label: Code msg: - empty: Code cannot be empty. + empty: Code kann nicht leer sein. language: - label: Language - placeholder: Automatic detection - btn_cancel: Cancel - btn_confirm: Add + label: Sprache + placeholder: Automatische Erkennung + btn_cancel: Abbrechen + btn_confirm: Hinzufügen formula: - text: Formula + text: Formel options: - inline: Inline formula - block: Block formula + inline: Inline Formel + block: Block Formel heading: - text: Heading + text: Überschrift options: - h1: Heading 1 - h2: Heading 2 - h3: Heading 3 - h4: Heading 4 - h5: Heading 5 - h6: Heading 6 + h1: Überschrift 1 + h2: Überschrift 2 + h3: Überschrift 3 + h4: Überschrift 4 + h5: Überschrift 5 + h6: Überschrift 6 help: - text: Help + text: Hilfe hr: - text: Horizontal Rule + text: Horizontaler Strich image: - text: Image - add_image: Add image - tab_image: Upload image + text: Bild + add_image: Bild hinzufügen + tab_image: Bild hochladen form_image: fields: file: - label: Image File - btn: Select image + label: Bilddatei + btn: Bild auswählen msg: - empty: File cannot be empty. - only_image: Only image files are allowed. - max_size: File size cannot exceed 4MB. + empty: Datei darf nicht leer sein. + only_image: Nur Bilddateien sind erlaubt. + max_size: Die Dateigröße darf 4MB nicht überschreiten. desc: - label: Description - tab_url: Image URL + label: Beschreibung + tab_url: Bild URL form_url: fields: url: - label: Image URL + label: Bild URL msg: - empty: Image URL cannot be empty. + empty: Bild-URL darf nicht leer sein. name: - label: Description - btn_cancel: Cancel - btn_confirm: Add - uploading: Uploading + label: Beschreibung + btn_cancel: Abbrechen + btn_confirm: Hinzufügen + uploading: Hochladen indent: - text: Indent + text: Einzug outdent: - text: Outdent + text: Ausrücken italic: - text: Emphasis + text: Schwerpunkt link: - text: Hyperlink - add_link: Add hyperlink + text: Hyperlinks + add_link: Hyperlinks hinzufügen form: fields: url: label: URL msg: - empty: URL cannot be empty. + empty: URL darf nicht leer sein. name: - label: Description - btn_cancel: Cancel - btn_confirm: Add + label: Beschreibung + btn_cancel: Abbrechen + btn_confirm: Hinzufügen ordered_list: - text: Numbered List + text: Nummerierte Liste unordered_list: - text: Bulleted List + text: Aufzählung table: text: Tabelle - heading: Heading - cell: Cell + heading: Überschrift + cell: Zelle close_modal: - title: I am closing this post as... - btn_cancel: Cancel - btn_submit: Submit + title: Ich schließe diesen Beitrag als... + btn_cancel: Abbrechen + btn_submit: Senden remark: - empty: Cannot be empty. + empty: Kann nicht leer sein. msg: - empty: Please select a reason. + empty: Bitte wähle einen Grund aus. report_modal: - flag_title: I am flagging to report this post as... - close_title: I am closing this post as... - review_question_title: Review question - review_answer_title: Review answer - review_comment_title: Review comment - btn_cancel: Cancel - btn_submit: Submit + flag_title: Ich melde diesen Beitrag als... + close_title: Ich schließe diesen Beitrag wegen ... + review_question_title: Frage ansehen + review_answer_title: Antworten überprüfen + review_comment_title: Kommentare anzeigen + btn_cancel: Abbrechen + btn_submit: Senden remark: - empty: Cannot be empty. + empty: Kann nicht leer sein. msg: - empty: Please select a reason. + empty: Bitte wähle einen Grund aus. tag_modal: - title: Create new tag + title: Neuen Tag erstellen form: fields: display_name: - label: Display Name + label: Anzeigename msg: - empty: Display name cannot be empty. - range: Display name up to 35 characters. + empty: Anzeigename darf nicht leer sein. + range: Nennen Sie bis zu 35 Zeichen. slug_name: - label: URL Slug - desc: 'Must use the character set "a-z", "0-9", "+ # - ."' + label: URL-Kürzel + desc: 'Muss den Zeichensatz "a-z", "0-9", "+ # - " verwenden.' msg: - empty: URL slug cannot be empty. - range: URL slug up to 35 characters. - character: URL slug contains unallowed character set. + empty: URL-Slug darf nicht leer sein. + range: URL-Slug mit bis zu 35 Zeichen. + character: URL-Slug enthält nicht erlaubten Zeichensatz. desc: - label: Description - btn_cancel: Cancel - btn_submit: Submit - btn_post: Post new tag + label: Beschreibung + btn_cancel: Abbrechen + btn_submit: Senden + btn_post: Neuen Tag erstellen tag_info: - created_at: Created - edited_at: Edited - history: History + created_at: Erstellt + edited_at: Bearbeitet + history: Verlauf synonyms: - title: Synonyms - text: The following tags will be remapped to - empty: No synonyms found. - btn_add: Add a synonym - btn_edit: Edit - btn_save: Save - synonyms_text: The following tags will be remapped to + title: Synonyme + text: Die folgenden Tags werden neu zugeordnet zu + empty: Keine Synonyme gefunden. + btn_add: Synonym hinzufügen + btn_edit: Bearbeiten + btn_save: Speichern + synonyms_text: Die folgenden Tags werden neu zugeordnet zu delete: - title: Delete this tag + title: Diesen Tag löschen tip_with_posts: >- -

We do not allowed deleting tag with posts.

Please remove this tag from the posts first.

+

Wir erlauben kein Löschen von Tags bei Posts.

Bitte entfernen Sie zuerst dieses Tag aus den Posts.

tip_with_synonyms: >- -

We do not allowed deleting tag with synonyms.

Please remove the synonyms from this tag first.

- tip: Are you sure you wish to delete? - close: Close +

Wir dürfen Tags mit Synonymen nicht löschen.

Bitte entfernen Sie zuerst die Synonyme aus diesem Tag.

+ tip: Möchten Sie wirklich löschen? + close: Schließen edit_tag: - title: Edit Tag - default_reason: Edit tag + title: Tag bearbeiten + default_reason: Tag bearbeiten form: fields: revision: label: Revision display_name: - label: Display Name + label: Anzeigename slug_name: - label: URL Slug - info: 'Must use the character set "a-z", "0-9", "+ # - ."' + label: URL-Slug + info: 'Muss den Zeichensatz "a-z", "0-9", "+ # - ." verwenden' desc: - label: Description + label: Beschreibung edit_summary: - label: Edit Summary + label: Zusammenfassung bearbeiten placeholder: >- - Briefly explain your changes (corrected spelling, fixed grammar, improved formatting) - btn_save_edits: Save edits - btn_cancel: Cancel + Erklären Sie kurz Ihre Änderungen (korrigierte Rechtschreibung, feste Grammatik, verbesserte Formatierung) + btn_save_edits: Änderungen speichern + btn_cancel: Stornieren dates: long_date: MMM D - long_date_with_year: "MMM D, YYYY" - long_date_with_time: "MMM D, YYYY [at] HH:mm" - now: now - x_seconds_ago: "{{count}}s ago" - x_minutes_ago: "{{count}}m ago" - x_hours_ago: "{{count}}h ago" - hour: hour - day: day + long_date_with_year: "MMM D, JJJJ" + long_date_with_time: "MMM T, JJJJ [at] HH:mm" + now: jetzt + x_seconds_ago: "vor {{count}}s" + x_minutes_ago: "vor {{count}}m" + x_hours_ago: "vor {{count}}h" + hour: stunde + day: tag comment: - btn_add_comment: Add comment - reply_to: Reply to - btn_reply: Reply - btn_edit: Edit - btn_delete: Delete - btn_flag: Flag - btn_save_edits: Save edits - btn_cancel: Cancel - show_more: Show more comments + btn_add_comment: Einen Kommentar hinzufügen + reply_to: Antwort an + btn_reply: Antwort + btn_edit: Bearbeiten + btn_delete: Löschen + btn_flag: Flagge + btn_save_edits: Änderungen speichern + btn_cancel: Stornieren + show_more: Weitere Kommentare anzeigen tip_question: >- - Use comments to ask for more information or suggest improvements. Avoid answering questions in comments. + Verwenden Sie Kommentare, um weitere Informationen anzufordern oder Verbesserungen vorzuschlagen. Vermeiden Sie die Beantwortung von Fragen in Kommentaren. tip_answer: >- - Use comments to reply to other users or notify them of changes. If you are adding new information, edit your post instead of commenting. + Verwenden Sie Kommentare, um anderen Benutzern zu antworten oder sie über Änderungen zu informieren. Wenn Sie neue Informationen hinzufügen, bearbeiten Sie Ihren Beitrag, anstatt ihn zu kommentieren. edit_answer: - title: Edit Answer - default_reason: Edit answer + title: Antwort bearbeiten + default_reason: Antwort bearbeiten form: fields: revision: label: Revision answer: - label: Answer + label: Antwort feedback: - characters: content must be at least 6 characters in length. + characters: der Inhalt muss mindestens 6 Zeichen lang sein. edit_summary: - label: Edit Summary + label: Zusammenfassung bearbeiten placeholder: >- - Briefly explain your changes (corrected spelling, fixed grammar, improved formatting) - btn_save_edits: Save edits - btn_cancel: Cancel + Begründen Sie kurz Ihre Änderungen (korrigierte Rechtschreibung, korrigierte Grammatik, verbesserte Formatierung) + btn_save_edits: Änderungen speichern + btn_cancel: Stornieren tags: - title: Tags + title: Stichworte sort_buttons: - popular: Popular + popular: Beliebt name: Name - newest: newest - button_follow: Follow - button_following: Following - tag_label: questions - search_placeholder: Filter by tag name - no_desc: The tag has no description. - more: More + newest: neueste + button_follow: Folgen + button_following: Folgend + tag_label: fragen + search_placeholder: Nach Tagnamen filtern + no_desc: Der Tag hat keine Beschreibung. + more: Mehr ask: - title: Add Question - edit_title: Edit Question - default_reason: Edit question - similar_questions: Similar questions + title: Frage hinzufügen + edit_title: Frage bearbeiten + default_reason: Frage bearbeiten + similar_questions: Ähnliche Fragen form: fields: revision: label: Revision title: - label: Title - placeholder: Be specific and imagine you're asking a question to another person + label: Titel + placeholder: Sei spezifisch und stelle dir vor, du stelle eine Frage an eine andere Person msg: - empty: Title cannot be empty. - range: Title up to 150 characters + empty: Der Titel darf nicht leer sein. + range: Titel bis zu 150 Zeichen body: - label: Body + label: Körper msg: - empty: Body cannot be empty. + empty: Körper darf nicht leer sein. tags: - label: Tags + label: Stichworte msg: - empty: Tags cannot be empty. + empty: Tags dürfen nicht leer sein. answer: - label: Answer + label: Antwort msg: - empty: Answer cannot be empty. + empty: Antwort darf nicht leer sein. edit_summary: - label: Edit Summary + label: Zusammenfassung bearbeiten placeholder: >- - Briefly explain your changes (corrected spelling, fixed grammar, improved formatting) - btn_post_question: Post your question - btn_save_edits: Save edits + Begründen Sie kurz Ihre Änderungen (korrigierte Rechtschreibung, korrigierte Grammatik, verbesserte Formatierung) + btn_post_question: Poste deine Frage + btn_save_edits: Änderungen speichern answer_question: Answer your own question - post_question&answer: Post your question and answer + post_question&answer: Posten Sie Ihre Frage und Antwort tag_selector: - add_btn: Add tag - create_btn: Create new tag - search_tag: Search tag - hint: "Describe what your question is about, at least one tag is required." - no_result: No tags matched - tag_required_text: Required tag (at least one) + add_btn: Schlagwort hinzufügen + create_btn: Neuen Tag erstellen + search_tag: Tag suchen + hint: "Beschreiben Sie, worum es in Ihrer Frage geht, mindestens ein Tag ist erforderlich." + no_result: Keine Tags gefunden + tag_required_text: Benötigter Tag (mindestens eins) header: nav: - question: Questions - tag: Tags - user: Users - profile: Profile - setting: Settings - logout: Log out - admin: Admin - review: Review + question: Fragen + tag: Schlagwörter + user: Benutzer + profile: Profil + setting: Einstellungen + logout: Ausloggen + admin: Administrator + review: Rezension search: - placeholder: Search + placeholder: Suchen footer: build_on: >- - Built on <1> Answer - the open-source software that powers Q&A communities.
Made with love © {{cc}}. + Erbaut auf <1> Antwort - der Open-Source-Software, die Q&A-Gemeinschaften unterstützt.
Mit Liebe ©️ {{cc}} gemacht. upload_img: - name: Change - loading: loading... + name: Ändern + loading: wird geladen... pic_auth_code: title: Captcha - placeholder: Type the text above + placeholder: Geben Sie den Text oben ein msg: - empty: Captcha cannot be empty. + empty: Captcha darf nicht leer sein. inactive: first: >- - You're almost done! We sent an activation mail to {{mail}}. Please follow the instructions in the mail to activate your account. - info: "If it doesn't arrive, check your spam folder." + Du bist fast fertig! Wir haben eine Aktivierungsmail an {{mail}} gesendet. Bitte folgen Sie den Anweisungen in der E-Mail, um Ihr Konto zu aktivieren. + info: "Wenn es nicht ankommt, überprüfen Sie Ihren Spam-Ordner." another: >- - We sent another activation email to you at {{mail}}. It might take a few minutes for it to arrive; be sure to check your spam folder. + Wir haben Ihnen eine weitere Aktivierungs-E-Mail an {{mail}} gesendet. Es kann einige Minuten dauern, bis es ankommt; überprüfen Sie unbedingt Ihren Spam-Ordner. btn_name: Resend activation email - change_btn_name: Change email + change_btn_name: Ändern Sie die E-Mail msg: - empty: Cannot be empty. + empty: Kann nicht leer sein. login: - page_title: Welcome to {{site_name}} - login_to_continue: Log in to continue - info_sign: Don't have an account? <1>Sign up - info_login: Already have an account? <1>Log in - agreements: By registering, you agree to the <1>privacy policy and <3>terms of service. - forgot_pass: Forgot password? + page_title: Willkommen bei {{site_name}} + login_to_continue: Melden Sie sich an, um fortzufahren + info_sign: Sie haben noch kein Konto? <1>Melden Sie sich an + info_login: Haben Sie bereits ein Konto? <1>Melden Sie sich an + agreements: Durch die Registrierung stimmen Sie der <1>Datenschutzerklärung und den <3>Nutzungsbedingungen zu. + forgot_pass: Passwort vergessen? name: label: Name msg: - empty: Name cannot be empty. - range: Name up to 30 characters. + empty: Der Name darf nicht leer sein. + range: Nennen Sie bis zu 30 Zeichen. email: - label: E-Mail + label: Email msg: empty: E-Mail-Feld darf nicht leer sein. password: @@ -631,58 +631,58 @@ ui: empty: Passwort-Feld darf nicht leer sein. different: The passwords entered on both sides are inconsistent account_forgot: - page_title: Forgot Your Password - btn_name: Send me recovery email + page_title: Haben Sie Ihr Passwort vergessen + btn_name: Senden Sie mir eine Wiederherstellungs-E-Mail send_success: >- - If an account matches {{mail}}, you should receive an email with instructions on how to reset your password shortly. + Wenn ein Konto mit {{mail}} übereinstimmt, sollten Sie in Kürze eine E-Mail mit Anweisungen zum Zurücksetzen Ihres Passworts erhalten. email: label: E-Mail msg: - empty: Email cannot be empty. + empty: E-Mail darf nicht leer sein. change_email: - page_title: Welcome to {{site_name}} - btn_cancel: Cancel - btn_update: Update email address + page_title: Willkommen bei {{site_name}} + btn_cancel: Stornieren + btn_update: Aktualisiere email adresse send_success: >- - If an account matches {{mail}}, you should receive an email with instructions on how to reset your password shortly. + Wenn ein Konto mit {{mail}} übereinstimmt, sollten Sie in Kürze eine E-Mail mit Anweisungen zum Zurücksetzen Ihres Passworts erhalten. email: - label: New Email + label: Neue e-mail msg: - empty: Email cannot be empty. + empty: E-Mail darf nicht leer sein. password_reset: - page_title: Password Reset - btn_name: Reset my password + page_title: Passwort zurücksetzen + btn_name: Setze mein Passwort zurück reset_success: >- - You successfully changed your password; you will be redirected to the log in page. + Sie haben Ihr Passwort erfolgreich geändert und werden zur Anmeldeseite weitergeleitet. link_invalid: >- - Sorry, this password reset link is no longer valid. Perhaps your password is already reset? - to_login: Continue to log in page + Dieser Link zum Zurücksetzen des Passworts ist leider nicht mehr gültig. Vielleicht wurde Ihr Passwort bereits zurückgesetzt? + to_login: Weiter zur Anmeldeseite password: - label: Password + label: Passwort msg: - empty: Password cannot be empty. - length: The length needs to be between 8 and 32 - different: The passwords entered on both sides are inconsistent + empty: Passwort kann nicht leer sein. + length: Die Länge muss zwischen 8 und 32 liegen + different: Die auf beiden Seiten eingegebenen Passwörter sind inkonsistent password_confirm: - label: Confirm New Password + label: Bestätige neues Passwort settings: - page_title: Settings + page_title: Einstellungen nav: - profile: Profile - notification: Notifications - account: Account - interface: Interface + profile: Profil + notification: Benachrichtigungen + account: Konto + interface: Schnittstelle profile: - heading: Profile - btn_name: Save + heading: Profil + btn_name: Speichern display_name: - label: Display Name - msg: Display name cannot be empty. - msg_range: Display name up to 30 characters. + label: Anzeigename + msg: Anzeigename darf nicht leer sein. + msg_range: Anzeigename bis zu 30 Zeichen. username: - label: Username - caption: People can mention you as "@username". - msg: Username cannot be empty. + label: Nutzername + caption: Andere können Sie als „@Benutzername“ erwähnen. + msg: Benutzername darf nicht leer sein. msg_range: Username up to 30 characters. character: 'Must use the character set "a-z", "0-9", " - . _"' avatar: @@ -748,132 +748,132 @@ ui: asked: asked update: Modified edit: edited - Views: Viewed - Follow: Follow - Following: Following - answered: answered - closed_in: Closed in - show_exist: Show existing question. + Views: Gesehen + Follow: Folgen + Following: Folgend + answered: beantwortet + closed_in: Abgeschlossen in + show_exist: Bestehende Frage anzeigen. answers: - title: Answers - score: Score - newest: Newest - btn_accept: Accept - btn_accepted: Accepted + title: Antworten + score: Punkte + newest: Neueste + btn_accept: Akzeptieren + btn_accepted: Akzeptiert write_answer: - title: Your Answer - btn_name: Post your answer - add_another_answer: Add another answer - confirm_title: Continue to answer - continue: Continue + title: Ihre Antwort + btn_name: Veröffentlichen Sie Ihre Antwort + add_another_answer: Weitere Antwort hinzufügen + confirm_title: Antworten fortsetzen + continue: Weitermachen confirm_info: >- -

Are you sure you want to add another answer?

You could use the edit link to refine and improve your existing answer, instead.

- empty: Answer cannot be empty. - characters: content must be at least 6 characters in length. +

Sind Sie sicher, dass Sie eine weitere Antwort hinzufügen möchten?

Sie können stattdessen den Editier-Link verwenden, um Ihre bestehende Antwort zu verfeinern und zu verbessern.

+ empty: Antwort darf nicht leer sein. + characters: der Inhalt muss mindestens 6 Zeichen lang sein. reopen: - title: Reopen this post - content: Are you sure you want to reopen? - success: This post has been reopened + title: Diesen Beitrag erneut öffnen + content: Möchten Sie wirklich wieder öffnen? + success: Dieser Beitrag wurde wieder geöffnet delete: - title: Delete this post + title: Diesen Beitrag löschen question: >- - We do not recommend deleting questions with answers because doing so deprives future readers of this knowledge.

Repeated deletion of answered questions can result in your account being blocked from asking. Are you sure you wish to delete? + Wir empfehlen nicht, Fragen mit Antworten zu löschen, da dies zukünftigen Lesern dieses Wissen entzieht.

Das wiederholte Löschen beantworteter Fragen kann dazu führen, dass Ihr Konto für das Stellen gesperrt wird. Möchten Sie wirklich löschen? answer_accepted: >- -

We do not recommend deleting accepted answer because doing so deprives future readers of this knowledge.

Repeated deletion of accepted answers can result in your account being blocked from answering. Are you sure you wish to delete? - other: Are you sure you wish to delete? - tip_question_deleted: This post has been deleted - tip_answer_deleted: This answer has been deleted +

Wir empfehlen nicht, akzeptierte Antworten zu löschen, da dies zukünftigen Lesern dieses Wissen entzieht.

Das wiederholte Löschen akzeptierter Antworten kann dazu führen, dass Ihr Konto für das Antworten gesperrt wird. Möchten Sie wirklich löschen? + other: Sind Sie sicher, dass Sie löschen möchten? + tip_question_deleted: Dieser Beitrag wurde gelöscht + tip_answer_deleted: Diese Antwort wurde gelöscht btns: confirm: Bestätigen cancel: Abbrechen save: Speichern delete: Löschen - login: Log in - signup: Sign up - logout: Log out - verify: Verify - add_question: Add question - approve: Approve - reject: Reject - skip: Skip - discard_draft: Discard draft + login: Einloggen + signup: Registrieren + logout: Ausloggen + verify: Überprüfen + add_question: Frage hinzufügen + approve: Genehmigen + reject: Ablehnen + skip: Überspringen + discard_draft: Entwurf verwerfen search: - title: Search Results - keywords: Keywords - options: Options - follow: Follow - following: Following - counts: "{{count}} Results" - more: More + title: Suchergebnisse + keywords: Schlüsselwörter + options: Optionen + follow: Folgen + following: Folgend + counts: "{{count}} Ergebnisse" + more: Mehr sort_btns: - relevance: Relevance - newest: Newest - active: Active - score: Score - more: More + relevance: Relevanz + newest: Neueste + active: Aktiv + score: Punktzahl + more: Mehr tips: - title: Advanced Search Tips - tag: "<1>[tag] search withing a tag" - user: "<1>user:username search by author" - answer: "<1>answers:0 unanswered questions" - score: "<1>score:3 posts with a 3+ score" - question: "<1>is:question search questions" - is_answer: "<1>is:answer search answers" - empty: We couldn't find anything.
Try different or less specific keywords. + title: Erweiterte Suchtipps + tag: "<1>[tag] Suche mit einem Tag" + user: "<1>user:username Suche nach Autor" + answer: "<1>Antworten:0 unbeantwortete Fragen" + score: "<1>score:3 Beiträge mit einer 3+ Punktzahl" + question: "<1>is:question Suchfragen" + is_answer: "<1>ist:answer Suchantworten" + empty: Wir konnten nichts finden.
Versuchen Sie andere oder weniger spezifische Schlüsselwörter. share: - name: Share - copy: Copy link - via: Share post via... - copied: Copied - facebook: Share to Facebook - twitter: Share to Twitter - cannot_vote_for_self: You can't vote for your own post + name: Aktie + copy: Verknüpfung kopieren + via: Beitrag teilen über... + copied: Kopiert + facebook: Auf Facebook teilen + twitter: Auf Twitter teilen + cannot_vote_for_self: Du kannst nicht für deinen eigenen Beitrag stimmen modal_confirm: - title: Error... + title: Fehler... account_result: - page_title: Welcome to {{site_name}} - success: Your new account is confirmed; you will be redirected to the home page. - link: Continue to homepage + page_title: Willkommen bei {{site_name}} + success: Ihr neues Konto wird bestätigt; Sie werden auf die Startseite weitergeleitet. + link: Weiter zur Startseite invalid: >- - Sorry, this account confirmation link is no longer valid. Perhaps your account is already active? - confirm_new_email: Your email has been updated. + Entschuldige, dieser Link zur Aktivierung des Benutzerkontos ist nicht länger gültig. Ist Dein Konto schon aktiviert? + confirm_new_email: Deine Mailadresse wurde aktualisiert. confirm_new_email_invalid: >- - Sorry, this confirmation link is no longer valid. Perhaps your email was already changed? + Entschuldigung, dieser Bestätigungslink ist nicht mehr gültig. Vielleicht wurde Ihre E-Mail-Adresse bereits geändert? unsubscribe: - page_title: Unsubscribe - success_title: Unsubscribe Successful - success_desc: You have been successfully removed from this subscriber list and won't receive any further emails from us. - link: Change settings + page_title: Abonnement entfernen + success_title: Erfolgreich vom Abo abgemeldet + success_desc: Sie wurden erfolgreich aus dieser Abonnentenliste entfernt und erhalten keine weiteren E-Mails von uns. + link: Einstellungen ändern question: - following_tags: Following Tags - edit: Edit - save: Save - follow_tag_tip: Follow tags to curate your list of questions. - hot_questions: Hot Questions - all_questions: All Questions - x_questions: "{{ count }} Questions" - x_answers: "{{ count }} answers" - questions: Questions - answers: Answers - newest: Newest - active: Active - frequent: Frequent - score: Score - unanswered: Unanswered - modified: modified - answered: answered - asked: asked - closed: closed - follow_a_tag: Follow a tag - more: More + following_tags: Folgende Tags + edit: Bearbeiten + save: Speichern + follow_tag_tip: Folgen Sie Tags, um Ihre Fragenliste zu kuratieren. + hot_questions: Angesagte Fragen + all_questions: Alle Fragen + x_questions: "{{ count }} Fragen" + x_answers: "{{ count }} Antworten" + questions: Fragen + answers: Antworten + newest: Neueste + active: Aktiv + frequent: Häufig + score: Punktzahl + unanswered: Unbeantwortet + modified: geändert + answered: beantwortet + asked: gefragt + closed: schließen + follow_a_tag: Folgen Sie einem Tag + more: Mehr personal: - overview: Overview - answers: Answers - answer: answer - questions: Questions - question: question - bookmarks: Bookmarks - reputation: Reputation + overview: Übersicht + answers: Antworten + answer: antwort + questions: Fragen + question: frage + bookmarks: Lesezeichen + reputation: Ruf comments: Comments votes: Votes newest: Newest @@ -933,75 +933,75 @@ ui: title: Create config.yaml label: The config.yaml file created. desc: >- - You can create the <1>config.yaml file manually in the <1>/var/wwww/xxx/ directory and paste the following text into it. - info: After you've done that, click "Next" button. - site_information: Site Information - admin_account: Admin Account + Sie können die <1>config.yaml Datei manuell im <1>/var/wwww/xxx/ Verzeichnis erstellen und den folgenden Text einfügen. + info: Nachdem Sie dies getan haben, klicken Sie auf "Weiter". + site_information: Standortinformationen + admin_account: Administratorkonto site_name: - label: Site Name - msg: Site Name cannot be empty. + label: Seitenname + msg: Der Site-Name darf nicht leer sein. site_url: - label: Site URL - text: The address of your site. + label: Seiten-URL + text: Die Adresse Ihrer Website. msg: - empty: Site URL cannot be empty. - incorrect: Site URL incorrect format. + empty: Die Website-URL darf nicht leer sein. + incorrect: Falsches Format der Website-URL. contact_email: - label: Contact Email - text: Email address of key contact responsible for this site. + label: Kontakt E-mail + text: E-Mail-Adresse des Hauptkontakts, der für diese Website verantwortlich ist. msg: - empty: Contact Email cannot be empty. - incorrect: Contact Email incorrect format. + empty: Contact email cannot be empty. + incorrect: Kontakt-E-Mail falsches Format. admin_name: label: Name - msg: Name cannot be empty. + msg: Der Name darf nicht leer sein. admin_password: - label: Password + label: Passwort text: >- You will need this password to log in. Please store it in a secure location. - msg: Password cannot be empty. + msg: Passwort kann nicht leer sein. admin_email: label: Email - text: You will need this email to log in. + text: Sie benötigen diese E-Mail um sich anzumelden. msg: - empty: Email cannot be empty. - incorrect: Email incorrect format. - ready_title: Your Answer is Ready! + empty: E-Mail darf nicht leer sein. + incorrect: E-Mail falsches Format. + ready_title: Ihre Antwort ist fertig! ready_desc: >- - If you ever feel like changing more settings, visit <1>admin section; find it in the site menu. - good_luck: "Have fun, and good luck!" - warn_title: Warning + Wenn Sie jemals Lust haben, weitere Einstellungen zu ändern, besuchen Sie <1>Admin-Sektion; finden Sie es im Seitenmenü. + good_luck: "Viel Spaß und viel Glück!" + warn_title: Warnung warn_desc: >- - The file <1>config.yaml already exists. If you need to reset any of the configuration items in this file, please delete it first. - install_now: You may try <1>installing now. - installed: Already installed + Die Datei <1>config.yaml ist bereits vorhanden. Wenn Sie eines der Konfigurationselemente in dieser Datei zurücksetzen müssen, löschen Sie es bitte zuerst. + install_now: Sie können versuchen, <1>jetzt zu installieren. + installed: Bereits installiert installed_desc: >- - You appear to have already installed. To reinstall please clear your old database tables first. - db_failed: Database connection failed + Sie scheinen bereits installiert zu haben. Um eine Neuinstallation durchzuführen, löschen Sie bitte zuerst Ihre alten Datenbanktabellen. + db_failed: Datenbankverbindung fehlgeschlagen db_failed_desc: >- - This either means that the database information in your <1>config.yaml file is incorrect or that contact with the database server could not be established. This could mean your host’s database server is down. + Dies bedeutet entweder, dass die Datenbankinformationen in der <1>Konfiguration enthalten sind. aml Datei ist falsch oder der Kontakt mit dem Datenbankserver konnte nicht hergestellt werden. Dies könnte bedeuten, dass der Datenbankserver Ihres Hosts nicht erreichbar ist. counts: - views: views - votes: votes - answers: answers - accepted: Accepted + views: ansehen + votes: stimmen + answers: antworten + accepted: Akzeptiert page_404: - http_error: HTTP Error 404 - desc: "Unfortunately, this page doesn't exist." - back_home: Back to homepage + http_error: HTTP-Fehler 404 + desc: "Leider existiert diese Seite nicht." + back_home: Zurück zur Hauptseite page_50X: - http_error: HTTP Error 500 - desc: The server encountered an error and could not complete your request. - back_home: Back to homepage + http_error: HTTP-Fehler 500 + desc: Der Server hat einen Fehler festgestellt und konnte Ihre Anfrage nicht abschließen. + back_home: Zurück zur Hauptseite page_maintenance: - desc: "We are under maintenance, we'll be back soon." + desc: "Wir werden gewartet, wir sind bald wieder da." nav_menus: - dashboard: Dashboard - contents: Contents - questions: Questions - answers: Answers - users: Users - flags: Flags + dashboard: Armaturenbrett + contents: Inhalt + questions: Fragen + answers: Antworten + users: Benutzer + flags: Flaggen settings: Settings general: General interface: Interface @@ -1054,61 +1054,61 @@ ui: enabled: Enabled disabled: Disabled flags: - title: Flags - pending: Pending - completed: Completed - flagged: Flagged - created: Created - action: Action - review: Review + title: Flaggen + pending: Ausstehend + completed: Abgeschlossen + flagged: Gekennzeichnet + created: Erstellt + action: Aktion + review: Rezension change_modal: - title: Change user status to... - btn_cancel: Cancel - btn_submit: Submit + title: Benutzerstatus ändern in... + btn_cancel: Abbrechen + btn_submit: Senden normal_name: normal - normal_desc: A normal user can ask and answer questions. - suspended_name: suspended - suspended_desc: A suspended user can't log in. - deleted_name: deleted - deleted_desc: "Delete profile, authentication associations." - inactive_name: inactive - inactive_desc: An inactive user must re-validate their email. - confirm_title: Delete this user - confirm_content: Are you sure you want to delete this user? This is permanent! - confirm_btn: Delete + normal_desc: Ein normaler Benutzer kann Fragen stellen und beantworten. + suspended_name: ausgesetzt + suspended_desc: Ein gesperrter Benutzer kann sich nicht einloggen. + deleted_name: gelöschte + deleted_desc: "Profil löschen, Authentifizierungszuordnungen." + inactive_name: inaktiv + inactive_desc: Ein inaktiver Benutzer muss seine E-Mail erneut validieren. + confirm_title: Löschen dieses Benutzers + confirm_content: Möchten Sie diesen Benutzer wirklich löschen? Dies ist endgültig! + confirm_btn: Löschen msg: - empty: Please select a reason. + empty: Bitte wähle einen Grund aus. status_modal: - title: "Change {{ type }} status to..." + title: "Status {{ type }} ändern zu..." normal_name: normal - normal_desc: A normal post available to everyone. - closed_name: closed - closed_desc: "A closed question can't answer, but still can edit, vote and comment." - deleted_name: deleted - deleted_desc: All reputation gained and lost will be restored. - btn_cancel: Cancel - btn_submit: Submit - btn_next: Next + normal_desc: Ein normaler Beitrag für jedermann verfügbar. + closed_name: schließen + closed_desc: "Eine geschlossene Frage kann nicht beantworten, kann aber trotzdem bearbeiten, abstimmen und kommentieren." + deleted_name: gelöschte + deleted_desc: Alle erworbenen und verlorenen Reputationen werden wiederhergestellt. + btn_cancel: Abbrechen + btn_submit: Senden + btn_next: Weiter user_role_modal: - title: Change user role to... - btn_cancel: Cancel - btn_submit: Submit + title: Benutzerrolle ändern zu... + btn_cancel: Abbrechen + btn_submit: Senden users: - title: Users - name: Name + title: Benutzer + name: Namen email: E-Mail - reputation: Reputation - created_at: Created Time - delete_at: Deleted Time - suspend_at: Suspended Time + reputation: Ruf + created_at: Erstellungszeitpunkt + delete_at: Gelöschte Zeit + suspend_at: Anhaltende Zeit status: Status - role: Role - action: Action - change: Change - all: All - staff: Staff - inactive: Inactive - suspended: Suspended + role: Rolle + action: Aktion + change: Ändern + all: Alle + staff: Mitarbeiter + inactive: Inaktiv + suspended: Suspendiert deleted: Deleted normal: Normal Moderator: Moderator @@ -1207,8 +1207,8 @@ ui: msg: Timezone cannot be empty. text: Choose a city in the same timezone as you. avatar: - label: Default Avatar - text: For users without a custom avatar of their own. + label: Standard-Avatar + text: Für Benutzer ohne eigenen Avatar. smtp: page_title: SMTP from_email: diff --git a/i18n/fr_FR.yaml b/i18n/fr_FR.yaml index b368ccf0..f2a3ad90 100644 --- a/i18n/fr_FR.yaml +++ b/i18n/fr_FR.yaml @@ -35,9 +35,9 @@ backend: error: admin: cannot_update_their_password: - other: You cannot modify your password. + other: Vous ne pouvez pas modifier votre mot de passe. cannot_modify_self_status: - other: You cannot modify your status. + other: Vous ne pouvez pas modifier votre statut. email_or_password_wrong: other: L'email et le mot de passe ne correspondent pas. answer: @@ -48,7 +48,7 @@ backend: cannot_update: other: Pas de permission pour mettre à jour. question_closed_cannot_add: - other: Questions are closed and cannot be added. + other: Les questions sont fermées et ne peuvent pas être ajoutées. comment: edit_without_permission: other: Les commentaires ne sont pas autorisés à être modifiés. @@ -87,7 +87,7 @@ backend: other: Le nouveau mot de passe est le même que le précédent. question: already_deleted: - other: This post has been deleted. + other: Ce message a été supprimé. not_found: other: Question non trouvée. cannot_deleted: @@ -106,7 +106,7 @@ backend: other: Rapport non trouvé. tag: already_exist: - other: Tag already exists. + other: Le tag existe déjà. not_found: other: Tag non trouvé. recommend_tag_not_found: @@ -265,7 +265,7 @@ ui: tag: Étiquette tags: Étiquettes tag_wiki: tag wiki - create_tag: Create Tag + create_tag: Créer un tag edit_tag: Modifier l'étiquette ask_a_question: Ajouter une question edit_question: Modifier la question @@ -286,8 +286,8 @@ ui: upgrade: Mise à jour d'Answer maintenance: Maintenance du site users: Utilisateurs - http_404: HTTP Error 404 - http_50X: HTTP Error 500 + http_404: Erreur HTTP 404 + http_50X: Erreur HTTP 500 notifications: title: Notifications inbox: Boîte de réception @@ -431,7 +431,7 @@ ui: range: Le nom doit contenir moins de 35 caractères. slug_name: label: URL simplifiée - desc: 'Doit utiliser le jeu de caractères "a-z", "0-9", "+ # - ."' + desc: Titre de 35 caractères maximum. msg: empty: L'URL ne peut pas être vide. range: Titre de 35 caractères maximum. @@ -440,7 +440,7 @@ ui: label: Description btn_cancel: Annuler btn_submit: Valider - btn_post: Post new tag + btn_post: Publier un nouveau tag tag_info: created_at: Créé edited_at: Modifié @@ -796,7 +796,7 @@ ui: approve: Approuver reject: Rejeter skip: Ignorer - discard_draft: Discard draft + discard_draft: Abandonner le brouillon search: title: Résultats de la recherche keywords: Mots-clés @@ -986,11 +986,11 @@ ui: answers: réponses accepted: Accepté page_404: - http_error: HTTP Error 404 + http_error: Erreur HTTP 404 desc: "Nous sommes désolés, mais cette page n’existe pas." back_home: Retour à la page d'accueil page_50X: - http_error: HTTP Error 500 + http_error: Erreur HTTP 500 desc: Le serveur a rencontré une erreur et n'a pas pu répondre à votre requête. back_home: Retour à la page d'accueil page_maintenance: @@ -1207,8 +1207,8 @@ ui: msg: Le fuseau horaire ne peut pas être vide. text: Choisissez une ville dans le même fuseau horaire que vous. avatar: - label: Default Avatar - text: For users without a custom avatar of their own. + label: Avatar par défaut + text: Pour les utilisateurs sans avatar personnalisé. smtp: page_title: SMTP from_email: @@ -1383,7 +1383,7 @@ ui: leave_page: Voulez-vous vraiment quitter la page ? changes_not_save: Impossible d'enregistrer vos modifications. draft: - discard_confirm: Are you sure you want to discard your draft? + discard_confirm: Êtes-vous sûr de vouloir abandonner ce brouillon ? messages: - post_deleted: This post has been deleted. + post_deleted: Ce message a été supprimé. diff --git a/i18n/ja_JP.yaml b/i18n/ja_JP.yaml index ee25d02a..e80dbedb 100644 --- a/i18n/ja_JP.yaml +++ b/i18n/ja_JP.yaml @@ -2,23 +2,23 @@ backend: base: success: - other: Success. + other: 成功 unknown: - other: Unknown error. + other: 不明なエラー request_format_error: - other: Request format is not valid. + other: リクエスト形式が無効です。 unauthorized_error: - other: Unauthorized. + other: 権限がありません。 database_error: - other: Data server error. + other: データサーバーエラー role: name: user: - other: User + other: ユーザー admin: - other: Admin + other: 管理者 moderator: - other: Moderator + other: モデレーター description: user: other: Default with no special access. @@ -27,94 +27,94 @@ backend: moderator: other: Has access to all posts except admin settings. email: - other: Email + other: メールアドレス password: - other: Password + other: パスワード email_or_password_wrong_error: - other: Email and password do not match. + other: メールアドレスとパスワードが一致しません。 error: admin: cannot_update_their_password: - other: You cannot modify your password. + other: パスワードは変更できません。 cannot_modify_self_status: - other: You cannot modify your status. + other: ステータスを変更できません。 email_or_password_wrong: - other: Email and password do not match. + other: メールアドレスとパスワードが一致しません。 answer: not_found: other: Answer do not found. cannot_deleted: - other: No permission to delete. + other: 削除する権限がありません。 cannot_update: - other: No permission to update. + other: 更新する権限がありません。 question_closed_cannot_add: - other: Questions are closed and cannot be added. + other: 質問はクローズされて、追加できません。 comment: edit_without_permission: - other: Comment are not allowed to edit. + other: コメントを編集することはできません。 not_found: - other: Comment not found. + other: コメントが見つかりません。 cannot_edit_after_deadline: - other: The comment time has been too long to modify. + other: コメント時間が長すぎて変更できません。 email: duplicate: - other: Email already exists. + other: メールアドレスは既に存在しています。 need_to_be_verified: - other: Email should be verified. + other: 電子メールを確認する必要があります。 verify_url_expired: - other: Email verified URL has expired, please resend the email. + other: メール認証済みURLの有効期限が切れています。メールを再送信してください。 lang: not_found: - other: Language file not found. + other: 言語ファイルが見つかりません。 object: captcha_verification_failed: - other: Captcha wrong. + other: Captchaが間違っています。 disallow_follow: - other: You are not allowed to follow. + other: フォローが許可されていません。 disallow_vote: - other: You are not allowed to vote. + other: 投票が許可されていません。 disallow_vote_your_self: - other: You can't vote for your own post. + other: 自分の投稿には投票できません。 not_found: - other: Object not found. + other: オブジェクトが見つかりません。 verification_failed: - other: Verification failed. + other: 認証に失敗しました。 email_or_password_incorrect: - other: Email and password do not match. + other: メールアドレスとパスワードが一致しません。 old_password_verification_failed: - other: The old password verification failed + other: 古いパスワードの確認に失敗しました。 new_password_same_as_previous_setting: - other: The new password is the same as the previous one. + other: 新しいパスワードは前のパスワードと同じです。 question: already_deleted: - other: This post has been deleted. + other: この投稿は削除されました。 not_found: - other: Question not found. + other: 質問が見つかりません。 cannot_deleted: - other: No permission to delete. + other: 削除する権限がありません。 cannot_close: - other: No permission to close. + other: クローズする権限がありません。 cannot_update: - other: No permission to update. + other: 更新する権限がありません。 rank: fail_to_meet_the_condition: - other: Rank fail to meet the condition. + other: ランクは条件を満たしていません。 report: handle_failed: - other: Report handle failed. + other: レポートの処理に失敗しました。 not_found: - other: Report not found. + other: レポートが見つかりません。 tag: already_exist: - other: Tag already exists. + other: タグは既に存在します。 not_found: - other: Tag not found. + other: タグが見つかりません。 recommend_tag_not_found: - other: Recommend Tag is not exist. + other: 推奨タグは存在しません。 recommend_tag_enter: - other: Please enter at least one required tag. + other: 少なくとも 1 つの必須タグを入力してください。 not_contain_synonym_tags: - other: Should not contain synonym tags. + other: 同義語のタグを含めないでください。 cannot_update: other: No permission to update. is_used_cannot_delete: @@ -301,12 +301,12 @@ ui: end: You don't meet a community guideline. editor: blockquote: - text: Blockquote + text: 引用 bold: text: Strong chart: text: Chart - flow_chart: Flow chart + flow_chart: フローチャート sequence_diagram: Sequence diagram class_diagram: Class diagram state_diagram: State diagram @@ -320,61 +320,61 @@ ui: form: fields: code: - label: Code + label: コード msg: empty: Code cannot be empty. language: - label: Language - placeholder: Automatic detection - btn_cancel: Cancel - btn_confirm: Add + label: 言語 + placeholder: 自動検出 + btn_cancel: キャンセル + btn_confirm: 追加 formula: - text: Formula + text: 数式 options: inline: Inline formula block: Block formula heading: - text: Heading + text: 見出し options: - h1: Heading 1 - h2: Heading 2 - h3: Heading 3 - h4: Heading 4 - h5: Heading 5 - h6: Heading 6 + h1: 見出し1 + h2: 見出し2 + h3: 見出し3 + h4: 見出し4 + h5: 見出し5 + h6: 見出し6 help: - text: Help + text: ヘルプ hr: text: Horizontal Rule image: - text: Image - add_image: Add image - tab_image: Upload image + text: 画像 + add_image: 画像を追加する + tab_image: 画像をアップロードする form_image: fields: file: - label: Image File - btn: Select image + label: 画像ファイル + btn: 画像を選択する msg: - empty: File cannot be empty. - only_image: Only image files are allowed. - max_size: File size cannot exceed 4MB. + empty: ファイルは空にできません。 + only_image: 画像ファイルのみが許可されています。 + max_size: ファイルサイズは4MBを超えることはできません。 desc: - label: Description - tab_url: Image URL + label: 説明 + tab_url: 画像URL form_url: fields: url: - label: Image URL + label: 画像URL msg: - empty: Image URL cannot be empty. + empty: 画像のURLは空にできません。 name: - label: Description - btn_cancel: Cancel - btn_confirm: Add - uploading: Uploading + label: 説明 + btn_cancel: キャンセル + btn_confirm: 追加 + uploading: アップロード中 indent: - text: Indent + text: インデント outdent: text: Outdent italic: @@ -431,7 +431,7 @@ ui: range: Display name up to 35 characters. slug_name: label: URL Slug - desc: 'Must use the character set "a-z", "0-9", "+ # - ."' + desc: '文字セット「a-z」、「0-9」、「+ # -」を使用する必要があります。' msg: empty: URL slug cannot be empty. range: URL slug up to 35 characters. @@ -709,17 +709,17 @@ ui: label: Email Notifications radio: "Answers to your questions, comments, and more" account: - heading: Account - change_email_btn: Change email - change_pass_btn: Change password + heading: アカウント + change_email_btn: メールアドレスを変更する + change_pass_btn: パスワードを変更する change_email_info: >- We've sent an email to that address. Please follow the confirmation instructions. email: - label: Email + label: メールアドレス msg: Email cannot be empty. - password_title: Password + password_title: パスワード current_pass: - label: Current Password + label: 現在のパスワード msg: empty: Current Password cannot be empty. length: The length needs to be between 8 and 32. diff --git a/i18n/pt_PT.yaml b/i18n/pt_PT.yaml index c4c33abc..7ec2efef 100644 --- a/i18n/pt_PT.yaml +++ b/i18n/pt_PT.yaml @@ -70,7 +70,7 @@ backend: captcha_verification_failed: other: O Captcha está incorreto. disallow_follow: - other: Você não possui autorização suficiente para seguir. + other: Você não tem permissão para seguir. disallow_vote: other: Você não possui permissão para votar. disallow_vote_your_self: @@ -108,7 +108,7 @@ backend: already_exist: other: Tag already exists. not_found: - other: Marcador não encontrado. + other: Marca não encontrada. recommend_tag_not_found: other: O marcador recomendado não existe. recommend_tag_enter: @@ -129,9 +129,9 @@ backend: other: Tema não encontrado. revision: review_underway: - other: Não é possível neste momento, há uma versão na fila de análise. + other: Não é possível editar atualmente, há uma versão na fila de análise. no_permission: - other: Sem permissão para realizar Revisão. + other: Sem permissão de modificação. user: email_or_password_wrong: other: @@ -139,7 +139,7 @@ backend: not_found: other: Usuário não encontrado. suspended: - other: O usuário foi suspenso. + other: O utilizador foi suspenso. username_invalid: other: Nome de usuário inválido. username_duplicate: diff --git a/i18n/sk_SK.yaml b/i18n/sk_SK.yaml index 976fae2e..7103770c 100644 --- a/i18n/sk_SK.yaml +++ b/i18n/sk_SK.yaml @@ -106,7 +106,7 @@ backend: other: Prehľad sa nenašiel. tag: already_exist: - other: Tag already exists. + other: Tento tag už existuje. not_found: other: Značka sa nenašla. recommend_tag_not_found: @@ -265,7 +265,7 @@ ui: tag: Značka tags: Značky tag_wiki: značka wiki - create_tag: Create Tag + create_tag: Vytvoriť štítok edit_tag: Upraviť značku ask_a_question: Pridať otázku edit_question: Úpraviť otázku @@ -280,14 +280,14 @@ ui: account_activation: Aktivácia účtu confirm_email: Potvrď e-mail account_suspended: Účet pozastavený - admin: Admin + admin: Administrátor change_email: Upraviť e-mail install: Answer Inštalácia upgrade: Answer Upgrade maintenance: Údržba webových stránok users: Užívatelia - http_404: HTTP Error 404 - http_50X: HTTP Error 500 + http_404: HTTP chyba 404 + http_50X: HTTP chyba 403 notifications: title: Oznámenia inbox: Doručená pošta @@ -303,31 +303,31 @@ ui: blockquote: text: Blockquote bold: - text: Strong + text: Silný chart: - text: Chart + text: Rebríček flow_chart: Flow chart sequence_diagram: Sequence diagram class_diagram: Class diagram state_diagram: State diagram entity_relationship_diagram: Entity relationship diagram user_defined_diagram: User defined diagram - gantt_chart: Gantt chart - pie_chart: Pie chart + gantt_chart: Ganttov diagram + pie_chart: Koláčový graf code: text: Code Sample add_code: Add code sample form: fields: code: - label: Code + label: Kód msg: empty: Code cannot be empty. language: - label: Language + label: Jazyk placeholder: Automatic detection - btn_cancel: Cancel - btn_confirm: Add + btn_cancel: Zrušiť + btn_confirm: Pridať formula: text: Formula options: @@ -343,36 +343,36 @@ ui: h5: Heading 5 h6: Heading 6 help: - text: Help + text: Pomoc hr: text: Horizontal Rule image: - text: Image - add_image: Add image - tab_image: Upload image + text: Obrázok + add_image: Pridať obrázok + tab_image: Nahrať obrázok form_image: fields: file: - label: Image File - btn: Select image + label: Obrázkový súbor + btn: Vyberte obrázok msg: - empty: File cannot be empty. - only_image: Only image files are allowed. + empty: Názov súboru nemôže byť prázdny. + only_image: Povolené sú iba obrázkové súbory. max_size: File size cannot exceed 4MB. desc: - label: Description - tab_url: Image URL + label: Popis + tab_url: URL obrázka form_url: fields: url: - label: Image URL + label: URL obrázka msg: - empty: Image URL cannot be empty. + empty: URL obrázka nemôže byť prázdna. name: label: Description - btn_cancel: Cancel - btn_confirm: Add - uploading: Uploading + btn_cancel: Zrušiť + btn_confirm: Pridať + uploading: Nahrávanie indent: text: Indent outdent: @@ -380,26 +380,26 @@ ui: italic: text: Emphasis link: - text: Hyperlink - add_link: Add hyperlink + text: Hypertextový odkaz + add_link: Pridať hypertextový odkaz form: fields: url: - label: URL + label: URL adresa msg: - empty: URL cannot be empty. + empty: URL adresa nemôže byť prázdna. name: - label: Description - btn_cancel: Cancel - btn_confirm: Add + label: Popis + btn_cancel: Zrušiť + btn_confirm: Pridať ordered_list: - text: Numbered List + text: Očíslovaný zoznam unordered_list: text: Bulleted List table: text: Table heading: Heading - cell: Cell + cell: Bunka close_modal: title: Tento príspevok uzatváram ako... btn_cancel: Zrušiť @@ -493,11 +493,11 @@ ui: day: deň comment: btn_add_comment: Pridať komentár - reply_to: Reply to - btn_reply: Reply + reply_to: Odpovedať + btn_reply: Odpovedať btn_edit: Upraviť btn_delete: Zmazať - btn_flag: Flag + btn_flag: Vlajka btn_save_edits: Uložiť zmeny btn_cancel: Zrušiť show_more: Zobraziť viac komentárov @@ -698,7 +698,7 @@ ui: label: O mne website: label: Webová stránka - placeholder: "https://example.com" + placeholder: "https://priklad.com" msg: Nesprávny formát webovej stránky location: label: Poloha @@ -911,11 +911,11 @@ ui: label: Databázový engine db_username: label: Užívateľské meno - placeholder: root + placeholder: super užívateľ msg: Užívateľské meno nemôže byť prázdne. db_password: label: Heslo - placeholder: root + placeholder: super užívateľ msg: Heslo nemôže byť prázdne. db_host: label: Hostiteľ databázy @@ -986,11 +986,11 @@ ui: answers: odpovede accepted: prijaté page_404: - http_error: HTTP Error 404 + http_error: HTTP chyba 404 desc: "Žiaľ, táto stránka neexistuje." back_home: Späť na domovskú stránku page_50X: - http_error: HTTP Error 500 + http_error: HTTP chyba 500 desc: Na serveri sa vyskytla chyba a nebolo možné dokončiť vašu požiadavku. back_home: Späť na domovskú stránku page_maintenance: @@ -1006,7 +1006,7 @@ ui: general: Všeobecné interface: Rozhranie smtp: SMTP - branding: Branding + branding: Budovanie značky legal: legálne write: písať tos: Podmienky služby @@ -1018,7 +1018,7 @@ ui: login: Prihlásiť sa admin: admin_header: - title: Admin + title: Administrátor dashboard: title: Nástenka welcome: Vitajte v Administrátorovi odpovedí! @@ -1037,7 +1037,7 @@ ui: timezone: "Časové pásmo:" system_info: Systémové informácie storage_used: "Použité úložisko:" - uptime: "Uptime:" + uptime: "Doba prevádzky:" answer_links: Odkazy na odpovede documents: Dokumenty feedback: Spätná väzba @@ -1112,7 +1112,7 @@ ui: deleted: Vymazané normal: Normálné Moderator: Moderátor - Admin: Admin + Admin: Správca User: Používateľ filter: placeholder: "Filter podľa mena, používateľ: ID" @@ -1207,8 +1207,8 @@ ui: msg: Časové pásmo nemôže byť prázdne. text: Vyberte si mesto v rovnakom časovom pásme v akom ste vy. avatar: - label: Default Avatar - text: For users without a custom avatar of their own. + label: Predvolený avatar + text: Pre používateľov bez vlastného avatara. smtp: page_title: SMTP from_email: @@ -1250,7 +1250,7 @@ ui: "yes": "Áno" "no": "Nie" branding: - page_title: Branding + page_title: Budovanie značky logo: label: Logo msg: Logo nemôže byť prázdne. @@ -1305,7 +1305,7 @@ ui: label: Primárna farba text: Upraviť farby používané vašími motívmi css_and_html: - page_title: CSS and HTML + page_title: CSS a HTML custom_css: label: Vlastné CSS text: Toto sa vloží ako @@ -1353,7 +1353,7 @@ ui: accept: akceptované cancelled: zrušené commented: komentované - rollback: rollback + rollback: Návrat edited: zmenené answered: odpovedané asked: spýtané diff --git a/i18n/tr_TR.yaml b/i18n/tr_TR.yaml index edd94157..9cee79a8 100644 --- a/i18n/tr_TR.yaml +++ b/i18n/tr_TR.yaml @@ -285,7 +285,7 @@ ui: install: Answer Installation upgrade: Answer Upgrade maintenance: Website Bakımı - users: Kullanıcı + users: Kullanıcılar http_404: HTTP Error 404 http_50X: HTTP Error 500 notifications: diff --git a/i18n/zh_CN.yaml b/i18n/zh_CN.yaml index d6c4425f..991a8131 100644 --- a/i18n/zh_CN.yaml +++ b/i18n/zh_CN.yaml @@ -35,9 +35,9 @@ backend: error: admin: cannot_update_their_password: - other: You cannot modify your password. + other: 您无法修改自己的密码。 cannot_modify_self_status: - other: You cannot modify your status. + other: 您无法修改自己的状态。 email_or_password_wrong: other: 邮箱和密码不匹配。 answer: @@ -48,7 +48,7 @@ backend: cannot_update: other: 没有更新权限。 question_closed_cannot_add: - other: Questions are closed and cannot be added. + other: 问题已关闭,无法添加。 comment: edit_without_permission: other: 不允许编辑评论。 @@ -87,7 +87,7 @@ backend: other: 新密码与之前的设置相同 question: already_deleted: - other: This post has been deleted. + other: 此问题已被删除. not_found: other: 问题未找到 cannot_deleted: @@ -106,7 +106,7 @@ backend: other: 报告未找到 tag: already_exist: - other: Tag already exists. + other: 标签已存在。 not_found: other: 标签未找到 recommend_tag_not_found: @@ -265,7 +265,7 @@ ui: tag: 标签 tags: 标签 tag_wiki: 标签 wiki - create_tag: Create Tag + create_tag: 创建标签 edit_tag: 编辑标签 ask_a_question: 提问题 edit_question: 编辑问题 @@ -286,8 +286,8 @@ ui: upgrade: Answer 升级 maintenance: 网站维护 users: 用户 - http_404: HTTP Error 404 - http_50X: HTTP Error 500 + http_404: HTTP 错误 404 + http_50X: HTTP 错误 500 notifications: title: 通知 inbox: 收件箱 @@ -431,7 +431,7 @@ ui: range: 显示名称不能超过 35 个字符。 slug_name: label: URL 固定链接 - desc: URL slug up to 35 characters. + desc: URL 地址不能超过 35 个字符。 msg: empty: URL 固定链接不能为空。 range: URL 固定链接不能超过 35 个字符。 @@ -440,7 +440,7 @@ ui: label: 描述 btn_cancel: 取消 btn_submit: 提交 - btn_post: Post new tag + btn_post: 发布新标签 tag_info: created_at: 创建于 edited_at: 编辑于 @@ -590,7 +590,7 @@ ui: placeholder: 搜索 footer: build_on: >- - 基于<1>Answer--为问答社区提供动力的开源软件。
Made with love © {{cc}}. + 基于 <1>Answer - 为问答社区提供动力的开源软件。
Made with love © {{cc}}. upload_img: name: 更改图片 loading: 加载中... @@ -796,7 +796,7 @@ ui: approve: 批准 reject: 拒绝 skip: 略过 - discard_draft: Discard draft + discard_draft: 丢弃草稿 search: title: 搜索结果 keywords: 关键词 @@ -933,7 +933,7 @@ ui: title: 创建 config.yaml label: 已创建 config.yaml 文件。 desc: >- - 您可以手动在 <1>/var/wwww/xxx/ 目录中创建<1>config.yaml 文件并粘贴以下文本。 + 您可以手动在 <1>/var/wwww/xxx/ 目录中创建 <1>config.yaml 文件并粘贴以下文本。 info: 完成后,点击“下一步”按钮。 site_information: 站点信息 admin_account: 管理员账户 @@ -972,8 +972,8 @@ ui: good_luck: "玩得愉快,祝您好运!" warn_title: 警告 warn_desc: >- - 文件<1>config.yaml已存在。如果您需要重置此文件中的任何配置项,请先删除它。 - install_now: 您可以尝试<1>现在安装。 + 文件 <1>config.yaml 已存在。如果您需要重置此文件中的任何配置项,请先删除它。 + install_now: 您可以尝试 <1>现在安装。 installed: 已安裝 installed_desc: >- 您似乎已经安装过了。要重新安装,请先清除旧的数据库表。 @@ -986,11 +986,11 @@ ui: answers: 个回答 accepted: 已被采纳 page_404: - http_error: HTTP Error 404 + http_error: HTTP 错误 404 desc: "很抱歉,此页面不存在。" back_home: 回到主页 page_50X: - http_error: HTTP Error 500 + http_error: HTTP 错误 500 desc: 服务器遇到了一个错误,无法完成你的请求。 back_home: 回到主页 page_maintenance: @@ -1188,7 +1188,7 @@ ui: msg: 简短网站描述不能为空。 text: "简短的标语,作为网站主页的标题(Html 的 title 标签)。" desc: - label: 站点描述 + label: 网站介绍 msg: 网站描述不能为空。 text: "使用一句话描述本站,作为网站的描述(Html 的 meta 标签)。" contact_email: @@ -1207,8 +1207,8 @@ ui: msg: 时区不能为空。 text: 选择一个与您相同时区的城市。 avatar: - label: Default Avatar - text: For users without a custom avatar of their own. + label: 默认头像 + text: 没有自定义头像的用户。 smtp: page_title: SMTP from_email: @@ -1383,7 +1383,7 @@ ui: leave_page: 确定要离开此页面? changes_not_save: 您的更改尚未保存 draft: - discard_confirm: Are you sure you want to discard your draft? + discard_confirm: 您确定要丢弃您的草稿吗? messages: - post_deleted: This post has been deleted. + post_deleted: 该帖子已被删除。 From 2a1367cb660ce96ba57f5a1c16a944c8ed902ec0 Mon Sep 17 00:00:00 2001 From: Fen Date: Tue, 11 Apr 2023 11:17:30 +0800 Subject: [PATCH 31/32] New Crowdin updates (#318) * New translations en_US.yaml (French) * New translations en_US.yaml (Spanish) * New translations en_US.yaml (German) * New translations en_US.yaml (Italian) * New translations en_US.yaml (Japanese) * New translations en_US.yaml (Korean) * New translations en_US.yaml (Portuguese) * New translations en_US.yaml (Russian) * New translations en_US.yaml (Slovak) * New translations en_US.yaml (Turkish) * New translations en_US.yaml (Chinese Simplified) * New translations en_US.yaml (Chinese Traditional) * New translations en_US.yaml (Vietnamese) * New translations en_US.yaml (Indonesian) * New translations en_US.yaml (Welsh) * New translations en_US.yaml (German) * New translations en_US.yaml (Chinese Simplified) --- i18n/cy_GB.yaml | 43 +++++++++--- i18n/de_DE.yaml | 183 +++++++++++++++++++++++++++--------------------- i18n/es_ES.yaml | 43 +++++++++--- i18n/fr_FR.yaml | 45 +++++++++--- i18n/id_ID.yaml | 45 +++++++++--- i18n/it_IT.yaml | 43 +++++++++--- i18n/ja_JP.yaml | 43 +++++++++--- i18n/ko_KR.yaml | 43 +++++++++--- i18n/pt_PT.yaml | 43 +++++++++--- i18n/ru_RU.yaml | 43 +++++++++--- i18n/sk_SK.yaml | 45 +++++++++--- i18n/tr_TR.yaml | 43 +++++++++--- i18n/vi_VN.yaml | 43 +++++++++--- i18n/zh_CN.yaml | 26 +++++-- i18n/zh_TW.yaml | 39 +++++++++-- 15 files changed, 568 insertions(+), 202 deletions(-) diff --git a/i18n/cy_GB.yaml b/i18n/cy_GB.yaml index 755bc7b4..95aab5eb 100644 --- a/i18n/cy_GB.yaml +++ b/i18n/cy_GB.yaml @@ -11,6 +11,17 @@ backend: other: Anawdurdodedig. database_error: other: Gwall gweinydd data. + action: + report: + other: Flag + edit: + other: Edit + delete: + other: Delete + close: + other: Close + reopen: + other: Reopen role: name: user: @@ -99,6 +110,8 @@ backend: rank: fail_to_meet_the_condition: other: Rank yn methu â bodloni'r amod. + vote_fail_to_meet_the_condition: + other: Thanks for the feedback. You need at least {{ rank }} reputation to cast a vote. report: handle_failed: other: Methodd handlen yr adroddiad. @@ -288,6 +301,7 @@ ui: users: Defnyddwyr http_404: Gwall HTTP 404 http_50X: Gwall HTTP 500 + http_403: HTTP Error 403 notifications: title: Hysbysiadau inbox: Mewnflwch @@ -505,6 +519,7 @@ ui: Use comments to ask for more information or suggest improvements. Avoid answering questions in comments. tip_answer: >- Use comments to reply to other users or notify them of changes. If you are adding new information, edit your post instead of commenting. + tip_vote: It adds something useful to the post edit_answer: title: Edit Answer default_reason: Edit answer @@ -754,6 +769,11 @@ ui: answered: answered closed_in: Closed in show_exist: Show existing question. + useful: Useful + question_useful: It is useful and clear + question_un_useful: It is unclear or not useful + answer_useful: It is useful + answer_un_useful: It is not useful answers: title: Answers score: Score @@ -770,7 +790,14 @@ ui:

Are you sure you want to add another answer?

You could use the edit link to refine and improve your existing answer, instead.

empty: Answer cannot be empty. characters: content must be at least 6 characters in length. + tips: + header_1: Thanks for your answer + li1_1: Please be sure to answer the question. Provide details and share your research. + li1_2: Back up any statements you make with references or personal experience. + header_2: But avoid ... + li2_1: Asking for help, seeking clarification, or responding to other answers. reopen: + confirm_btn: Reopen title: Reopen this post content: Are you sure you want to reopen? success: This post has been reopened @@ -985,13 +1012,11 @@ ui: votes: votes answers: answers accepted: Accepted - page_404: - http_error: HTTP Error 404 - desc: "Unfortunately, this page doesn't exist." - back_home: Back to homepage - page_50X: - http_error: HTTP Error 500 - desc: The server encountered an error and could not complete your request. + page_error: + http_error: HTTP Error {{ code }} + desc_403: You don’t have permission to access this page. + desc_404: Unfortunately, this page doesn't exist. + desc_50X: The server encountered an error and could not complete your request. back_home: Back to homepage page_maintenance: desc: "We are under maintenance, we'll be back soon." @@ -1374,8 +1399,8 @@ ui: no_data: "We couldn't find anything." users: title: Users - users_with_the_most_reputation: Users with the highest reputation scores - users_with_the_most_vote: Users who voted the most + users_with_the_most_reputation: Users with the highest reputation scores this week + users_with_the_most_vote: Users who voted the most this week staffs: Our community staff reputation: reputation votes: votes diff --git a/i18n/de_DE.yaml b/i18n/de_DE.yaml index 9ff6b7d0..d25eed73 100644 --- a/i18n/de_DE.yaml +++ b/i18n/de_DE.yaml @@ -11,6 +11,17 @@ backend: other: Nicht autorisiert. database_error: other: Datenbank-Fehler. + action: + report: + other: Flag + edit: + other: Edit + delete: + other: Delete + close: + other: Close + reopen: + other: Reopen role: name: user: @@ -99,6 +110,8 @@ backend: rank: fail_to_meet_the_condition: other: Rang erfüllt die Bedingung nicht. + vote_fail_to_meet_the_condition: + other: Thanks for the feedback. You need at least {{ rank }} reputation to cast a vote. report: handle_failed: other: Berichtshandle fehlgeschlagen. @@ -288,6 +301,7 @@ ui: users: Benutzer http_404: HTTP-Fehler 404 http_50X: HTTP-Fehler 500 + http_403: HTTP Error 403 notifications: title: Benachrichtigungen inbox: Posteingang @@ -505,6 +519,7 @@ ui: Verwenden Sie Kommentare, um weitere Informationen anzufordern oder Verbesserungen vorzuschlagen. Vermeiden Sie die Beantwortung von Fragen in Kommentaren. tip_answer: >- Verwenden Sie Kommentare, um anderen Benutzern zu antworten oder sie über Änderungen zu informieren. Wenn Sie neue Informationen hinzufügen, bearbeiten Sie Ihren Beitrag, anstatt ihn zu kommentieren. + tip_vote: It adds something useful to the post edit_answer: title: Antwort bearbeiten default_reason: Antwort bearbeiten @@ -605,7 +620,7 @@ ui: info: "Wenn es nicht ankommt, überprüfen Sie Ihren Spam-Ordner." another: >- Wir haben Ihnen eine weitere Aktivierungs-E-Mail an {{mail}} gesendet. Es kann einige Minuten dauern, bis es ankommt; überprüfen Sie unbedingt Ihren Spam-Ordner. - btn_name: Resend activation email + btn_name: Aktivierungs Mail erneut senden change_btn_name: Ändern Sie die E-Mail msg: empty: Kann nicht leer sein. @@ -683,37 +698,37 @@ ui: label: Nutzername caption: Andere können Sie als „@Benutzername“ erwähnen. msg: Benutzername darf nicht leer sein. - msg_range: Username up to 30 characters. - character: 'Must use the character set "a-z", "0-9", " - . _"' + msg_range: Benutzername bis zu 30 Zeichen. + character: 'Muss den Zeichensatz "a-z", "0-9", " - . _" verwenden' avatar: - label: Profile Image + label: Profilbild gravatar: Gravatar - gravatar_text: You can change image on <1>gravatar.com - custom: Custom - btn_refresh: Refresh - custom_text: You can upload your image. + gravatar_text: Sie können das Bild auf <1>gravatar.com ändern + custom: Benutzerdefiniert + btn_refresh: Aktualisieren + custom_text: Sie können Ihr Bild hochladen. default: System - msg: Please upload an avatar + msg: Bitte laden Sie einen Avatar hoch bio: - label: About Me + label: Über mich website: - label: Website + label: Webseite placeholder: "https://example.com" - msg: Website incorrect format + msg: Website falsches Format location: - label: Location - placeholder: "City, Country" + label: Standort + placeholder: "Stadt, Land" notification: - heading: Notifications + heading: Benachrichtigungen email: - label: Email Notifications - radio: "Answers to your questions, comments, and more" + label: E-Mail-Benachrichtigungen + radio: "Antworten auf Ihre Fragen, Kommentare und mehr" account: - heading: Account + heading: Konto change_email_btn: E-Mail-Adresse ändern change_pass_btn: Passwort ändern change_email_info: >- - We've sent an email to that address. Please follow the confirmation instructions. + Wir haben eine E-Mail an diese Adresse gesendet. Bitte folgen Sie den Bestätigungsanweisungen. email: label: E-Mail msg: E-Mail-Feld darf nicht leer sein. @@ -721,39 +736,44 @@ ui: current_pass: label: Aktuelles Passwort msg: - empty: Current Password cannot be empty. - length: The length needs to be between 8 and 32. - different: The two entered passwords do not match. + empty: Aktuelles Passwort darf nicht leer sein. + length: Die Länge muss zwischen 8 und 32 liegen. + different: Die beiden eingegebenen Passwörter stimmen nicht überein. new_pass: label: Neues Passwort pass_confirm: label: Neues Passwort bestätigen interface: - heading: Interface + heading: Schnittstelle lang: - label: Interface Language - text: User interface language. It will change when you refresh the page. + label: Schnittstellensprache + text: Sprache der Benutzeroberfläche. Es ändert sich, wenn Sie die Seite aktualisieren. toast: - update: update success - update_password: Password changed successfully. - flag_success: Thanks for flagging. - forbidden_operate_self: Forbidden to operate on yourself - review: Your revision will show after review. + update: erfolg aktualisieren + update_password: Das Kennwort wurde erfolgreich geändert. + flag_success: Danke fürs Markieren. + forbidden_operate_self: Verboten, an sich selbst zu operieren + review: Ihre Überarbeitung wird nach der Überprüfung angezeigt. related_question: - title: Related Questions - btn: Add question - answers: answers + title: Verwandte Fragen + btn: Frage hinzufügen + answers: antworten question_detail: - Asked: Asked - asked: asked - update: Modified - edit: edited + Asked: Fragte + asked: fragte + update: Geändert + edit: bearbeitet Views: Gesehen Follow: Folgen Following: Folgend answered: beantwortet closed_in: Abgeschlossen in show_exist: Bestehende Frage anzeigen. + useful: Useful + question_useful: It is useful and clear + question_un_useful: It is unclear or not useful + answer_useful: It is useful + answer_un_useful: It is not useful answers: title: Antworten score: Punkte @@ -770,7 +790,14 @@ ui:

Sind Sie sicher, dass Sie eine weitere Antwort hinzufügen möchten?

Sie können stattdessen den Editier-Link verwenden, um Ihre bestehende Antwort zu verfeinern und zu verbessern.

empty: Antwort darf nicht leer sein. characters: der Inhalt muss mindestens 6 Zeichen lang sein. + tips: + header_1: Thanks for your answer + li1_1: Please be sure to answer the question. Provide details and share your research. + li1_2: Back up any statements you make with references or personal experience. + header_2: But avoid ... + li2_1: Asking for help, seeking clarification, or responding to other answers. reopen: + confirm_btn: Reopen title: Diesen Beitrag erneut öffnen content: Möchten Sie wirklich wieder öffnen? success: Dieser Beitrag wurde wieder geöffnet @@ -931,7 +958,7 @@ ui: msg: Database File cannot be empty. config_yaml: title: Create config.yaml - label: The config.yaml file created. + label: Die erstellte config.yaml-Datei. desc: >- Sie können die <1>config.yaml Datei manuell im <1>/var/wwww/xxx/ Verzeichnis erstellen und den folgenden Text einfügen. info: Nachdem Sie dies getan haben, klicken Sie auf "Weiter". @@ -958,7 +985,7 @@ ui: admin_password: label: Passwort text: >- - You will need this password to log in. Please store it in a secure location. + Sie benötigen dieses Passwort, um sich anzumelden. Bitte bewahren Sie es an einem sicheren Ort auf. msg: Passwort kann nicht leer sein. admin_email: label: Email @@ -985,14 +1012,12 @@ ui: votes: stimmen answers: antworten accepted: Akzeptiert - page_404: - http_error: HTTP-Fehler 404 - desc: "Leider existiert diese Seite nicht." - back_home: Zurück zur Hauptseite - page_50X: - http_error: HTTP-Fehler 500 - desc: Der Server hat einen Fehler festgestellt und konnte Ihre Anfrage nicht abschließen. - back_home: Zurück zur Hauptseite + page_error: + http_error: HTTP Error {{ code }} + desc_403: You don’t have permission to access this page. + desc_404: Unfortunately, this page doesn't exist. + desc_50X: The server encountered an error and could not complete your request. + back_home: Back to homepage page_maintenance: desc: "Wir werden gewartet, wir sind bald wieder da." nav_menus: @@ -1002,45 +1027,45 @@ ui: answers: Antworten users: Benutzer flags: Flaggen - settings: Settings - general: General - interface: Interface + settings: Einstellungen + general: Allgemein + interface: Schnittstelle smtp: SMTP branding: Branding - legal: Legal - write: Write - tos: Terms of Service - privacy: Privacy + legal: Gesetzliche + write: Schreiben + tos: Nutzungsbedingungen + privacy: Privatsphäre seo: SEO - customize: Customize - themes: Themes + customize: Anpassen + themes: Themen css-html: CSS/HTML - login: Login + login: Anmeldung admin: admin_header: - title: Admin + title: Administrator dashboard: - title: Dashboard - welcome: Welcome to Answer Admin! - site_statistics: Site Statistics - questions: "Questions:" - answers: "Answers:" - comments: "Comments:" - votes: "Votes:" - active_users: "Active users:" - flags: "Flags:" - site_health_status: Site Health Status - version: "Version:" + title: Armaturenbrett + welcome: Willkommen beim Answer-Admin! + site_statistics: Site-Statistiken + questions: "Fragen:" + answers: "Antworten:" + comments: "Kommentare:" + votes: "Stimmen:" + active_users: "Aktive Benutzer:" + flags: "Flaggen:" + site_health_status: Website-Gesundheitsstatus + version: "Ausführung:" https: "HTTPS:" - uploading_files: "Uploading files:" + uploading_files: "Dateien hochladen:" smtp: "SMTP:" - timezone: "Timezone:" - system_info: System Info - storage_used: "Storage used:" - uptime: "Uptime:" - answer_links: Answer Links - documents: Documents - feedback: Feedback + timezone: "Zeitzone:" + system_info: Systeminformationen + storage_used: "Verwendeter Speicher:" + uptime: "Betriebszeit:" + answer_links: Antwortlinks + documents: Unterlagen + feedback: Rückmeldung support: Support review: Review config: Config @@ -1374,8 +1399,8 @@ ui: no_data: "We couldn't find anything." users: title: Users - users_with_the_most_reputation: Users with the highest reputation scores - users_with_the_most_vote: Users who voted the most + users_with_the_most_reputation: Users with the highest reputation scores this week + users_with_the_most_vote: Users who voted the most this week staffs: Our community staff reputation: reputation votes: votes diff --git a/i18n/es_ES.yaml b/i18n/es_ES.yaml index 3d29087d..88bfe870 100644 --- a/i18n/es_ES.yaml +++ b/i18n/es_ES.yaml @@ -11,6 +11,17 @@ backend: other: No autorizado. database_error: other: Error en el servidor de datos. + action: + report: + other: Flag + edit: + other: Edit + delete: + other: Delete + close: + other: Close + reopen: + other: Reopen role: name: user: @@ -99,6 +110,8 @@ backend: rank: fail_to_meet_the_condition: other: El rango no cumple la condición. + vote_fail_to_meet_the_condition: + other: Thanks for the feedback. You need at least {{ rank }} reputation to cast a vote. report: handle_failed: other: Error en el manejador del reporte. @@ -309,6 +322,7 @@ ui: users: Usuarios http_404: HTTP Error 404 http_50X: HTTP Error 500 + http_403: HTTP Error 403 notifications: title: Notificaciones inbox: Buzón de entrada @@ -526,6 +540,7 @@ ui: Utiliza los comentarios para pedir más información o sugerir mejoras y modificaciones. Evita responder preguntas en los comentarios. tip_answer: >- Usa comentarios para responder a otros usuarios o notificarles de cambios. Si estás añadiendo nueva información, edita tu publicación en vez de comentar. + tip_vote: It adds something useful to the post edit_answer: title: Editar respuesta default_reason: Editar respuesta @@ -775,6 +790,11 @@ ui: answered: respondida closed_in: Cerrado el show_exist: Mostrar una pregunta existente. + useful: Useful + question_useful: It is useful and clear + question_un_useful: It is unclear or not useful + answer_useful: It is useful + answer_un_useful: It is not useful answers: title: Respuestas score: Puntuación @@ -791,7 +811,14 @@ ui:

¿Seguro que quieres añadir otra respuesta?

Puedes utilizar el enlace de edición para detallar y mejorar tu respuesta existente en su lugar.

empty: La respuesta no puede estar vacía. characters: content must be at least 6 characters in length. + tips: + header_1: Thanks for your answer + li1_1: Please be sure to answer the question. Provide details and share your research. + li1_2: Back up any statements you make with references or personal experience. + header_2: But avoid ... + li2_1: Asking for help, seeking clarification, or responding to other answers. reopen: + confirm_btn: Reopen title: Reabrir esta publicación content: '¿Seguro que quieres reabrir esta publicación?' success: Esta publicación ha sido reabierta @@ -1010,13 +1037,11 @@ ui: votes: votes answers: answers accepted: Accepted - page_404: - http_error: HTTP Error 404 - desc: "Unfortunately, this page doesn't exist." - back_home: Back to homepage - page_50X: - http_error: HTTP Error 500 - desc: The server encountered an error and could not complete your request. + page_error: + http_error: HTTP Error {{ code }} + desc_403: You don’t have permission to access this page. + desc_404: Unfortunately, this page doesn't exist. + desc_50X: The server encountered an error and could not complete your request. back_home: Back to homepage page_maintenance: desc: "We are under maintenance, we'll be back soon." @@ -1399,8 +1424,8 @@ ui: no_data: "We couldn't find anything." users: title: Usuarios - users_with_the_most_reputation: Usuarios con la reputación más alta - users_with_the_most_vote: Usuarios que más han votado + users_with_the_most_reputation: Users with the highest reputation scores this week + users_with_the_most_vote: Users who voted the most this week staffs: Nuestor equipo de la comunidad reputation: reputación votes: votos diff --git a/i18n/fr_FR.yaml b/i18n/fr_FR.yaml index f2a3ad90..bf487b72 100644 --- a/i18n/fr_FR.yaml +++ b/i18n/fr_FR.yaml @@ -11,6 +11,17 @@ backend: other: Non autorisé. database_error: other: Erreur du serveur de données. + action: + report: + other: Flag + edit: + other: Edit + delete: + other: Delete + close: + other: Close + reopen: + other: Reopen role: name: user: @@ -99,6 +110,8 @@ backend: rank: fail_to_meet_the_condition: other: Le rang ne remplit pas la condition. + vote_fail_to_meet_the_condition: + other: Thanks for the feedback. You need at least {{ rank }} reputation to cast a vote. report: handle_failed: other: La gestion du rapport a échoué. @@ -288,6 +301,7 @@ ui: users: Utilisateurs http_404: Erreur HTTP 404 http_50X: Erreur HTTP 500 + http_403: HTTP Error 403 notifications: title: Notifications inbox: Boîte de réception @@ -505,6 +519,7 @@ ui: Utilisez les commentaires pour demander plus d'informations ou suggérer des améliorations. Évitez de répondre aux questions dans les commentaires. tip_answer: >- Utilisez des commentaires pour répondre à d'autres utilisateurs ou leur signaler des modifications. Si vous ajoutez de nouvelles informations, modifiez votre message au lieu de commenter. + tip_vote: It adds something useful to the post edit_answer: title: Modifier la réponse default_reason: Modifier la réponse @@ -754,6 +769,11 @@ ui: answered: répondu closed_in: Fermé dans show_exist: Afficher la question existante. + useful: Useful + question_useful: It is useful and clear + question_un_useful: It is unclear or not useful + answer_useful: It is useful + answer_un_useful: It is not useful answers: title: Réponses score: Score @@ -770,7 +790,14 @@ ui:

Êtes-vous sûr de vouloir ajouter une autre réponse ?

Vous pouvez utiliser le lien d'édition pour affiner et améliorer votre réponse existante.

empty: La réponse ne peut être vide. characters: le contenu doit comporter au moins 6 caractères. + tips: + header_1: Thanks for your answer + li1_1: Please be sure to answer the question. Provide details and share your research. + li1_2: Back up any statements you make with references or personal experience. + header_2: But avoid ... + li2_1: Asking for help, seeking clarification, or responding to other answers. reopen: + confirm_btn: Reopen title: Rouvrir ce message content: Êtes-vous sûr de vouloir rouvrir ? success: Ce message a été rouvert @@ -985,14 +1012,12 @@ ui: votes: votes answers: réponses accepted: Accepté - page_404: - http_error: Erreur HTTP 404 - desc: "Nous sommes désolés, mais cette page n’existe pas." - back_home: Retour à la page d'accueil - page_50X: - http_error: Erreur HTTP 500 - desc: Le serveur a rencontré une erreur et n'a pas pu répondre à votre requête. - back_home: Retour à la page d'accueil + page_error: + http_error: HTTP Error {{ code }} + desc_403: You don’t have permission to access this page. + desc_404: Unfortunately, this page doesn't exist. + desc_50X: The server encountered an error and could not complete your request. + back_home: Back to homepage page_maintenance: desc: "Nous sommes en maintenance, nous serons bientôt de retour." nav_menus: @@ -1374,8 +1399,8 @@ ui: no_data: "Nous n'avons rien pu trouver." users: title: Utilisateurs - users_with_the_most_reputation: Utilisateurs avec les scores de réputation les plus élevés - users_with_the_most_vote: Utilisateurs qui ont le plus voté + users_with_the_most_reputation: Users with the highest reputation scores this week + users_with_the_most_vote: Users who voted the most this week staffs: Staff de la communauté reputation: réputation votes: votes diff --git a/i18n/id_ID.yaml b/i18n/id_ID.yaml index a3010e5d..827a1877 100644 --- a/i18n/id_ID.yaml +++ b/i18n/id_ID.yaml @@ -11,6 +11,17 @@ backend: other: Tidak diizinkan. database_error: other: Kesalahan data server. + action: + report: + other: Flag + edit: + other: Edit + delete: + other: Delete + close: + other: Close + reopen: + other: Reopen role: name: user: @@ -99,6 +110,8 @@ backend: rank: fail_to_meet_the_condition: other: Peringkat gagal memenuhi syarat. + vote_fail_to_meet_the_condition: + other: Thanks for the feedback. You need at least {{ rank }} reputation to cast a vote. report: handle_failed: other: Laporan penanganan gagal. @@ -288,6 +301,7 @@ ui: users: Pengguna http_404: HTTP Error 404 http_50X: HTTP Error 500 + http_403: HTTP Error 403 notifications: title: Pemberitahuan inbox: Kotak Masuk @@ -505,6 +519,7 @@ ui: Gunakan komentar untuk meminta informasi lebih lanjut atau menyarankan perbaikan. Hindari menjawab pertanyaan di komentar. tip_answer: >- Gunakan komentar untuk membalas pengguna lain atau memberi tahu mereka tentang perubahan. Jika Anda menambahkan informasi baru, cukup edit posting Anda. + tip_vote: It adds something useful to the post edit_answer: title: Sunting jawaban default_reason: Edit jawaban @@ -754,6 +769,11 @@ ui: answered: dijawab closed_in: Ditutup pada show_exist: Gunakan pertanyaan yang sudah ada. + useful: Useful + question_useful: It is useful and clear + question_un_useful: It is unclear or not useful + answer_useful: It is useful + answer_un_useful: It is not useful answers: title: Jawaban score: Nilai @@ -770,7 +790,14 @@ ui:

Yakin ingin menambahkan jawaban lain?

Sebagai gantinya, Anda dapat menggunakan tautan edit untuk menyaring dan menyempurnakan jawaban anda.

empty: Jawaban tidak boleh kosong. characters: content must be at least 6 characters in length. + tips: + header_1: Thanks for your answer + li1_1: Please be sure to answer the question. Provide details and share your research. + li1_2: Back up any statements you make with references or personal experience. + header_2: But avoid ... + li2_1: Asking for help, seeking clarification, or responding to other answers. reopen: + confirm_btn: Reopen title: Buka kembali postingan ini content: Kamu yakin ingin membuka kembali? success: Postingan ini telah dibuka kembali @@ -985,14 +1012,12 @@ ui: votes: votes answers: answers accepted: Accepted - page_404: - http_error: HTTP Error 404 - desc: "Sayangnya, halaman ini tidak ada." - back_home: Kembali ke beranda - page_50X: - http_error: HTTP Error 500 - desc: Server mengalami kesalahan internal dan tidak dapat menyelesaikan permintaan Anda. - back_home: Kembali ke beranda + page_error: + http_error: HTTP Error {{ code }} + desc_403: You don’t have permission to access this page. + desc_404: Unfortunately, this page doesn't exist. + desc_50X: The server encountered an error and could not complete your request. + back_home: Back to homepage page_maintenance: desc: "We are under maintenance, we'll be back soon." nav_menus: @@ -1374,8 +1399,8 @@ ui: no_data: "We couldn't find anything." users: title: Users - users_with_the_most_reputation: Users with the highest reputation scores - users_with_the_most_vote: Users who voted the most + users_with_the_most_reputation: Users with the highest reputation scores this week + users_with_the_most_vote: Users who voted the most this week staffs: Our community staff reputation: reputation votes: votes diff --git a/i18n/it_IT.yaml b/i18n/it_IT.yaml index 51004ba5..414425e4 100644 --- a/i18n/it_IT.yaml +++ b/i18n/it_IT.yaml @@ -11,6 +11,17 @@ backend: other: Non autorizzato database_error: other: Errore server dati + action: + report: + other: Flag + edit: + other: Edit + delete: + other: Delete + close: + other: Close + reopen: + other: Reopen role: name: user: @@ -99,6 +110,8 @@ backend: rank: fail_to_meet_the_condition: other: Condizioni non valide per il grado + vote_fail_to_meet_the_condition: + other: Thanks for the feedback. You need at least {{ rank }} reputation to cast a vote. report: handle_failed: other: Gestione del report fallita @@ -288,6 +301,7 @@ ui: users: Users http_404: HTTP Error 404 http_50X: HTTP Error 500 + http_403: HTTP Error 403 notifications: title: Notifications inbox: Inbox @@ -505,6 +519,7 @@ ui: Use comments to ask for more information or suggest improvements. Avoid answering questions in comments. tip_answer: >- Use comments to reply to other users or notify them of changes. If you are adding new information, edit your post instead of commenting. + tip_vote: It adds something useful to the post edit_answer: title: Edit Answer default_reason: Edit answer @@ -754,6 +769,11 @@ ui: answered: answered closed_in: Closed in show_exist: Show existing question. + useful: Useful + question_useful: It is useful and clear + question_un_useful: It is unclear or not useful + answer_useful: It is useful + answer_un_useful: It is not useful answers: title: Answers score: Score @@ -770,7 +790,14 @@ ui:

Are you sure you want to add another answer?

You could use the edit link to refine and improve your existing answer, instead.

empty: Answer cannot be empty. characters: content must be at least 6 characters in length. + tips: + header_1: Thanks for your answer + li1_1: Please be sure to answer the question. Provide details and share your research. + li1_2: Back up any statements you make with references or personal experience. + header_2: But avoid ... + li2_1: Asking for help, seeking clarification, or responding to other answers. reopen: + confirm_btn: Reopen title: Reopen this post content: Are you sure you want to reopen? success: This post has been reopened @@ -985,13 +1012,11 @@ ui: votes: votes answers: answers accepted: Accepted - page_404: - http_error: HTTP Error 404 - desc: "Unfortunately, this page doesn't exist." - back_home: Back to homepage - page_50X: - http_error: HTTP Error 500 - desc: The server encountered an error and could not complete your request. + page_error: + http_error: HTTP Error {{ code }} + desc_403: You don’t have permission to access this page. + desc_404: Unfortunately, this page doesn't exist. + desc_50X: The server encountered an error and could not complete your request. back_home: Back to homepage page_maintenance: desc: "We are under maintenance, we'll be back soon." @@ -1374,8 +1399,8 @@ ui: no_data: "We couldn't find anything." users: title: Users - users_with_the_most_reputation: Users with the highest reputation scores - users_with_the_most_vote: Users who voted the most + users_with_the_most_reputation: Users with the highest reputation scores this week + users_with_the_most_vote: Users who voted the most this week staffs: Our community staff reputation: reputation votes: votes diff --git a/i18n/ja_JP.yaml b/i18n/ja_JP.yaml index e80dbedb..34c17404 100644 --- a/i18n/ja_JP.yaml +++ b/i18n/ja_JP.yaml @@ -11,6 +11,17 @@ backend: other: 権限がありません。 database_error: other: データサーバーエラー + action: + report: + other: Flag + edit: + other: Edit + delete: + other: Delete + close: + other: Close + reopen: + other: Reopen role: name: user: @@ -99,6 +110,8 @@ backend: rank: fail_to_meet_the_condition: other: ランクは条件を満たしていません。 + vote_fail_to_meet_the_condition: + other: Thanks for the feedback. You need at least {{ rank }} reputation to cast a vote. report: handle_failed: other: レポートの処理に失敗しました。 @@ -288,6 +301,7 @@ ui: users: Users http_404: HTTP Error 404 http_50X: HTTP Error 500 + http_403: HTTP Error 403 notifications: title: Notifications inbox: Inbox @@ -505,6 +519,7 @@ ui: Use comments to ask for more information or suggest improvements. Avoid answering questions in comments. tip_answer: >- Use comments to reply to other users or notify them of changes. If you are adding new information, edit your post instead of commenting. + tip_vote: It adds something useful to the post edit_answer: title: Edit Answer default_reason: Edit answer @@ -754,6 +769,11 @@ ui: answered: answered closed_in: Closed in show_exist: Show existing question. + useful: Useful + question_useful: It is useful and clear + question_un_useful: It is unclear or not useful + answer_useful: It is useful + answer_un_useful: It is not useful answers: title: Answers score: Score @@ -770,7 +790,14 @@ ui:

Are you sure you want to add another answer?

You could use the edit link to refine and improve your existing answer, instead.

empty: Answer cannot be empty. characters: content must be at least 6 characters in length. + tips: + header_1: Thanks for your answer + li1_1: Please be sure to answer the question. Provide details and share your research. + li1_2: Back up any statements you make with references or personal experience. + header_2: But avoid ... + li2_1: Asking for help, seeking clarification, or responding to other answers. reopen: + confirm_btn: Reopen title: Reopen this post content: Are you sure you want to reopen? success: This post has been reopened @@ -985,13 +1012,11 @@ ui: votes: votes answers: answers accepted: Accepted - page_404: - http_error: HTTP Error 404 - desc: "Unfortunately, this page doesn't exist." - back_home: Back to homepage - page_50X: - http_error: HTTP Error 500 - desc: The server encountered an error and could not complete your request. + page_error: + http_error: HTTP Error {{ code }} + desc_403: You don’t have permission to access this page. + desc_404: Unfortunately, this page doesn't exist. + desc_50X: The server encountered an error and could not complete your request. back_home: Back to homepage page_maintenance: desc: "We are under maintenance, we'll be back soon." @@ -1374,8 +1399,8 @@ ui: no_data: "We couldn't find anything." users: title: Users - users_with_the_most_reputation: Users with the highest reputation scores - users_with_the_most_vote: Users who voted the most + users_with_the_most_reputation: Users with the highest reputation scores this week + users_with_the_most_vote: Users who voted the most this week staffs: Our community staff reputation: reputation votes: votes diff --git a/i18n/ko_KR.yaml b/i18n/ko_KR.yaml index ee25d02a..bf82398b 100644 --- a/i18n/ko_KR.yaml +++ b/i18n/ko_KR.yaml @@ -11,6 +11,17 @@ backend: other: Unauthorized. database_error: other: Data server error. + action: + report: + other: Flag + edit: + other: Edit + delete: + other: Delete + close: + other: Close + reopen: + other: Reopen role: name: user: @@ -99,6 +110,8 @@ backend: rank: fail_to_meet_the_condition: other: Rank fail to meet the condition. + vote_fail_to_meet_the_condition: + other: Thanks for the feedback. You need at least {{ rank }} reputation to cast a vote. report: handle_failed: other: Report handle failed. @@ -288,6 +301,7 @@ ui: users: Users http_404: HTTP Error 404 http_50X: HTTP Error 500 + http_403: HTTP Error 403 notifications: title: Notifications inbox: Inbox @@ -505,6 +519,7 @@ ui: Use comments to ask for more information or suggest improvements. Avoid answering questions in comments. tip_answer: >- Use comments to reply to other users or notify them of changes. If you are adding new information, edit your post instead of commenting. + tip_vote: It adds something useful to the post edit_answer: title: Edit Answer default_reason: Edit answer @@ -754,6 +769,11 @@ ui: answered: answered closed_in: Closed in show_exist: Show existing question. + useful: Useful + question_useful: It is useful and clear + question_un_useful: It is unclear or not useful + answer_useful: It is useful + answer_un_useful: It is not useful answers: title: Answers score: Score @@ -770,7 +790,14 @@ ui:

Are you sure you want to add another answer?

You could use the edit link to refine and improve your existing answer, instead.

empty: Answer cannot be empty. characters: content must be at least 6 characters in length. + tips: + header_1: Thanks for your answer + li1_1: Please be sure to answer the question. Provide details and share your research. + li1_2: Back up any statements you make with references or personal experience. + header_2: But avoid ... + li2_1: Asking for help, seeking clarification, or responding to other answers. reopen: + confirm_btn: Reopen title: Reopen this post content: Are you sure you want to reopen? success: This post has been reopened @@ -985,13 +1012,11 @@ ui: votes: votes answers: answers accepted: Accepted - page_404: - http_error: HTTP Error 404 - desc: "Unfortunately, this page doesn't exist." - back_home: Back to homepage - page_50X: - http_error: HTTP Error 500 - desc: The server encountered an error and could not complete your request. + page_error: + http_error: HTTP Error {{ code }} + desc_403: You don’t have permission to access this page. + desc_404: Unfortunately, this page doesn't exist. + desc_50X: The server encountered an error and could not complete your request. back_home: Back to homepage page_maintenance: desc: "We are under maintenance, we'll be back soon." @@ -1374,8 +1399,8 @@ ui: no_data: "We couldn't find anything." users: title: Users - users_with_the_most_reputation: Users with the highest reputation scores - users_with_the_most_vote: Users who voted the most + users_with_the_most_reputation: Users with the highest reputation scores this week + users_with_the_most_vote: Users who voted the most this week staffs: Our community staff reputation: reputation votes: votes diff --git a/i18n/pt_PT.yaml b/i18n/pt_PT.yaml index 7ec2efef..b670e931 100644 --- a/i18n/pt_PT.yaml +++ b/i18n/pt_PT.yaml @@ -11,6 +11,17 @@ backend: other: Não autorizado. database_error: other: Erro no servidor de dados. + action: + report: + other: Flag + edit: + other: Edit + delete: + other: Delete + close: + other: Close + reopen: + other: Reopen role: name: user: @@ -99,6 +110,8 @@ backend: rank: fail_to_meet_the_condition: other: O nível não consegue satisfazer a condição. + vote_fail_to_meet_the_condition: + other: Thanks for the feedback. You need at least {{ rank }} reputation to cast a vote. report: handle_failed: other: Falha ao manusear relatório. @@ -288,6 +301,7 @@ ui: users: Usuários http_404: HTTP Error 404 http_50X: HTTP Error 500 + http_403: HTTP Error 403 notifications: title: Notificações inbox: Caixa de entrada @@ -505,6 +519,7 @@ ui: Use comments to ask for more information or suggest improvements. Avoid answering questions in comments. tip_answer: >- Use comments to reply to other users or notify them of changes. If you are adding new information, edit your post instead of commenting. + tip_vote: It adds something useful to the post edit_answer: title: Edit Answer default_reason: Edit answer @@ -754,6 +769,11 @@ ui: answered: answered closed_in: Closed in show_exist: Show existing question. + useful: Useful + question_useful: It is useful and clear + question_un_useful: It is unclear or not useful + answer_useful: It is useful + answer_un_useful: It is not useful answers: title: Answers score: Score @@ -770,7 +790,14 @@ ui:

Are you sure you want to add another answer?

You could use the edit link to refine and improve your existing answer, instead.

empty: Answer cannot be empty. characters: content must be at least 6 characters in length. + tips: + header_1: Thanks for your answer + li1_1: Please be sure to answer the question. Provide details and share your research. + li1_2: Back up any statements you make with references or personal experience. + header_2: But avoid ... + li2_1: Asking for help, seeking clarification, or responding to other answers. reopen: + confirm_btn: Reopen title: Reopen this post content: Are you sure you want to reopen? success: This post has been reopened @@ -985,13 +1012,11 @@ ui: votes: votes answers: answers accepted: Accepted - page_404: - http_error: HTTP Error 404 - desc: "Unfortunately, this page doesn't exist." - back_home: Back to homepage - page_50X: - http_error: HTTP Error 500 - desc: The server encountered an error and could not complete your request. + page_error: + http_error: HTTP Error {{ code }} + desc_403: You don’t have permission to access this page. + desc_404: Unfortunately, this page doesn't exist. + desc_50X: The server encountered an error and could not complete your request. back_home: Back to homepage page_maintenance: desc: "We are under maintenance, we'll be back soon." @@ -1374,8 +1399,8 @@ ui: no_data: "We couldn't find anything." users: title: Users - users_with_the_most_reputation: Users with the highest reputation scores - users_with_the_most_vote: Users who voted the most + users_with_the_most_reputation: Users with the highest reputation scores this week + users_with_the_most_vote: Users who voted the most this week staffs: Our community staff reputation: reputation votes: votes diff --git a/i18n/ru_RU.yaml b/i18n/ru_RU.yaml index 29fbd6c5..b3de553b 100644 --- a/i18n/ru_RU.yaml +++ b/i18n/ru_RU.yaml @@ -11,6 +11,17 @@ backend: other: Авторизация не выполнена. database_error: other: Ошибка сервера данных. + action: + report: + other: Flag + edit: + other: Edit + delete: + other: Delete + close: + other: Close + reopen: + other: Reopen role: name: user: @@ -99,6 +110,8 @@ backend: rank: fail_to_meet_the_condition: other: Ранг не соответствует условию. + vote_fail_to_meet_the_condition: + other: Thanks for the feedback. You need at least {{ rank }} reputation to cast a vote. report: handle_failed: other: Не удалось обработать отчет. @@ -288,6 +301,7 @@ ui: users: Пользователи http_404: HTTP Error 404 http_50X: HTTP Error 500 + http_403: HTTP Error 403 notifications: title: Уведомления inbox: Входящие @@ -505,6 +519,7 @@ ui: Use comments to ask for more information or suggest improvements. Avoid answering questions in comments. tip_answer: >- Use comments to reply to other users or notify them of changes. If you are adding new information, edit your post instead of commenting. + tip_vote: It adds something useful to the post edit_answer: title: Edit Answer default_reason: Edit answer @@ -754,6 +769,11 @@ ui: answered: answered closed_in: Closed in show_exist: Show existing question. + useful: Useful + question_useful: It is useful and clear + question_un_useful: It is unclear or not useful + answer_useful: It is useful + answer_un_useful: It is not useful answers: title: Answers score: Score @@ -770,7 +790,14 @@ ui:

Are you sure you want to add another answer?

You could use the edit link to refine and improve your existing answer, instead.

empty: Answer cannot be empty. characters: content must be at least 6 characters in length. + tips: + header_1: Thanks for your answer + li1_1: Please be sure to answer the question. Provide details and share your research. + li1_2: Back up any statements you make with references or personal experience. + header_2: But avoid ... + li2_1: Asking for help, seeking clarification, or responding to other answers. reopen: + confirm_btn: Reopen title: Reopen this post content: Are you sure you want to reopen? success: This post has been reopened @@ -985,13 +1012,11 @@ ui: votes: votes answers: answers accepted: Accepted - page_404: - http_error: HTTP Error 404 - desc: "Unfortunately, this page doesn't exist." - back_home: Back to homepage - page_50X: - http_error: HTTP Error 500 - desc: The server encountered an error and could not complete your request. + page_error: + http_error: HTTP Error {{ code }} + desc_403: You don’t have permission to access this page. + desc_404: Unfortunately, this page doesn't exist. + desc_50X: The server encountered an error and could not complete your request. back_home: Back to homepage page_maintenance: desc: "We are under maintenance, we'll be back soon." @@ -1374,8 +1399,8 @@ ui: no_data: "We couldn't find anything." users: title: Users - users_with_the_most_reputation: Users with the highest reputation scores - users_with_the_most_vote: Users who voted the most + users_with_the_most_reputation: Users with the highest reputation scores this week + users_with_the_most_vote: Users who voted the most this week staffs: Our community staff reputation: reputation votes: votes diff --git a/i18n/sk_SK.yaml b/i18n/sk_SK.yaml index 7103770c..b5860d25 100644 --- a/i18n/sk_SK.yaml +++ b/i18n/sk_SK.yaml @@ -11,6 +11,17 @@ backend: other: Neoprávnené. database_error: other: Chyba dátového servera. + action: + report: + other: Flag + edit: + other: Edit + delete: + other: Delete + close: + other: Close + reopen: + other: Reopen role: name: user: @@ -99,6 +110,8 @@ backend: rank: fail_to_meet_the_condition: other: Poradie nespĺňa podmienku. + vote_fail_to_meet_the_condition: + other: Thanks for the feedback. You need at least {{ rank }} reputation to cast a vote. report: handle_failed: other: Spracovanie prehľadu zlyhalo. @@ -288,6 +301,7 @@ ui: users: Užívatelia http_404: HTTP chyba 404 http_50X: HTTP chyba 403 + http_403: HTTP Error 403 notifications: title: Oznámenia inbox: Doručená pošta @@ -505,6 +519,7 @@ ui: Use comments to ask for more information or suggest improvements. Avoid answering questions in comments. tip_answer: >- Use comments to reply to other users or notify them of changes. If you are adding new information, edit your post instead of commenting. + tip_vote: It adds something useful to the post edit_answer: title: Uprav odpoveď default_reason: Uprav odpoveď @@ -754,6 +769,11 @@ ui: answered: zodpovedaný closed_in: Uzatvorené show_exist: Ukázať existujúcu otázku. + useful: Useful + question_useful: It is useful and clear + question_un_useful: It is unclear or not useful + answer_useful: It is useful + answer_un_useful: It is not useful answers: title: Odpovede score: Skóre @@ -770,7 +790,14 @@ ui:

Ste si istí, že chcete pridať ďalšiu odpoveď?

Mohli by ste namiesto toho použiť úpravu na vylepšenie svojej už existujúcej odpovede.

empty: Odpoveď nemôže byť prázdna. characters: Minimálna dĺžka obsahu musí byť 6 znakov. + tips: + header_1: Thanks for your answer + li1_1: Please be sure to answer the question. Provide details and share your research. + li1_2: Back up any statements you make with references or personal experience. + header_2: But avoid ... + li2_1: Asking for help, seeking clarification, or responding to other answers. reopen: + confirm_btn: Reopen title: Znovu otvoriť tento príspevok content: Ste si istý, že ho chcete znovu otvoriť? success: Tento príspevok bol znovu otvorený @@ -985,14 +1012,12 @@ ui: votes: hlasy answers: odpovede accepted: prijaté - page_404: - http_error: HTTP chyba 404 - desc: "Žiaľ, táto stránka neexistuje." - back_home: Späť na domovskú stránku - page_50X: - http_error: HTTP chyba 500 - desc: Na serveri sa vyskytla chyba a nebolo možné dokončiť vašu požiadavku. - back_home: Späť na domovskú stránku + page_error: + http_error: HTTP Error {{ code }} + desc_403: You don’t have permission to access this page. + desc_404: Unfortunately, this page doesn't exist. + desc_50X: The server encountered an error and could not complete your request. + back_home: Back to homepage page_maintenance: desc: "Prebieha údržba, čoskoro sa vrátime." nav_menus: @@ -1374,8 +1399,8 @@ ui: no_data: "Nič sa nám nepodarilo nájsť." users: title: Použivatelia - users_with_the_most_reputation: Používatelia s najvyšším skóre reputácie - users_with_the_most_vote: Používatelia, ktorí hlasovali najviac + users_with_the_most_reputation: Users with the highest reputation scores this week + users_with_the_most_vote: Users who voted the most this week staffs: Zamestnanci našej komunity reputation: reputácia votes: hlasy diff --git a/i18n/tr_TR.yaml b/i18n/tr_TR.yaml index 9cee79a8..32a56a3c 100644 --- a/i18n/tr_TR.yaml +++ b/i18n/tr_TR.yaml @@ -11,6 +11,17 @@ backend: other: İzin yok. database_error: other: Veri sunucu hatası. + action: + report: + other: Flag + edit: + other: Edit + delete: + other: Delete + close: + other: Close + reopen: + other: Reopen role: name: user: @@ -99,6 +110,8 @@ backend: rank: fail_to_meet_the_condition: other: Rank fail to meet the condition. + vote_fail_to_meet_the_condition: + other: Thanks for the feedback. You need at least {{ rank }} reputation to cast a vote. report: handle_failed: other: Rapor işlenemedi. @@ -288,6 +301,7 @@ ui: users: Kullanıcılar http_404: HTTP Error 404 http_50X: HTTP Error 500 + http_403: HTTP Error 403 notifications: title: Bildirimler inbox: Gelen Kutusu @@ -505,6 +519,7 @@ ui: Use comments to ask for more information or suggest improvements. Avoid answering questions in comments. tip_answer: >- Use comments to reply to other users or notify them of changes. If you are adding new information, edit your post instead of commenting. + tip_vote: It adds something useful to the post edit_answer: title: Edit Answer default_reason: Edit answer @@ -754,6 +769,11 @@ ui: answered: answered closed_in: Closed in show_exist: Show existing question. + useful: Useful + question_useful: It is useful and clear + question_un_useful: It is unclear or not useful + answer_useful: It is useful + answer_un_useful: It is not useful answers: title: Answers score: Score @@ -770,7 +790,14 @@ ui:

Are you sure you want to add another answer?

You could use the edit link to refine and improve your existing answer, instead.

empty: Answer cannot be empty. characters: content must be at least 6 characters in length. + tips: + header_1: Thanks for your answer + li1_1: Please be sure to answer the question. Provide details and share your research. + li1_2: Back up any statements you make with references or personal experience. + header_2: But avoid ... + li2_1: Asking for help, seeking clarification, or responding to other answers. reopen: + confirm_btn: Reopen title: Reopen this post content: Are you sure you want to reopen? success: This post has been reopened @@ -985,13 +1012,11 @@ ui: votes: votes answers: answers accepted: Accepted - page_404: - http_error: HTTP Error 404 - desc: "Unfortunately, this page doesn't exist." - back_home: Back to homepage - page_50X: - http_error: HTTP Error 500 - desc: The server encountered an error and could not complete your request. + page_error: + http_error: HTTP Error {{ code }} + desc_403: You don’t have permission to access this page. + desc_404: Unfortunately, this page doesn't exist. + desc_50X: The server encountered an error and could not complete your request. back_home: Back to homepage page_maintenance: desc: "We are under maintenance, we'll be back soon." @@ -1374,8 +1399,8 @@ ui: no_data: "We couldn't find anything." users: title: Users - users_with_the_most_reputation: Users with the highest reputation scores - users_with_the_most_vote: Users who voted the most + users_with_the_most_reputation: Users with the highest reputation scores this week + users_with_the_most_vote: Users who voted the most this week staffs: Our community staff reputation: reputation votes: votes diff --git a/i18n/vi_VN.yaml b/i18n/vi_VN.yaml index 3cc7e462..1d4771b0 100644 --- a/i18n/vi_VN.yaml +++ b/i18n/vi_VN.yaml @@ -11,6 +11,17 @@ backend: other: Unauthorized. database_error: other: Data server error. + action: + report: + other: Flag + edit: + other: Edit + delete: + other: Delete + close: + other: Close + reopen: + other: Reopen role: name: user: @@ -99,6 +110,8 @@ backend: rank: fail_to_meet_the_condition: other: Rank fail to meet the condition. + vote_fail_to_meet_the_condition: + other: Thanks for the feedback. You need at least {{ rank }} reputation to cast a vote. report: handle_failed: other: Report handle failed. @@ -288,6 +301,7 @@ ui: users: Users http_404: HTTP Error 404 http_50X: HTTP Error 500 + http_403: HTTP Error 403 notifications: title: Notifications inbox: Inbox @@ -505,6 +519,7 @@ ui: Use comments to ask for more information or suggest improvements. Avoid answering questions in comments. tip_answer: >- Use comments to reply to other users or notify them of changes. If you are adding new information, edit your post instead of commenting. + tip_vote: It adds something useful to the post edit_answer: title: Edit Answer default_reason: Edit answer @@ -754,6 +769,11 @@ ui: answered: answered closed_in: Closed in show_exist: Show existing question. + useful: Useful + question_useful: It is useful and clear + question_un_useful: It is unclear or not useful + answer_useful: It is useful + answer_un_useful: It is not useful answers: title: Answers score: Score @@ -770,7 +790,14 @@ ui:

Are you sure you want to add another answer?

You could use the edit link to refine and improve your existing answer, instead.

empty: Answer cannot be empty. characters: content must be at least 6 characters in length. + tips: + header_1: Thanks for your answer + li1_1: Please be sure to answer the question. Provide details and share your research. + li1_2: Back up any statements you make with references or personal experience. + header_2: But avoid ... + li2_1: Asking for help, seeking clarification, or responding to other answers. reopen: + confirm_btn: Reopen title: Reopen this post content: Are you sure you want to reopen? success: This post has been reopened @@ -985,13 +1012,11 @@ ui: votes: votes answers: answers accepted: Accepted - page_404: - http_error: HTTP Error 404 - desc: "Unfortunately, this page doesn't exist." - back_home: Back to homepage - page_50X: - http_error: HTTP Error 500 - desc: The server encountered an error and could not complete your request. + page_error: + http_error: HTTP Error {{ code }} + desc_403: You don’t have permission to access this page. + desc_404: Unfortunately, this page doesn't exist. + desc_50X: The server encountered an error and could not complete your request. back_home: Back to homepage page_maintenance: desc: "We are under maintenance, we'll be back soon." @@ -1374,8 +1399,8 @@ ui: no_data: "We couldn't find anything." users: title: Users - users_with_the_most_reputation: Users with the highest reputation scores - users_with_the_most_vote: Users who voted the most + users_with_the_most_reputation: Users with the highest reputation scores this week + users_with_the_most_vote: Users who voted the most this week staffs: Our community staff reputation: reputation votes: votes diff --git a/i18n/zh_CN.yaml b/i18n/zh_CN.yaml index 77abeedf..3bfdef38 100644 --- a/i18n/zh_CN.yaml +++ b/i18n/zh_CN.yaml @@ -301,6 +301,7 @@ ui: users: 用户 http_404: HTTP 错误 404 http_50X: HTTP 错误 500 + http_403: HTTP 错误 403 notifications: title: 通知 inbox: 收件箱 @@ -518,6 +519,7 @@ ui: 使用评论提问更多信息或者提出改进意见。尽量避免使用评论功能回答问题。 tip_answer: >- 使用评论对回答者进行回复,或者通知回答者你已更新了问题的内容。如果要补充或者完善问题的内容,请在原问题中更改。 + tip_vote: It adds something useful to the post edit_answer: title: 编辑回答 default_reason: 编辑回答 @@ -767,6 +769,11 @@ ui: answered: 回答于 closed_in: 关闭于 show_exist: 查看相关问题。 + useful: Useful + question_useful: It is useful and clear + question_un_useful: It is unclear or not useful + answer_useful: It is useful + answer_un_useful: It is not useful answers: title: 个回答 score: 评分 @@ -783,7 +790,14 @@ ui:

您确定要提交一个新的回答吗?

您可以直接编辑和改善您之前的回答的。

empty: 回答内容不能为空。 characters: 内容长度至少 6 个字符 + tips: + header_1: Thanks for your answer + li1_1: Please be sure to answer the question. Provide details and share your research. + li1_2: Back up any statements you make with references or personal experience. + header_2: But avoid ... + li2_1: Asking for help, seeking clarification, or responding to other answers. reopen: + confirm_btn: 重新打开 title: 重新打开这个帖子 content: 确定要重新打开吗? success: 这个帖子已被重新打开 @@ -1000,10 +1014,10 @@ ui: accepted: 已被采纳 page_error: http_error: HTTP Error {{ code }} - desc_403: 你无权访问此页面。 - desc_404: 很抱歉,此页面不存在。 - desc_50X: 服务器遇到了一个错误,无法完成你的请求。 - back_home: 回到主页 + desc_403: You don’t have permission to access this page. + desc_404: Unfortunately, this page doesn't exist. + desc_50X: The server encountered an error and could not complete your request. + back_home: Back to homepage page_maintenance: desc: "我们正在进行维护,我们将很快回来。" nav_menus: @@ -1385,8 +1399,8 @@ ui: no_data: "空空如也" users: title: 用户 - users_with_the_most_reputation: 本周信誉积分最高的用户 - users_with_the_most_vote: 本周投票最多的用户 + users_with_the_most_reputation: Users with the highest reputation scores this week + users_with_the_most_vote: Users who voted the most this week staffs: 我们的社区工作人员 reputation: 声望值 votes: 投票 diff --git a/i18n/zh_TW.yaml b/i18n/zh_TW.yaml index 84ebe6d2..fe91ec2d 100644 --- a/i18n/zh_TW.yaml +++ b/i18n/zh_TW.yaml @@ -11,6 +11,17 @@ backend: other: 未授權。 database_error: other: 資料庫錯誤。 + action: + report: + other: Flag + edit: + other: Edit + delete: + other: Delete + close: + other: Close + reopen: + other: Reopen role: name: user: @@ -99,6 +110,8 @@ backend: rank: fail_to_meet_the_condition: other: 級別不符合條件 + vote_fail_to_meet_the_condition: + other: Thanks for the feedback. You need at least {{ rank }} reputation to cast a vote. report: handle_failed: other: 報告處理失敗。 @@ -288,6 +301,7 @@ ui: users: 用戶 http_404: HTTP Error 404 http_50X: HTTP Error 500 + http_403: HTTP Error 403 notifications: title: 通知 inbox: 收件夾 @@ -505,6 +519,7 @@ ui: 通过評論询问更多问题或提出改進建議。避免在評論中回答問題。 tip_answer: >- 使用評論回復其他用戶或通知他們进行更改。如果你要添加新的信息,請編輯你的帖子,而不是發表評論。 + tip_vote: It adds something useful to the post edit_answer: title: 編輯回答 default_reason: 編輯回答 @@ -754,6 +769,11 @@ ui: answered: 回答於 closed_in: 關閉於 show_exist: 顯示現有問題。 + useful: Useful + question_useful: It is useful and clear + question_un_useful: It is unclear or not useful + answer_useful: It is useful + answer_un_useful: It is not useful answers: title: 個回答 score: 評分 @@ -770,7 +790,14 @@ ui:

您確定要添加一個新的回答嗎?

您可以使用编辑链接来完善和改进您现有的答案。

empty: 回答內容不能為空。 characters: 內容必須至少6個字元長度。 + tips: + header_1: Thanks for your answer + li1_1: Please be sure to answer the question. Provide details and share your research. + li1_2: Back up any statements you make with references or personal experience. + header_2: But avoid ... + li2_1: Asking for help, seeking clarification, or responding to other answers. reopen: + confirm_btn: Reopen title: 重新打開這個貼文 content: 確定要重新打開嗎? success: 這個貼文已被重新打開 @@ -987,10 +1014,10 @@ ui: accepted: 已採納 page_error: http_error: HTTP Error {{ code }} - desc_403: 你无权访问此頁面。 - desc_404: 很抱歉,此頁面不存在。 - desc_50X: 伺服器遇到了一個錯誤,無法完成你的請求。 - back_home: 回到首頁 + desc_403: You don’t have permission to access this page. + desc_404: Unfortunately, this page doesn't exist. + desc_50X: The server encountered an error and could not complete your request. + back_home: Back to homepage page_maintenance: desc: "我們正在維護中,很快就會回來。" nav_menus: @@ -1372,8 +1399,8 @@ ui: no_data: "我們找不到任何東西。" users: title: 用戶 - users_with_the_most_reputation: 信譽積分最高的用戶 - users_with_the_most_vote: 投票最多的用戶 + users_with_the_most_reputation: Users with the highest reputation scores this week + users_with_the_most_vote: Users who voted the most this week staffs: 我們的社區工作人員 reputation: 聲望值 votes: 選票 From 5361f4e12710b9057e537aed08f1c62025761f47 Mon Sep 17 00:00:00 2001 From: shuai Date: Tue, 11 Apr 2023 15:54:17 +0800 Subject: [PATCH 32/32] fix: generator add reviosn --- ui/src/common/interface.ts | 1 + ui/src/components/PageTags/index.tsx | 3 ++- ui/src/stores/siteInfo.ts | 8 +++++--- ui/src/utils/guard.ts | 4 +++- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/ui/src/common/interface.ts b/ui/src/common/interface.ts index cb6b63e3..640efcaa 100644 --- a/ui/src/common/interface.ts +++ b/ui/src/common/interface.ts @@ -328,6 +328,7 @@ export interface SiteSettings { theme: AdminSettingsTheme; site_seo: AdminSettingsSeo; version: string; + revision: string; } export interface AdminSettingBranding { diff --git a/ui/src/components/PageTags/index.tsx b/ui/src/components/PageTags/index.tsx index 4f663ac1..bd6d02a4 100644 --- a/ui/src/components/PageTags/index.tsx +++ b/ui/src/components/PageTags/index.tsx @@ -11,6 +11,7 @@ const Index: FC = () => { (state) => state.items, ); const appVersion = siteInfoStore((_) => _.version); + const hashVersion = siteInfoStore((_) => _.revision); const setAppGenerator = () => { if (!appVersion) { return; @@ -19,7 +20,7 @@ const Index: FC = () => { if (generatorMetaNode) { generatorMetaNode.setAttribute( 'content', - `Answer ${appVersion} - https://github.com/answerdev/answer`, + `Answer ${appVersion} - https://github.com/answerdev/answer version ${hashVersion}`, ); } }; diff --git a/ui/src/stores/siteInfo.ts b/ui/src/stores/siteInfo.ts index 26c5321b..1072501a 100644 --- a/ui/src/stores/siteInfo.ts +++ b/ui/src/stores/siteInfo.ts @@ -6,8 +6,9 @@ import { DEFAULT_SITE_NAME } from '@/common/constants'; interface SiteInfoType { siteInfo: AdminSettingsGeneral; version: string; + revision: string; update: (params: AdminSettingsGeneral) => void; - updateVersion: (ver: string) => void; + updateVersion: (ver: string, revision: string) => void; } const siteInfo = create((set) => ({ @@ -20,6 +21,7 @@ const siteInfo = create((set) => ({ permalink: 1, }, version: '', + revision: '', update: (params) => set((_) => { const o = { ..._.siteInfo, ...params }; @@ -30,9 +32,9 @@ const siteInfo = create((set) => ({ siteInfo: o, }; }), - updateVersion: (ver) => { + updateVersion: (ver, revision) => { set(() => { - return { version: ver }; + return { version: ver, revision }; }); }, })); diff --git a/ui/src/utils/guard.ts b/ui/src/utils/guard.ts index 5ff081af..fee55094 100644 --- a/ui/src/utils/guard.ts +++ b/ui/src/utils/guard.ts @@ -302,7 +302,9 @@ export const initAppSettingsStore = async () => { const appSettings = await getAppSettings(); if (appSettings) { siteInfoStore.getState().update(appSettings.general); - siteInfoStore.getState().updateVersion(appSettings.version); + siteInfoStore + .getState() + .updateVersion(appSettings.version, appSettings.revision); interfaceStore.getState().update(appSettings.interface); brandingStore.getState().update(appSettings.branding); loginSettingStore.getState().update(appSettings.login);