Skip to content

Commit 8c647bf

Browse files
luzpazlunny
andauthored
Fix various typos (#18219)
Found via `codespell -q 3 -S ./options/locale,./vendor -L ba,pullrequest,pullrequests,readby,te,unknwon` Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
1 parent 242dddf commit 8c647bf

File tree

31 files changed

+40
-40
lines changed

31 files changed

+40
-40
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ been added to each release, please refer to the [blog](https://blog.gitea.io).
108108
* Fix unwanted team review request deletion (#17257) (#17264)
109109
* Fix broken Activities link in team dashboard (#17255) (#17258)
110110
* API pull's head/base have correct permission(#17214) (#17245)
111-
* Fix stange behavior of DownloadPullDiffOrPatch in incorect index (#17223) (#17227)
111+
* Fix strange behavior of DownloadPullDiffOrPatch in incorrect index (#17223) (#17227)
112112
* Upgrade xorm to v1.2.5 (#17177) (#17188)
113113
* Fix missing repo link in issue/pull assigned emails (#17183) (#17184)
114114
* Fix bug of get context user (#17169) (#17172)

docs/content/doc/developers/guidelines-frontend.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ el.addEventListener('click', (e) => {
8383

8484
el.addEventListener('async', async (e) => { // not recommended but acceptable
8585
e.preventDefault(); // acceptable
86-
await asyncFoo(); // skip out event dispath
86+
await asyncFoo(); // skip out event dispatch
8787
e.preventDefault(); // WRONG
8888
});
8989
```
@@ -106,7 +106,7 @@ $('#el').on('click', (e) => {
106106
$('#el').on('click', async (e) => { // not recommended but acceptable
107107
e.preventDefault(); // acceptable
108108
return false; // WRONG, jQuery expects the returned value is a boolean, not a Promise
109-
await asyncFoo(); // skip out event dispath
109+
await asyncFoo(); // skip out event dispatch
110110
return false; // WRONG
111111
});
112112
```

models/asymkey/ssh_key_parse.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ import (
3434
// |____|__ \___ > ____| |____| (____ /__| /____ >\___ >__|
3535
// \/ \/\/ \/ \/ \/
3636
//
37-
// This file contains functiosn for parsing ssh-keys
37+
// This file contains functions for parsing ssh-keys
3838
//
3939
// TODO: Consider if these functions belong in models - no other models function call them or are called by them
4040
// They may belong in a service or a module

models/notification.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ func CreateRepoTransferNotification(doer, newOwner *user_model.User, repo *repo_
183183

184184
// CreateOrUpdateIssueNotifications creates an issue notification
185185
// for each watcher, or updates it if already exists
186-
// receiverID > 0 just send to reciver, else send to all watcher
186+
// receiverID > 0 just send to receiver, else send to all watcher
187187
func CreateOrUpdateIssueNotifications(issueID, commentID, notificationAuthorID, receiverID int64) error {
188188
ctx, committer, err := db.TxContext()
189189
if err != nil {

models/repo.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,7 @@ func CreateRepository(ctx context.Context, doer, u *user_model.User, repo *repo_
534534
if isAdmin, err := isUserRepoAdmin(db.GetEngine(ctx), repo, doer); err != nil {
535535
return fmt.Errorf("isUserRepoAdmin: %v", err)
536536
} else if !isAdmin {
537-
// Make creator repo admin if it wan't assigned automatically
537+
// Make creator repo admin if it wasn't assigned automatically
538538
if err = addCollaborator(ctx, repo, doer); err != nil {
539539
return fmt.Errorf("AddCollaborator: %v", err)
540540
}

models/review.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,7 @@ func getReviewByIssueIDAndUserID(e db.Engine, issueID, userID int64) (*Review, e
535535
return review, nil
536536
}
537537

538-
// GetTeamReviewerByIssueIDAndTeamID get the latest review requst of reviewer team for a pull request
538+
// GetTeamReviewerByIssueIDAndTeamID get the latest review request of reviewer team for a pull request
539539
func GetTeamReviewerByIssueIDAndTeamID(issueID, teamID int64) (review *Review, err error) {
540540
return getTeamReviewerByIssueIDAndTeamID(db.GetEngine(db.DefaultContext), issueID, teamID)
541541
}

modules/avatar/identicon/identicon.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ Origin: An image is splitted into 9 areas
8484
8585
Area 1/3/9/7 use a 90-degree rotating pattern.
8686
Area 1/3/9/7 use another 90-degree rotating pattern.
87-
Area 5 uses a random patter.
87+
Area 5 uses a random pattern.
8888
8989
The Patched Fix: make the image left-right mirrored to get rid of something like "swastika"
9090
*/

modules/csv/csv_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ c;d;#`,
223223
// case 13 - tab delimited with commas in values
224224
{
225225
csv: `name email note
226-
John Doe john@doe.com This,note,had,a,lot,of,commas,to,test,delimters`,
226+
John Doe john@doe.com This,note,had,a,lot,of,commas,to,test,delimiters`,
227227
filename: "",
228228
expectedDelimiter: '\t',
229229
},
@@ -240,7 +240,7 @@ func TestRemoveQuotedString(t *testing.T) {
240240
text string
241241
expectedText string
242242
}{
243-
// case 0 - quoted text with escpaed quotes in 1st column
243+
// case 0 - quoted text with escaped quotes in 1st column
244244
{
245245
text: `col1,col2,col3
246246
"quoted ""text"" with
@@ -249,7 +249,7 @@ in first column",b,c`,
249249
expectedText: `col1,col2,col3
250250
,b,c`,
251251
},
252-
// case 1 - quoted text with escpaed quotes in 2nd column
252+
// case 1 - quoted text with escaped quotes in 2nd column
253253
{
254254
text: `col1,col2,col3
255255
a,"quoted ""text"" with
@@ -258,7 +258,7 @@ in second column",c`,
258258
expectedText: `col1,col2,col3
259259
a,,c`,
260260
},
261-
// case 2 - quoted text with escpaed quotes in last column
261+
// case 2 - quoted text with escaped quotes in last column
262262
{
263263
text: `col1,col2,col3
264264
a,b,"quoted ""text"" with
@@ -351,7 +351,7 @@ c;d`,
351351
// case 8 - tab delimited with commas in value
352352
{
353353
csv: `name email note
354-
John Doe john@doe.com This,note,had,a,lot,of,commas,to,test,delimters`,
354+
John Doe john@doe.com This,note,had,a,lot,of,commas,to,test,delimiters`,
355355
expectedDelimiter: '\t',
356356
},
357357
// case 9 - tab delimited with new lines in values, commas in values
@@ -431,7 +431,7 @@ skxg,t,vay,d,wug,d,xg,sexc rt g,ag,mjq,fjnyji,iwa,m,ml,b,ua,b,qjxeoc be,s,sh,n,j
431431
csv: "col1@col2@col3\na@b@" + strings.Repeat("c", 6000) + "\nd,e," + strings.Repeat("f", 4000),
432432
expectedDelimiter: '@',
433433
},
434-
// case 16 - has all delimters so should return comma
434+
// case 16 - has all delimiters so should return comma
435435
{
436436
csv: `col1,col2;col3@col4|col5 col6
437437
a b|c@d;e,f`,

modules/doctor/fix16961.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ func fixBrokenRepoUnits16961(logger log.Logger, autofix bool) error {
297297
)
298298

299299
if err != nil {
300-
logger.Critical("Unable to iterate acrosss repounits to fix the broken units: Error %v", err)
300+
logger.Critical("Unable to iterate across repounits to fix the broken units: Error %v", err)
301301
return err
302302
}
303303

modules/git/repo_branch.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const BranchPrefix = "refs/heads/"
1616

1717
// AGit Flow
1818

19-
// PullRequestPrefix sepcial ref to create a pull request: refs/for/<targe-branch>/<topic-branch>
19+
// PullRequestPrefix special ref to create a pull request: refs/for/<targe-branch>/<topic-branch>
2020
// or refs/for/<targe-branch> -o topic='<topic-branch>'
2121
const PullRequestPrefix = "refs/for/"
2222

modules/migration/null_downloader.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ func (n NullDownloader) GetReviews(pullRequestContext IssueContext) ([]*Review,
6565
return nil, &ErrNotSupported{Entity: "Reviews"}
6666
}
6767

68-
// FormatCloneURL add authentification into remote URLs
68+
// FormatCloneURL add authentication into remote URLs
6969
func (n NullDownloader) FormatCloneURL(opts MigrateOptions, remoteAddr string) (string, error) {
7070
if len(opts.AuthToken) > 0 || len(opts.AuthUsername) > 0 {
7171
u, err := url.Parse(remoteAddr)

modules/process/manager.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ func (pm *Manager) AddContext(parent context.Context, description string) (ctx c
7979
}
8080

8181
// AddContextTimeout creates a new context and add it as a process. Once the process is finished, finished must be called
82-
// to remove the process from the process table. It should not be called until the process is finsihed but must always be called.
82+
// to remove the process from the process table. It should not be called until the process is finished but must always be called.
8383
//
8484
// cancel should be used to cancel the returned context, however it will not remove the process from the process table.
8585
// finished will cancel the returned context and remove it from the process table.

modules/public/static.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import (
2121
"code.gitea.io/gitea/modules/timeutil"
2222
)
2323

24-
// GlobalModTime provide a gloabl mod time for embedded asset files
24+
// GlobalModTime provide a global mod time for embedded asset files
2525
func GlobalModTime(filename string) time.Time {
2626
return timeutil.GetExecutableModTime()
2727
}

modules/structs/org.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ type Organization struct {
1717
RepoAdminChangeTeamAccess bool `json:"repo_admin_change_team_access"`
1818
}
1919

20-
// OrganizationPermissions list differents users permissions on an organization
20+
// OrganizationPermissions list different users permissions on an organization
2121
type OrganizationPermissions struct {
2222
IsOwner bool `json:"is_owner"`
2323
IsAdmin bool `json:"is_admin"`

modules/structs/repo.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ type CreateRepoOption struct {
110110
Private bool `json:"private"`
111111
// Label-Set to use
112112
IssueLabels string `json:"issue_labels"`
113-
// Whether the repository should be auto-intialized?
113+
// Whether the repository should be auto-initialized?
114114
AutoInit bool `json:"auto_init"`
115115
// Whether the repository is template
116116
Template bool `json:"template"`

modules/templates/static.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ var (
2828
bodyTemplates = template.New("")
2929
)
3030

31-
// GlobalModTime provide a gloabl mod time for embedded asset files
31+
// GlobalModTime provide a global mod time for embedded asset files
3232
func GlobalModTime(filename string) time.Time {
3333
return timeutil.GetExecutableModTime()
3434
}

modules/updatechecker/update_checker.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ func UpdateRemoteVersion(version string) (err error) {
6868
return appstate.AppState.Set(&CheckerState{LatestVersion: version})
6969
}
7070

71-
// GetRemoteVersion returns the current remote version (or currently installed verson if fail to fetch from DB)
71+
// GetRemoteVersion returns the current remote version (or currently installed version if fail to fetch from DB)
7272
func GetRemoteVersion() string {
7373
item := new(CheckerState)
7474
if err := appstate.AppState.Get(item); err != nil {

options/license/Noweb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ Noweb is available free for any use in any field of endeavor. You may redistribu
66

77
You may sell noweb if you wish. For example, you may sell a CD-ROM including noweb.
88

9-
You may sell a derived work, provided that all source code for your derived work is available, at no additional charge, to anyone who buys your derived work in any form. You must give permisson for said source code to be used and modified under the terms of this license. You must state clearly that your work uses or is based on noweb and that noweb is available free of change. You must also request that bug reports on your work be reported to you.
9+
You may sell a derived work, provided that all source code for your derived work is available, at no additional charge, to anyone who buys your derived work in any form. You must give permission for said source code to be used and modified under the terms of this license. You must state clearly that your work uses or is based on noweb and that noweb is available free of change. You must also request that bug reports on your work be reported to you.

routers/api/v1/repo/file.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ func createOrUpdateFile(ctx *context.APIContext, opts *files_service.UpdateRepoF
405405
return files_service.CreateOrUpdateRepoFile(ctx.Repo.Repository, ctx.User, opts)
406406
}
407407

408-
// DeleteFile Delete a fle in a repository
408+
// DeleteFile Delete a file in a repository
409409
func DeleteFile(ctx *context.APIContext) {
410410
// swagger:operation DELETE /repos/{owner}/{repo}/contents/{filepath} repository repoDeleteFile
411411
// ---

routers/private/hook_pre_receive.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ func preReceivePullRequest(ctx *preReceiveContext, oldCommitID, newCommitID, ref
404404

405405
if ctx.opts.IsWiki {
406406
ctx.JSON(http.StatusForbidden, map[string]interface{}{
407-
"err": "Pull requests are not suppported on the wiki.",
407+
"err": "Pull requests are not supported on the wiki.",
408408
})
409409
return
410410
}

routers/web/repo/issue.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1024,7 +1024,7 @@ func NewIssuePost(ctx *context.Context) {
10241024
}
10251025
}
10261026

1027-
// roleDescriptor returns the Role Decriptor for a comment in/with the given repo, poster and issue
1027+
// roleDescriptor returns the Role Descriptor for a comment in/with the given repo, poster and issue
10281028
func roleDescriptor(repo *repo_model.Repository, poster *user_model.User, issue *models.Issue) (models.RoleDescriptor, error) {
10291029
perm, err := models.GetUserRepoPermission(repo, poster)
10301030
if err != nil {

services/agit/agit.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ func ProcRecive(ctx *context.PrivateContext, opts *private.HookOptions) []privat
268268
return results
269269
}
270270

271-
// UserNameChanged hanle user name change for agit flow pull
271+
// UserNameChanged handle user name change for agit flow pull
272272
func UserNameChanged(user *user_model.User, newName string) error {
273273
pulls, err := models.GetAllUnmergedAgitPullRequestByPoster(user.ID)
274274
if err != nil {

services/gitdiff/gitdiff.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -880,7 +880,7 @@ parsingLoop:
880880
// Handle ambiguous filenames
881881
if curFile.IsAmbiguous {
882882
// The shortest string that can end up here is:
883-
// "--- a\t\n" without the qoutes.
883+
// "--- a\t\n" without the quotes.
884884
// This line has a len() of 7 but doesn't contain a oldName.
885885
// So the amount that the line need is at least 8 or more.
886886
// The code will otherwise panic for a out-of-bounds.

services/migrations/codebase.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ type codebaseUser struct {
6464
Email string `json:"email"`
6565
}
6666

67-
// CodebaseDownloader implements a Downloader interface to get repository informations
67+
// CodebaseDownloader implements a Downloader interface to get repository information
6868
// from Codebase
6969
type CodebaseDownloader struct {
7070
base.NullDownloader
@@ -111,7 +111,7 @@ func NewCodebaseDownloader(ctx context.Context, projectURL *url.URL, project, re
111111
return downloader
112112
}
113113

114-
// FormatCloneURL add authentification into remote URLs
114+
// FormatCloneURL add authentication into remote URLs
115115
func (d *CodebaseDownloader) FormatCloneURL(opts base.MigrateOptions, remoteAddr string) (string, error) {
116116
return opts.CloneAddr, nil
117117
}

services/migrations/gogs.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ func (g *GogsDownloader) GetTopics() ([]string, error) {
254254
return []string{}, nil
255255
}
256256

257-
// FormatCloneURL add authentification into remote URLs
257+
// FormatCloneURL add authentication into remote URLs
258258
func (g *GogsDownloader) FormatCloneURL(opts MigrateOptions, remoteAddr string) (string, error) {
259259
if len(opts.AuthToken) > 0 || len(opts.AuthUsername) > 0 {
260260
u, err := url.Parse(remoteAddr)

services/migrations/onedev.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ type onedevUser struct {
6969
Email string `json:"email"`
7070
}
7171

72-
// OneDevDownloader implements a Downloader interface to get repository informations
72+
// OneDevDownloader implements a Downloader interface to get repository information
7373
// from OneDev
7474
type OneDevDownloader struct {
7575
base.NullDownloader

services/pull/merge.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ func rawMerge(pr *models.PullRequest, doer *user_model.User, mergeStyle repo_mod
437437

438438
var pushCmd *git.Command
439439
if mergeStyle == repo_model.MergeStyleRebaseUpdate {
440-
// force push the rebase result to head brach
440+
// force push the rebase result to head branch
441441
pushCmd = git.NewCommand("push", "-f", "head_repo", stagingBranch+":"+git.BranchPrefix+pr.HeadBranch)
442442
} else {
443443
pushCmd = git.NewCommand("push", "origin", baseBranch+":"+git.BranchPrefix+pr.BaseBranch)

services/repository/archiver/archiver.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ func Init() error {
252252
}
253253
log.Trace("ArchiverData Process: %#v", archiveReq)
254254
if _, err := doArchive(archiveReq); err != nil {
255-
log.Error("Archive %v faild: %v", datum, err)
255+
log.Error("Archive %v failed: %v", datum, err)
256256
}
257257
}
258258
}

services/wiki/wiki_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ func TestRepository_EditWikiPage(t *testing.T) {
190190
wikiPath := NameToFilename(newWikiName)
191191
entry, err := masterTree.GetTreeEntryByPath(wikiPath)
192192
assert.NoError(t, err)
193-
assert.Equal(t, wikiPath, entry.Name(), "%s not editted correctly", newWikiName)
193+
assert.Equal(t, wikiPath, entry.Name(), "%s not edited correctly", newWikiName)
194194

195195
if newWikiName != "Home" {
196196
_, err := masterTree.GetTreeEntryByPath("Home.md")
@@ -243,7 +243,7 @@ func TestPrepareWikiFileName(t *testing.T) {
243243
wikiPath: "home-of-and-%26-or-wiki-page%21.md",
244244
wantErr: false,
245245
}, {
246-
name: "fount unescaped cases",
246+
name: "found unescaped cases",
247247
arg: "Unescaped File",
248248
existence: true,
249249
wikiPath: "Unescaped File.md",

templates/base/head.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
]).values()),
4747
{{end}}
4848
mermaidMaxSourceCharacters: {{MermaidMaxSourceCharacters}},
49-
{{/* this global i18n object should only contain gereral texts. for specalized texts, it should be provied inside the related modules by: (1) API response (2) HTML data-attribute (3) PageData */}}
49+
{{/* this global i18n object should only contain general texts. for specialized texts, it should be provided inside the related modules by: (1) API response (2) HTML data-attribute (3) PageData */}}
5050
i18n: {
5151
copy_success: '{{.i18n.Tr "copy_success"}}',
5252
copy_error: '{{.i18n.Tr "copy_error"}}',

templates/swagger/v1_json.tmpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13893,7 +13893,7 @@
1389313893
],
1389413894
"properties": {
1389513895
"auto_init": {
13896-
"description": "Whether the repository should be auto-intialized?",
13896+
"description": "Whether the repository should be auto-initialized?",
1389713897
"type": "boolean",
1389813898
"x-go-name": "AutoInit"
1389913899
},
@@ -16400,7 +16400,7 @@
1640016400
"x-go-package": "code.gitea.io/gitea/modules/structs"
1640116401
},
1640216402
"OrganizationPermissions": {
16403-
"description": "OrganizationPermissions list differents users permissions on an organization",
16403+
"description": "OrganizationPermissions list different users permissions on an organization",
1640416404
"type": "object",
1640516405
"properties": {
1640616406
"can_create_repository": {

0 commit comments

Comments
 (0)