aboutsummaryrefslogtreecommitdiffstats
path: root/templates/repo/file_info.tmpl
diff options
context:
space:
mode:
authordelvh <dev.lh@web.de>2023-09-25 10:56:50 +0200
committerGitHub <noreply@github.com>2023-09-25 08:56:50 +0000
commit7960ba7e2bbe2eb6f98f6d99f2ce105468cdf56e (patch)
treecfcc4836ba1bb71518742f2aaf980f1f34248468 /templates/repo/file_info.tmpl
parente6d8b146207de0f5d88b7c08dc75b1f2f078cbbe (diff)
downloadgitea-7960ba7e2bbe2eb6f98f6d99f2ce105468cdf56e.tar.gz
gitea-7960ba7e2bbe2eb6f98f6d99f2ce105468cdf56e.zip
Always use `ctx.Locale.Tr` inside templates (#27231)
Diffstat (limited to 'templates/repo/file_info.tmpl')
-rw-r--r--templates/repo/file_info.tmpl8
1 files changed, 4 insertions, 4 deletions
diff --git a/templates/repo/file_info.tmpl b/templates/repo/file_info.tmpl
index 7323b30d77..3003fbbdb6 100644
--- a/templates/repo/file_info.tmpl
+++ b/templates/repo/file_info.tmpl
@@ -1,17 +1,17 @@
<div class="file-info text grey normal gt-mono">
{{if .FileIsSymlink}}
<div class="file-info-entry">
- {{.locale.Tr "repo.symbolic_link"}}
+ {{ctx.Locale.Tr "repo.symbolic_link"}}
</div>
{{end}}
{{if .NumLinesSet}}{{/* Explicit attribute needed to show 0 line changes */}}
<div class="file-info-entry">
- {{.NumLines}} {{.locale.TrN .NumLines "repo.line" "repo.lines"}}
+ {{.NumLines}} {{ctx.Locale.TrN .NumLines "repo.line" "repo.lines"}}
</div>
{{end}}
{{if .FileSize}}
<div class="file-info-entry">
- {{FileSize .FileSize}}{{if .IsLFSFile}} ({{.locale.Tr "repo.stored_lfs"}}){{end}}
+ {{FileSize .FileSize}}{{if .IsLFSFile}} ({{ctx.Locale.Tr "repo.stored_lfs"}}){{end}}
</div>
{{end}}
{{if .LFSLock}}
@@ -27,7 +27,7 @@
{{end}}
{{if .IsExecutable}}
<div class="file-info-entry">
- {{.locale.Tr "repo.executable_file"}}
+ {{ctx.Locale.Tr "repo.executable_file"}}
</div>
{{end}}
{{if .ImageSize}}