Unverified Commit 8c647bf0 authored by luzpaz's avatar luzpaz Committed by GitHub
Browse files

Fix various typos (#18219)



Found via `codespell -q 3 -S ./options/locale,./vendor -L ba,pullrequest,pullrequests,readby,te,unknwon`
Co-authored-by: default avatarLunny Xiao <xiaolunwen@gmail.com>
parent 242dddfc
......@@ -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)
......
......@@ -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
});
```
......
......@@ -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
......
......@@ -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 {
......
......@@ -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)
}
......
......@@ -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)
}
......
......@@ -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"
*/
......
......@@ -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`,
......
......@@ -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
}
......
......@@ -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/"
......
......@@ -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)
......
......@@ -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.
......
......@@ -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()
}
......
......@@ -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"`
......
......@@ -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"`
......
......@@ -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()
}
......
......@@ -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 {
......
......@@ -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.
......@@ -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
// ---
......
......@@ -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
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment