]> source.dussan.org Git - gitea.git/commitdiff
Supplement and Improvement for #32558 (#32585)
authorKerwin Bryant <kerwin612@qq.com>
Thu, 21 Nov 2024 02:42:37 +0000 (10:42 +0800)
committerGitHub <noreply@github.com>
Thu, 21 Nov 2024 02:42:37 +0000 (02:42 +0000)
Thank you for @wxiaoguang's reminders and suggestions:
https://github.com/go-gitea/gitea/pull/32558#discussion_r1849972913

options/locale/locale_en-US.ini
templates/install.tmpl

index 122b70924a9ca53c7b2373da149433a4375f4f4e..d75827be5c42f99664ea6152a561b287c2bd932e 100644 (file)
@@ -352,7 +352,7 @@ enable_update_checker = Enable Update Checker
 enable_update_checker_helper = Checks for new version releases periodically by connecting to gitea.io.
 env_config_keys = Environment Configuration
 env_config_keys_prompt = The following environment variables will also be applied to your configuration file:
-config_write_file_prompt = These configuration options will be written into:
+config_write_file_prompt = These configuration options will be written into: %s
 
 [home]
 nav_menu = Navigation Menu
index ea4023d40909861acad532c21855cd774a2e3339..6c4cc7df01b0fd09c2951d01f111e83c662eabfa 100644 (file)
 
                                        <div class="inline field">
                                                <div class="right-content">
-                                                       {{ctx.Locale.Tr "install.config_write_file_prompt"}} <span class="ui label">{{.CustomConfFile}}</span> <button class="btn interact-fg" data-clipboard-text="{{.CustomConfFile}}">{{svg "octicon-copy" 14}}</button>
+                                                       {{$copyBtn := svg "octicon-copy" 14}}
+                                                       {{$filePath := HTMLFormat `<span class="ui label">%s</span> <button class="btn interact-fg" data-clipboard-text="%s">%s</button>` .CustomConfFile .CustomConfFile $copyBtn}}
+                                                       {{ctx.Locale.Tr "install.config_write_file_prompt" $filePath}}
                                                </div>
                                                <div class="tw-mt-4 tw-mb-2 tw-text-center">
                                                        <button class="ui primary button">{{ctx.Locale.Tr "install.install_btn_confirm"}}</button>