Skip to content

Commit 62f7349

Browse files
authored
1 parent 51aafb4 commit 62f7349

File tree

4 files changed

+5
-6
lines changed

4 files changed

+5
-6
lines changed

options/locale/locale_en-US.ini

-1
Original file line numberDiff line numberDiff line change
@@ -1305,7 +1305,6 @@ file_copy_permalink = Copy Permalink
13051305
view_git_blame = View Git Blame
13061306
video_not_supported_in_browser = Your browser does not support the HTML5 'video' tag.
13071307
audio_not_supported_in_browser = Your browser does not support the HTML5 'audio' tag.
1308-
stored_lfs = Stored with Git LFS
13091308
symbolic_link = Symbolic link
13101309
executable_file = Executable File
13111310
vendored = Vendored

templates/repo/diff/box.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,8 @@
101101
{{end}}
102102
</div>
103103
<span class="file tw-flex tw-items-center tw-font-mono tw-flex-1"><a class="muted file-link" title="{{if $file.IsRenamed}}{{$file.OldName}} → {{end}}{{$file.Name}}" href="#diff-{{$file.NameHash}}">{{if $file.IsRenamed}}{{$file.OldName}} → {{end}}{{$file.Name}}</a>
104-
{{if .IsLFSFile}} ({{ctx.Locale.Tr "repo.stored_lfs"}}){{end}}
105104
<button class="btn interact-fg tw-p-2" data-clipboard-text="{{$file.Name}}" data-tooltip-content="{{ctx.Locale.Tr "copy_path"}}">{{svg "octicon-copy" 14}}</button>
105+
{{if .IsLFSFile}}<span class="ui label">LFS</span>{{end}}
106106
{{if $file.IsGenerated}}
107107
<span class="ui label">{{ctx.Locale.Tr "repo.diff.generated"}}</span>
108108
{{end}}

templates/repo/file_info.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
{{end}}
1212
{{if ne .FileSize nil}}
1313
<div class="file-info-entry">
14-
{{FileSize .FileSize}}{{if .IsLFSFile}} ({{ctx.Locale.Tr "repo.stored_lfs"}}){{end}}
14+
{{FileSize .FileSize}}{{if .IsLFSFile}}<span class="ui label">LFS</span>{{end}}
1515
</div>
1616
{{end}}
1717
{{if .LFSLock}}

tests/integration/lfs_view_test.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ func TestLFSRender(t *testing.T) {
3838
doc := NewHTMLParser(t, resp.Body).doc
3939

4040
fileInfo := doc.Find("div.file-info-entry").First().Text()
41-
assert.Contains(t, fileInfo, "Stored with Git LFS")
41+
assert.Contains(t, fileInfo, "LFS")
4242

4343
content := doc.Find("div.file-view").Text()
4444
assert.Contains(t, content, "Testing documents in LFS")
@@ -54,7 +54,7 @@ func TestLFSRender(t *testing.T) {
5454
doc := NewHTMLParser(t, resp.Body).doc
5555

5656
fileInfo := doc.Find("div.file-info-entry").First().Text()
57-
assert.Contains(t, fileInfo, "Stored with Git LFS")
57+
assert.Contains(t, fileInfo, "LFS")
5858

5959
src, exists := doc.Find(".file-view img").Attr("src")
6060
assert.True(t, exists, "The image should be in an <img> tag")
@@ -71,7 +71,7 @@ func TestLFSRender(t *testing.T) {
7171
doc := NewHTMLParser(t, resp.Body).doc
7272

7373
fileInfo := doc.Find("div.file-info-entry").First().Text()
74-
assert.Contains(t, fileInfo, "Stored with Git LFS")
74+
assert.Contains(t, fileInfo, "LFS")
7575

7676
rawLink, exists := doc.Find("div.file-view > div.view-raw > a").Attr("href")
7777
assert.True(t, exists, "Download link should render instead of content because this is a binary file")

0 commit comments

Comments
 (0)