From f92f188cdf4aacc0b824c07e4f0366fde9d0954f Mon Sep 17 00:00:00 2001 From: Marcin Sedlak-Jakubowski <msedlakjakubowski@gitlab.com> Date: Tue, 9 Mar 2021 23:50:16 +0000 Subject: [PATCH] Use "Created" instead of "opened" when describing issue creation --- .../issues_list/components/issuable.vue | 6 +++--- app/helpers/issuables_helper.rb | 2 +- app/views/projects/issues/_issue.html.haml | 2 +- .../246959-msj-opened-created-ui.yml | 5 +++++ locale/gitlab.pot | 18 +++++++++--------- .../issues_list/components/issuable_spec.js | 4 ++-- 6 files changed, 21 insertions(+), 16 deletions(-) create mode 100644 changelogs/unreleased/246959-msj-opened-created-ui.yml diff --git a/app/assets/javascripts/issues_list/components/issuable.vue b/app/assets/javascripts/issues_list/components/issuable.vue index a2970bdc43b3d..60b01a6d37f2e 100644 --- a/app/assets/javascripts/issues_list/components/issuable.vue +++ b/app/assets/javascripts/issues_list/components/issuable.vue @@ -32,9 +32,9 @@ import IssueAssignees from '~/vue_shared/components/issue/issue_assignees.vue'; export default { i18n: { - openedAgo: __('opened %{timeAgoString} by %{user}'), - openedAgoJira: __('opened %{timeAgoString} by %{user} in Jira'), - openedAgoServiceDesk: __('opened %{timeAgoString} by %{email} via %{user}'), + openedAgo: __('created %{timeAgoString} by %{user}'), + openedAgoJira: __('created %{timeAgoString} by %{user} in Jira'), + openedAgoServiceDesk: __('created %{timeAgoString} by %{email} via %{user}'), }, components: { IssueAssignees, diff --git a/app/helpers/issuables_helper.rb b/app/helpers/issuables_helper.rb index e28daabe1ed3c..639a54fa9ec27 100644 --- a/app/helpers/issuables_helper.rb +++ b/app/helpers/issuables_helper.rb @@ -151,7 +151,7 @@ def issuable_meta_author_status(author) def issuable_meta(issuable, project) output = [] - output << "Opened #{time_ago_with_tooltip(issuable.created_at)} by ".html_safe + output << "Created #{time_ago_with_tooltip(issuable.created_at)} by ".html_safe if issuable.is_a?(Issue) && issuable.service_desk_reply_to output << "#{html_escape(issuable.service_desk_reply_to)} via " diff --git a/app/views/projects/issues/_issue.html.haml b/app/views/projects/issues/_issue.html.haml index 235107134949d..838b4538cad0a 100644 --- a/app/views/projects/issues/_issue.html.haml +++ b/app/views/projects/issues/_issue.html.haml @@ -22,7 +22,7 @@ #{issuable_reference(issue)} %span.issuable-authored.d-none.d-sm-inline-block · - opened #{time_ago_with_tooltip(issue.created_at, placement: 'bottom')} by + created #{time_ago_with_tooltip(issue.created_at, placement: 'bottom')} by - if issue.service_desk_reply_to #{issue.service_desk_reply_to} via #{link_to_member(@project, issue.author, avatar: false)} diff --git a/changelogs/unreleased/246959-msj-opened-created-ui.yml b/changelogs/unreleased/246959-msj-opened-created-ui.yml new file mode 100644 index 0000000000000..d0435638be872 --- /dev/null +++ b/changelogs/unreleased/246959-msj-opened-created-ui.yml @@ -0,0 +1,5 @@ +--- +title: Use Created instead of opened when describing issue creation +merge_request: 49478 +author: +type: other diff --git a/locale/gitlab.pot b/locale/gitlab.pot index 7d4e91afdcd1e..46897477f6b5e 100644 --- a/locale/gitlab.pot +++ b/locale/gitlab.pot @@ -35243,6 +35243,15 @@ msgstr "" msgid "created" msgstr "" +msgid "created %{timeAgoString} by %{email} via %{user}" +msgstr "" + +msgid "created %{timeAgoString} by %{user}" +msgstr "" + +msgid "created %{timeAgoString} by %{user} in Jira" +msgstr "" + msgid "created %{timeAgo}" msgstr "" @@ -36016,15 +36025,6 @@ msgstr "" msgid "open issue" msgstr "" -msgid "opened %{timeAgoString} by %{email} via %{user}" -msgstr "" - -msgid "opened %{timeAgoString} by %{user}" -msgstr "" - -msgid "opened %{timeAgoString} by %{user} in Jira" -msgstr "" - msgid "opened %{timeAgo}" msgstr "" diff --git a/spec/frontend/issues_list/components/issuable_spec.js b/spec/frontend/issues_list/components/issuable_spec.js index 236eab6e276a9..97d841c861dc9 100644 --- a/spec/frontend/issues_list/components/issuable_spec.js +++ b/spec/frontend/issues_list/components/issuable_spec.js @@ -192,9 +192,9 @@ describe('Issuable component', () => { expect(wrapper.classes('closed')).toBe(false); }); - it('renders fuzzy opened date and author', () => { + it('renders fuzzy created date and author', () => { expect(trimText(findOpenedAgoContainer().text())).toContain( - `opened 1 month ago by ${TEST_USER_NAME}`, + `created 1 month ago by ${TEST_USER_NAME}`, ); }); -- GitLab