Skip to content

Commit 3b90d2b

Browse files
committed
imrpove
1 parent 47376c8 commit 3b90d2b

File tree

4 files changed

+15
-15
lines changed

4 files changed

+15
-15
lines changed

models/issues/comment.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ type Role string
186186

187187
// RoleDescriptor defines comment tag type
188188
type RoleDescriptor struct {
189-
IsPoster util.OptionalBool
189+
IsPoster bool
190190
Role Role
191191
}
192192

@@ -210,12 +210,12 @@ func (r Role) String() string {
210210

211211
// LocaleString returns the locale string name of the Status
212212
func (r Role) LocaleString(lang translation.Locale) string {
213-
return lang.Tr("repo.issues." + r.String())
213+
return lang.Tr("repo.issues.role." + r.String())
214214
}
215215

216216
// LocaleHelper returns the locale string name of the Status
217217
func (r Role) LocaleHelper(lang translation.Locale) string {
218-
return lang.Tr("repo.issues." + r.String() + "_helper")
218+
return lang.Tr("repo.issues.role." + r.String() + "_helper")
219219
}
220220

221221
// Comment represents a comment in commit and issue page.

options/locale/locale_en-US.ini

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1482,16 +1482,16 @@ issues.ref_reopened_from = `<a href="%[3]s">reopened this issue %[4]s</a> <a id=
14821482
issues.ref_from = `from %[1]s`
14831483
issues.author = Author
14841484
issues.author_helper = This user is the author.
1485-
issues.owner = Owner
1486-
issues.owner_helper = This user is the owner of this repository.
1487-
issues.member = Member
1488-
issues.member_helper = This user is a member of the organization owning this repository.
1489-
issues.collaborator = Collaborator
1490-
issues.collaborator_helper = This user has been invited to collaborate on the repository.
1491-
issues.first_time_contributor = First-time contributor
1492-
issues.first_time_contributor_helper = This is the first contribution of this user to the repository.
1493-
issues.contributor = Contributor
1494-
issues.contributor_helper = This user has previously committed to the repository.
1485+
issues.role.owner = Owner
1486+
issues.role.owner_helper = This user is the owner of this repository.
1487+
issues.role.member = Member
1488+
issues.role.member_helper = This user is a member of the organization owning this repository.
1489+
issues.role.collaborator = Collaborator
1490+
issues.role.collaborator_helper = This user has been invited to collaborate on the repository.
1491+
issues.role.first_time_contributor = First-time contributor
1492+
issues.role.first_time_contributor_helper = This is the first contribution of this user to the repository.
1493+
issues.role.contributor = Contributor
1494+
issues.role.contributor_helper = This user has previously committed to the repository.
14951495
issues.re_request_review=Re-request review
14961496
issues.is_stale = There have been changes to this PR since this review
14971497
issues.remove_request_review=Remove review request

routers/web/repo/issue.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1243,7 +1243,7 @@ func roleDescriptor(ctx stdCtx.Context, repo *repo_model.Repository, poster *use
12431243

12441244
// If the poster is the actual poster of the issue, enable Poster role.
12451245
if issue.IsPoster(poster.ID) {
1246-
roleDescriptor.IsPoster = util.OptionalBoolTrue
1246+
roleDescriptor.IsPoster = true
12471247
}
12481248

12491249
// Check if the poster is owner of the repo.

templates/repo/issue/view_content/show_role.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{{if and .ShowRole.IsPoster.IsTrue (not .IgnorePoster)}}
1+
{{if and .ShowRole.IsPoster (not .IgnorePoster)}}
22
<div class="ui basic label role-label" data-tooltip-content="{{ctx.Locale.Tr "repo.issues.author_helper"}}">
33
{{ctx.Locale.Tr "repo.issues.author"}}
44
</div>

0 commit comments

Comments
 (0)