summaryrefslogtreecommitdiffstats
path: root/templates/repo/blame.tmpl
diff options
context:
space:
mode:
authorGusted <williamzijl7@hotmail.com>2022-06-27 22:58:46 +0200
committerGitHub <noreply@github.com>2022-06-27 15:58:46 -0500
commitd55a0b723809f5b94acd948b924c8518014445e0 (patch)
tree0ef9ea54f30769ca1d16ce20e551bd7a078f7f5e /templates/repo/blame.tmpl
parentb551bc2a089d3310dde5706d1b9702f112fe3ea0 (diff)
downloadgitea-d55a0b723809f5b94acd948b924c8518014445e0.tar.gz
gitea-d55a0b723809f5b94acd948b924c8518014445e0.zip
Refactor `i18n` to `locale` (#20153)
* Refactor `i18n` to `locale` - Currently we're using the `i18n` variable naming for the `locale` struct. This contains locale's specific information and cannot be used for general i18n purpose, therefore refactoring it to `locale` makes more sense. - Ref: https://github.com/go-gitea/gitea/pull/20096#discussion_r906699200 * Update routers/install/install.go
Diffstat (limited to 'templates/repo/blame.tmpl')
-rw-r--r--templates/repo/blame.tmpl18
1 files changed, 9 insertions, 9 deletions
diff --git a/templates/repo/blame.tmpl b/templates/repo/blame.tmpl
index 3dc3522275..6b3f3eddd7 100644
--- a/templates/repo/blame.tmpl
+++ b/templates/repo/blame.tmpl
@@ -3,21 +3,21 @@
<div class="file-header-left df ac">
<div class="file-info text grey normal mono">
<div class="file-info-entry">
- {{.NumLines}} {{.i18n.TrN .NumLines "repo.line" "repo.lines"}}
+ {{.NumLines}} {{.locale.TrN .NumLines "repo.line" "repo.lines"}}
</div>
<div class="file-info-entry">{{FileSize .FileSize}}</div>
</div>
</div>
<div class="file-header-right file-actions df ac">
<div class="ui buttons">
- <a class="ui tiny button" href="{{$.RawFileLink}}">{{.i18n.Tr "repo.file_raw"}}</a>
+ <a class="ui tiny button" href="{{$.RawFileLink}}">{{.locale.Tr "repo.file_raw"}}</a>
{{if not .IsViewCommit}}
- <a class="ui tiny button" href="{{.RepoLink}}/src/commit/{{.CommitID | PathEscape}}/{{.TreePath | PathEscapeSegments}}">{{.i18n.Tr "repo.file_permalink"}}</a>
+ <a class="ui tiny button" href="{{.RepoLink}}/src/commit/{{.CommitID | PathEscape}}/{{.TreePath | PathEscapeSegments}}">{{.locale.Tr "repo.file_permalink"}}</a>
{{end}}
- <a class="ui tiny button" href="{{.RepoLink}}/src/{{.BranchNameSubURL}}/{{.TreePath | PathEscapeSegments}}">{{.i18n.Tr "repo.normal_view"}}</a>
- <a class="ui tiny button" href="{{.RepoLink}}/commits/{{.BranchNameSubURL}}/{{.TreePath | PathEscapeSegments}}">{{.i18n.Tr "repo.file_history"}}</a>
- <a class="ui tiny button unescape-button">{{.i18n.Tr "repo.unescape_control_characters"}}</a>
- <a class="ui tiny button escape-button" style="display: none;">{{.i18n.Tr "repo.escape_control_characters"}}</a>
+ <a class="ui tiny button" href="{{.RepoLink}}/src/{{.BranchNameSubURL}}/{{.TreePath | PathEscapeSegments}}">{{.locale.Tr "repo.normal_view"}}</a>
+ <a class="ui tiny button" href="{{.RepoLink}}/commits/{{.BranchNameSubURL}}/{{.TreePath | PathEscapeSegments}}">{{.locale.Tr "repo.file_history"}}</a>
+ <a class="ui tiny button unescape-button">{{.locale.Tr "repo.unescape_control_characters"}}</a>
+ <a class="ui tiny button escape-button" style="display: none;">{{.locale.Tr "repo.escape_control_characters"}}</a>
</div>
</div>
</h4>
@@ -46,7 +46,7 @@
</td>
<td class="lines-blame-btn">
{{if $row.PreviousSha}}
- <a href="{{$row.PreviousShaURL}}" class="tooltip" data-content='{{$.i18n.Tr "repo.blame_prior"}}'>
+ <a href="{{$row.PreviousShaURL}}" class="tooltip" data-content='{{$.locale.Tr "repo.blame_prior"}}'>
{{svg "octicon-versions"}}
</a>
{{end}}
@@ -55,7 +55,7 @@
<span id="L{{$row.RowNumber}}" data-line-number="{{$row.RowNumber}}"></span>
</td>
{{if $.EscapeStatus.Escaped}}
- <td class="lines-escape">{{if $row.EscapeStatus.Escaped}}<a href="" class="toggle-escape-button" title="{{$.i18n.Tr "repo.line_unicode"}}"></a>{{end}}</td>
+ <td class="lines-escape">{{if $row.EscapeStatus.Escaped}}<a href="" class="toggle-escape-button" title="{{$.locale.Tr "repo.line_unicode"}}"></a>{{end}}</td>
{{end}}
<td rel="L{{$row.RowNumber}}" rel="L{{$row.RowNumber}}" class="lines-code blame-code chroma">
<code class="code-inner pl-3">{{$row.Code}}</code>