Commit 6e029740 authored by Marvin Karegyeya's avatar Marvin Karegyeya Committed by Scott Hampton

Use i18n in appearances/_form.html.haml

Externalise strings in appearances/_form.html.haml
parent f23f2d34
- parsed_with_gfm = "Content parsed with #{link_to('GitLab Flavored Markdown', help_page_path('user/markdown'), target: '_blank')}.".html_safe
- parsed_with_gfm = (_("Content parsed with %{link}.") % { link: link_to('GitLab Flavored Markdown', help_page_path('user/markdown'), target: '_blank') }).html_safe
= form_for @appearance, url: admin_appearances_path, html: { class: 'gl-mt-3' } do |f|
= form_errors(@appearance)
......@@ -6,22 +6,22 @@
.row
.col-lg-4.profile-settings-sidebar
%h4.gl-mt-0 Navigation bar
%h4.gl-mt-0= _('Navigation bar')
.col-lg-8
.form-group
= f.label :header_logo, 'Header logo', class: 'col-form-label label-bold pt-0'
= f.label :header_logo, _('Header logo'), class: 'col-form-label label-bold pt-0'
%p
- if @appearance.header_logo?
= 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 gl-button btn-danger btn-danger-secondary btn-sm"
= link_to _('Remove header logo'), header_logos_admin_appearances_path, data: { confirm: _("Header logo will be removed. Are you sure?") }, method: :delete, class: "btn gl-button btn-danger btn-danger-secondary btn-sm"
%hr
= f.hidden_field :header_logo_cache
= f.file_field :header_logo, class: "", accept: 'image/*'
.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')
%hr
.row
.col-lg-4.profile-settings-sidebar
......@@ -29,27 +29,27 @@
.col-lg-8
.form-group
= f.label :favicon, 'Favicon', class: 'col-form-label label-bold pt-0'
= f.label :favicon, _('Favicon'), class: 'col-form-label label-bold pt-0'
%p
- 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 gl-button btn-danger btn-danger-secondary btn-sm"
= link_to _('Remove favicon'), favicon_admin_appearances_path, data: { confirm: _("Favicon will be removed. Are you sure?") }, method: :delete, class: "btn gl-button btn-danger btn-danger-secondary btn-sm"
%hr
= f.hidden_field :favicon_cache
= f.file_field :favicon, class: '', accept: 'image/*'
.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.")
= render partial: 'admin/appearances/system_header_footer_form', locals: { form: f }
%hr
.row
.col-lg-4.profile-settings-sidebar
%h4.gl-mt-0 Sign in/Sign up pages
%h4.gl-mt-0= _('Sign in/Sign up pages')
.col-lg-8
.form-group
......@@ -67,17 +67,17 @@
= 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 gl-button btn-danger btn-danger-secondary 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 gl-button btn-danger btn-danger-secondary btn-sm remove-logo"
%hr
= f.hidden_field :logo_cache
= f.file_field :logo, class: "", accept: 'image/*'
.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.')
%hr
.row
.col-lg-4.profile-settings-sidebar
%h4.gl-mt-0 New project pages
%h4.gl-mt-0= _('New project pages')
.col-lg-8
.form-group
......@@ -90,7 +90,7 @@
%hr
.row
.col-lg-4.profile-settings-sidebar
%h4.gl-mt-0 Profile image guideline
%h4.gl-mt-0= _('Profile image guideline')
.col-lg-8
.form-group
......@@ -101,13 +101,13 @@
= parsed_with_gfm
.gl-mt-3.gl-mb-3
= f.submit 'Update appearance settings', class: 'btn gl-button btn-confirm'
= f.submit _('Update appearance settings'), class: 'btn gl-button btn-confirm'
- if @appearance.persisted? || @appearance.updated_at
.mt-4
- 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'
= 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
......
---
title: Externalize strings in appearances/_form.html.haml
merge_request: 58135
author: nuwe1
type: other
......@@ -8788,6 +8788,9 @@ msgstr ""
msgid "Contains %{count} blobs of images (%{size})"
msgstr ""
msgid "Content parsed with %{link}."
msgstr ""
msgid "ContentEditor|You have to provide a renderMarkdown function or a custom serializer"
msgstr ""
......@@ -13472,9 +13475,15 @@ msgstr ""
msgid "Faster releases. Better code. Less pain."
msgstr ""
msgid "Favicon"
msgstr ""
msgid "Favicon was successfully removed."
msgstr ""
msgid "Favicon will be removed. Are you sure?"
msgstr ""
msgid "Feature Flags"
msgstr ""
......@@ -15925,9 +15934,15 @@ msgstr ""
msgid "Hashed storage can't be disabled anymore for new projects"
msgstr ""
msgid "Header logo"
msgstr ""
msgid "Header logo was successfully removed."
msgstr ""
msgid "Header logo will be removed. Are you sure?"
msgstr ""
msgid "Header message"
msgstr ""
......@@ -16367,6 +16382,9 @@ msgstr ""
msgid "ImageViewerDimensions|W"
msgstr ""
msgid "Images with incorrect dimensions are not resized automatically, and may result in unexpected behavior."
msgstr ""
msgid "Impersonate"
msgstr ""
......@@ -19403,6 +19421,9 @@ msgstr ""
msgid "Logo was successfully removed."
msgstr ""
msgid "Logo will be removed. Are you sure?"
msgstr ""
msgid "Logs"
msgstr ""
......@@ -19778,6 +19799,15 @@ msgstr ""
msgid "Maximum file size indexed (KiB)"
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 file size is 2MB. Please select a smaller file."
msgstr ""
......@@ -21110,6 +21140,9 @@ msgstr ""
msgid "Navigate to the project to close the milestone."
msgstr ""
msgid "Navigation bar"
msgstr ""
msgid "Nav|Help"
msgstr ""
......@@ -21532,6 +21565,12 @@ msgstr ""
msgid "New project"
msgstr ""
msgid "New project page"
msgstr ""
msgid "New project pages"
msgstr ""
msgid "New project/repository"
msgstr ""
......@@ -24341,6 +24380,9 @@ msgstr ""
msgid "Profile Settings"
msgstr ""
msgid "Profile image guideline"
msgstr ""
msgid "ProfileSession|on"
msgstr ""
......@@ -26568,6 +26610,9 @@ msgstr ""
msgid "Remove due date"
msgstr ""
msgid "Remove favicon"
msgstr ""
msgid "Remove file"
msgstr ""
......@@ -26583,6 +26628,9 @@ msgstr ""
msgid "Remove group"
msgstr ""
msgid "Remove header logo"
msgstr ""
msgid "Remove iteration"
msgstr ""
......@@ -26598,6 +26646,9 @@ msgstr ""
msgid "Remove log"
msgstr ""
msgid "Remove logo"
msgstr ""
msgid "Remove member"
msgstr ""
......@@ -29385,6 +29436,9 @@ msgstr ""
msgid "Sign in with smart card"
msgstr ""
msgid "Sign in/Sign up pages"
msgstr ""
msgid "Sign out"
msgstr ""
......@@ -29397,6 +29451,9 @@ msgstr ""
msgid "Sign up was successful! Please confirm your email to sign in."
msgstr ""
msgid "Sign-in page"
msgstr ""
msgid "Sign-in restrictions"
msgstr ""
......@@ -34008,6 +34065,9 @@ msgstr ""
msgid "Update all"
msgstr ""
msgid "Update appearance settings"
msgstr ""
msgid "Update approval rule"
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