Commit 6b235dc4 authored by Natalia Tepluhina's avatar Natalia Tepluhina

Merge branch 'jh-cleanup_html_todolist' into 'master'

Clean up remaining backend strings on the HTML translation linter todolist

See merge request gitlab-org/gitlab!38690
parents 698f7df2 ea081e1d
...@@ -184,9 +184,8 @@ module ProjectsHelper ...@@ -184,9 +184,8 @@ module ProjectsHelper
end end
def autodeploy_flash_notice(branch_name) def autodeploy_flash_notice(branch_name)
translation = _("Branch <strong>%{branch_name}</strong> was created. To set up auto deploy, choose a GitLab CI Yaml template and commit your changes. %{link_to_autodeploy_doc}") % html_escape(_("Branch %{branch_name} was created. To set up auto deploy, choose a GitLab CI Yaml template and commit your changes. %{link_to_autodeploy_doc}")) %
{ branch_name: truncate(sanitize(branch_name)), link_to_autodeploy_doc: link_to_autodeploy_doc } { branch_name: tag.strong(truncate(sanitize(branch_name))), link_to_autodeploy_doc: link_to_autodeploy_doc }
translation.html_safe
end end
def project_list_cache_key(project, pipeline_status: true) def project_list_cache_key(project, pipeline_status: true)
...@@ -353,14 +352,14 @@ module ProjectsHelper ...@@ -353,14 +352,14 @@ module ProjectsHelper
description = description =
if share_with_group && share_with_members if share_with_group && share_with_members
_("You can invite a new member to <strong>%{project_name}</strong> or invite another group.") _("You can invite a new member to %{project_name} or invite another group.")
elsif share_with_group elsif share_with_group
_("You can invite another group to <strong>%{project_name}</strong>.") _("You can invite another group to %{project_name}.")
elsif share_with_members elsif share_with_members
_("You can invite a new member to <strong>%{project_name}</strong>.") _("You can invite a new member to %{project_name}.")
end end
description.html_safe % { project_name: project.name } html_escape(description) % { project_name: tag.strong(project.name) }
end end
def metrics_external_dashboard_url def metrics_external_dashboard_url
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
= _("Authorization required") = _("Authorization required")
%main{ :role => "main" } %main{ :role => "main" }
%p.h4 %p.h4
= _("Authorize <strong>%{user}</strong> to use your account?").html_safe % { user: @chat_name_params[:chat_name] } = html_escape(_("Authorize %{user} to use your account?")) % { user: tag.strong(@chat_name_params[:chat_name]) }
%hr %hr
.actions .actions
......
...@@ -25,4 +25,4 @@ ...@@ -25,4 +25,4 @@
= render 'destroy' = render 'destroy'
- else - else
.bs-callout.bs-callout-warning .bs-callout.bs-callout-warning
= s_('GitLabPages|GitLab Pages are disabled for this project. You can enable them on your project\'s %{strong_start}Settings > General > Visibility%{strong_end} page.').html_safe % { strong_start: '<strong>'.html_safe, strong_end: '</strong>'.html_safe } = html_escape_once(s_('GitLabPages|GitLab Pages are disabled for this project. You can enable them on your project\'s %{strong_start}Settings &gt; General &gt; Visibility%{strong_end} page.')).html_safe % { strong_start: '<strong>'.html_safe, strong_end: '</strong>'.html_safe }
- pretty_name = @project&.full_name || _('<project name>') - pretty_name = html_escape(@project&.full_name) || html_escape_once(_('&lt;project name&gt;')).html_safe
- run_actions_text = s_("ProjectService|Perform common operations on GitLab project: %{project_name}") % { project_name: pretty_name } - run_actions_text = html_escape(s_("ProjectService|Perform common operations on GitLab project: %{project_name}")) % { project_name: pretty_name }
%p= s_("ProjectService|To set up this service:") %p= s_("ProjectService|To set up this service:")
%ul.list-unstyled.indent-list %ul.list-unstyled.indent-list
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
.form-group .form-group
= label_tag :display_name, _('Display name'), class: 'col-12 col-form-label label-bold' = label_tag :display_name, _('Display name'), class: 'col-12 col-form-label label-bold'
.col-12.input-group .col-12.input-group
= text_field_tag :display_name, "GitLab / #{pretty_name}", class: 'form-control form-control-sm', readonly: 'readonly' = text_field_tag :display_name, "GitLab / #{pretty_name}".html_safe, class: 'form-control form-control-sm', readonly: 'readonly'
.input-group-append .input-group-append
= clipboard_button(target: '#display_name', class: 'input-group-text') = clipboard_button(target: '#display_name', class: 'input-group-text')
......
...@@ -85,7 +85,7 @@ ...@@ -85,7 +85,7 @@
%p %p
- freeze_period_docs = help_page_path('user/project/releases/index', anchor: 'prevent-unintentional-releases-by-setting-a-deploy-freeze') - freeze_period_docs = help_page_path('user/project/releases/index', anchor: 'prevent-unintentional-releases-by-setting-a-deploy-freeze')
- freeze_period_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: freeze_period_docs } - freeze_period_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: freeze_period_docs }
= s_('DeployFreeze|Specify times when deployments are not allowed for an environment. The <code>gitlab-ci.yml</code> file must be updated to make deployment jobs aware of the %{freeze_period_link_start}freeze period%{freeze_period_link_end}.').html_safe % { freeze_period_link_start: freeze_period_link_start, freeze_period_link_end: '</a>'.html_safe } = html_escape(s_('DeployFreeze|Specify times when deployments are not allowed for an environment. The %{filename} file must be updated to make deployment jobs aware of the %{freeze_period_link_start}freeze period%{freeze_period_link_end}.')) % { freeze_period_link_start: freeze_period_link_start, freeze_period_link_end: '</a>'.html_safe, filename: tag.code('gitlab-ci.yml') }
- cron_syntax_url = 'https://crontab.guru/' - cron_syntax_url = 'https://crontab.guru/'
- cron_syntax_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: cron_syntax_url } - cron_syntax_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: cron_syntax_url }
......
...@@ -13,4 +13,4 @@ ...@@ -13,4 +13,4 @@
%br %br
= _('Multiple IP address ranges are supported.') = _('Multiple IP address ranges are supported.')
%br %br
= _('Example: <code>192.168.0.0/24</code>. %{read_more_link}.').html_safe % { read_more_link: read_more_link } = html_escape(_('Example: %{ip_address}. %{read_more_link}.')) % { read_more_link: read_more_link, ip_address: tag.code('192.168.0.0/24') }
...@@ -9,35 +9,41 @@ module Gitlab ...@@ -9,35 +9,41 @@ module Gitlab
notices = [] notices = []
unless Gitlab::Database.postgresql_minimum_supported_version? unless Gitlab::Database.postgresql_minimum_supported_version?
string_args = {
pg_version_current: Gitlab::Database.version,
pg_version_minimum: Gitlab::Database::MINIMUM_POSTGRES_VERSION,
pg_requirements_url_open: '<a href="https://docs.gitlab.com/ee/install/requirements.html#database">'.html_safe,
pg_requirements_url_close: '</a>'.html_safe
}
notices << notices <<
{ {
type: 'warning', type: 'warning',
message: _('You are using PostgreSQL %{pg_version_current}, but PostgreSQL ' \ message: html_escape(_('You are using PostgreSQL %{pg_version_current}, but PostgreSQL ' \
'%{pg_version_minimum} is required for this version of GitLab. ' \ '%{pg_version_minimum} is required for this version of GitLab. ' \
'Please upgrade your environment to a supported PostgreSQL version, ' \ 'Please upgrade your environment to a supported PostgreSQL version, ' \
'see %{pg_requirements_url} for details.') % { 'see %{pg_requirements_url_open}database requirements%{pg_requirements_url_close} for details.')) % string_args
pg_version_current: Gitlab::Database.version,
pg_version_minimum: Gitlab::Database::MINIMUM_POSTGRES_VERSION,
pg_requirements_url: '<a href="https://docs.gitlab.com/ee/install/requirements.html#database">database requirements</a>'
}
} }
end end
if Gitlab::Database.postgresql_upcoming_deprecation? && Gitlab::Database.within_deprecation_notice_window? if Gitlab::Database.postgresql_upcoming_deprecation? && Gitlab::Database.within_deprecation_notice_window?
upcoming_deprecation = Gitlab::Database::UPCOMING_POSTGRES_VERSION_DETAILS upcoming_deprecation = Gitlab::Database::UPCOMING_POSTGRES_VERSION_DETAILS
string_args = {
pg_version_upcoming: upcoming_deprecation[:pg_version_minimum],
gl_version_upcoming: upcoming_deprecation[:gl_version],
gl_version_upcoming_date: upcoming_deprecation[:gl_version_date],
pg_version_upcoming_url_open: "<a href=\"#{upcoming_deprecation[:url]}\">".html_safe,
pg_version_upcoming_url_close: '</a>'.html_safe
}
notices << notices <<
{ {
type: 'warning', type: 'warning',
message: _('Note that PostgreSQL %{pg_version_upcoming} will become the minimum required ' \ message: html_escape(_('Note that PostgreSQL %{pg_version_upcoming} will become the minimum required ' \
'version in GitLab %{gl_version_upcoming} (%{gl_version_upcoming_date}). Please ' \ 'version in GitLab %{gl_version_upcoming} (%{gl_version_upcoming_date}). Please ' \
'consider upgrading your environment to a supported PostgreSQL version soon, ' \ 'consider upgrading your environment to a supported PostgreSQL version soon, ' \
'see <a href="%{pg_version_upcoming_url}">the related epic</a> for details.') % { 'see %{pg_version_upcoming_url_open}the related epic%{pg_version_upcoming_url_close} for details.')) % string_args
pg_version_upcoming: upcoming_deprecation[:pg_version_minimum],
gl_version_upcoming: upcoming_deprecation[:gl_version],
gl_version_upcoming_date: upcoming_deprecation[:gl_version_date],
pg_version_upcoming_url: upcoming_deprecation[:url]
}
} }
end end
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -1072,9 +1072,6 @@ msgstr "" ...@@ -1072,9 +1072,6 @@ msgstr ""
msgid "< 1 hour" msgid "< 1 hour"
msgstr "" msgstr ""
msgid "<project name>"
msgstr ""
msgid "<strong>Deletes</strong> source branch" msgid "<strong>Deletes</strong> source branch"
msgstr "" msgstr ""
...@@ -3554,7 +3551,7 @@ msgstr "" ...@@ -3554,7 +3551,7 @@ msgstr ""
msgid "Authorize %{link_to_client} to use your account?" msgid "Authorize %{link_to_client} to use your account?"
msgstr "" msgstr ""
msgid "Authorize <strong>%{user}</strong> to use your account?" msgid "Authorize %{user} to use your account?"
msgstr "" msgstr ""
msgid "Authorize external services to send alerts to GitLab" msgid "Authorize external services to send alerts to GitLab"
...@@ -3953,7 +3950,7 @@ msgstr "" ...@@ -3953,7 +3950,7 @@ msgstr ""
msgid "Branch %{branchName} was not found in this project's repository." msgid "Branch %{branchName} was not found in this project's repository."
msgstr "" msgstr ""
msgid "Branch <strong>%{branch_name}</strong> was created. To set up auto deploy, choose a GitLab CI Yaml template and commit your changes. %{link_to_autodeploy_doc}" msgid "Branch %{branch_name} was created. To set up auto deploy, choose a GitLab CI Yaml template and commit your changes. %{link_to_autodeploy_doc}"
msgstr "" msgstr ""
msgid "Branch has changed" msgid "Branch has changed"
...@@ -8094,7 +8091,7 @@ msgstr "" ...@@ -8094,7 +8091,7 @@ msgstr ""
msgid "DeployFreeze|No deploy freezes exist for this project. To add one, click %{strongStart}Add deploy freeze%{strongEnd}" msgid "DeployFreeze|No deploy freezes exist for this project. To add one, click %{strongStart}Add deploy freeze%{strongEnd}"
msgstr "" msgstr ""
msgid "DeployFreeze|Specify times when deployments are not allowed for an environment. The <code>gitlab-ci.yml</code> file must be updated to make deployment jobs aware of the %{freeze_period_link_start}freeze period%{freeze_period_link_end}." msgid "DeployFreeze|Specify times when deployments are not allowed for an environment. The %{filename} file must be updated to make deployment jobs aware of the %{freeze_period_link_start}freeze period%{freeze_period_link_end}."
msgstr "" msgstr ""
msgid "DeployFreeze|Time zone" msgid "DeployFreeze|Time zone"
...@@ -9956,7 +9953,7 @@ msgstr "" ...@@ -9956,7 +9953,7 @@ msgstr ""
msgid "Exactly one of %{attributes} is required" msgid "Exactly one of %{attributes} is required"
msgstr "" msgstr ""
msgid "Example: <code>192.168.0.0/24</code>. %{read_more_link}." msgid "Example: %{ip_address}. %{read_more_link}."
msgstr "" msgstr ""
msgid "Example: @sub\\.company\\.com$" msgid "Example: @sub\\.company\\.com$"
...@@ -11506,7 +11503,7 @@ msgstr "" ...@@ -11506,7 +11503,7 @@ msgstr ""
msgid "GitLabPages|Force HTTPS (requires valid certificates)" msgid "GitLabPages|Force HTTPS (requires valid certificates)"
msgstr "" msgstr ""
msgid "GitLabPages|GitLab Pages are disabled for this project. You can enable them on your project's %{strong_start}Settings > General > Visibility%{strong_end} page." msgid "GitLabPages|GitLab Pages are disabled for this project. You can enable them on your project's %{strong_start}Settings &gt; General &gt; Visibility%{strong_end} page."
msgstr "" msgstr ""
msgid "GitLabPages|It may take up to 30 minutes before the site is available after the first deployment." msgid "GitLabPages|It may take up to 30 minutes before the site is available after the first deployment."
...@@ -16538,7 +16535,7 @@ msgstr "" ...@@ -16538,7 +16535,7 @@ msgstr ""
msgid "Note parameters are invalid: %{errors}" msgid "Note parameters are invalid: %{errors}"
msgstr "" msgstr ""
msgid "Note that PostgreSQL %{pg_version_upcoming} will become the minimum required version in GitLab %{gl_version_upcoming} (%{gl_version_upcoming_date}). Please consider upgrading your environment to a supported PostgreSQL version soon, see <a href=\"%{pg_version_upcoming_url}\">the related epic</a> for details." msgid "Note that PostgreSQL %{pg_version_upcoming} will become the minimum required version in GitLab %{gl_version_upcoming} (%{gl_version_upcoming_date}). Please consider upgrading your environment to a supported PostgreSQL version soon, see %{pg_version_upcoming_url_open}the related epic%{pg_version_upcoming_url_close} for details."
msgstr "" msgstr ""
msgid "Note that this invitation was sent to %{mail_to_invite_email}, but you are signed in as %{link_to_current_user} with email %{mail_to_current_user}." msgid "Note that this invitation was sent to %{mail_to_invite_email}, but you are signed in as %{link_to_current_user} with email %{mail_to_current_user}."
...@@ -27822,7 +27819,7 @@ msgstr "" ...@@ -27822,7 +27819,7 @@ msgstr ""
msgid "You are trying to upload something other than an image. Please upload a .png, .jpg, .jpeg, .gif, .bmp, .tiff or .ico." msgid "You are trying to upload something other than an image. Please upload a .png, .jpg, .jpeg, .gif, .bmp, .tiff or .ico."
msgstr "" msgstr ""
msgid "You are using PostgreSQL %{pg_version_current}, but PostgreSQL %{pg_version_minimum} is required for this version of GitLab. Please upgrade your environment to a supported PostgreSQL version, see %{pg_requirements_url} for details." msgid "You are using PostgreSQL %{pg_version_current}, but PostgreSQL %{pg_version_minimum} is required for this version of GitLab. Please upgrade your environment to a supported PostgreSQL version, see %{pg_requirements_url_open}database requirements%{pg_requirements_url_close} for details."
msgstr "" msgstr ""
msgid "You can %{linkStart}view the blob%{linkEnd} instead." msgid "You can %{linkStart}view the blob%{linkEnd} instead."
...@@ -27879,13 +27876,13 @@ msgstr "" ...@@ -27879,13 +27876,13 @@ msgstr ""
msgid "You can get started by cloning the repository or start adding files to it with one of the following options." msgid "You can get started by cloning the repository or start adding files to it with one of the following options."
msgstr "" msgstr ""
msgid "You can invite a new member to <strong>%{project_name}</strong> or invite another group." msgid "You can invite a new member to %{project_name} or invite another group."
msgstr "" msgstr ""
msgid "You can invite a new member to <strong>%{project_name}</strong>." msgid "You can invite a new member to %{project_name}."
msgstr "" msgstr ""
msgid "You can invite another group to <strong>%{project_name}</strong>." msgid "You can invite another group to %{project_name}."
msgstr "" msgstr ""
msgid "You can move around the graph by using the arrow keys." msgid "You can move around the graph by using the arrow keys."
......
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