summaryrefslogtreecommitdiffstats
path: root/templates/repo/diff/image_diff.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/diff/image_diff.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/diff/image_diff.tmpl')
-rw-r--r--templates/repo/diff/image_diff.tmpl22
1 files changed, 11 insertions, 11 deletions
diff --git a/templates/repo/diff/image_diff.tmpl b/templates/repo/diff/image_diff.tmpl
index 63481288c9..71a6da5c5e 100644
--- a/templates/repo/diff/image_diff.tmpl
+++ b/templates/repo/diff/image_diff.tmpl
@@ -4,10 +4,10 @@
<div class="image-diff" data-path-before="{{.root.BeforeRawPath}}/{{PathEscapeSegments .file.OldName}}" data-path-after="{{.root.RawPath}}/{{PathEscapeSegments .file.Name}}">
<div class="ui secondary pointing tabular top attached borderless menu stackable new-menu">
<div class="new-menu-inner">
- <a class="item active" data-tab="diff-side-by-side-{{ .file.Index }}">{{.root.i18n.Tr "repo.diff.image.side_by_side"}}</a>
+ <a class="item active" data-tab="diff-side-by-side-{{ .file.Index }}">{{.root.locale.Tr "repo.diff.image.side_by_side"}}</a>
{{if and .blobBase .blobHead}}
- <a class="item" data-tab="diff-swipe-{{ .file.Index }}">{{.root.i18n.Tr "repo.diff.image.swipe"}}</a>
- <a class="item" data-tab="diff-overlay-{{ .file.Index }}">{{.root.i18n.Tr "repo.diff.image.overlay"}}</a>
+ <a class="item" data-tab="diff-swipe-{{ .file.Index }}">{{.root.locale.Tr "repo.diff.image.swipe"}}</a>
+ <a class="item" data-tab="diff-overlay-{{ .file.Index }}">{{.root.locale.Tr "repo.diff.image.overlay"}}</a>
{{end}}
</div>
</div>
@@ -16,31 +16,31 @@
<div class="diff-side-by-side">
{{if .blobBase }}
<span class="side">
- <p class="side-header">{{.root.i18n.Tr "repo.diff.file_before"}}</p>
+ <p class="side-header">{{.root.locale.Tr "repo.diff.file_before"}}</p>
<span class="before-container"><img class="image-before" /></span>
<p>
<span class="bounds-info-before">
- {{.root.i18n.Tr "repo.diff.file_image_width"}}: <span class="text bounds-info-width"></span>
+ {{.root.locale.Tr "repo.diff.file_image_width"}}: <span class="text bounds-info-width"></span>
&nbsp;|&nbsp;
- {{.root.i18n.Tr "repo.diff.file_image_height"}}: <span class="text bounds-info-height"></span>
+ {{.root.locale.Tr "repo.diff.file_image_height"}}: <span class="text bounds-info-height"></span>
&nbsp;|&nbsp;
</span>
- {{.root.i18n.Tr "repo.diff.file_byte_size"}}: <span class="text">{{FileSize .blobBase.Size}}</span>
+ {{.root.locale.Tr "repo.diff.file_byte_size"}}: <span class="text">{{FileSize .blobBase.Size}}</span>
</p>
</span>
{{end}}
{{if .blobHead }}
<span class="side">
- <p class="side-header">{{.root.i18n.Tr "repo.diff.file_after"}}</p>
+ <p class="side-header">{{.root.locale.Tr "repo.diff.file_after"}}</p>
<span class="after-container"><img class="image-after" /></span>
<p>
<span class="bounds-info-after">
- {{.root.i18n.Tr "repo.diff.file_image_width"}}: <span class="text bounds-info-width"></span>
+ {{.root.locale.Tr "repo.diff.file_image_width"}}: <span class="text bounds-info-width"></span>
&nbsp;|&nbsp;
- {{.root.i18n.Tr "repo.diff.file_image_height"}}: <span class="text bounds-info-height"></span>
+ {{.root.locale.Tr "repo.diff.file_image_height"}}: <span class="text bounds-info-height"></span>
&nbsp;|&nbsp;
</span>
- {{.root.i18n.Tr "repo.diff.file_byte_size"}}: <span class="text">{{FileSize .blobHead.Size}}</span>
+ {{.root.locale.Tr "repo.diff.file_byte_size"}}: <span class="text">{{FileSize .blobHead.Size}}</span>
</p>
</span>
{{end}}