[GITEA] Use correct translations for pull request

- When a commit references a pull request, the detail strings should
reflect that. Add a new translation string for the pull request.
- Added integration tests.
- Resolves #2256

(cherry picked from commit 0d054cd4d998957bd499bfebe4002290526c5b92)
This commit is contained in:
Gusted 2024-01-28 20:17:46 +01:00 committed by Earl Warren
parent b26d037c62
commit 361617eea0
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00
4 changed files with 50 additions and 1 deletions

View file

@ -152,7 +152,11 @@
{{template "shared/user/avatarlink" dict "user" .Poster}}
<span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}}
{{ctx.Locale.Tr "repo.issues.commit_ref_at" .EventTag $createdStr | Safe}}
{{if .Issue.IsPull}}
{{ctx.Locale.Tr "repo.pulls.commit_ref_at" .EventTag $createdStr | Safe}}
{{else}}
{{ctx.Locale.Tr "repo.issues.commit_ref_at" .EventTag $createdStr | Safe}}
{{end}}
</span>
<div class="detail">
{{svg "octicon-git-commit"}}