1
1
mirror of https://github.com/go-gitea/gitea synced 2025-09-15 05:08:13 +00:00

Fix various typos in codebase (#35480)

This commit is contained in:
luzpaz
2025-09-13 10:34:43 -04:00
committed by GitHub
parent 325e059a50
commit 688abac5ca
26 changed files with 30 additions and 30 deletions

View File

@@ -11,7 +11,7 @@ The default version will read from `docs/config.yml`. You can override this
using the option `--version`. using the option `--version`.
The upstream branches will be fetched, using the remote `origin`. This can The upstream branches will be fetched, using the remote `origin`. This can
be overrided using `--upstream`, and fetching can be avoided using be overridden using `--upstream`, and fetching can be avoided using
`--no-fetch`. `--no-fetch`.
By default the branch created will be called `backport-$PR-$VERSION`. You By default the branch created will be called `backport-$PR-$VERSION`. You

View File

@@ -150,7 +150,7 @@
<p>In general, Your Gitea Instance retains User Personal Information for as long as your account is active, or as needed to provide you service.</p> <p>In general, Your Gitea Instance retains User Personal Information for as long as your account is active, or as needed to provide you service.</p>
<p>If you would like to cancel your account or delete your User Personal Information, you may do so in your user profile. We retain and use your information as necessary to comply with our legal obligations, resolve disputes, and enforce our agreements, but barring legal requirements, we will delete your full profile (within reason) within 90 days of your request. Feel free to contact our support to request erasure of the data we process on the bassis of consent within 30 days.</p> <p>If you would like to cancel your account or delete your User Personal Information, you may do so in your user profile. We retain and use your information as necessary to comply with our legal obligations, resolve disputes, and enforce our agreements, but barring legal requirements, we will delete your full profile (within reason) within 90 days of your request. Feel free to contact our support to request erasure of the data we process on the basis of consent within 30 days.</p>
<p>After an account has been deleted, certain data, such as contributions to other Users' repositories and comments in others' issues, will remain. However, we will delete or de-identify your User Personal Information, including your username and email address, from the author field of issues, pull requests, and comments by associating them with a ghost user.</p> <p>After an account has been deleted, certain data, such as contributions to other Users' repositories and comments in others' issues, will remain. However, we will delete or de-identify your User Personal Information, including your username and email address, from the author field of issues, pull requests, and comments by associating them with a ghost user.</p>

View File

@@ -67,7 +67,7 @@ func (l *XORMLogBridge) Warn(v ...any) {
l.Log(stackLevel, log.WARN, "%s", fmt.Sprint(v...)) l.Log(stackLevel, log.WARN, "%s", fmt.Sprint(v...))
} }
// Warnf show warnning log // Warnf show warning log
func (l *XORMLogBridge) Warnf(format string, v ...any) { func (l *XORMLogBridge) Warnf(format string, v ...any) {
l.Log(stackLevel, log.WARN, format, v...) l.Log(stackLevel, log.WARN, format, v...)
} }

View File

