Show ssh command directly in template instead of i18n translation (#19335)

* add missing space for generate ssh token command

Signed-off-by: Junjie Yuan <yuan@junjie.pro>

* Do not use i18n for ssh command

* Remove unnecessary settings.ssh_token_code

* Revert locale_zh-CN.ini

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
tokarchuk/v1.17
原俊杰 3 years ago committed by GitHub
parent 5e242e021b
commit 184302665f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      options/locale/locale_en-US.ini
  2. 2
      templates/user/settings/keys_ssh.tmpl

@ -664,7 +664,6 @@ ssh_invalid_token_signature = The provided SSH key, signature or token do not ma
ssh_token_required = You must provide a signature for the below token ssh_token_required = You must provide a signature for the below token
ssh_token = Token ssh_token = Token
ssh_token_help = You can generate a signature using: ssh_token_help = You can generate a signature using:
ssh_token_code = echo -n "%s" | ssh-keygen -Y sign -n gitea -f /path_to_your_pubkey
ssh_token_signature = Armored SSH signature ssh_token_signature = Armored SSH signature
key_signature_ssh_placeholder = Begins with '-----BEGIN SSH SIGNATURE-----' key_signature_ssh_placeholder = Begins with '-----BEGIN SSH SIGNATURE-----'
verify_ssh_key_success = SSH key '%s' has been verified. verify_ssh_key_success = SSH key '%s' has been verified.

@ -75,7 +75,7 @@
<input readonly="" value="{{$.TokenToSign}}"> <input readonly="" value="{{$.TokenToSign}}">
<div class="help"> <div class="help">
<p>{{$.i18n.Tr "settings.ssh_token_help"}}</p> <p>{{$.i18n.Tr "settings.ssh_token_help"}}</p>
<p><code>{{$.i18n.Tr "settings.ssh_token_code" $.TokenToSign}}</code></p> <p><code>{{printf "echo -n '%s' | ssh-keygen -Y sign -n gitea -f /path_to_your_pubkey" $.TokenToSign}}</code></p>
</div> </div>
<br> <br>
</div> </div>

Loading…
Cancel
Save