From 81cc944cdaab468e456f3e53fb4b511e1c6a863b Mon Sep 17 00:00:00 2001 From: Otto Richter <git@otto.splvs.net> Date: Wed, 17 Apr 2024 19:32:18 +0200 Subject: [PATCH] Fix unlabelled button in code review (cherry picked from commit 187e10d8c9d8cd3edeb953e520ba370f2f1c73b3) --- options/locale/locale_en-US.ini | 1 + templates/repo/diff/box.tmpl | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index 9198847235..18a396b715 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -99,6 +99,7 @@ disabled = Disabled locked = Locked copy = Copy +copy_generic = Copy to clipboard copy_url = Copy URL copy_hash = Copy hash copy_content = Copy content diff --git a/templates/repo/diff/box.tmpl b/templates/repo/diff/box.tmpl index 6b343e4ee0..71154f9768 100644 --- a/templates/repo/diff/box.tmpl +++ b/templates/repo/diff/box.tmpl @@ -130,7 +130,7 @@ </div> <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> {{if .IsLFSFile}} ({{ctx.Locale.Tr "repo.stored_lfs"}}){{end}} - <button class="btn interact-fg tw-p-2" data-clipboard-text="{{$file.Name}}">{{svg "octicon-copy" 14}}</button> + <button class="btn interact-fg tw-p-2" data-clipboard-text="{{$file.Name}}" data-tooltip-content="{{ctx.Locale.Tr "copy_generic"}}" aria-label="{{ctx.Locale.Tr "copy_generic"}}">{{svg "octicon-copy" 14}}</button> {{if $file.IsGenerated}} <span class="ui label">{{ctx.Locale.Tr "repo.diff.generated"}}</span> {{end}}