@@ -408,7 +408,7 @@ func AddBranchProtectionCanPushAndEnableWhitelist(x *xorm.Engine) error {
official, err := isOfficialReviewer(sess, review.IssueID, reviewer) official, err := isOfficialReviewer(sess, review.IssueID, reviewer)
if err != nil { if err != nil {
// Branch might not be proteced or other error, ignore it. // Branch might not be protected or other error, ignore it.
continue continue
} }
review.Official = official review.Official = official

View File

@@ -8,7 +8,7 @@ const (
SettingsKeyHiddenCommentTypes = "issue.hidden_comment_types" SettingsKeyHiddenCommentTypes = "issue.hidden_comment_types"
// SettingsKeyDiffWhitespaceBehavior is the setting key for whitespace behavior of diff // SettingsKeyDiffWhitespaceBehavior is the setting key for whitespace behavior of diff
SettingsKeyDiffWhitespaceBehavior = "diff.whitespace_behaviour" SettingsKeyDiffWhitespaceBehavior = "diff.whitespace_behaviour"
// SettingsKeyShowOutdatedComments is the setting key wether or not to show outdated comments in PRs // SettingsKeyShowOutdatedComments is the setting key whether or not to show outdated comments in PRs
SettingsKeyShowOutdatedComments = "comment_code.show_outdated" SettingsKeyShowOutdatedComments = "comment_code.show_outdated"
// UserActivityPubPrivPem is user's private key // UserActivityPubPrivPem is user's private key

View File

@@ -70,7 +70,7 @@ func (i *Identicon) render(c, b1, b2, b1Angle, b2Angle, foreColor int) image.Ima
/* /*
# Algorithm # Algorithm
Origin: An image is splitted into 9 areas Origin: An image is split into 9 areas
``` ```
------------- -------------

View File

@@ -250,7 +250,7 @@ func (b *Indexer) Index(ctx context.Context, repo *repo_model.Repository, sha st
func (b *Indexer) Delete(ctx context.Context, repoID int64) error { func (b *Indexer) Delete(ctx context.Context, repoID int64) error {
if err := b.doDelete(ctx, repoID); err != nil { if err := b.doDelete(ctx, repoID); err != nil {
// Maybe there is a conflict during the delete operation, so we should retry after a refresh // Maybe there is a conflict during the delete operation, so we should retry after a refresh
log.Warn("Deletion of entries of repo %v within index %v was erroneus. Trying to refresh index before trying again", repoID, b.inner.VersionedIndexName(), err) log.Warn("Deletion of entries of repo %v within index %v was erroneous. Trying to refresh index before trying again", repoID, b.inner.VersionedIndexName(), err)
if err := b.refreshIndex(ctx); err != nil { if err := b.refreshIndex(ctx); err != nil {
return err return err
} }

View File

@@ -134,7 +134,7 @@ func testIndexer(name string, t *testing.T, indexer internal.Indexer) {
}, },
}, },
// Search for matches on both the contents and the filenames within the repo '62'. // Search for matches on both the contents and the filenames within the repo '62'.
// This scenario yields two results: the first result is baed on the file (cucumber.md) while the second is based on the contents // This scenario yields two results: the first result is based on the file (cucumber.md) while the second is based on the contents
{ {
RepoIDs: []int64{62}, RepoIDs: []int64{62},
Keyword: "cucumber", Keyword: "cucumber",

View File

@@ -28,7 +28,7 @@ import (
) )
// IndexerMetadata is used to send data to the queue, so it contains only the ids. // IndexerMetadata is used to send data to the queue, so it contains only the ids.
// It may look weired, because it has to be compatible with the old queue data format. // It may look weird, because it has to be compatible with the old queue data format.
// If the IsDelete flag is true, the IDs specify the issues to delete from the index without querying the database. // If the IsDelete flag is true, the IDs specify the issues to delete from the index without querying the database.
// If the IsDelete flag is false, the ID specify the issue to index, so Indexer will query the database to get the issue data. // If the IsDelete flag is false, the ID specify the issue to index, so Indexer will query the database to get the issue data.
// It should be noted that if the id is not existing in the database, it's index will be deleted too even if IsDelete is false. // It should be noted that if the id is not existing in the database, it's index will be deleted too even if IsDelete is false.

View File

@@ -18,7 +18,7 @@ func resolveLinkRelative(ctx context.Context, base, cur, link string, absolute b
} }
if strings.HasPrefix(link, "/") { if strings.HasPrefix(link, "/") {
if strings.HasPrefix(link, base) && strings.Count(base, "/") >= 4 { if strings.HasPrefix(link, base) && strings.Count(base, "/") >= 4 {
// a trick to tolerate that some users were using absolut paths (the old gitea's behavior) // a trick to tolerate that some users were using absolute paths (the old gitea's behavior)
finalLink = link finalLink = link
} else { } else {
finalLink = util.URLJoin(base, "./", link) finalLink = util.URLJoin(base, "./", link)

View File

@@ -22,7 +22,7 @@
// //
// 4. Handler (represented by HandlerFuncT type): // 4. Handler (represented by HandlerFuncT type):
// - It's the function responsible for processing items. Each active worker will call it. // - It's the function responsible for processing items. Each active worker will call it.
// - If an item or some items are not psuccessfully rocessed, the handler could return them as "unhandled items". // - If an item or some items are not successfully processed, the handler could return them as "unhandled items".
// In such scenarios, the queue system ensures these unhandled items are returned to the base queue after a brief delay. // In such scenarios, the queue system ensures these unhandled items are returned to the base queue after a brief delay.
// This mechanism is particularly beneficial in cases where the processing entity (like a document indexer) is // This mechanism is particularly beneficial in cases where the processing entity (like a document indexer) is
// temporarily unavailable. It ensures that no item is skipped or lost due to transient failures in the processing // temporarily unavailable. It ensures that no item is skipped or lost due to transient failures in the processing

View File

@@ -17,7 +17,7 @@ import (
type StateType string type StateType string
const ( const (
// StateOpen pr is opend // StateOpen pr is opened
StateOpen StateType = "open" StateOpen StateType = "open"
// StateClosed pr is closed // StateClosed pr is closed
StateClosed StateType = "closed" StateClosed StateType = "closed"

View File

@@ -319,7 +319,7 @@ const (
) )
// Name represents the service type's name // Name represents the service type's name
// WARNNING: the name have to be equal to that on goth's library // WARNING: the name has to be equal to that on goth's library
func (gt GitServiceType) Name() string { func (gt GitServiceType) Name() string {
return strings.ToLower(gt.Title()) return strings.ToLower(gt.Title())
} }

View File

@@ -61,7 +61,7 @@ type User struct {
// MarshalJSON implements the json.Marshaler interface for User, adding field(s) for backward compatibility // MarshalJSON implements the json.Marshaler interface for User, adding field(s) for backward compatibility
func (u User) MarshalJSON() ([]byte, error) { func (u User) MarshalJSON() ([]byte, error) {
// Re-declaring User to avoid recursion // Redeclaring User to avoid recursion
type shadow User type shadow User
return json.Marshal(struct { return json.Marshal(struct {
shadow shadow

View File

@@ -48,12 +48,12 @@ func TestIsSvgImage(t *testing.T) {
<!-- Comments --> <!-- Comments -->
<svg></svg>`)).IsSvgImage()) <svg></svg>`)).IsSvgImage())
assert.True(t, DetectContentType([]byte(`<?xml version="1.0" encoding="UTF-8"?> assert.True(t, DetectContentType([]byte(`<?xml version="1.0" encoding="UTF-8"?>
<!-- Multline <!-- Multiline
Comment --> Comment -->
<svg></svg>`)).IsSvgImage()) <svg></svg>`)).IsSvgImage())
assert.True(t, DetectContentType([]byte(`<?xml version="1.0" encoding="UTF-8"?> assert.True(t, DetectContentType([]byte(`<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Multline <!-- Multiline
Comment --> Comment -->
<svg></svg>`)).IsSvgImage()) <svg></svg>`)).IsSvgImage())

View File

@@ -8,7 +8,7 @@ gradle-app.setting
# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored) # Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
!gradle-wrapper.jar !gradle-wrapper.jar
# Avoid ignore Gradle wrappper properties # Avoid ignore Gradle wrapper properties
!gradle-wrapper.properties !gradle-wrapper.properties
# Cache of project # Cache of project

View File

@@ -157,7 +157,7 @@ func (s *Service) FetchTask(
if tasksVersion != latestVersion { if tasksVersion != latestVersion {
// if the task version in request is not equal to the version in db, // if the task version in request is not equal to the version in db,
// it means there may still be some tasks not be assgined. // it means there may still be some tasks that haven't been assigned.
// try to pick a task for the runner that send the request. // try to pick a task for the runner that send the request.
if t, ok, err := actions_service.PickTask(ctx, runner); err != nil { if t, ok, err := actions_service.PickTask(ctx, runner); err != nil {
log.Error("pick task failed: %v", err) log.Error("pick task failed: %v", err)

View File

@@ -281,7 +281,7 @@ func skipWorkflows(ctx context.Context, input *notifyInput, commit *git.Commit)
return true return true
} }
} }
// skip workflow runs events exceeding the maxiumum of 5 recursive events // skip workflow runs events exceeding the maximum of 5 recursive events
log.Debug("repo %s: skipped workflow_run because of recursive event of 5", input.Repo.RepoPath()) log.Debug("repo %s: skipped workflow_run because of recursive event of 5", input.Repo.RepoPath())
return true return true
} }

View File

@@ -48,7 +48,7 @@ type csrfProtector struct {
opt CsrfOptions opt CsrfOptions
// id must be unique per user. // id must be unique per user.
id string id string
// token is the valid one which wil be used by end user and passed via header, cookie, or hidden form value. // token is the valid one which will be used by end user and passed via header, cookie, or hidden form value.
token string token string
} }

View File

@@ -120,7 +120,7 @@ func CreateCommitStatus(ctx context.Context, repo *repo_model.Repository, creato
return nil return nil
} }
// FindReposLastestCommitStatuses loading repository default branch latest combinded commit status with cache // FindReposLastestCommitStatuses loading repository default branch latest combined commit status with cache
func FindReposLastestCommitStatuses(ctx context.Context, repos []*repo_model.Repository) ([]*git_model.CommitStatus, error) { func FindReposLastestCommitStatuses(ctx context.Context, repos []*repo_model.Repository) ([]*git_model.CommitStatus, error) {
results := make([]*git_model.CommitStatus, len(repos)) results := make([]*git_model.CommitStatus, len(repos))
allCached := true allCached := true

View File

@@ -182,7 +182,7 @@ func (flow *Flow) AddGlyph(row, column int, glyph byte) {
}) })
} }
// Glyph represents a co-ordinate and glyph // Glyph represents a coordinate and glyph
type Glyph struct { type Glyph struct {
Row int Row int
Column int Column int
@@ -244,7 +244,7 @@ func newRefsFromRefNames(refNames []byte) []git.Reference {
return refs return refs
} }
// Commit represents a commit at co-ordinate X, Y with the data // Commit represents a commit at coordinate X, Y with the data
type Commit struct { type Commit struct {
Commit *git.Commit Commit *git.Commit
User *user_model.User User *user_model.User

View File

@@ -117,7 +117,7 @@
<div class="commit-divergence" data-tooltip-content="{{$tooltipDivergence}}"> <div class="commit-divergence" data-tooltip-content="{{$tooltipDivergence}}">
<div class="bar-group"> <div class="bar-group">
<div class="count count-behind">{{.CommitsBehind}}</div> <div class="count count-behind">{{.CommitsBehind}}</div>
{{/* old code bears 0/0.0 = NaN output, so it might output invalid "width: NaNpx", it just works and doesn't caues any problem. */}} {{/* old code bears 0/0.0 = NaN output, so it might output invalid "width: NaNpx", it just works and doesn't cause any problem. */}}
<div class="bar bar-behind" style="width: {{Eval 100 "*" .CommitsBehind "/" "(" .CommitsBehind "+" .CommitsAhead "+" 0.0 ")"}}%"></div> <div class="bar bar-behind" style="width: {{Eval 100 "*" .CommitsBehind "/" "(" .CommitsBehind "+" .CommitsAhead "+" 0.0 ")"}}%"></div>
</div> </div>
<div class="bar-group"> <div class="bar-group">

