Skip to content

Commit 1f13229

Browse files
authored
Add helper descriptions on new repo page (#14591)
* Add helper descriptions on new repo page Add helpers for: * repo description * .gitignore * license * README * default branch * signature trust model Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com> * Oops, rename trust_model_helper To match similar helper. trust_model_helper_intro -> trust_model_helper Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
1 parent d6068c1 commit 1f13229

File tree

2 files changed

+28
-1
lines changed

2 files changed

+28
-1
lines changed

options/locale/locale_en-US.ini

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -665,6 +665,7 @@ email_notifications.disable = Disable Email Notifications
665665
email_notifications.submit = Set Email Preference
666666

667667
[repo]
668+
new_repo_helper = A repository contains all project files, including revision history. Already have it elsewhere? <a href="%s">Migrate repository.</a>
668669
owner = Owner
669670
owner_helper = Some organizations may not show up in the dropdown due to a maximum repository count limit.
670671
repo_name = Repository Name
@@ -687,17 +688,27 @@ use_template = Use this template
687688
generate_repo = Generate Repository
688689
generate_from = Generate From
689690
repo_desc = Description
691+
repo_desc_helper = Enter short description (optional)
690692
repo_lang = Language
691693
repo_gitignore_helper = Select .gitignore templates.
694+
repo_gitignore_helper_desc = Choose which files not to track from a list of templates for common languages. Typical artifacts generated by each language's build tools are included on .gitignore by default.
692695
issue_labels = Issue Labels
693696
issue_labels_helper = Select an issue label set.
694697
license = License
695698
license_helper = Select a license file.
699+
license_helper_desc = A license governs what others can and can't do with your code. Not sure which one is right for your project? See <a target="_blank" rel="noopener noreferrer" href="%s">Choose a license.</a>
696700
readme = README
697701
readme_helper = Select a README file template.
702+
readme_helper_desc = This is the place where you can write a complete description for your project.
698703
auto_init = Initialize Repository (Adds .gitignore, License and README)
704+
trust_model_helper = Select trust model for signature verification. Possible options are:
705+
trust_model_helper_collaborator = Collaborator: Trust signatures by collaborators
706+
trust_model_helper_committer = Committer: Trust signatures that match committers
707+
trust_model_helper_collaborator_committer = Collaborator+Committer: Trust signatures by collaborators which match the committer
708+
trust_model_helper_default = Default: Use the default trust model for this installation
699709
create_repo = Create Repository
700710
default_branch = Default Branch
711+
default_branch_helper = The default branch is the base branch for pull requests and code commits.
701712
mirror_prune = Prune
702713
mirror_prune_desc = Remove obsolete remote-tracking references
703714
mirror_interval = Mirror Interval (valid time units are 'h', 'm', 's'). 0 to disable automatic sync.

templates/repo/create.tmpl

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
</h3>
1010
<div class="ui attached segment">
1111
{{template "base/alert" .}}
12+
13+
<p class="ui center">{{.i18n.Tr "repo.new_repo_helper" "/repo/migrate" | Safe}}</p>
14+
1215
{{if not .CanCreateRepo}}
1316
<div class="ui negative message">
1417
<p>{{.i18n.Tr (TrN .i18n.Lang .MaxCreationLimit "repo.form.reach_limit_of_creation_1" "repo.form.reach_limit_of_creation_n") .MaxCreationLimit}}</p>
@@ -59,7 +62,7 @@
5962
</div>
6063
<div class="inline field {{if .Err_Description}}error{{end}}">
6164
<label for="description">{{.i18n.Tr "repo.repo_desc"}}</label>
62-
<textarea id="description" name="description">{{.description}}</textarea>
65+
<textarea id="description" name="description" placeholder="{{.i18n.Tr "repo.repo_desc_helper"}}">{{.description}}</textarea>
6366
</div>
6467
<div class="inline field">
6568
<label>{{.i18n.Tr "repo.template"}}</label>
@@ -135,6 +138,7 @@
135138
{{end}}
136139
</div>
137140
</div>
141+
<span class="help">{{.i18n.Tr "repo.repo_gitignore_helper_desc"}}</span>
138142
</div>
139143
<div class="inline field">
140144
<label>{{.i18n.Tr "repo.license"}}</label>
@@ -148,6 +152,7 @@
148152
{{end}}
149153
</div>
150154
</div>
155+
<span class="help">{{.i18n.Tr "repo.license_helper_desc" "https://choosealicense.com/" | Str2html}}</span>
151156
</div>
152157

153158
<div class="inline field">
@@ -161,6 +166,7 @@
161166
{{end}}
162167
</div>
163168
</div>
169+
<span class="help">{{.i18n.Tr "repo.readme_helper_desc"}}</span>
164170
</div>
165171
<div class="inline field">
166172
<div class="ui checkbox" id="auto-init">
@@ -171,6 +177,7 @@
171177
<div class="inline field">
172178
<label for="default_branch">{{.i18n.Tr "repo.default_branch"}}</label>
173179
<input id="default_branch" name="default_branch" value="{{.default_branch}}" placeholder="{{.default_branch}}">
180+
<span class="help">{{.i18n.Tr "repo.default_branch_helper"}}</span>
174181
</div>
175182
<div class="inline field">
176183
<label>{{.i18n.Tr "repo.settings.trust_model"}}</label>
@@ -185,6 +192,15 @@
185192
<div class="item" data-value="collaboratorcommitter">{{.i18n.Tr "repo.settings.trust_model.collaboratorcommitter"}}</div>
186193
</div>
187194
</div>
195+
<div class="help">
196+
{{.i18n.Tr "repo.trust_model_helper"}}
197+
<ul>
198+
<li>{{.i18n.Tr "repo.trust_model_helper_collaborator"}}</li>
199+
<li>{{.i18n.Tr "repo.trust_model_helper_committer"}}</li>
200+
<li>{{.i18n.Tr "repo.trust_model_helper_collaborator_committer"}}</li>
201+
<li>{{.i18n.Tr "repo.trust_model_helper_default"}}</li>
202+
</ul>
203+
</div>
188204
</div>
189205
<div class="inline field">
190206
<label>{{.i18n.Tr "repo.template"}}</label>

0 commit comments

Comments
 (0)