diff options
author | luzpaz <luzpaz@users.noreply.github.com> | 2022-01-10 04:32:37 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-10 17:32:37 +0800 |
commit | 8c647bf0f6b19fe666c645ec16010d07bfe85a63 (patch) | |
tree | eaa322e1244591b00a36b7d79ce416bd1bd932af | |
parent | 242dddfcb7cfab1d21c1658828d94f603809a5c7 (diff) | |
download | gitea-8c647bf0f6b19fe666c645ec16010d07bfe85a63.tar.gz gitea-8c647bf0f6b19fe666c645ec16010d07bfe85a63.zip |
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>
31 files changed, 40 insertions, 40 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index cd60f5c395..f13220ce77 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -108,7 +108,7 @@ been added to each release, please refer to the [blog](https://blog.gitea.io). * Fix unwanted team review request deletion (#17257) (#17264) * Fix broken Activities link in team dashboard (#17255) (#17258) * API pull's head/base have correct permission(#17214) (#17245) - * Fix stange behavior of DownloadPullDiffOrPatch in incorect index (#17223) (#17227) + * Fix strange behavior of DownloadPullDiffOrPatch in incorrect index (#17223) (#17227) * Upgrade xorm to v1.2.5 (#17177) (#17188) * Fix missing repo link in issue/pull assigned emails (#17183) (#17184) * Fix bug of get context user (#17169) (#17172) diff --git a/docs/content/doc/developers/guidelines-frontend.md b/docs/content/doc/developers/guidelines-frontend.md index 8bd0ee0482..9fec5bd17e 100644 --- a/docs/content/doc/developers/guidelines-frontend.md +++ b/docs/content/doc/developers/guidelines-frontend.md @@ -83,7 +83,7 @@ el.addEventListener('click', (e) => { el.addEventListener('async', async (e) => { // not recommended but acceptable e.preventDefault(); // acceptable - await asyncFoo(); // skip out event dispath + await asyncFoo(); // skip out event dispatch e.preventDefault(); // WRONG }); ``` @@ -106,7 +106,7 @@ $('#el').on('click', (e) => { $('#el').on('click', async (e) => { // not recommended but acceptable e.preventDefault(); // acceptable return false; // WRONG, jQuery expects the returned value is a boolean, not a Promise - await asyncFoo(); // skip out event dispath + await asyncFoo(); // skip out event dispatch return false; // WRONG }); ``` diff --git a/models/asymkey/ssh_key_parse.go b/models/asymkey/ssh_key_parse.go index 734bd4ccab..3f52a4e9e0 100644 --- a/models/asymkey/ssh_key_parse.go +++ b/models/asymkey/ssh_key_parse.go @@ -34,7 +34,7 @@ import ( // |____|__ \___ > ____| |____| (____ /__| /____ >\___ >__| // \/ \/\/ \/ \/ \/ // -// This file contains functiosn for parsing ssh-keys +// This file contains functions for parsing ssh-keys // // TODO: Consider if these functions belong in models - no other models function call them or are called by them // They may belong in a service or a module diff --git a/models/notification.go b/models/notification.go index 0be0144924..8f5d9d01e6 100644 --- a/models/notification.go +++ b/models/notification.go @@ -183,7 +183,7 @@ func CreateRepoTransferNotification(doer, newOwner *user_model.User, repo *repo_ // CreateOrUpdateIssueNotifications creates an issue notification // for each watcher, or updates it if already exists -// receiverID > 0 just send to reciver, else send to all watcher +// receiverID > 0 just send to receiver, else send to all watcher func CreateOrUpdateIssueNotifications(issueID, commentID, notificationAuthorID, receiverID int64) error { ctx, committer, err := db.TxContext() if err != nil { diff --git a/models/repo.go b/models/repo.go index 1fc8bd207b..fcb2cae3f9 100644 --- a/models/repo.go +++ b/models/repo.go @@ -534,7 +534,7 @@ func CreateRepository(ctx context.Context, doer, u *user_model.User, repo *repo_ if isAdmin, err := isUserRepoAdmin(db.GetEngine(ctx), repo, doer); err != nil { return fmt.Errorf("isUserRepoAdmin: %v", err) } else if !isAdmin { - // Make creator repo admin if it wan't assigned automatically + // Make creator repo admin if it wasn't assigned automatically if err = addCollaborator(ctx, repo, doer); err != nil { return fmt.Errorf("AddCollaborator: %v", err) } diff --git a/models/review.go b/models/review.go index 023f98c3ea..88d0819089 100644 --- a/models/review.go +++ b/models/review.go @@ -535,7 +535,7 @@ func getReviewByIssueIDAndUserID(e db.Engine, issueID, userID int64) (*Review, e return review, nil } -// GetTeamReviewerByIssueIDAndTeamID get the latest review requst of reviewer team for a pull request +// GetTeamReviewerByIssueIDAndTeamID get the latest review request of reviewer team for a pull request func GetTeamReviewerByIssueIDAndTeamID(issueID, teamID int64) (review *Review, err error) { return getTeamReviewerByIssueIDAndTeamID(db.GetEngine(db.DefaultContext), issueID, teamID) } diff --git a/modules/avatar/identicon/identicon.go b/modules/avatar/identicon/identicon.go index 8589c59289..cc7e2a791d 100644 --- a/modules/avatar/identicon/identicon.go +++ b/modules/avatar/identicon/identicon.go @@ -84,7 +84,7 @@ Origin: An image is splitted into 9 areas Area 1/3/9/7 use a 90-degree rotating pattern. Area 1/3/9/7 use another 90-degree rotating pattern. -Area 5 uses a random patter. +Area 5 uses a random pattern. The Patched Fix: make the image left-right mirrored to get rid of something like "swastika" */ diff --git a/modules/csv/csv_test.go b/modules/csv/csv_test.go index 1612a66953..41c4ddaee2 100644 --- a/modules/csv/csv_test.go +++ b/modules/csv/csv_test.go @@ -223,7 +223,7 @@ c;d;#`, // case 13 - tab delimited with commas in values { csv: `name email note -John Doe john@doe.com This,note,had,a,lot,of,commas,to,test,delimters`, +John Doe john@doe.com This,note,had,a,lot,of,commas,to,test,delimiters`, filename: "", expectedDelimiter: '\t', }, @@ -240,7 +240,7 @@ func TestRemoveQuotedString(t *testing.T) { text string expectedText string }{ - // case 0 - quoted text with escpaed quotes in 1st column + // case 0 - quoted text with escaped quotes in 1st column { text: `col1,col2,col3 "quoted ""text"" with @@ -249,7 +249,7 @@ in first column",b,c`, expectedText: `col1,col2,col3 ,b,c`, }, - // case 1 - quoted text with escpaed quotes in 2nd column + // case 1 - quoted text with escaped quotes in 2nd column { text: `col1,col2,col3 a,"quoted ""text"" with @@ -258,7 +258,7 @@ in second column",c`, expectedText: `col1,col2,col3 a,,c`, }, - // case 2 - quoted text with escpaed quotes in last column + // case 2 - quoted text with escaped quotes in last column { text: `col1,col2,col3 a,b,"quoted ""text"" with @@ -351,7 +351,7 @@ c;d`, // case 8 - tab delimited with commas in value { csv: `name email note -John Doe john@doe.com This,note,had,a,lot,of,commas,to,test,delimters`, +John Doe john@doe.com This,note,had,a,lot,of,commas,to,test,delimiters`, expectedDelimiter: '\t', }, // 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 csv: "col1@col2@col3\na@b@" + strings.Repeat("c", 6000) + "\nd,e," + strings.Repeat("f", 4000), expectedDelimiter: '@', }, - // case 16 - has all delimters so should return comma + // case 16 - has all delimiters so should return comma { csv: `col1,col2;col3@col4|col5 col6 a b|c@d;e,f`, diff --git a/modules/doctor/fix16961.go b/modules/doctor/fix16961.go index 4797c97ef3..56d02ae92e 100644 --- a/modules/doctor/fix16961.go +++ b/modules/doctor/fix16961.go @@ -297,7 +297,7 @@ func fixBrokenRepoUnits16961(logger log.Logger, autofix bool) error { ) if err != nil { - logger.Critical("Unable to iterate acrosss repounits to fix the broken units: Error %v", err) + logger.Critical("Unable to iterate across repounits to fix the broken units: Error %v", err) return err } diff --git a/modules/git/repo_branch.go b/modules/git/repo_branch.go index 01933d7ade..71a81935d6 100644 --- a/modules/git/repo_branch.go +++ b/modules/git/repo_branch.go @@ -16,7 +16,7 @@ const BranchPrefix = "refs/heads/" // AGit Flow -// PullRequestPrefix sepcial ref to create a pull request: refs/for/<targe-branch>/<topic-branch> +// PullRequestPrefix special ref to create a pull request: refs/for/<targe-branch>/<topic-branch> // or refs/for/<targe-branch> -o topic='<topic-branch>' const PullRequestPrefix = "refs/for/" diff --git a/modules/migration/null_downloader.go b/modules/migration/null_downloader.go index 05daf72108..69d5ac7b56 100644 --- a/modules/migration/null_downloader.go +++ b/modules/migration/null_downloader.go @@ -65,7 +65,7 @@ func (n NullDownloader) GetReviews(pullRequestContext IssueContext) ([]*Review, return nil, &ErrNotSupported{Entity: "Reviews"} } -// FormatCloneURL add authentification into remote URLs +// FormatCloneURL add authentication into remote URLs func (n NullDownloader) FormatCloneURL(opts MigrateOptions, remoteAddr string) (string, error) { if len(opts.AuthToken) > 0 || len(opts.AuthUsername) > 0 { u, err := url.Parse(remoteAddr) diff --git a/modules/process/manager.go b/modules/process/manager.go index 10a89d04dd..7cde9f9451 100644 --- a/modules/process/manager.go +++ b/modules/process/manager.go @@ -79,7 +79,7 @@ func (pm *Manager) AddContext(parent context.Context, description string) (ctx c } // AddContextTimeout creates a new context and add it as a process. Once the process is finished, finished must be called -// to remove the process from the process table. It should not be called until the process is finsihed but must always be called. +// to remove the process from the process table. It should not be called until the process is finished but must always be called. // // cancel should be used to cancel the returned context, however it will not remove the process from the process table. // finished will cancel the returned context and remove it from the process table. diff --git a/modules/public/static.go b/modules/public/static.go index 2e35329a07..a81efacfa4 100644 --- a/modules/public/static.go +++ b/modules/public/static.go @@ -21,7 +21,7 @@ import ( "code.gitea.io/gitea/modules/timeutil" ) -// GlobalModTime provide a gloabl mod time for embedded asset files +// GlobalModTime provide a global mod time for embedded asset files func GlobalModTime(filename string) time.Time { return timeutil.GetExecutableModTime() } diff --git a/modules/structs/org.go b/modules/structs/org.go index 4ae0ca8b6f..d8bd59e1ec 100644 --- a/modules/structs/org.go +++ b/modules/structs/org.go @@ -17,7 +17,7 @@ type Organization struct { RepoAdminChangeTeamAccess bool `json:"repo_admin_change_team_access"` } -// OrganizationPermissions list differents users permissions on an organization +// OrganizationPermissions list different users permissions on an organization type OrganizationPermissions struct { IsOwner bool `json:"is_owner"` IsAdmin bool `json:"is_admin"` diff --git a/modules/structs/repo.go b/modules/structs/repo.go index 38d80db704..852af1f891 100644 --- a/modules/structs/repo.go +++ b/modules/structs/repo.go @@ -110,7 +110,7 @@ type CreateRepoOption struct { Private bool `json:"private"` // Label-Set to use IssueLabels string `json:"issue_labels"` - // Whether the repository should be auto-intialized? + // Whether the repository should be auto-initialized? AutoInit bool `json:"auto_init"` // Whether the repository is template Template bool `json:"template"` diff --git a/modules/templates/static.go b/modules/templates/static.go index c2295b2bd8..5b06aaad8f 100644 --- a/modules/templates/static.go +++ b/modules/templates/static.go @@ -28,7 +28,7 @@ var ( bodyTemplates = template.New("") ) -// GlobalModTime provide a gloabl mod time for embedded asset files +// GlobalModTime provide a global mod time for embedded asset files func GlobalModTime(filename string) time.Time { return timeutil.GetExecutableModTime() } diff --git a/modules/updatechecker/update_checker.go b/modules/updatechecker/update_checker.go index 149a8462f6..b144166ee9 100644 --- a/modules/updatechecker/update_checker.go +++ b/modules/updatechecker/update_checker.go @@ -68,7 +68,7 @@ func UpdateRemoteVersion(version string) (err error) { return appstate.AppState.Set(&CheckerState{LatestVersion: version}) } -// GetRemoteVersion returns the current remote version (or currently installed verson if fail to fetch from DB) +// GetRemoteVersion returns the current remote version (or currently installed version if fail to fetch from DB) func GetRemoteVersion() string { item := new(CheckerState) if err := appstate.AppState.Get(item); err != nil { diff --git a/options/license/Noweb b/options/license/Noweb index 8271989fb9..ec76f819d8 100644 --- a/options/license/Noweb +++ b/options/license/Noweb @@ -6,4 +6,4 @@ Noweb is available free for any use in any field of endeavor. You may redistribu You may sell noweb if you wish. For example, you may sell a CD-ROM including noweb. -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. +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. diff --git a/routers/api/v1/repo/file.go b/routers/api/v1/repo/file.go index 98decfcb6f..f02c7ea345 100644 --- a/routers/api/v1/repo/file.go +++ b/routers/api/v1/repo/file.go @@ -405,7 +405,7 @@ func createOrUpdateFile(ctx *context.APIContext, opts *files_service.UpdateRepoF return files_service.CreateOrUpdateRepoFile(ctx.Repo.Repository, ctx.User, opts) } -// DeleteFile Delete a fle in a repository +// DeleteFile Delete a file in a repository func DeleteFile(ctx *context.APIContext) { // swagger:operation DELETE /repos/{owner}/{repo}/contents/{filepath} repository repoDeleteFile // --- diff --git a/routers/private/hook_pre_receive.go b/routers/private/hook_pre_receive.go index 7ad719155c..b8f61cbb11 100644 --- a/routers/private/hook_pre_receive.go +++ b/routers/private/hook_pre_receive.go @@ -404,7 +404,7 @@ func preReceivePullRequest(ctx *preReceiveContext, oldCommitID, newCommitID, ref if ctx.opts.IsWiki { ctx.JSON(http.StatusForbidden, map[string]interface{}{ - "err": "Pull requests are not suppported on the wiki.", + "err": "Pull requests are not supported on the wiki.", }) return } diff --git a/routers/web/repo/issue.go b/routers/web/repo/issue.go index a28b37c580..ee94e0e6d8 100644 --- a/routers/web/repo/issue.go +++ b/routers/web/repo/issue.go @@ -1024,7 +1024,7 @@ func NewIssuePost(ctx *context.Context) { } } -// roleDescriptor returns the Role Decriptor for a comment in/with the given repo, poster and issue +// roleDescriptor returns the Role Descriptor for a comment in/with the given repo, poster and issue func roleDescriptor(repo *repo_model.Repository, poster *user_model.User, issue *models.Issue) (models.RoleDescriptor, error) { perm, err := models.GetUserRepoPermission(repo, poster) if err != nil { diff --git a/services/agit/agit.go b/services/agit/agit.go index beb21940b0..34f097b42d 100644 --- a/services/agit/agit.go +++ b/services/agit/agit.go @@ -268,7 +268,7 @@ func ProcRecive(ctx *context.PrivateContext, opts *private.HookOptions) []privat return results } -// UserNameChanged hanle user name change for agit flow pull +// UserNameChanged handle user name change for agit flow pull func UserNameChanged(user *user_model.User, newName string) error { pulls, err := models.GetAllUnmergedAgitPullRequestByPoster(user.ID) if err != nil { diff --git a/services/gitdiff/gitdiff.go b/services/gitdiff/gitdiff.go index 292c270b7e..fb3e32935d 100644 --- a/services/gitdiff/gitdiff.go +++ b/services/gitdiff/gitdiff.go @@ -880,7 +880,7 @@ parsingLoop: // Handle ambiguous filenames if curFile.IsAmbiguous { // The shortest string that can end up here is: - // "--- a\t\n" without the qoutes. + // "--- a\t\n" without the quotes. // This line has a len() of 7 but doesn't contain a oldName. // So the amount that the line need is at least 8 or more. // The code will otherwise panic for a out-of-bounds. diff --git a/services/migrations/codebase.go b/services/migrations/codebase.go index 8999ee363e..395bc6152e 100644 --- a/services/migrations/codebase.go +++ b/services/migrations/codebase.go @@ -64,7 +64,7 @@ type codebaseUser struct { Email string `json:"email"` } -// CodebaseDownloader implements a Downloader interface to get repository informations +// CodebaseDownloader implements a Downloader interface to get repository information // from Codebase type CodebaseDownloader struct { base.NullDownloader @@ -111,7 +111,7 @@ func NewCodebaseDownloader(ctx context.Context, projectURL *url.URL, project, re return downloader } -// FormatCloneURL add authentification into remote URLs +// FormatCloneURL add authentication into remote URLs func (d *CodebaseDownloader) FormatCloneURL(opts base.MigrateOptions, remoteAddr string) (string, error) { return opts.CloneAddr, nil } diff --git a/services/migrations/gogs.go b/services/migrations/gogs.go index 5a477c542d..e103ef996e 100644 --- a/services/migrations/gogs.go +++ b/services/migrations/gogs.go @@ -254,7 +254,7 @@ func (g *GogsDownloader) GetTopics() ([]string, error) { return []string{}, nil } -// FormatCloneURL add authentification into remote URLs +// FormatCloneURL add authentication into remote URLs func (g *GogsDownloader) FormatCloneURL(opts MigrateOptions, remoteAddr string) (string, error) { if len(opts.AuthToken) > 0 || len(opts.AuthUsername) > 0 { u, err := url.Parse(remoteAddr) diff --git a/services/migrations/onedev.go b/services/migrations/onedev.go index 5d5aaa40f9..bb676131f3 100644 --- a/services/migrations/onedev.go +++ b/services/migrations/onedev.go @@ -69,7 +69,7 @@ type onedevUser struct { Email string `json:"email"` } -// OneDevDownloader implements a Downloader interface to get repository informations +// OneDevDownloader implements a Downloader interface to get repository information // from OneDev type OneDevDownloader struct { base.NullDownloader diff --git a/services/pull/merge.go b/services/pull/merge.go index e541495bef..34cab2fd71 100644 --- a/services/pull/merge.go +++ b/services/pull/merge.go @@ -437,7 +437,7 @@ func rawMerge(pr *models.PullRequest, doer *user_model.User, mergeStyle repo_mod var pushCmd *git.Command if mergeStyle == repo_model.MergeStyleRebaseUpdate { - // force push the rebase result to head brach + // force push the rebase result to head branch pushCmd = git.NewCommand("push", "-f", "head_repo", stagingBranch+":"+git.BranchPrefix+pr.HeadBranch) } else { pushCmd = git.NewCommand("push", "origin", baseBranch+":"+git.BranchPrefix+pr.BaseBranch) diff --git a/services/repository/archiver/archiver.go b/services/repository/archiver/archiver.go index fb40c3383d..16ee532f78 100644 --- a/services/repository/archiver/archiver.go +++ b/services/repository/archiver/archiver.go @@ -252,7 +252,7 @@ func Init() error { } log.Trace("ArchiverData Process: %#v", archiveReq) if _, err := doArchive(archiveReq); err != nil { - log.Error("Archive %v faild: %v", datum, err) + log.Error("Archive %v failed: %v", datum, err) } } } diff --git a/services/wiki/wiki_test.go b/services/wiki/wiki_test.go index 659666f977..f5ee76109c 100644 --- a/services/wiki/wiki_test.go +++ b/services/wiki/wiki_test.go @@ -190,7 +190,7 @@ func TestRepository_EditWikiPage(t *testing.T) { wikiPath := NameToFilename(newWikiName) entry, err := masterTree.GetTreeEntryByPath(wikiPath) assert.NoError(t, err) - assert.Equal(t, wikiPath, entry.Name(), "%s not editted correctly", newWikiName) + assert.Equal(t, wikiPath, entry.Name(), "%s not edited correctly", newWikiName) if newWikiName != "Home" { _, err := masterTree.GetTreeEntryByPath("Home.md") @@ -243,7 +243,7 @@ func TestPrepareWikiFileName(t *testing.T) { wikiPath: "home-of-and-%26-or-wiki-page%21.md", wantErr: false, }, { - name: "fount unescaped cases", + name: "found unescaped cases", arg: "Unescaped File", existence: true, wikiPath: "Unescaped File.md", diff --git a/templates/base/head.tmpl b/templates/base/head.tmpl index 499c113abf..3068dd4cbb 100644 --- a/templates/base/head.tmpl +++ b/templates/base/head.tmpl @@ -46,7 +46,7 @@ ]).values()), {{end}} mermaidMaxSourceCharacters: {{MermaidMaxSourceCharacters}}, - {{/* 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 */}} + {{/* 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 */}} i18n: { copy_success: '{{.i18n.Tr "copy_success"}}', copy_error: '{{.i18n.Tr "copy_error"}}', diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl index 50ea3463a6..7588261256 100644 --- a/templates/swagger/v1_json.tmpl +++ b/templates/swagger/v1_json.tmpl @@ -13893,7 +13893,7 @@ ], "properties": { "auto_init": { - "description": "Whether the repository should be auto-intialized?", + "description": "Whether the repository should be auto-initialized?", "type": "boolean", "x-go-name": "AutoInit" }, @@ -16400,7 +16400,7 @@ "x-go-package": "code.gitea.io/gitea/modules/structs" }, "OrganizationPermissions": { - "description": "OrganizationPermissions list differents users permissions on an organization", + "description": "OrganizationPermissions list different users permissions on an organization", "type": "object", "properties": { "can_create_repository": { |