View File

@@ -4,7 +4,7 @@
* CommitSignVerification * CommitSignVerification
If you'd like to modify this template, you could test it on the devtest page. If you'd like to modify this template, you could test it on the devtest page.
ATTENTION: this template could be re-rendered many times (on the graph and commit list page), ATTENTION: this template could be re-rendered many times (on the graph and commit list page),
so this template should be kept as small as possbile, DO NOT put large components like modal/dialog into it. so this template should be kept as small as possible, DO NOT put large components like modal/dialog into it.
*/}} */}}
{{- $commit := $.Commit -}} {{- $commit := $.Commit -}}
{{- $commitBaseLink := $.CommitBaseLink -}} {{- $commitBaseLink := $.CommitBaseLink -}}
@@ -78,4 +78,4 @@ so this template should be kept as small as possbile, DO NOT put large component
</a> </a>
{{- end -}} {{- end -}}
{{- /* This template should be kept as small as possbile, DO NOT put large components like modal/dialog into it. */ -}} {{- /* This template should be kept as small as possible, DO NOT put large components like modal/dialog into it. */ -}}

View File

@@ -66,7 +66,7 @@ func testGitPush(t *testing.T, u *url.URL) {
} }
pushed = append(pushed, "master") pushed = append(pushed, "master")
// push all, so that master are not chagned // push all, so that master is not changed
doGitPushTestRepository(gitPath, "origin", "--all")(t) doGitPushTestRepository(gitPath, "origin", "--all")(t)
return pushed, deleted return pushed, deleted

