From 711cbcce8d6a193f5738c45861d11cb86b412ec7 Mon Sep 17 00:00:00 2001 From: Gusted Date: Sun, 26 Jun 2022 00:50:12 +0200 Subject: [PATCH] Use neutral language in comments and docs (#20135) - Replace `his/her` to `their`, as it's more neutral language. --- docs/content/doc/developers/oauth2-provider.md | 4 ++-- docs/content/doc/developers/oauth2-provider.zh-tw.md | 2 +- models/migrations/v154.go | 2 +- models/org.go | 2 +- models/user/follow.go | 2 +- models/user/user.go | 4 ++-- routers/web/auth/password.go | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/content/doc/developers/oauth2-provider.md b/docs/content/doc/developers/oauth2-provider.md index efe78eed97..ce6e9aad8c 100644 --- a/docs/content/doc/developers/oauth2-provider.md +++ b/docs/content/doc/developers/oauth2-provider.md @@ -41,13 +41,13 @@ To use the Authorization Code Grant as a third party application it is required ## Scopes -Currently Gitea does not support scopes (see [#4300](https://github.com/go-gitea/gitea/issues/4300)) and all third party applications will be granted access to all resources of the user and his/her organizations. +Currently Gitea does not support scopes (see [#4300](https://github.com/go-gitea/gitea/issues/4300)) and all third party applications will be granted access to all resources of the user and their organizations. ## Example **Note:** This example does not use PKCE. -1. Redirect to user to the authorization endpoint in order to get his/her consent for accessing the resources: +1. Redirect to user to the authorization endpoint in order to get their consent for accessing the resources: ```curl https://[YOUR-GITEA-URL]/login/oauth/authorize?client_id=CLIENT_ID&redirect_uri=REDIRECT_URI& response_type=code&state=STATE diff --git a/docs/content/doc/developers/oauth2-provider.zh-tw.md b/docs/content/doc/developers/oauth2-provider.zh-tw.md index a2013feac4..179c6342cd 100644 --- a/docs/content/doc/developers/oauth2-provider.zh-tw.md +++ b/docs/content/doc/developers/oauth2-provider.zh-tw.md @@ -46,7 +46,7 @@ Gitea 支援作為 OAuth2 提供者,能讓第三方程式能在使用者同意 **備註:** 此範例未使用 PKCE。 1. 重新導向使用者到 authorization endpoint 以獲得他同意授權存取資源: - + ```curl https://[YOUR-GITEA-URL]/login/oauth/authorize?client_id=CLIENT_ID&redirect_uri=REDIRECT_URI& response_type=code&state=STATE diff --git a/models/migrations/v154.go b/models/migrations/v154.go index 11407c30ee..bb17fb4725 100644 --- a/models/migrations/v154.go +++ b/models/migrations/v154.go @@ -30,7 +30,7 @@ func addTimeStamps(x *xorm.Engine) error { return err } - // Follow represents relations of user and his/her followers. + // Follow represents relations of user and their followers. type Follow struct { CreatedUnix timeutil.TimeStamp `xorm:"INDEX created"` } diff --git a/models/org.go b/models/org.go index 849c9b985b..efcb7183e7 100644 --- a/models/org.go +++ b/models/org.go @@ -149,7 +149,7 @@ func removeOrgUser(ctx context.Context, orgID, userID int64) error { } } - // Delete member in his/her teams. + // Delete member in their teams. teams, err := organization.GetUserOrgTeams(ctx, org.ID, userID) if err != nil { return err diff --git a/models/user/follow.go b/models/user/follow.go index 6b02486c43..5f24f706d1 100644 --- a/models/user/follow.go +++ b/models/user/follow.go @@ -9,7 +9,7 @@ import ( "code.gitea.io/gitea/modules/timeutil" ) -// Follow represents relations of user and his/her followers. +// Follow represents relations of user and their followers. type Follow struct { ID int64 `xorm:"pk autoincr"` UserID int64 `xorm:"UNIQUE(follow)"` diff --git a/models/user/user.go b/models/user/user.go index f7d457b91b..9460bd38fe 100644 --- a/models/user/user.go +++ b/models/user/user.go @@ -86,7 +86,7 @@ type User struct { PasswdHashAlgo string `xorm:"NOT NULL DEFAULT 'argon2'"` // MustChangePassword is an attribute that determines if a user - // is to change his/her password after registration. + // is to change their password after registration. MustChangePassword bool `xorm:"NOT NULL DEFAULT false"` LoginType auth.Type @@ -537,7 +537,7 @@ func GetUserSalt() (string, error) { return hex.EncodeToString(rBytes), nil } -// NewGhostUser creates and returns a fake user for someone has deleted his/her account. +// NewGhostUser creates and returns a fake user for someone has deleted their account. func NewGhostUser() *User { return &User{ ID: -1, diff --git a/routers/web/auth/password.go b/routers/web/auth/password.go index 06ccd2e76f..c41c8bd1e5 100644 --- a/routers/web/auth/password.go +++ b/routers/web/auth/password.go @@ -274,7 +274,7 @@ func MustChangePassword(ctx *context.Context) { ctx.HTML(http.StatusOK, tplMustChangePassword) } -// MustChangePasswordPost response for updating a user's password after his/her +// MustChangePasswordPost response for updating a user's password after their // account was created by an admin func MustChangePasswordPost(ctx *context.Context) { form := web.GetForm(ctx).(*forms.MustChangePasswordForm)