]> source.dussan.org Git - gitea.git/commitdiff
Add helper descriptions on new repo page (#14591)
authorBagas Sanjaya <bagasdotme@gmail.com>
Sun, 21 Feb 2021 09:59:31 +0000 (16:59 +0700)
committerGitHub <noreply@github.com>
Sun, 21 Feb 2021 09:59:31 +0000 (17:59 +0800)
* 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>
options/locale/locale_en-US.ini
templates/repo/create.tmpl

index 2690303253343884ed64c63073669428d798bff3..8245df754a70e1751c64359ab2ae94e562a49175 100644 (file)
@@ -665,6 +665,7 @@ email_notifications.disable = Disable Email Notifications
 email_notifications.submit = Set Email Preference
 
 [repo]
+new_repo_helper = A repository contains all project files, including revision history.  Already have it elsewhere? <a href="%s">Migrate repository.</a>
 owner = Owner
 owner_helper = Some organizations may not show up in the dropdown due to a maximum repository count limit.
 repo_name = Repository Name
@@ -687,17 +688,27 @@ use_template = Use this template
 generate_repo = Generate Repository
 generate_from = Generate From
 repo_desc = Description
+repo_desc_helper = Enter short description (optional)
 repo_lang = Language
 repo_gitignore_helper = Select .gitignore templates.
+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.
 issue_labels = Issue Labels
 issue_labels_helper = Select an issue label set.
 license = License
 license_helper = Select a license file.
+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>
 readme = README
 readme_helper = Select a README file template.
+readme_helper_desc = This is the place where you can write a complete description for your project.
 auto_init = Initialize Repository (Adds .gitignore, License and README)
+trust_model_helper = Select trust model for signature verification. Possible options are:
+trust_model_helper_collaborator = Collaborator: Trust signatures by collaborators
+trust_model_helper_committer = Committer: Trust signatures that match committers
+trust_model_helper_collaborator_committer = Collaborator+Committer: Trust signatures by collaborators which match the committer
+trust_model_helper_default = Default: Use the default trust model for this installation
 create_repo = Create Repository
 default_branch = Default Branch
+default_branch_helper = The default branch is the base branch for pull requests and code commits.
 mirror_prune = Prune
 mirror_prune_desc = Remove obsolete remote-tracking references
 mirror_interval = Mirror Interval (valid time units are 'h', 'm', 's'). 0 to disable automatic sync.
index 8bb3584ec650d2da5d49b5bbd7a89f5851e9289f..4aabcb6bb377bcb50a9c689ef179c18eda3e48a9 100644 (file)
@@ -9,6 +9,9 @@
                                </h3>
                                <div class="ui attached segment">
                                        {{template "base/alert" .}}
+
+                                       <p class="ui center">{{.i18n.Tr "repo.new_repo_helper" "/repo/migrate" | Safe}}</p>
+
                                        {{if not .CanCreateRepo}}
                                                <div class="ui negative message">
                                                        <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 @@
                                        </div>
                                        <div class="inline field {{if .Err_Description}}error{{end}}">
                                                <label for="description">{{.i18n.Tr "repo.repo_desc"}}</label>
-                                               <textarea id="description" name="description">{{.description}}</textarea>
+                                               <textarea id="description" name="description" placeholder="{{.i18n.Tr "repo.repo_desc_helper"}}">{{.description}}</textarea>
                                        </div>
                                        <div class="inline field">
                                                <label>{{.i18n.Tr "repo.template"}}</label>
                                                                        {{end}}
                                                                </div>
                                                        </div>
+                                                       <span class="help">{{.i18n.Tr "repo.repo_gitignore_helper_desc"}}</span>
                                                </div>
                                                <div class="inline field">
                                                        <label>{{.i18n.Tr "repo.license"}}</label>
                                                                        {{end}}
                                                                </div>
                                                        </div>
+                                                       <span class="help">{{.i18n.Tr "repo.license_helper_desc" "https://choosealicense.com/" | Str2html}}</span>
                                                </div>
 
                                                <div class="inline field">
                                                                        {{end}}
                                                                </div>
                                                        </div>
+                                                       <span class="help">{{.i18n.Tr "repo.readme_helper_desc"}}</span>
                                                </div>
                                                <div class="inline field">
                                                        <div class="ui checkbox" id="auto-init">
                                                <div class="inline field">
                                                        <label for="default_branch">{{.i18n.Tr "repo.default_branch"}}</label>
                                                        <input id="default_branch" name="default_branch" value="{{.default_branch}}" placeholder="{{.default_branch}}">
+                                                       <span class="help">{{.i18n.Tr "repo.default_branch_helper"}}</span>
                                                </div>
                                                <div class="inline field">
                                                        <label>{{.i18n.Tr "repo.settings.trust_model"}}</label>
                                                                        <div class="item" data-value="collaboratorcommitter">{{.i18n.Tr "repo.settings.trust_model.collaboratorcommitter"}}</div>
                                                                </div>
                                                        </div>
+                                                       <div class="help">
+                                                               {{.i18n.Tr "repo.trust_model_helper"}}
+                                                               <ul>
+                                                                       <li>{{.i18n.Tr "repo.trust_model_helper_collaborator"}}</li>
+                                                                       <li>{{.i18n.Tr "repo.trust_model_helper_committer"}}</li>
+                                                                       <li>{{.i18n.Tr "repo.trust_model_helper_collaborator_committer"}}</li>
+                                                                       <li>{{.i18n.Tr "repo.trust_model_helper_default"}}</li>
+                                                               </ul>
+                                                       </div>
                                                </div>
                                                <div class="inline field">
                                                        <label>{{.i18n.Tr "repo.template"}}</label>