View File

@@ -881,7 +881,7 @@ func TestPullAutoMergeAfterCommitStatusSucceedAndApproval(t *testing.T) {
time.Sleep(2 * time.Second) time.Sleep(2 * time.Second)
// realod pr again // reload pr again
pr = unittest.AssertExistsAndLoadBean(t, &issues_model.PullRequest{ID: pr.ID}) pr = unittest.AssertExistsAndLoadBean(t, &issues_model.PullRequest{ID: pr.ID})
assert.True(t, pr.HasMerged) assert.True(t, pr.HasMerged)
assert.NotEmpty(t, pr.MergedCommitID) assert.NotEmpty(t, pr.MergedCommitID)
@@ -1006,7 +1006,7 @@ func TestPullAutoMergeAfterCommitStatusSucceedAndApprovalForAgitFlow(t *testing.
htmlDoc := NewHTMLParser(t, resp.Body) htmlDoc := NewHTMLParser(t, resp.Body)
testSubmitReview(t, approveSession, htmlDoc.GetCSRF(), "user2", "repo1", strconv.Itoa(int(pr.Index)), sha, "approve", http.StatusOK) testSubmitReview(t, approveSession, htmlDoc.GetCSRF(), "user2", "repo1", strconv.Itoa(int(pr.Index)), sha, "approve", http.StatusOK)
// realod pr again // reload pr again
pr = unittest.AssertExistsAndLoadBean(t, &issues_model.PullRequest{ID: pr.ID}) pr = unittest.AssertExistsAndLoadBean(t, &issues_model.PullRequest{ID: pr.ID})
assert.True(t, pr.HasMerged) assert.True(t, pr.HasMerged)
assert.NotEmpty(t, pr.MergedCommitID) assert.NotEmpty(t, pr.MergedCommitID)

View File

@@ -228,7 +228,7 @@ func TestPullView_GivenApproveOrRejectReviewOnClosedPR(t *testing.T) {
t.Run("Submit approve/reject review on closed PR", func(t *testing.T) { t.Run("Submit approve/reject review on closed PR", func(t *testing.T) {
// Created a closed PR (made by user1) in the upstream repo1. // Created a closed PR (made by user1) in the upstream repo1.
testEditFileToNewBranch(t, user1Session, "user1", "repo1", "master", "a-test-branch", "README.md", "Hello, World (Editied...again)\n") testEditFileToNewBranch(t, user1Session, "user1", "repo1", "master", "a-test-branch", "README.md", "Hello, World (Edited...again)\n")
resp := testPullCreate(t, user1Session, "user1", "repo1", false, "master", "a-test-branch", "This is a pull title") resp := testPullCreate(t, user1Session, "user1", "repo1", false, "master", "a-test-branch", "This is a pull title")
elem := strings.Split(test.RedirectURL(resp), "/") elem := strings.Split(test.RedirectURL(resp), "/")
assert.Equal(t, "pulls", elem[3]) assert.Equal(t, "pulls", elem[3])