Skip to content

Commit 2ef6ac8

Browse files
authored
Use double quotes consistently in en-US (#24141)
Also removes quotes in commit messages related to file modifications made in the Web UI.
1 parent 9611710 commit 2ef6ac8

8 files changed

+86
-86
lines changed

options/locale/locale_en-US.ini

Lines changed: 77 additions & 77 deletions
Large diffs are not rendered by default.

tests/integration/api_repo_file_create_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ func TestAPICreateFile(t *testing.T) {
214214
req = NewRequestWithJSON(t, "POST", url, &createFileOptions)
215215
resp = MakeRequest(t, req, http.StatusCreated)
216216
DecodeJSON(t, resp, &fileResponse)
217-
expectedMessage := "Add '" + treePath + "'\n"
217+
expectedMessage := "Add " + treePath + "\n"
218218
assert.EqualValues(t, expectedMessage, fileResponse.Commit.Message)
219219

220220
// Test trying to create a file that already exists, should fail

tests/integration/api_repo_file_delete_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ func TestAPIDeleteFile(t *testing.T) {
9999
req = NewRequestWithJSON(t, "DELETE", url, &deleteFileOptions)
100100
resp = MakeRequest(t, req, http.StatusOK)
101101
DecodeJSON(t, resp, &fileResponse)
102-
expectedMessage := "Delete '" + treePath + "'\n"
102+
expectedMessage := "Delete " + treePath + "\n"
103103
assert.EqualValues(t, expectedMessage, fileResponse.Commit.Message)
104104

105105
// Test deleting a file with the wrong SHA

tests/integration/api_repo_file_update_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ func TestAPIUpdateFile(t *testing.T) {
199199
req = NewRequestWithJSON(t, "PUT", url, &updateFileOptions)
200200
resp = MakeRequest(t, req, http.StatusOK)
201201
DecodeJSON(t, resp, &fileResponse)
202-
expectedMessage := "Update '" + treePath + "'\n"
202+
expectedMessage := "Update " + treePath + "\n"
203203
assert.EqualValues(t, expectedMessage, fileResponse.Commit.Message)
204204

205205
// Test updating a file with the wrong SHA

tests/integration/editor_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ func TestCreateFileOnProtectedBranch(t *testing.T) {
5555
// Check if master branch has been locked successfully
5656
flashCookie := session.GetCookie(gitea_context.CookieNameFlash)
5757
assert.NotNil(t, flashCookie)
58-
assert.EqualValues(t, "success%3DBranch%2Bprotection%2Bfor%2Brule%2B%2527master%2527%2Bhas%2Bbeen%2Bupdated.", flashCookie.Value)
58+
assert.EqualValues(t, "success%3DBranch%2Bprotection%2Bfor%2Brule%2B%2522master%2522%2Bhas%2Bbeen%2Bupdated.", flashCookie.Value)
5959

6060
// Request editor page
6161
req = NewRequest(t, "GET", "/user2/repo1/_new/master/")
@@ -76,7 +76,7 @@ func TestCreateFileOnProtectedBranch(t *testing.T) {
7676

7777
resp = session.MakeRequest(t, req, http.StatusOK)
7878
// Check body for error message
79-
assert.Contains(t, resp.Body.String(), "Cannot commit to protected branch 'master'.")
79+
assert.Contains(t, resp.Body.String(), "Cannot commit to protected branch "master".")
8080

8181
// remove the protected branch
8282
csrf = GetCSRF(t, session, "/user2/repo1/settings/branches")
@@ -95,7 +95,7 @@ func TestCreateFileOnProtectedBranch(t *testing.T) {
9595
// Check if master branch has been locked successfully
9696
flashCookie = session.GetCookie(gitea_context.CookieNameFlash)
9797
assert.NotNil(t, flashCookie)
98-
assert.EqualValues(t, "error%3DRemoving%2Bbranch%2Bprotection%2Brule%2B%25271%2527%2Bfailed.", flashCookie.Value)
98+
assert.EqualValues(t, "error%3DRemoving%2Bbranch%2Bprotection%2Brule%2B%25221%2522%2Bfailed.", flashCookie.Value)
9999
})
100100
}
101101

tests/integration/git_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ func doProtectBranch(ctx APITestContext, branch, userToWhitelist, unprotectedFil
439439
// Check if master branch has been locked successfully
440440
flashCookie := ctx.Session.GetCookie(gitea_context.CookieNameFlash)
441441
assert.NotNil(t, flashCookie)
442-
assert.EqualValues(t, "success%3DBranch%2Bprotection%2Bfor%2Brule%2B%2527"+url.QueryEscape(branch)+"%2527%2Bhas%2Bbeen%2Bupdated.", flashCookie.Value)
442+
assert.EqualValues(t, "success%3DBranch%2Bprotection%2Bfor%2Brule%2B%2522"+url.QueryEscape(branch)+"%2522%2Bhas%2Bbeen%2Bupdated.", flashCookie.Value)
443443
}
444444
}
445445

tests/integration/pull_create_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ func TestPullCreate(t *testing.T) {
6767
resp = session.MakeRequest(t, req, http.StatusOK)
6868
assert.Regexp(t, `\+Hello, World \(Edited\)`, resp.Body)
6969
assert.Regexp(t, "diff", resp.Body)
70-
assert.Regexp(t, `Subject: \[PATCH\] Update 'README.md'`, resp.Body)
70+
assert.Regexp(t, `Subject: \[PATCH\] Update README.md`, resp.Body)
7171
assert.NotRegexp(t, "diff.*diff", resp.Body) // not two diffs, just one
7272
})
7373
}

tests/integration/pull_merge_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ func TestPullCleanUpAfterMerge(t *testing.T) {
187187
htmlDoc := NewHTMLParser(t, resp.Body)
188188
resultMsg := htmlDoc.doc.Find(".ui.message>p").Text()
189189

190-
assert.EqualValues(t, "Branch 'user1/repo1:feature/test' has been deleted.", resultMsg)
190+
assert.EqualValues(t, "Branch \"user1/repo1:feature/test\" has been deleted.", resultMsg)
191191
})
192192
}
193193

0 commit comments

Comments
 (0)