mirror of
1
Fork 0

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>
This commit is contained in:
luzpaz 2022-01-10 04:32:37 -05:00 committed by GitHub
parent 242dddfcb7
commit 8c647bf0f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
31 changed files with 40 additions and 40 deletions

View File

@ -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)

View File

@ -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
});
```

View File

@ -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

View File

@ -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 {

View File

@ -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)
}

View File

@ -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)
}

View File

@ -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"
*/

View File

@ -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`,

View File

@ -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
}

View File

@ -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/"

View File

@ -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)

View File

@ -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.

View File

@ -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()
}

View File

@ -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"`

View File

@ -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"`

View File

@ -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()
}

View File

@ -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 {

View File

@ -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.

View File

@ -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
// ---

View File

@ -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
}

View File

@ -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 {

View File

@ -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 {

View File

@ -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.

View File

@ -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
}

View File

@ -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)

View File

@ -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

View File

@ -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)

View File

@ -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)
}
}
}

View File

@ -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",

View File

@ -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"}}',

View File

@ -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": {