Skip to content

Commit da4be34

Browse files
committed
Merge branch 'release/1.0.6' into github-main
2 parents dcd514b + e520411 commit da4be34

File tree

77 files changed

+1671
-1038
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+1671
-1038
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.PHONY: build clean ui
22

3-
VERSION=1.0.5
3+
VERSION=1.0.6
44
BIN=answer
55
DIR_SRC=./cmd/answer
66
DOCKER_CMD=docker

docs/docs.go

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5984,9 +5984,6 @@ const docTemplate = `{
59845984
"schema.GetOtherUserInfoResp": {
59855985
"type": "object",
59865986
"properties": {
5987-
"has": {
5988-
"type": "boolean"
5989-
},
59905987
"info": {
59915988
"$ref": "#/definitions/schema.GetOtherUserInfoByUsernameResp"
59925989
}
@@ -7688,7 +7685,6 @@ const docTemplate = `{
76887685
],
76897686
"properties": {
76907687
"status": {
7691-
"description": "user status",
76927688
"type": "string",
76937689
"enum": [
76947690
"normal",
@@ -7698,7 +7694,6 @@ const docTemplate = `{
76987694
]
76997695
},
77007696
"user_id": {
7701-
"description": "user id",
77027697
"type": "string"
77037698
}
77047699
}
@@ -7994,6 +7989,10 @@ const docTemplate = `{
79947989
"label": {
79957990
"type": "string"
79967991
},
7992+
"progress": {
7993+
"description": "Translation completion percentage",
7994+
"type": "integer"
7995+
},
79977996
"value": {
79987997
"type": "string"
79997998
}

docs/swagger.json

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5972,9 +5972,6 @@
59725972
"schema.GetOtherUserInfoResp": {
59735973
"type": "object",
59745974
"properties": {
5975-
"has": {
5976-
"type": "boolean"
5977-
},
59785975
"info": {
59795976
"$ref": "#/definitions/schema.GetOtherUserInfoByUsernameResp"
59805977
}
@@ -7676,7 +7673,6 @@
76767673
],
76777674
"properties": {
76787675
"status": {
7679-
"description": "user status",
76807676
"type": "string",
76817677
"enum": [
76827678
"normal",
@@ -7686,7 +7682,6 @@
76867682
]
76877683
},
76887684
"user_id": {
7689-
"description": "user id",
76907685
"type": "string"
76917686
}
76927687
}
@@ -7982,6 +7977,10 @@
79827977
"label": {
79837978
"type": "string"
79847979
},
7980+
"progress": {
7981+
"description": "Translation completion percentage",
7982+
"type": "integer"
7983+
},
79857984
"value": {
79867985
"type": "string"
79877986
}

docs/swagger.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -488,8 +488,6 @@ definitions:
488488
type: object
489489
schema.GetOtherUserInfoResp:
490490
properties:
491-
has:
492-
type: boolean
493491
info:
494492
$ref: '#/definitions/schema.GetOtherUserInfoByUsernameResp'
495493
type: object
@@ -1691,15 +1689,13 @@ definitions:
16911689
schema.UpdateUserStatusReq:
16921690
properties:
16931691
status:
1694-
description: user status
16951692
enum:
16961693
- normal
16971694
- suspended
16981695
- deleted
16991696
- inactive
17001697
type: string
17011698
user_id:
1702-
description: user id
17031699
type: string
17041700
required:
17051701
- status
@@ -1911,6 +1907,9 @@ definitions:
19111907
properties:
19121908
label:
19131909
type: string
1910+
progress:
1911+
description: Translation completion percentage
1912+
type: integer
19141913
value:
19151914
type: string
19161915
type: object

go.mod

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,13 @@ require (
3535
github.com/segmentfault/pacman/contrib/server/http v0.0.0-20221018072427-a15dd1434e05
3636
github.com/spf13/cobra v1.6.1
3737
github.com/stretchr/testify v1.8.1
38-
github.com/swaggo/files v0.0.0-20220728132757-551d4a08d97a
38+
github.com/swaggo/files v1.0.0
3939
github.com/swaggo/gin-swagger v1.5.3
40-
github.com/swaggo/swag v1.8.7
40+
github.com/swaggo/swag v1.8.10
4141
github.com/tidwall/gjson v1.14.4
4242
github.com/yuin/goldmark v1.4.13
4343
golang.org/x/crypto v0.1.0
44-
golang.org/x/net v0.1.0
44+
golang.org/x/net v0.2.0
4545
gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df
4646
gopkg.in/yaml.v3 v3.0.1
4747
modernc.org/sqlite v1.14.2
@@ -121,7 +121,7 @@ require (
121121
go.uber.org/zap v1.23.0 // indirect
122122
golang.org/x/image v0.1.0 // indirect
123123
golang.org/x/mod v0.6.0 // indirect
124-
golang.org/x/sys v0.1.0 // indirect
124+
golang.org/x/sys v0.2.0 // indirect
125125
golang.org/x/text v0.5.0 // indirect
126126
golang.org/x/tools v0.2.0 // indirect
127127
google.golang.org/protobuf v1.28.1 // indirect

go.sum

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -668,13 +668,14 @@ github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKs
668668
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
669669
github.com/subosito/gotenv v1.4.1 h1:jyEFiXpy21Wm81FBN71l9VoMMV8H8jG+qIK3GCpY6Qs=
670670
github.com/subosito/gotenv v1.4.1/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0=
671-
github.com/swaggo/files v0.0.0-20220728132757-551d4a08d97a h1:kAe4YSu0O0UFn1DowNo2MY5p6xzqtJ/wQ7LZynSvGaY=
672671
github.com/swaggo/files v0.0.0-20220728132757-551d4a08d97a/go.mod h1:lKJPbtWzJ9JhsTN1k1gZgleJWY/cqq0psdoMmaThG3w=
672+
github.com/swaggo/files v1.0.0 h1:1gGXVIeUFCS/dta17rnP0iOpr6CXFwKD7EO5ID233e4=
673+
github.com/swaggo/files v1.0.0/go.mod h1:N59U6URJLyU1PQgFqPM7wXLMhJx7QAolnvfQkqO13kc=
673674
github.com/swaggo/gin-swagger v1.5.3 h1:8mWmHLolIbrhJJTflsaFoZzRBYVmEE7JZGIq08EiC0Q=
674675
github.com/swaggo/gin-swagger v1.5.3/go.mod h1:3XJKSfHjDMB5dBo/0rrTXidPmgLeqsX89Yp4uA50HpI=
675676
github.com/swaggo/swag v1.8.1/go.mod h1:ugemnJsPZm/kRwFUnzBlbHRd0JY9zE1M4F+uy2pAaPQ=
676-
github.com/swaggo/swag v1.8.7 h1:2K9ivTD3teEO+2fXV6zrZKDqk5IuU2aJtBDo8U7omWU=
677-
github.com/swaggo/swag v1.8.7/go.mod h1:ezQVUUhly8dludpVk+/PuwJWvLLanB13ygV5Pr9enSk=
677+
github.com/swaggo/swag v1.8.10 h1:eExW4bFa52WOjqRzRD58bgWsWfdFJso50lpbeTcmTfo=
678+
github.com/swaggo/swag v1.8.10/go.mod h1:ezQVUUhly8dludpVk+/PuwJWvLLanB13ygV5Pr9enSk=
678679
github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww=
679680
github.com/syndtr/goleveldb v1.0.0 h1:fBdIW9lB4Iz0n9khmH8w27SJ3QEJ7+IgjPEwGSZiFdE=
680681
github.com/syndtr/goleveldb v1.0.0/go.mod h1:ZVVdQEZoIme9iO1Ch2Jdy24qqXrMMOU6lpPAyBWyWuQ=
@@ -850,8 +851,8 @@ golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qx
850851
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
851852
golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
852853
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
853-
golang.org/x/net v0.1.0 h1:hZ/3BUoy5aId7sCpA/Tc5lt8DkFgdVS2onTpJsZ/fl0=
854-
golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco=
854+
golang.org/x/net v0.2.0 h1:sZfSu1wtKLGlWI4ZZayP0ck9Y73K1ynO6gqzTdBVdPU=
855+
golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY=
855856
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
856857
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
857858
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
@@ -944,11 +945,12 @@ golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBc
944945
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
945946
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
946947
golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
947-
golang.org/x/sys v0.1.0 h1:kunALQeHf1/185U1i0GOB/fy1IPRDDpuoOOqRReG57U=
948-
golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
948+
golang.org/x/sys v0.2.0 h1:ljd4t30dBnAvMZaQCevtY0xLLD0A+bRZXbgLMLU1F/A=
949+
golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
949950
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
950951
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
951952
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
953+
golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc=
952954
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
953955
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
954956
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=

i18n/en_US.yaml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ backend:
3535
other: Email and password do not match.
3636
error:
3737
admin:
38+
cannot_update_their_password:
39+
other: You cannot modify your password.
40+
cannot_modify_self_status:
41+
other: You cannot modify your status.
3842
email_or_password_wrong:
3943
other: Email and password do not match.
4044
answer:
@@ -81,6 +85,8 @@ backend:
8185
new_password_same_as_previous_setting:
8286
other: The new password is the same as the previous one.
8387
question:
88+
already_deleted:
89+
other: This post has been deleted.
8490
not_found:
8591
other: Question not found.
8692
cannot_deleted:
@@ -819,6 +825,7 @@ ui:
819825
approve: Approve
820826
reject: Reject
821827
skip: Skip
828+
discard_draft: Discard draft
822829
search:
823830
title: Search Results
824831
keywords: Keywords
@@ -1015,9 +1022,11 @@ ui:
10151022
answers: answers
10161023
accepted: Accepted
10171024
page_404:
1025+
http_error: HTTP Error 404
10181026
desc: "Unfortunately, this page doesn't exist."
10191027
back_home: Back to homepage
10201028
page_50X:
1029+
http_error: HTTP Error 500
10211030
desc: The server encountered an error and could not complete your request.
10221031
back_home: Back to homepage
10231032
page_maintenance:
@@ -1407,6 +1416,10 @@ ui:
14071416
reputation: reputation
14081417
votes: votes
14091418
prompt:
1410-
leave_page: "Are you sure you want to leave the page?"
1411-
changes_not_save: "Your changes may not be saved."
1419+
leave_page: Are you sure you want to leave the page?
1420+
changes_not_save: Your changes may not be saved.
1421+
draft:
1422+
discard_confirm: Are you sure you want to discard your draft?
1423+
messages:
1424+
post_deleted: This post has been deleted.
14121425

i18n/i18n.yaml

Lines changed: 27 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,41 @@
11
# all support language
22
language_options:
3-
- label: "English(US)"
3+
- label: "English"
44
value: "en_US"
5-
- label: "Español(ES)"
5+
progress: 100
6+
- label: "Español"
67
value: "es_ES"
7-
- label: "Português(PT)"
8+
progress: 0
9+
- label: "Português(BR)"
10+
value: "pt_BR"
11+
progress: 0
12+
- label: "Português"
813
value: "pt_PT"
9-
- label: "Deutsch(DE)"
14+
progress: 0
15+
- label: "Deutsch"
1016
value: "de_DE"
11-
- label: "Français(FR)"
17+
progress: 4
18+
- label: "Français"
1219
value: "fr_FR"
13-
- label: "日本語(JA)"
20+
progress: 100
21+
- label: "日本語"
1422
value: "ja_JP"
15-
- label: "Italiano(IT)"
23+
progress: 0
24+
- label: "Italiano"
1625
value: "it_IT"
17-
- label: "Русский(RU)"
26+
progress: 16
27+
- label: "Русский"
1828
value: "ru_RU"
19-
- label: "简体中文(CN)"
29+
progress: 13
30+
- label: "简体中文"
2031
value: "zh_CN"
21-
- label: "繁體中文(CN)"
32+
progress: 100
33+
- label: "繁體中文"
2234
value: "zh_TW"
23-
- label: "한국어(KO)"
35+
progress: 100
36+
- label: "한국어"
2437
value: "ko_KR"
25-
- label: "Tiếng Việt(VI)"
38+
progress: 0
39+
- label: "Tiếng Việt"
2640
value: "vi_VN"
41+
progress: 0

0 commit comments

Comments
 (0)