]> source.dussan.org Git - gitea.git/commitdiff
Fix various typos (#20338)
authorluzpaz <luzpaz@users.noreply.github.com>
Tue, 12 Jul 2022 21:32:37 +0000 (17:32 -0400)
committerGitHub <noreply@github.com>
Tue, 12 Jul 2022 21:32:37 +0000 (23:32 +0200)
* Fix various typos

Found via `codespell -q 3 -S ./options/locale,./options/license,./public/vendor -L actived,allways,attachements,ba,befores,commiter,pullrequest,pullrequests,readby,splitted,te,unknwon`

Co-authored-by: zeripath <art27@cantab.net>
27 files changed:
Dockerfile.rootless
Makefile
README.md
cmd/manager.go
docs/content/doc/advanced/config-cheat-sheet.zh-cn.md
docs/content/doc/packages/nuget.en-us.md
integrations/dump_restore_test.go
models/db/context.go
models/issues/pull_list.go
models/organization/team_repo.go
modules/charset/charset.go
modules/doctor/breaking.go
modules/nosql/manager_leveldb.go
modules/web/middleware/locale.go
modules/web/routing/context.go
options/gitignore/Bazel
routers/api/packages/composer/api.go
routers/api/packages/conan/conan.go
routers/api/packages/rubygems/rubygems.go
routers/web/repo/pull.go
routers/web/repo/release.go
routers/web/web.go
routers/web/webfinger.go
services/auth/source/oauth2/providers.go
templates/repo/issue/view_content/pull.tmpl
web_src/js/features/repo-projects.js
web_src/less/_dashboard.less

index e576570e5ecbc9197be88725c747587227083f6f..c597fb29c856dccff3ebe35864c962e00a475335 100644 (file)
@@ -62,7 +62,7 @@ ENV GITEA_CUSTOM /var/lib/gitea/custom
 ENV GITEA_TEMP /tmp/gitea
 ENV TMPDIR /tmp/gitea
 
-#TODO add to docs the ability to define the ini to load (usefull to test and revert a config)
+#TODO add to docs the ability to define the ini to load (useful to test and revert a config)
 ENV GITEA_APP_INI /etc/gitea/app.ini
 ENV HOME "/var/lib/gitea/git"
 VOLUME ["/var/lib/gitea", "/etc/gitea"]
index 866b8c892e34ec160e229510f69e932c8b16dca4..41d39b4c323283f0b8d9fbd058b0a12e9b8168ef 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -771,7 +771,7 @@ generate-manpage:
        @mkdir -p man/man1/ man/man5
        @./gitea docs --man > man/man1/gitea.1
        @gzip -9 man/man1/gitea.1 && echo man/man1/gitea.1.gz created
-       @#TODO A smal script witch format config-cheat-sheet.en-us.md nicely to suit as config man page
+       @#TODO A small script that formats config-cheat-sheet.en-us.md nicely for use as a config man page
 
 .PHONY: pr\#%
 pr\#%: clean-all
index 172e16cf5632823374c5fec543a4a1cf8e0da40f..6c5952894aca96abb27c64f24afd7edf1db2878a 100644 (file)
--- a/README.md
+++ b/README.md
@@ -102,7 +102,7 @@ NOTES:
 
 Translations are done through Crowdin. If you want to translate to a new language ask one of the managers in the Crowdin project to add a new language there. 
 
-You can also just create an issue for adding a language or ask on discord on the #translation channel. If you need context or find some translation issues, you can leave a comment on the string or ask on Discord. For general translation questions there is a section in the docs. Currently a bit empty but we hope fo fill it as questions pop up.
+You can also just create an issue for adding a language or ask on discord on the #translation channel. If you need context or find some translation issues, you can leave a comment on the string or ask on Discord. For general translation questions there is a section in the docs. Currently a bit empty but we hope to fill it as questions pop up.
 
 https://docs.gitea.io/en-us/translation-guidelines/
 
index 03fe23aa9e3f04009cebd7c52ec1c7963f9bdb1e..8fbfd1093cbcabf6e0fff49a4047cf5f307c1179 100644 (file)
@@ -82,7 +82,7 @@ var (
                        },
                        cli.BoolFlag{
                                Name:  "no-system",
-                               Usage: "Do not show system proceses",
+                               Usage: "Do not show system processes",
                        },
                        cli.BoolFlag{
                                Name:  "stacktraces",
index ef1504bc94fcb3d46c004d93571f8cd808eb059c..33c693083d02f5d1bb24e005ba5a64f9d939f895 100644 (file)
@@ -346,7 +346,7 @@ ALLOW_DATA_URI_IMAGES = true
 - `ALLOW_DATA_URI_IMAGES`: **false** 允许 data uri 图片 (`<img src="data:image/png;base64,..."/>`)。
 
 多个净化规则可以被同时定义,只要section名称最后一位不重复即可。如: `[markup.sanitizer.TeX-2]`。
-为了针对一种渲染类型进行一个特殊的净化策略,必须使用形如 `[markup.sanitizer.asciidoc.rule-1]` 的方式来命名 seciton。
+为了针对一种渲染类型进行一个特殊的净化策略,必须使用形如 `[markup.sanitizer.asciidoc.rule-1]` 的方式来命名 section。
 如果此规则没有匹配到任何渲染类型,它将会被应用到所有的渲染类型。
 
 ## Time (`time`)
index 0b92d85a3d4e961dd248eb2bb50e8107062c4dc7..421faf9ee6503a3e4a3352783ae3072b632793c4 100644 (file)
@@ -23,7 +23,7 @@ Publish [NuGet](https://www.nuget.org/) packages for your user or organization.
 ## Requirements
 
 To work with the NuGet package registry, you can use command-line interface tools as well as NuGet features in various IDEs like Visual Studio.
-More informations about NuGet clients can be found in [the official documentation](https://docs.microsoft.com/en-us/nuget/install-nuget-client-tools).
+More information about NuGet clients can be found in [the official documentation](https://docs.microsoft.com/en-us/nuget/install-nuget-client-tools).
 The following examples use the `dotnet nuget` tool.
 
 ## Configuring the package registry
index 3723334ea155d6f21174d506c6b7327bb53e1be3..ef869c4ddabcddf917f545cd5d30f805217b13f3 100644 (file)
@@ -201,7 +201,7 @@ func (c *compareDump) assertEquals(repoBefore, repoAfter *repo_model.Repository)
                "Assignees": {ignore: true}, // not implemented yet
                "Head":      {nested: comparePullRequestBranch},
                "Base":      {nested: comparePullRequestBranch},
-               "Labels":    {ignore: true}, // because org labels are not handled propery
+               "Labels":    {ignore: true}, // because org labels are not handled properly
        }).([]*base.PullRequest)
        assert.True(c.t, ok)
        assert.GreaterOrEqual(c.t, len(prs), 1)
index 783033c0e03a67f0a83cc40a42e33fceec225cce..4fd35200cf71cb37eac1ff5f622faffe205425dc 100644 (file)
@@ -100,7 +100,7 @@ func TxContext() (*Context, Committer, error) {
 }
 
 // WithTx represents executing database operations on a transaction
-// you can optionally change the context to a parrent one
+// you can optionally change the context to a parent one
 func WithTx(f func(ctx context.Context) error, stdCtx ...context.Context) error {
        parentCtx := DefaultContext
        if len(stdCtx) != 0 && stdCtx[0] != nil {
index 9ca536909eb7391dd928a29ae1795b0e8f96592b..8eeffa2c0d16b8812d60c0a1f314da6cab611025 100644 (file)
@@ -62,7 +62,7 @@ func GetUnmergedPullRequestsByHeadInfo(repoID int64, branch string) ([]*PullRequ
                Find(&prs)
 }
 
-// CanMaintainerWriteToBranch check whether user is a matainer and could write to the branch
+// CanMaintainerWriteToBranch check whether user is a maintainer and could write to the branch
 func CanMaintainerWriteToBranch(p access_model.Permission, branch string, user *user_model.User) bool {
        if p.CanWrite(unit.TypeCode) {
                return true
index 717d754c40b7f2c6c1602c2133ad88840fc21604..fb3f267f817af2dc7875f71ef3686f7620d03425 100644 (file)
@@ -55,7 +55,7 @@ func GetTeamRepositories(ctx context.Context, opts *SearchTeamRepoOptions) ([]*r
                Find(&repos)
 }
 
-// AddTeamRepo addes a repo for an organization's team
+// AddTeamRepo adds a repo for an organization's team
 func AddTeamRepo(ctx context.Context, orgID, teamID, repoID int64) error {
        _, err := db.GetEngine(ctx).Insert(&TeamRepo{
                OrgID:  orgID,
index 89bbf1f8c93a811eb0f7522b67091a7695fdb24c..a1210d2f05dc584b5f7dc0370c1a09ad96f41a61 100644 (file)
@@ -23,7 +23,7 @@ import (
 // UTF8BOM is the utf-8 byte-order marker
 var UTF8BOM = []byte{'\xef', '\xbb', '\xbf'}
 
-// ToUTF8WithFallbackReader detects the encoding of content and coverts to UTF-8 reader if possible
+// ToUTF8WithFallbackReader detects the encoding of content and converts to UTF-8 reader if possible
 func ToUTF8WithFallbackReader(rd io.Reader) io.Reader {
        buf := make([]byte, 2048)
        n, err := util.ReadAtMost(rd, buf)
@@ -76,7 +76,7 @@ func ToUTF8WithErr(content []byte) (string, error) {
        return string(result), err
 }
 
-// ToUTF8WithFallback detects the encoding of content and coverts to UTF-8 if possible
+// ToUTF8WithFallback detects the encoding of content and converts to UTF-8 if possible
 func ToUTF8WithFallback(content []byte) []byte {
        bs, _ := io.ReadAll(ToUTF8WithFallbackReader(bytes.NewReader(content)))
        return bs
@@ -191,7 +191,7 @@ func DetectEncoding(content []byte) (string, error) {
                        break
                }
 
-               // Otherwise check if this results is earlier in the DetectedCharsetOrder than our current top guesss
+               // Otherwise check if this results is earlier in the DetectedCharsetOrder than our current top guess
                resultPriority, resultHas := setting.Repository.DetectedCharsetScore[strings.ToLower(strings.TrimSpace(result.Charset))]
                if resultHas && (!has || resultPriority < priority) {
                        topResult = result
index 3e01d97d7c731e585208401c7513fc9a86e40d69..391c8e76c59077f997d0ee8fb492a6210d9b0513 100644 (file)
@@ -32,8 +32,8 @@ func iterateUserAccounts(ctx context.Context, each func(*user.User) error) error
 // Ref: https://github.com/go-gitea/gitea/pull/19085 & https://github.com/go-gitea/gitea/pull/17688
 func checkUserEmail(ctx context.Context, logger log.Logger, _ bool) error {
        // We could use quirky SQL to get all users that start without a [a-zA-Z0-9], but that would mean
-       // DB provider-specific SQL and only works _now_. So instead we iterate trough all user accounts and
-       // use the user.ValidateEmail function to be future-proof.
+       // DB provider-specific SQL and only works _now_. So instead we iterate through all user accounts
+       // and use the user.ValidateEmail function to be future-proof.
        var invalidUserCount int64
        if err := iterateUserAccounts(ctx, func(u *user.User) error {
                // Only check for users, skip
index d356a79bf82c2e4ec5da31b5e132b0affaf77f11..7539952cf1c73cca688fc33b17931f3c4e96ab8a 100644 (file)
@@ -103,7 +103,7 @@ func (m *Manager) getLevelDB(connection string) (*leveldb.DB, error) {
        db, ok = m.LevelDBConnections[dataDir]
        if ok {
                db.count++
-               log.Warn("Duplicate connnection to level db: %s with different connection strings. Initial connection: %s. This connection: %s", dataDir, db.name[0], connection)
+               log.Warn("Duplicate connection to level db: %s with different connection strings. Initial connection: %s. This connection: %s", dataDir, db.name[0], connection)
                db.name = append(db.name, connection)
                m.LevelDBConnections[connection] = db
                return db.db, nil
index de8e49796541b6c3dd02c7bf9c970a08b245b80c..f4018527c0295513de48d1f80dcc02bfb55344ff 100644 (file)
@@ -60,7 +60,7 @@ func SetLocaleCookie(resp http.ResponseWriter, lang string, expiry int) {
 }
 
 // DeleteLocaleCookie convenience function to delete the locale cookie consistently
-// Setting the lang cookie will trigger the middleware to reset the language ot previous state.
+// Setting the lang cookie will trigger the middleware to reset the language to previous state.
 func DeleteLocaleCookie(resp http.ResponseWriter) {
        SetCookie(resp, "lang", "",
                -1,
index d3c7759e64c9ca5fec6b0221f0a665077dbee9be..7e263db5a26e831ae26579da0aed9538d0871d16 100644 (file)
@@ -25,7 +25,7 @@ func UpdateFuncInfo(ctx context.Context, funcInfo *FuncInfo) {
        record.lock.Unlock()
 }
 
-// MarkLongPolling marks the reuqest is a long-polling request, and the logger may output different message for it
+// MarkLongPolling marks the request is a long-polling request, and the logger may output different message for it
 func MarkLongPolling(resp http.ResponseWriter, req *http.Request) {
        record, ok := req.Context().Value(contextKey).(*requestRecord)
        if !ok {
index bc3afc20ba696ab9c903b7fe344eb4b107025ddd..4e1d5a2ba0a423b90db8abae3c10af8da5edd2f8 100644 (file)
@@ -6,7 +6,7 @@
 /bazel-*
 
 # Directories for the Bazel IntelliJ plugin containing the generated
-# IntelliJ project files and plugin configuration. Seperate directories are
+# IntelliJ project files and plugin configuration. Separate directories are
 # for the IntelliJ, Android Studio and CLion versions of the plugin.
 /.ijwb/
 /.aswb/
index d8f67d130cd09cac99d671fd440c285117cf883e..5e1cc293da0f84c6800edb502c3f933f39d9dff6 100644 (file)
@@ -76,7 +76,7 @@ type PackageVersionMetadata struct {
        Dist    Dist      `json:"dist"`
 }
 
-// Dist contains package download informations
+// Dist contains package download information
 type Dist struct {
        Type     string `json:"type"`
        URL      string `json:"url"`
index 0a27f18fd1ee970025e998d44cbeb4b5b09dc3d9..04b0bb6cdd9b291eb8ce4cffea6386a4c914ddd0 100644 (file)
@@ -429,14 +429,14 @@ func uploadFile(ctx *context.Context, fileFilter stringSet, fileKey string) {
        ctx.Status(http.StatusCreated)
 }
 
-// DownloadRecipeFile serves the conent of the requested recipe file
+// DownloadRecipeFile serves the content of the requested recipe file
 func DownloadRecipeFile(ctx *context.Context) {
        rref := ctx.Data[recipeReferenceKey].(*conan_module.RecipeReference)
 
        downloadFile(ctx, recipeFileList, rref.AsKey())
 }
 
-// DownloadPackageFile serves the conent of the requested package file
+// DownloadPackageFile serves the content of the requested package file
 func DownloadPackageFile(ctx *context.Context) {
        pref := ctx.Data[packageReferenceKey].(*conan_module.PackageReference)
 
index 6fdd03e8ea7049ec142db7a2736ad1c668159cc3..b3815a914ea7e660678022d8a67c9f71533059db 100644 (file)
@@ -37,7 +37,7 @@ func EnumeratePackages(ctx *context.Context) {
        enumeratePackages(ctx, "specs.4.8", packages)
 }
 
-// EnumeratePackagesLatest serves the list of the lastest version of every package
+// EnumeratePackagesLatest serves the list of the latest version of every package
 func EnumeratePackagesLatest(ctx *context.Context) {
        pvs, _, err := packages_model.SearchLatestVersions(ctx, &packages_model.PackageSearchOptions{
                OwnerID: ctx.Package.Owner.ID,
index 6e8f575ad54a5f76249e478b67247a773315dbe3..2a961c3cbc554e9e5b5ebe505c780a23a4267159 100644 (file)
@@ -1440,7 +1440,7 @@ func UpdatePullRequestTarget(ctx *context.Context) {
                        err := err.(issues_model.ErrPullRequestAlreadyExists)
 
                        RepoRelPath := ctx.Repo.Owner.Name + "/" + ctx.Repo.Repository.Name
-                       errorMessage := ctx.Tr("repo.pulls.has_pull_request", html.EscapeString(ctx.Repo.RepoLink+"/pulls/"+strconv.FormatInt(err.IssueID, 10)), html.EscapeString(RepoRelPath), err.IssueID) // FIXME: Creates url insidde locale string
+                       errorMessage := ctx.Tr("repo.pulls.has_pull_request", html.EscapeString(ctx.Repo.RepoLink+"/pulls/"+strconv.FormatInt(err.IssueID, 10)), html.EscapeString(RepoRelPath), err.IssueID) // FIXME: Creates url inside locale string
 
                        ctx.Flash.Error(errorMessage)
                        ctx.JSON(http.StatusConflict, map[string]interface{}{
index df953fd0b95f70fffbec92b0b3a4c4d1991fb8c6..ab87c3e2385afdcae0a8f3f6a1e0930040fd90f3 100644 (file)
@@ -98,8 +98,8 @@ func releasesOrTags(ctx *context.Context, isTagList bool) {
                listOptions.PageSize = setting.API.MaxResponseItems
        }
 
-       // TODO(20073) tags are used for compare feature witch needs all tags
-       // filtering is doen at the client side atm
+       // TODO(20073) tags are used for compare feature which needs all tags
+       // filtering is done on the client-side atm
        tagListStart, tagListEnd := 0, 0
        if isTagList {
                tagListStart, tagListEnd = listOptions.GetStartEnd()
@@ -514,12 +514,12 @@ func EditReleasePost(ctx *context.Context) {
        ctx.Redirect(ctx.Repo.RepoLink + "/releases")
 }
 
-// DeleteRelease delete a release
+// DeleteRelease deletes a release
 func DeleteRelease(ctx *context.Context) {
        deleteReleaseOrTag(ctx, false)
 }
 
-// DeleteTag delete a tag
+// DeleteTag deletes a tag
 func DeleteTag(ctx *context.Context) {
        deleteReleaseOrTag(ctx, true)
 }
index 1b6dd03bc8a84693b87f3b3b597b537ddcacee97..ae273d99e4ffd9586715b6eb5c36833bf64d7a7f 100644 (file)
@@ -85,7 +85,7 @@ func CorsHandler() func(next http.Handler) http.Handler {
 // for users that have already signed in.
 func buildAuthGroup() *auth_service.Group {
        group := auth_service.NewGroup(
-               &auth_service.OAuth2{}, // FIXME: this should be removed and only applied in download and oauth realted routers
+               &auth_service.OAuth2{}, // FIXME: this should be removed and only applied in download and oauth related routers
                &auth_service.Basic{},  // FIXME: this should be removed and only applied in download and git/lfs routers
                &auth_service.Session{},
        )
index c4808fbfd2419dc7f1890b02ffddfdefd419d4fb..972182becee72565ea8051afad3f8a936d6e3a80 100644 (file)
@@ -33,7 +33,7 @@ type webfingerLink struct {
        Properties map[string]interface{} `json:"properties,omitempty"`
 }
 
-// WebfingerQuery returns informations about a resource
+// WebfingerQuery returns information about a resource
 // https://datatracker.ietf.org/doc/html/rfc7565
 func WebfingerQuery(ctx *context.Context) {
        appURL, _ := url.Parse(setting.AppURL)
index 45851c879990dd0818f21983778dcf570af5f8d9..aa3ee3842ddb4beb839bb8dbdc637830bda1486d 100644 (file)
@@ -35,7 +35,7 @@ type GothProvider interface {
        GothProviderCreator
 }
 
-// ImagedProvider provide an overrided image setting for the provider
+// ImagedProvider provide an overridden image setting for the provider
 type ImagedProvider struct {
        GothProvider
        image string
index 7ed73e1176f52d42ca32b65ab720fb2cb5485244..179f857ba6de587200e53020a8bc0582b320b724 100644 (file)
 
                                {{$notAllOverridableChecksOk := or .IsBlockedByApprovals .IsBlockedByRejection .IsBlockedByOfficialReviewRequests .IsBlockedByOutdatedBranch .IsBlockedByChangedProtectedFiles (and .EnableStatusCheck (not .RequiredStatusCheckState.IsSuccess))}}
 
-                               {{/* admin can merge without checks, writer can merge when checkes succeed */}}
+                               {{/* admin can merge without checks, writer can merge when checks succeed */}}
                                {{$canMergeNow := and (or $.IsRepoAdmin (not $notAllOverridableChecksOk)) (or (not .AllowMerge) (not .RequireSigned) .WillSign)}}
                                {{/* admin and writer both can make an auto merge schedule */}}
 
index a948eba80727aec976d49f3501d398693f44326e..9777e6c8ecc3724294a9b0ad6f2f212a86df72f3 100644 (file)
@@ -192,7 +192,7 @@ function setLabelColor(label, color) {
 }
 
 /**
- * Inspired by W3C recommandation https://www.w3.org/TR/WCAG20/#relativeluminancedef
+ * Inspired by W3C recommendation https://www.w3.org/TR/WCAG20/#relativeluminancedef
  */
 function getRelativeColor(color) {
   color /= 255;
index 54cb74b6ee105aad402e2df102b50885ee7765e1..3c83009c25742ca442ebf9641a196c9875ee1877 100644 (file)
@@ -68,7 +68,7 @@
 
   .dashboard-repos,
   .dashboard-orgs {
-    margin: 0 1px; /* Accomodate for Semantic's 1px hacks on .attached elements */
+    margin: 0 1px; /* Accommodate for Semantic's 1px hacks on .attached elements */
   }
 
   .dashboard-navbar {