diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2024-02-15 05:48:45 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-14 21:48:45 +0000 |
commit | f3eb835886031df7a562abc123c3f6011c81eca8 (patch) | |
tree | 6db218680b00a81f2ea46675d5dde94642a232b9 /tests/integration/branches_test.go | |
parent | 94d06be035bac468129903c9f32e785baf3c1c3b (diff) | |
download | gitea-f3eb835886031df7a562abc123c3f6011c81eca8.tar.gz gitea-f3eb835886031df7a562abc123c3f6011c81eca8.zip |
Refactor locale&string&template related code (#29165)
Clarify when "string" should be used (and be escaped), and when
"template.HTML" should be used (no need to escape)
And help PRs like #29059 , to render the error messages correctly.
Diffstat (limited to 'tests/integration/branches_test.go')
-rw-r--r-- | tests/integration/branches_test.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/integration/branches_test.go b/tests/integration/branches_test.go index 99d7eef706..e148fe2d6f 100644 --- a/tests/integration/branches_test.go +++ b/tests/integration/branches_test.go @@ -37,7 +37,7 @@ func TestUndoDeleteBranch(t *testing.T) { htmlDoc, name := branchAction(t, ".restore-branch-button") assert.Contains(t, htmlDoc.doc.Find(".ui.positive.message").Text(), - translation.NewLocale("en-US").Tr("repo.branch.restore_success", name), + translation.NewLocale("en-US").TrString("repo.branch.restore_success", name), ) }) } @@ -46,7 +46,7 @@ func deleteBranch(t *testing.T) { htmlDoc, name := branchAction(t, ".delete-branch-button") assert.Contains(t, htmlDoc.doc.Find(".ui.positive.message").Text(), - translation.NewLocale("en-US").Tr("repo.branch.deletion_success", name), + translation.NewLocale("en-US").TrString("repo.branch.deletion_success", name), ) } |