summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Bennett <lbennett@gitlab.com>2019-01-28 04:18:27 +0000
committerLuke Bennett <lbennett@gitlab.com>2019-01-28 05:07:11 +0000
commit528f9558fc5f847ae94a998e69d550dce4aa4bf8 (patch)
tree306ae75c87b63fe8cc00f4047ceeeaa370d44698
parentc243b154abf5c29ba35fd2fab2ca3bc010fdc324 (diff)
downloadgitlab-ce-appearances-ext.tar.gz
Externalize admin appearances stringsappearances-ext
-rw-r--r--app/views/admin/appearances/_form.html.haml41
-rw-r--r--app/views/admin/appearances/show.html.haml6
-rw-r--r--changelogs/unreleased/appearances-ext.yml5
-rw-r--r--locale/gitlab.pot69
4 files changed, 99 insertions, 22 deletions
diff --git a/app/views/admin/appearances/_form.html.haml b/app/views/admin/appearances/_form.html.haml
index 544f09048f5..7eb77d81aac 100644
--- a/app/views/admin/appearances/_form.html.haml
+++ b/app/views/admin/appearances/_form.html.haml
@@ -1,9 +1,12 @@
+- gfm_link_start = "<a href='#{help_page_path('user/markdown')}' target='_blank' rel='noopener noreferrer'>".html_safe
+- link_end = '</a>'.html_safe
+
= form_for @appearance, url: admin_appearances_path do |f|
= form_errors(@appearance)
%fieldset.app_logo
%legend
- Navigation bar:
+ = _('Navigation bar:')
.form-group.row
= f.label :header_logo, 'Header logo', class: 'col-sm-2 col-form-label pt-0'
.col-sm-10
@@ -11,35 +14,35 @@
= image_tag @appearance.header_logo_path, class: 'appearance-light-logo-preview'
- if @appearance.persisted?
%br
- = link_to 'Remove header logo', header_logos_admin_appearances_path, data: { confirm: "Header logo will be removed. Are you sure?"}, method: :delete, class: "btn btn-inverted btn-remove btn-sm remove-logo"
+ = link_to _('Remove header logo'), header_logos_admin_appearances_path, data: { confirm: _('Header logo will be removed. Are you sure?') }, method: :delete, class: "btn btn-inverted btn-remove btn-sm remove-logo"
%hr
= f.hidden_field :header_logo_cache
= f.file_field :header_logo, class: ""
.hint
- Maximum file size is 1MB. Pages are optimized for a 28px tall header logo
+ = _('Maximum file size is 1MB. Pages are optimized for a 28px tall header logo')
%fieldset.app_logo
%legend
- Favicon:
+ = _('Favicon:')
.form-group.row
- = f.label :favicon, 'Favicon', class: 'col-sm-2 col-form-label pt-0'
+ = f.label :favicon, _('Favicon'), class: 'col-sm-2 col-form-label pt-0'
.col-sm-10
- if @appearance.favicon?
= image_tag @appearance.favicon_path, class: 'appearance-light-logo-preview'
- if @appearance.persisted?
%br
- = link_to 'Remove favicon', favicon_admin_appearances_path, data: { confirm: "Favicon will be removed. Are you sure?"}, method: :delete, class: "btn btn-inverted btn-remove btn-sm remove-logo"
+ = link_to _('Remove favicon'), favicon_admin_appearances_path, data: { confirm: _('Favicon will be removed. Are you sure?') }, method: :delete, class: "btn btn-inverted btn-remove btn-sm remove-logo"
%hr
= f.hidden_field :favicon_cache
= f.file_field :favicon, class: ''
.hint
- Maximum file size is 1MB. Image size must be 32x32px. Allowed image formats are #{favicon_extension_whitelist}.
+ = _('Maximum file size is 1MB. Image size must be 32x32px. Allowed image formats are %{favicon_extension_whitelist}.') % { favicon_extension_whitelist: favicon_extension_whitelist }
%br
- Images with incorrect dimensions are not resized automatically, and may result in unexpected behavior.
+ = _('Images with incorrect dimensions are not resized automatically, and may result in unexpected behavior.')
%fieldset.sign-in
%legend
- Sign in/Sign up pages:
+ = _('Sign in/Sign up pages:')
.form-group.row
= f.label :title, class: 'col-sm-2 col-form-label'
.col-sm-10
@@ -49,7 +52,7 @@
.col-sm-10
= f.text_area :description, class: "form-control", rows: 10
.hint
- Description parsed with #{link_to "GitLab Flavored Markdown", help_page_path('user/markdown'), target: '_blank'}.
+ = _('Description parsed with %{gfm_link_start}GitLab Flavored Markdown%{link_end}.').html_safe % { gfm_link_start: gfm_link_start, link_end: link_end }
.form-group.row
= f.label :logo, class: 'col-sm-2 col-form-label pt-0'
.col-sm-10
@@ -57,30 +60,30 @@
= image_tag @appearance.logo_path, class: 'appearance-logo-preview'
- if @appearance.persisted?
%br
- = link_to 'Remove logo', logo_admin_appearances_path, data: { confirm: "Logo will be removed. Are you sure?"}, method: :delete, class: "btn btn-inverted btn-remove btn-sm remove-logo"
+ = link_to _('Remove logo'), logo_admin_appearances_path, data: { confirm: _('Logo will be removed. Are you sure?') }, method: :delete, class: "btn btn-inverted btn-remove btn-sm remove-logo"
%hr
= f.hidden_field :logo_cache
= f.file_field :logo, class: ""
.hint
- Maximum file size is 1MB. Pages are optimized for a 640x360 px logo.
+ = _('Maximum file size is 1MB. Pages are optimized for a 640x360 px logo.')
%fieldset
%legend
- New project pages:
+ = _('New project pages:')
.form-group.row
= f.label :new_project_guidelines, class: 'col-sm-2 col-form-label'
.col-sm-10
= f.text_area :new_project_guidelines, class: "form-control", rows: 10
.hint
- Guidelines parsed with #{link_to "GitLab Flavored Markdown", help_page_path('user/markdown'), target: '_blank'}.
+ = _('Guidelines parsed with %{gfm_link_start}GitLab Flavored Markdown%{link_end}.').html_safe % { gfm_link_start: gfm_link_start, link_end: link_end }
.form-actions
- = f.submit 'Save', class: 'btn btn-success append-right-10'
+ = f.submit _('Save'), class: 'btn btn-success append-right-10'
- if @appearance.persisted?
- Preview last save:
- = link_to 'Sign-in page', preview_sign_in_admin_appearances_path, class: 'btn', target: '_blank', rel: 'noopener noreferrer'
- = link_to 'New project page', new_project_path, class: 'btn', target: '_blank', rel: 'noopener noreferrer'
+ = _('Preview last save:')
+ = link_to _('Sign-in page'), preview_sign_in_admin_appearances_path, class: 'btn', target: '_blank', rel: 'noopener noreferrer'
+ = link_to _('New project page'), new_project_path, class: 'btn', target: '_blank', rel: 'noopener noreferrer'
- if @appearance.updated_at
%span.float-right
- Last edit #{time_ago_with_tooltip(@appearance.updated_at)}
+ = _('Last edit %{updated_at_time_ago}').html_safe % { updated_at_time_ago: time_ago_with_tooltip(@appearance.updated_at) }
diff --git a/app/views/admin/appearances/show.html.haml b/app/views/admin/appearances/show.html.haml
index 454b779842c..d1d6c1356d2 100644
--- a/app/views/admin/appearances/show.html.haml
+++ b/app/views/admin/appearances/show.html.haml
@@ -1,9 +1,9 @@
-- page_title "Appearance"
+- page_title _('Appearance')
%h3.page-title
- Appearance settings
+ = _('Appearance settings')
%p.light
- You can modify the look and feel of GitLab here
+ = _('You can modify the look and feel of GitLab here')
%hr
= render 'form'
diff --git a/changelogs/unreleased/appearances-ext.yml b/changelogs/unreleased/appearances-ext.yml
new file mode 100644
index 00000000000..e92ff30a0f3
--- /dev/null
+++ b/changelogs/unreleased/appearances-ext.yml
@@ -0,0 +1,5 @@
+---
+title: Externalize admin appearances strings
+merge_request:
+author:
+type: other
diff --git a/locale/gitlab.pot b/locale/gitlab.pot
index a72e921dcce..a8b38f82073 100644
--- a/locale/gitlab.pot
+++ b/locale/gitlab.pot
@@ -675,6 +675,9 @@ msgstr ""
msgid "Appearance"
msgstr ""
+msgid "Appearance settings"
+msgstr ""
+
msgid "Application"
msgstr ""
@@ -2581,6 +2584,9 @@ msgstr ""
msgid "Description"
msgstr ""
+msgid "Description parsed with %{gfm_link_start}GitLab Flavored Markdown%{link_end}."
+msgstr ""
+
msgid "Description:"
msgstr ""
@@ -3130,6 +3136,15 @@ msgstr ""
msgid "Faster as it re-uses the project workspace (falling back to clone if it doesn't exist)"
msgstr ""
+msgid "Favicon"
+msgstr ""
+
+msgid "Favicon will be removed. Are you sure?"
+msgstr ""
+
+msgid "Favicon:"
+msgstr ""
+
msgid "Feb"
msgstr ""
@@ -3547,6 +3562,12 @@ msgstr ""
msgid "GroupsTree|Search by name"
msgstr ""
+msgid "Guidelines parsed with %{gfm_link_start}GitLab Flavored Markdown%{link_end}."
+msgstr ""
+
+msgid "Header logo will be removed. Are you sure?"
+msgstr ""
+
msgid "Health Check"
msgstr ""
@@ -3684,6 +3705,9 @@ msgstr ""
msgid "ImageDiffViewer|Swipe"
msgstr ""
+msgid "Images with incorrect dimensions are not resized automatically, and may result in unexpected behavior."
+msgstr ""
+
msgid "Impersonation has been disabled"
msgstr ""
@@ -4025,6 +4049,9 @@ msgstr ""
msgid "Last contact"
msgstr ""
+msgid "Last edit %{updated_at_time_ago}"
+msgstr ""
+
msgid "Last edited %{date}"
msgstr ""
@@ -4147,6 +4174,9 @@ msgstr ""
msgid "Locked to current projects"
msgstr ""
+msgid "Logo will be removed. Are you sure?"
+msgstr ""
+
msgid "Logs"
msgstr ""
@@ -4249,6 +4279,15 @@ msgstr ""
msgid "Max access level"
msgstr ""
+msgid "Maximum file size is 1MB. Image size must be 32x32px. Allowed image formats are %{favicon_extension_whitelist}."
+msgstr ""
+
+msgid "Maximum file size is 1MB. Pages are optimized for a 28px tall header logo"
+msgstr ""
+
+msgid "Maximum file size is 1MB. Pages are optimized for a 640x360 px logo."
+msgstr ""
+
msgid "Maximum job timeout"
msgstr ""
@@ -4474,6 +4513,9 @@ msgstr ""
msgid "Naming, visibility"
msgstr ""
+msgid "Navigation bar:"
+msgstr ""
+
msgid "Nav|Help"
msgstr ""
@@ -4560,6 +4602,12 @@ msgstr ""
msgid "New project"
msgstr ""
+msgid "New project page"
+msgstr ""
+
+msgid "New project pages:"
+msgstr ""
+
msgid "New schedule"
msgstr ""
@@ -5180,6 +5228,9 @@ msgstr ""
msgid "Preview"
msgstr ""
+msgid "Preview last save:"
+msgstr ""
+
msgid "Preview payload"
msgstr ""
@@ -5791,9 +5842,18 @@ msgstr ""
msgid "Remove avatar"
msgstr ""
+msgid "Remove favicon"
+msgstr ""
+
msgid "Remove group"
msgstr ""
+msgid "Remove header logo"
+msgstr ""
+
+msgid "Remove logo"
+msgstr ""
+
msgid "Remove priority"
msgstr ""
@@ -6383,9 +6443,15 @@ msgstr ""
msgid "Sign in via 2FA code"
msgstr ""
+msgid "Sign in/Sign up pages:"
+msgstr ""
+
msgid "Sign out"
msgstr ""
+msgid "Sign-in page"
+msgstr ""
+
msgid "Sign-in restrictions"
msgstr ""
@@ -8007,6 +8073,9 @@ msgstr ""
msgid "You can invite a new member to <strong>%{project_name}</strong> or invite another group."
msgstr ""
+msgid "You can modify the look and feel of GitLab here"
+msgstr ""
+
msgid "You can move around the graph by using the arrow keys."
msgstr ""