Commit 73eb5097 authored by Thomas Randolph's avatar Thomas Randolph

Add new setting for the default initial branch name

parent 9c3cb4d3
= form_for @application_setting, url: general_admin_application_settings_path(anchor: 'js-default-branch-name'), html: { class: 'fieldset-form' } do |f|
= form_errors(@application_setting)
- fallback_branch_name = '<code>master</code>'
%fieldset
.form-group
= f.label :default_branch_name, _('Default initial branch name'), class: 'label-light'
= f.text_field :default_branch_name, placeholder: 'master', class: 'form-control'
%span.form-text.text-muted
= (_("Changes affect new repositories only. If not specified, Git's default name %{branch_name_default} will be used.") % { branch_name_default: fallback_branch_name } ).html_safe
= f.submit _('Save changes'), class: 'gl-button btn-success'
......@@ -2,6 +2,18 @@
- page_title _("Repository")
- @content_class = "limit-container-width" unless fluid_layout
- if Feature.enabled?(:global_default_branch_name)
%section.settings.as-default-branch-name.no-animate#js-default-branch-name{ class: ('expanded' if expanded_by_default?) }
.settings-header
%h4
= _('Default initial branch name')
%button.gl-button.js-settings-toggle{ type: 'button' }
= expanded_by_default? ? _('Collapse') : _('Expand')
%p
= _('Set the default name of the initial branch when creating new repositories through the user interface.')
.settings-content
= render 'initial_branch_name'
%section.settings.as-mirror.no-animate#js-mirror-settings{ class: ('expanded' if expanded_by_default?) }
.settings-header
%h4
......
......@@ -4260,6 +4260,9 @@ msgstr ""
msgid "Changes"
msgstr ""
msgid "Changes affect new repositories only. If not specified, Git's default name %{branch_name_default} will be used."
msgstr ""
msgid "Changes are shown as if the <b>source</b> revision was being merged into the <b>target</b> revision."
msgstr ""
......@@ -7405,6 +7408,9 @@ msgstr ""
msgid "Default first day of the week in calendars and date pickers."
msgstr ""
msgid "Default initial branch name"
msgstr ""
msgid "Default issue template"
msgstr ""
......@@ -21068,6 +21074,9 @@ msgstr ""
msgid "Set the default expiration time for each job's artifacts. 0 for unlimited. The default unit is in seconds, but you can define an alternative. For example: <code>4 mins 2 sec</code>, <code>2h42min</code>."
msgstr ""
msgid "Set the default name of the initial branch when creating new repositories through the user interface."
msgstr ""
msgid "Set the due date to %{due_date}."
msgstr ""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment