mirror of
				https://github.com/go-gitea/gitea
				synced 2025-11-03 21:08:25 +00:00 
			
		
		
		
	Use double quotes consistently in en-US (#24141)
Also removes quotes in commit messages related to file modifications made in the Web UI.
This commit is contained in:
		
				
					committed by
					
						
						GitHub
					
				
			
			
				
	
			
			
			
						parent
						
							9611710636
						
					
				
				
					commit
					2ef6ac8dbf
				
			@@ -214,7 +214,7 @@ func TestAPICreateFile(t *testing.T) {
 | 
			
		||||
		req = NewRequestWithJSON(t, "POST", url, &createFileOptions)
 | 
			
		||||
		resp = MakeRequest(t, req, http.StatusCreated)
 | 
			
		||||
		DecodeJSON(t, resp, &fileResponse)
 | 
			
		||||
		expectedMessage := "Add '" + treePath + "'\n"
 | 
			
		||||
		expectedMessage := "Add " + treePath + "\n"
 | 
			
		||||
		assert.EqualValues(t, expectedMessage, fileResponse.Commit.Message)
 | 
			
		||||
 | 
			
		||||
		// Test trying to create a file that already exists, should fail
 | 
			
		||||
 
 | 
			
		||||
@@ -99,7 +99,7 @@ func TestAPIDeleteFile(t *testing.T) {
 | 
			
		||||
		req = NewRequestWithJSON(t, "DELETE", url, &deleteFileOptions)
 | 
			
		||||
		resp = MakeRequest(t, req, http.StatusOK)
 | 
			
		||||
		DecodeJSON(t, resp, &fileResponse)
 | 
			
		||||
		expectedMessage := "Delete '" + treePath + "'\n"
 | 
			
		||||
		expectedMessage := "Delete " + treePath + "\n"
 | 
			
		||||
		assert.EqualValues(t, expectedMessage, fileResponse.Commit.Message)
 | 
			
		||||
 | 
			
		||||
		// Test deleting a file with the wrong SHA
 | 
			
		||||
 
 | 
			
		||||
@@ -199,7 +199,7 @@ func TestAPIUpdateFile(t *testing.T) {
 | 
			
		||||
		req = NewRequestWithJSON(t, "PUT", url, &updateFileOptions)
 | 
			
		||||
		resp = MakeRequest(t, req, http.StatusOK)
 | 
			
		||||
		DecodeJSON(t, resp, &fileResponse)
 | 
			
		||||
		expectedMessage := "Update '" + treePath + "'\n"
 | 
			
		||||
		expectedMessage := "Update " + treePath + "\n"
 | 
			
		||||
		assert.EqualValues(t, expectedMessage, fileResponse.Commit.Message)
 | 
			
		||||
 | 
			
		||||
		// Test updating a file with the wrong SHA
 | 
			
		||||
 
 | 
			
		||||
@@ -55,7 +55,7 @@ func TestCreateFileOnProtectedBranch(t *testing.T) {
 | 
			
		||||
		// Check if master branch has been locked successfully
 | 
			
		||||
		flashCookie := session.GetCookie(gitea_context.CookieNameFlash)
 | 
			
		||||
		assert.NotNil(t, flashCookie)
 | 
			
		||||
		assert.EqualValues(t, "success%3DBranch%2Bprotection%2Bfor%2Brule%2B%2527master%2527%2Bhas%2Bbeen%2Bupdated.", flashCookie.Value)
 | 
			
		||||
		assert.EqualValues(t, "success%3DBranch%2Bprotection%2Bfor%2Brule%2B%2522master%2522%2Bhas%2Bbeen%2Bupdated.", flashCookie.Value)
 | 
			
		||||
 | 
			
		||||
		// Request editor page
 | 
			
		||||
		req = NewRequest(t, "GET", "/user2/repo1/_new/master/")
 | 
			
		||||
@@ -76,7 +76,7 @@ func TestCreateFileOnProtectedBranch(t *testing.T) {
 | 
			
		||||
 | 
			
		||||
		resp = session.MakeRequest(t, req, http.StatusOK)
 | 
			
		||||
		// Check body for error message
 | 
			
		||||
		assert.Contains(t, resp.Body.String(), "Cannot commit to protected branch 'master'.")
 | 
			
		||||
		assert.Contains(t, resp.Body.String(), "Cannot commit to protected branch "master".")
 | 
			
		||||
 | 
			
		||||
		// remove the protected branch
 | 
			
		||||
		csrf = GetCSRF(t, session, "/user2/repo1/settings/branches")
 | 
			
		||||
@@ -95,7 +95,7 @@ func TestCreateFileOnProtectedBranch(t *testing.T) {
 | 
			
		||||
		// Check if master branch has been locked successfully
 | 
			
		||||
		flashCookie = session.GetCookie(gitea_context.CookieNameFlash)
 | 
			
		||||
		assert.NotNil(t, flashCookie)
 | 
			
		||||
		assert.EqualValues(t, "error%3DRemoving%2Bbranch%2Bprotection%2Brule%2B%25271%2527%2Bfailed.", flashCookie.Value)
 | 
			
		||||
		assert.EqualValues(t, "error%3DRemoving%2Bbranch%2Bprotection%2Brule%2B%25221%2522%2Bfailed.", flashCookie.Value)
 | 
			
		||||
	})
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -439,7 +439,7 @@ func doProtectBranch(ctx APITestContext, branch, userToWhitelist, unprotectedFil
 | 
			
		||||
		// Check if master branch has been locked successfully
 | 
			
		||||
		flashCookie := ctx.Session.GetCookie(gitea_context.CookieNameFlash)
 | 
			
		||||
		assert.NotNil(t, flashCookie)
 | 
			
		||||
		assert.EqualValues(t, "success%3DBranch%2Bprotection%2Bfor%2Brule%2B%2527"+url.QueryEscape(branch)+"%2527%2Bhas%2Bbeen%2Bupdated.", flashCookie.Value)
 | 
			
		||||
		assert.EqualValues(t, "success%3DBranch%2Bprotection%2Bfor%2Brule%2B%2522"+url.QueryEscape(branch)+"%2522%2Bhas%2Bbeen%2Bupdated.", flashCookie.Value)
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -67,7 +67,7 @@ func TestPullCreate(t *testing.T) {
 | 
			
		||||
		resp = session.MakeRequest(t, req, http.StatusOK)
 | 
			
		||||
		assert.Regexp(t, `\+Hello, World \(Edited\)`, resp.Body)
 | 
			
		||||
		assert.Regexp(t, "diff", resp.Body)
 | 
			
		||||
		assert.Regexp(t, `Subject: \[PATCH\] Update 'README.md'`, resp.Body)
 | 
			
		||||
		assert.Regexp(t, `Subject: \[PATCH\] Update README.md`, resp.Body)
 | 
			
		||||
		assert.NotRegexp(t, "diff.*diff", resp.Body) // not two diffs, just one
 | 
			
		||||
	})
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -187,7 +187,7 @@ func TestPullCleanUpAfterMerge(t *testing.T) {
 | 
			
		||||
		htmlDoc := NewHTMLParser(t, resp.Body)
 | 
			
		||||
		resultMsg := htmlDoc.doc.Find(".ui.message>p").Text()
 | 
			
		||||
 | 
			
		||||
		assert.EqualValues(t, "Branch 'user1/repo1:feature/test' has been deleted.", resultMsg)
 | 
			
		||||
		assert.EqualValues(t, "Branch \"user1/repo1:feature/test\" has been deleted.", resultMsg)
 | 
			
		||||
	})
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user