Browse Source

Add placeholder text for "Add SSH/GPG Key" forms (#12533)

* Add placeholder text for "Add SSH/GPG Key" forms

This commit add placeholder text for both Add SSH key and Add GPG key
forms.

* Localize placeholders

Changes requested by @zeripath

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
for-closed-social
Bagas Sanjaya 4 years ago
committed by GitHub
parent
commit
fff0204cab
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 2 deletions
  1. +2
    -0
      options/locale/locale_en-US.ini
  2. +1
    -1
      templates/user/settings/keys_gpg.tmpl
  3. +1
    -1
      templates/user/settings/keys_ssh.tmpl

+ 2
- 0
options/locale/locale_en-US.ini View File

@ -500,6 +500,8 @@ ssh_helper = Need help? Have a look at GitHub's guide to
gpg_helper = <strong>Need help?</strong> Have a look at GitHub's guide <a href="%s">about GPG</a>. gpg_helper = <strong>Need help?</strong> Have a look at GitHub's guide <a href="%s">about GPG</a>.
add_new_key = Add SSH Key add_new_key = Add SSH Key
add_new_gpg_key = Add GPG Key add_new_gpg_key = Add GPG Key
key_content_ssh_placeholder = Begins with 'ssh-ed25519', 'ssh-rsa', 'ecdsa-sha2-nistp256', 'ecdsa-sha2-nistp384', or 'ecdsa-sha2-nistp521'
key_content_gpg_placeholder = Begins with '-----BEGIN PGP PUBLIC KEY BLOCK-----'
ssh_key_been_used = This SSH key has already been added to the server. ssh_key_been_used = This SSH key has already been added to the server.
ssh_key_name_used = An SSH key with same name is already added to your account. ssh_key_name_used = An SSH key with same name is already added to your account.
gpg_key_id_used = A public GPG key with same ID already exists. gpg_key_id_used = A public GPG key with same ID already exists.

+ 1
- 1
templates/user/settings/keys_gpg.tmpl View File

@ -47,7 +47,7 @@
<input type="hidden" name="title" value="none"> <input type="hidden" name="title" value="none">
<div class="field {{if .Err_Content}}error{{end}}"> <div class="field {{if .Err_Content}}error{{end}}">
<label for="content">{{.i18n.Tr "settings.key_content"}}</label> <label for="content">{{.i18n.Tr "settings.key_content"}}</label>
<textarea id="gpg-key-content" name="content" required>{{.content}}</textarea>
<textarea id="gpg-key-content" name="content" placeholder="{{.i18n.Tr "settings.key_content_gpg_placeholder"}}" required>{{.content}}</textarea>
</div> </div>
<input name="type" type="hidden" value="gpg"> <input name="type" type="hidden" value="gpg">
<button class="ui green button"> <button class="ui green button">

+ 1
- 1
templates/user/settings/keys_ssh.tmpl View File

@ -51,7 +51,7 @@
</div> </div>
<div class="field {{if .Err_Content}}error{{end}}"> <div class="field {{if .Err_Content}}error{{end}}">
<label for="content">{{.i18n.Tr "settings.key_content"}}</label> <label for="content">{{.i18n.Tr "settings.key_content"}}</label>
<textarea id="ssh-key-content" name="content" required>{{.content}}</textarea>
<textarea id="ssh-key-content" name="content" placeholder="{{.i18n.Tr "settings.key_content_ssh_placeholder"}}" required>{{.content}}</textarea>
</div> </div>
<input name="type" type="hidden" value="ssh"> <input name="type" type="hidden" value="ssh">
<button class="ui green button"> <button class="ui green button">

Loading…
Cancel
Save