Commit b0149107 authored by Alex Kalderimis's avatar Alex Kalderimis

Remove localisation from preposition method

Internationalizing this string is basically pointless as translating
fragments of sentences without taking word-order into account cannot
produce good translations.

See: https://gitlab.com/gitlab-org/gitlab/-/issues/211831
parent 809e72ca
......@@ -69,11 +69,11 @@ module EventsHelper
def event_preposition(event)
if event.wiki_page?
_("Events|in the wiki for")
'in the wiki for'
elsif event.milestone?
"in"
'in'
elsif event.push_action? || event.commented_action? || event.target
"at"
'at'
end
end
......
......@@ -8164,9 +8164,6 @@ msgstr ""
msgid "Events in %{project_path}"
msgstr ""
msgid "Events|in the wiki for"
msgstr ""
msgid "Every %{action} attempt has failed: %{job_error_message}. Please try again."
msgstr ""
......
......@@ -93,7 +93,7 @@ describe EventsHelper do
let(:event) { create(:wiki_page_event) }
it 'returns a suitable phrase' do
expect(helper.event_preposition(event)).to eq('Events|in the wiki for')
expect(helper.event_preposition(event)).to eq('in the wiki for')
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