Skip to content

Commit fff0204

Browse files
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 <[email protected]>
1 parent 0c9eb46 commit fff0204

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

options/locale/locale_en-US.ini

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -500,6 +500,8 @@ ssh_helper = <strong>Need help?</strong> Have a look at GitHub's guide to <a hre
500500
gpg_helper = <strong>Need help?</strong> Have a look at GitHub's guide <a href="%s">about GPG</a>.
501501
add_new_key = Add SSH Key
502502
add_new_gpg_key = Add GPG Key
503+
key_content_ssh_placeholder = Begins with 'ssh-ed25519', 'ssh-rsa', 'ecdsa-sha2-nistp256', 'ecdsa-sha2-nistp384', or 'ecdsa-sha2-nistp521'
504+
key_content_gpg_placeholder = Begins with '-----BEGIN PGP PUBLIC KEY BLOCK-----'
503505
ssh_key_been_used = This SSH key has already been added to the server.
504506
ssh_key_name_used = An SSH key with same name is already added to your account.
505507
gpg_key_id_used = A public GPG key with same ID already exists.

templates/user/settings/keys_gpg.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
<input type="hidden" name="title" value="none">
4848
<div class="field {{if .Err_Content}}error{{end}}">
4949
<label for="content">{{.i18n.Tr "settings.key_content"}}</label>
50-
<textarea id="gpg-key-content" name="content" required>{{.content}}</textarea>
50+
<textarea id="gpg-key-content" name="content" placeholder="{{.i18n.Tr "settings.key_content_gpg_placeholder"}}" required>{{.content}}</textarea>
5151
</div>
5252
<input name="type" type="hidden" value="gpg">
5353
<button class="ui green button">

templates/user/settings/keys_ssh.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
</div>
5252
<div class="field {{if .Err_Content}}error{{end}}">
5353
<label for="content">{{.i18n.Tr "settings.key_content"}}</label>
54-
<textarea id="ssh-key-content" name="content" required>{{.content}}</textarea>
54+
<textarea id="ssh-key-content" name="content" placeholder="{{.i18n.Tr "settings.key_content_ssh_placeholder"}}" required>{{.content}}</textarea>
5555
</div>
5656
<input name="type" type="hidden" value="ssh">
5757
<button class="ui green button">

0 commit comments

Comments
 (0)