Commit 432314e3 authored by Vitali Tatarintev's avatar Vitali Tatarintev

Merge branch 'fix40' into 'master'

Fix multiple strings in translations (|, space, CC, markdown, ...)

This removes one "|" in strings so only one "|" exists per string.

This adds missing space in "for%{term_element}".

This changes "CC" to "Credit Card". So translators don't have to figure out what "CC" is.

This changes "markdown" to "Markdown".

Remove "* * * * *" from translation. Seems this is never translated into something else.

Remove 3 spaces from " %{name},  confirm your email address now! " making it identical with an already existing string.

Remove extra spavce in "check out %{notificationLinkStart} notification emails%{notificationLinkEnd}".

Closes #340195, #340138, #340133, #340129, #340675, #341196

See merge request gitlab-org/gitlab!70182
parents eb1db88f 2ba0f98c
...@@ -81,7 +81,7 @@ MarkdownPreview.prototype.fetchMarkdownPreview = function (text, url, success) { ...@@ -81,7 +81,7 @@ MarkdownPreview.prototype.fetchMarkdownPreview = function (text, url, success) {
}) })
.catch(() => .catch(() =>
createFlash({ createFlash({
message: __('An error occurred while fetching markdown preview'), message: __('An error occurred while fetching Markdown preview'),
}), }),
); );
}; };
......
...@@ -25,7 +25,7 @@ export default { ...@@ -25,7 +25,7 @@ export default {
lazy: true, lazy: true,
}, },
translations: { translations: {
cronPlaceholder: __('* * * * *'), cronPlaceholder: '* * * * *',
cronSyntaxInstructions: __( cronSyntaxInstructions: __(
'Define a custom deploy freeze pattern with %{cronSyntaxStart}cron syntax%{cronSyntaxEnd}', 'Define a custom deploy freeze pattern with %{cronSyntaxStart}cron syntax%{cronSyntaxEnd}',
), ),
......
...@@ -31,7 +31,7 @@ export const i18n = { ...@@ -31,7 +31,7 @@ export const i18n = {
title: __('Custom notification events'), title: __('Custom notification events'),
bodyTitle: __('Notification events'), bodyTitle: __('Notification events'),
bodyMessage: __( bodyMessage: __(
'Custom notification levels are the same as participating levels. With custom notification levels you will also receive notifications for select events. To find out more, check out %{notificationLinkStart} notification emails%{notificationLinkEnd}.', 'Custom notification levels are the same as participating levels. With custom notification levels you will also receive notifications for select events. To find out more, check out %{notificationLinkStart}notification emails%{notificationLinkEnd}.',
), ),
}, },
eventNames: { eventNames: {
......
...@@ -2,51 +2,51 @@ import { s__ } from '~/locale'; ...@@ -2,51 +2,51 @@ import { s__ } from '~/locale';
export const PIPELINE_SOURCES = [ export const PIPELINE_SOURCES = [
{ {
text: s__('Pipeline|Source|Push'), text: s__('PipelineSource|Push'),
value: 'push', value: 'push',
}, },
{ {
text: s__('Pipeline|Source|Web'), text: s__('PipelineSource|Web'),
value: 'web', value: 'web',
}, },
{ {
text: s__('Pipeline|Source|Trigger'), text: s__('PipelineSource|Trigger'),
value: 'trigger', value: 'trigger',
}, },
{ {
text: s__('Pipeline|Source|Schedule'), text: s__('PipelineSource|Schedule'),
value: 'schedule', value: 'schedule',
}, },
{ {
text: s__('Pipeline|Source|API'), text: s__('PipelineSource|API'),
value: 'api', value: 'api',
}, },
{ {
text: s__('Pipeline|Source|External'), text: s__('PipelineSource|External'),
value: 'external', value: 'external',
}, },
{ {
text: s__('Pipeline|Source|Pipeline'), text: s__('PipelineSource|Pipeline'),
value: 'pipeline', value: 'pipeline',
}, },
{ {
text: s__('Pipeline|Source|Chat'), text: s__('PipelineSource|Chat'),
value: 'chat', value: 'chat',
}, },
{ {
text: s__('Pipeline|Source|Web IDE'), text: s__('PipelineSource|Web IDE'),
value: 'webide', value: 'webide',
}, },
{ {
text: s__('Pipeline|Source|Merge Request'), text: s__('PipelineSource|Merge Request'),
value: 'merge_request_event', value: 'merge_request_event',
}, },
{ {
text: s__('Pipeline|Source|External Pull Request'), text: s__('PipelineSource|External Pull Request'),
value: 'external_pull_request_event', value: 'external_pull_request_event',
}, },
{ {
text: s__('Pipeline|Source|Parent Pipeline'), text: s__('PipelineSource|Parent Pipeline'),
value: 'parent_pipeline', value: 'parent_pipeline',
}, },
]; ];
...@@ -97,7 +97,7 @@ export default { ...@@ -97,7 +97,7 @@ export default {
}); });
}) })
.catch(() => { .catch(() => {
this.previewContent = __('An error occurred while fetching markdown preview'); this.previewContent = __('An error occurred while fetching Markdown preview');
this.isLoading = false; this.isLoading = false;
}); });
} }
......
...@@ -254,7 +254,7 @@ export default { ...@@ -254,7 +254,7 @@ export default {
.then(() => $(this.$refs['markdown-preview']).renderGFM()) .then(() => $(this.$refs['markdown-preview']).renderGFM())
.catch(() => .catch(() =>
createFlash({ createFlash({
message: __('Error rendering markdown preview'), message: __('Error rendering Markdown preview'),
}), }),
); );
}, },
......
...@@ -87,9 +87,9 @@ module SearchHelper ...@@ -87,9 +87,9 @@ module SearchHelper
def search_entries_info_template(collection) def search_entries_info_template(collection)
if collection.total_pages > 1 if collection.total_pages > 1
s_("SearchResults|Showing %{from} - %{to} of %{count} %{scope} for%{term_element}").html_safe s_("SearchResults|Showing %{from} - %{to} of %{count} %{scope} for %{term_element}").html_safe
else else
s_("SearchResults|Showing %{count} %{scope} for%{term_element}").html_safe s_("SearchResults|Showing %{count} %{scope} for %{term_element}").html_safe
end end
end end
......
<%= _(" %{name}, confirm your email address now! ") % { name: @resource.user.name } %> <%= _("%{name}, confirm your email address now!") % { name: @resource.user.name } %>
<%= _("Use the link below to confirm your email address (%{email})") % { email: @resource.email } %> <%= _("Use the link below to confirm your email address (%{email})") % { email: @resource.email } %>
......
...@@ -3,11 +3,11 @@ import { PIPELINE_SOURCES as CE_PIPELINE_SOURCES } from '~/pipelines/components/ ...@@ -3,11 +3,11 @@ import { PIPELINE_SOURCES as CE_PIPELINE_SOURCES } from '~/pipelines/components/
const EE_PIPELINE_SOURCES = [ const EE_PIPELINE_SOURCES = [
{ {
text: s__('Pipeline|Source|On-Demand DAST Scan'), text: s__('PipelineSource|On-Demand DAST Scan'),
value: 'ondemand_dast_scan', value: 'ondemand_dast_scan',
}, },
{ {
text: s__('Pipeline|Source|On-Demand DAST Validation'), text: s__('PipelineSource|On-Demand DAST Validation'),
value: 'ondemand_dast_validation', value: 'ondemand_dast_validation',
}, },
{ {
......
...@@ -63,9 +63,9 @@ module EE ...@@ -63,9 +63,9 @@ module EE
return super unless gitlab_com_snippet_db_search? return super unless gitlab_com_snippet_db_search?
if collection.total_pages > 1 if collection.total_pages > 1
s_("SearchResults|Showing %{from} - %{to} of %{count} %{scope} for%{term_element} in your personal and project snippets").html_safe s_("SearchResults|Showing %{from} - %{to} of %{count} %{scope} for %{term_element} in your personal and project snippets").html_safe
else else
s_("SearchResults|Showing %{count} %{scope} for%{term_element} in your personal and project snippets").html_safe s_("SearchResults|Showing %{count} %{scope} for %{term_element} in your personal and project snippets").html_safe
end end
end end
......
...@@ -149,7 +149,7 @@ RSpec.describe SearchHelper do ...@@ -149,7 +149,7 @@ RSpec.describe SearchHelper do
let(:show_snippets) { true } let(:show_snippets) { true }
let(:collection) { Kaminari.paginate_array([:foo]).page(1).per(10) } let(:collection) { Kaminari.paginate_array([:foo]).page(1).per(10) }
let(:user) { create(:user) } let(:user) { create(:user) }
let(:message) { "Showing %{count} %{scope} for%{term_element}" } let(:message) { "Showing %{count} %{scope} for %{term_element}" }
let(:new_message) { message + " in your personal and project snippets" } let(:new_message) { message + " in your personal and project snippets" }
subject { search_entries_info_template(collection) } subject { search_entries_info_template(collection) }
......
...@@ -15,7 +15,7 @@ module Gitlab ...@@ -15,7 +15,7 @@ module Gitlab
def tagline def tagline
[ [
s_('InProductMarketing|Start a free trial of GitLab Ultimate – no CC required'), s_('InProductMarketing|Start a free trial of GitLab Ultimate – no credit card required'),
s_('InProductMarketing|Improve app security with a 30-day trial'), s_('InProductMarketing|Improve app security with a 30-day trial'),
s_('InProductMarketing|Start with a GitLab Ultimate free trial') s_('InProductMarketing|Start with a GitLab Ultimate free trial')
][series] ][series]
......
...@@ -16,9 +16,6 @@ msgstr "" ...@@ -16,9 +16,6 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
msgid " %{name}, confirm your email address now! "
msgstr ""
msgid " %{start} to %{end}" msgid " %{start} to %{end}"
msgstr "" msgstr ""
...@@ -1135,9 +1132,6 @@ msgstr "" ...@@ -1135,9 +1132,6 @@ msgstr ""
msgid "(we need your current password to confirm your changes)" msgid "(we need your current password to confirm your changes)"
msgstr "" msgstr ""
msgid "* * * * *"
msgstr ""
msgid "+ %{amount} more" msgid "+ %{amount} more"
msgstr "" msgstr ""
...@@ -3587,6 +3581,9 @@ msgstr "" ...@@ -3587,6 +3581,9 @@ msgstr ""
msgid "An error occurred while enabling Service Desk." msgid "An error occurred while enabling Service Desk."
msgstr "" msgstr ""
msgid "An error occurred while fetching Markdown preview"
msgstr ""
msgid "An error occurred while fetching ancestors" msgid "An error occurred while fetching ancestors"
msgstr "" msgstr ""
...@@ -3617,9 +3614,6 @@ msgstr "" ...@@ -3617,9 +3614,6 @@ msgstr ""
msgid "An error occurred while fetching label colors." msgid "An error occurred while fetching label colors."
msgstr "" msgstr ""
msgid "An error occurred while fetching markdown preview"
msgstr ""
msgid "An error occurred while fetching participants" msgid "An error occurred while fetching participants"
msgstr "" msgstr ""
...@@ -9996,7 +9990,7 @@ msgstr "" ...@@ -9996,7 +9990,7 @@ msgstr ""
msgid "Custom notification events" msgid "Custom notification events"
msgstr "" msgstr ""
msgid "Custom notification levels are the same as participating levels. With custom notification levels you will also receive notifications for select events. To find out more, check out %{notificationLinkStart} notification emails%{notificationLinkEnd}." msgid "Custom notification levels are the same as participating levels. With custom notification levels you will also receive notifications for select events. To find out more, check out %{notificationLinkStart}notification emails%{notificationLinkEnd}."
msgstr "" msgstr ""
msgid "Custom project templates" msgid "Custom project templates"
...@@ -13363,7 +13357,7 @@ msgstr "" ...@@ -13363,7 +13357,7 @@ msgstr ""
msgid "Error parsing CSV file. Please make sure it has" msgid "Error parsing CSV file. Please make sure it has"
msgstr "" msgstr ""
msgid "Error rendering markdown preview" msgid "Error rendering Markdown preview"
msgstr "" msgstr ""
msgid "Error saving label update." msgid "Error saving label update."
...@@ -17603,7 +17597,7 @@ msgstr "" ...@@ -17603,7 +17597,7 @@ msgstr ""
msgid "InProductMarketing|Start a GitLab Ultimate trial today in less than one minute, no credit card required." msgid "InProductMarketing|Start a GitLab Ultimate trial today in less than one minute, no credit card required."
msgstr "" msgstr ""
msgid "InProductMarketing|Start a free trial of GitLab Ultimate – no CC required" msgid "InProductMarketing|Start a free trial of GitLab Ultimate – no credit card required"
msgstr "" msgstr ""
msgid "InProductMarketing|Start a trial" msgid "InProductMarketing|Start a trial"
...@@ -24871,6 +24865,48 @@ msgstr "" ...@@ -24871,6 +24865,48 @@ msgstr ""
msgid "PipelineSchedules|Variables" msgid "PipelineSchedules|Variables"
msgstr "" msgstr ""
msgid "PipelineSource|API"
msgstr ""
msgid "PipelineSource|Chat"
msgstr ""
msgid "PipelineSource|External"
msgstr ""
msgid "PipelineSource|External Pull Request"
msgstr ""
msgid "PipelineSource|Merge Request"
msgstr ""
msgid "PipelineSource|On-Demand DAST Scan"
msgstr ""
msgid "PipelineSource|On-Demand DAST Validation"
msgstr ""
msgid "PipelineSource|Parent Pipeline"
msgstr ""
msgid "PipelineSource|Pipeline"
msgstr ""
msgid "PipelineSource|Push"
msgstr ""
msgid "PipelineSource|Schedule"
msgstr ""
msgid "PipelineSource|Trigger"
msgstr ""
msgid "PipelineSource|Web"
msgstr ""
msgid "PipelineSource|Web IDE"
msgstr ""
msgid "PipelineStatusTooltip|Pipeline: %{ciStatus}" msgid "PipelineStatusTooltip|Pipeline: %{ciStatus}"
msgstr "" msgstr ""
...@@ -25171,51 +25207,9 @@ msgstr "" ...@@ -25171,51 +25207,9 @@ msgstr ""
msgid "Pipeline|Source" msgid "Pipeline|Source"
msgstr "" msgstr ""
msgid "Pipeline|Source|API"
msgstr ""
msgid "Pipeline|Source|Chat"
msgstr ""
msgid "Pipeline|Source|External"
msgstr ""
msgid "Pipeline|Source|External Pull Request"
msgstr ""
msgid "Pipeline|Source|Merge Request"
msgstr ""
msgid "Pipeline|Source|On-Demand DAST Scan"
msgstr ""
msgid "Pipeline|Source|On-Demand DAST Validation"
msgstr ""
msgid "Pipeline|Source|Parent Pipeline"
msgstr ""
msgid "Pipeline|Source|Pipeline"
msgstr ""
msgid "Pipeline|Source|Push"
msgstr ""
msgid "Pipeline|Source|Schedule"
msgstr ""
msgid "Pipeline|Source|Security Policy" msgid "Pipeline|Source|Security Policy"
msgstr "" msgstr ""
msgid "Pipeline|Source|Trigger"
msgstr ""
msgid "Pipeline|Source|Web"
msgstr ""
msgid "Pipeline|Source|Web IDE"
msgstr ""
msgid "Pipeline|Specify variable values to be used in this run. The values specified in %{linkStart}CI/CD settings%{linkEnd} will be used by default." msgid "Pipeline|Specify variable values to be used in this run. The values specified in %{linkStart}CI/CD settings%{linkEnd} will be used by default."
msgstr "" msgstr ""
...@@ -29760,16 +29754,16 @@ msgstr "" ...@@ -29760,16 +29754,16 @@ msgstr ""
msgid "SearchCodeResults|of %{link_to_project}" msgid "SearchCodeResults|of %{link_to_project}"
msgstr "" msgstr ""
msgid "SearchResults|Showing %{count} %{scope} for%{term_element}" msgid "SearchResults|Showing %{count} %{scope} for %{term_element}"
msgstr "" msgstr ""
msgid "SearchResults|Showing %{count} %{scope} for%{term_element} in your personal and project snippets" msgid "SearchResults|Showing %{count} %{scope} for %{term_element} in your personal and project snippets"
msgstr "" msgstr ""
msgid "SearchResults|Showing %{from} - %{to} of %{count} %{scope} for%{term_element}" msgid "SearchResults|Showing %{from} - %{to} of %{count} %{scope} for %{term_element}"
msgstr "" msgstr ""
msgid "SearchResults|Showing %{from} - %{to} of %{count} %{scope} for%{term_element} in your personal and project snippets" msgid "SearchResults|Showing %{from} - %{to} of %{count} %{scope} for %{term_element} in your personal and project snippets"
msgstr "" msgstr ""
msgid "SearchResults|code result" msgid "SearchResults|code result"
......
...@@ -248,13 +248,13 @@ RSpec.describe SearchHelper do ...@@ -248,13 +248,13 @@ RSpec.describe SearchHelper do
it 'uses the correct singular label' do it 'uses the correct singular label' do
collection = Kaminari.paginate_array([:foo]).page(1).per(10) collection = Kaminari.paginate_array([:foo]).page(1).per(10)
expect(search_entries_info(collection, scope, 'foo')).to eq("Showing 1 #{label} for<span>&nbsp;<code>foo</code>&nbsp;</span>") expect(search_entries_info(collection, scope, 'foo')).to eq("Showing 1 #{label} for <span>&nbsp;<code>foo</code>&nbsp;</span>")
end end
it 'uses the correct plural label' do it 'uses the correct plural label' do
collection = Kaminari.paginate_array([:foo] * 23).page(1).per(10) collection = Kaminari.paginate_array([:foo] * 23).page(1).per(10)
expect(search_entries_info(collection, scope, 'foo')).to eq("Showing 1 - 10 of 23 #{label.pluralize} for<span>&nbsp;<code>foo</code>&nbsp;</span>") expect(search_entries_info(collection, scope, 'foo')).to eq("Showing 1 - 10 of 23 #{label.pluralize} for <span>&nbsp;<code>foo</code>&nbsp;</span>")
end end
end end
......
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