Commit ef359df4 authored by Tom Quirk's avatar Tom Quirk

Clean up design management error messages

parent 64174a7c
...@@ -2,20 +2,18 @@ import { __, s__, sprintf } from '~/locale'; ...@@ -2,20 +2,18 @@ import { __, s__, sprintf } from '~/locale';
export const designDeletionError = ({ singular = true } = {}) => { export const designDeletionError = ({ singular = true } = {}) => {
const design = singular ? __('a design') : __('designs'); const design = singular ? __('a design') : __('designs');
return sprintf(s__('DesignManagement|Could not delete %{design}. Please try again'), { return sprintf(s__('Could not delete %{design}. Please try again.'), {
design, design,
}); });
}; };
export const ADD_DISCUSSION_COMMENT_ERROR = s__( export const ADD_DISCUSSION_COMMENT_ERROR = s__(
'DesignManagement|Could not add a new comment. Please try again', 'DesignManagement|Could not add a new comment. Please try again.',
); );
export const ADD_IMAGE_DIFF_NOTE_ERROR = s__( export const ADD_IMAGE_DIFF_NOTE_ERROR = s__(
'DesignManagement|Could not create new discussion. Please try again.', 'DesignManagement|Could not create new discussion. Please try again.',
); );
export const UPLOAD_DESIGN_ERROR = s__( export const UPLOAD_DESIGN_ERROR = s__(
'DesignManagement|Error uploading a new design. Please try again', 'DesignManagement|Error uploading a new design. Please try again.',
);
export const DESIGN_NOT_FOUND_ERROR = s__('DesignManagement|Could not find design');
export const DESIGN_NOT_EXIST_ERROR = s__(
'DesignManagement|Requested design version does not exist',
); );
export const DESIGN_NOT_FOUND_ERROR = __('Could not find design');
export const DESIGN_NOT_EXIST_ERROR = __('Requested design version does not exist');
// Jest Snapshot v1, https://goo.gl/fbAQLP // Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Design management design index page flash GlAlert is rendered in correct position with correct content 1`] = ` exports[`Design management design index page with error GlAlert is rendered in correct position with correct content 1`] = `
<div <div
class="design-detail fixed-top w-100 position-bottom-0 d-flex justify-content-center flex-column flex-lg-row" class="design-detail fixed-top w-100 position-bottom-0 d-flex justify-content-center flex-column flex-lg-row"
> >
......
...@@ -92,7 +92,7 @@ describe('Design management design index page', () => { ...@@ -92,7 +92,7 @@ describe('Design management design index page', () => {
}); });
expect(wrapper.element).toMatchSnapshot(); expect(wrapper.element).toMatchSnapshot();
expect(wrapper.find(GlAlert)).toBeUndefined(); expect(wrapper.find(GlAlert).exists()).toBe(false);
}); });
describe('when has no discussions', () => { describe('when has no discussions', () => {
......
...@@ -5000,12 +5000,18 @@ msgstr "" ...@@ -5000,12 +5000,18 @@ msgstr ""
msgid "Could not create project" msgid "Could not create project"
msgstr "" msgstr ""
msgid "Could not delete %{design}. Please try again."
msgstr ""
msgid "Could not delete chat nickname %{chat_name}." msgid "Could not delete chat nickname %{chat_name}."
msgstr "" msgstr ""
msgid "Could not fetch projects" msgid "Could not fetch projects"
msgstr "" msgstr ""
msgid "Could not find design"
msgstr ""
msgid "Could not remove the trigger." msgid "Could not remove the trigger."
msgstr "" msgstr ""
...@@ -6017,18 +6023,12 @@ msgstr "" ...@@ -6017,18 +6023,12 @@ msgstr ""
msgid "DesignManagement|Are you sure you want to delete the selected designs?" msgid "DesignManagement|Are you sure you want to delete the selected designs?"
msgstr "" msgstr ""
msgid "DesignManagement|Could not add a new comment. Please try again" msgid "DesignManagement|Could not add a new comment. Please try again."
msgstr "" msgstr ""
msgid "DesignManagement|Could not create new discussion. Please try again." msgid "DesignManagement|Could not create new discussion. Please try again."
msgstr "" msgstr ""
msgid "DesignManagement|Could not delete %{design}. Please try again"
msgstr ""
msgid "DesignManagement|Could not find design"
msgstr ""
msgid "DesignManagement|Delete" msgid "DesignManagement|Delete"
msgstr "" msgstr ""
...@@ -6041,7 +6041,7 @@ msgstr "" ...@@ -6041,7 +6041,7 @@ msgstr ""
msgid "DesignManagement|Deselect all" msgid "DesignManagement|Deselect all"
msgstr "" msgstr ""
msgid "DesignManagement|Error uploading a new design. Please try again" msgid "DesignManagement|Error uploading a new design. Please try again."
msgstr "" msgstr ""
msgid "DesignManagement|Go back to designs" msgid "DesignManagement|Go back to designs"
...@@ -6053,9 +6053,6 @@ msgstr "" ...@@ -6053,9 +6053,6 @@ msgstr ""
msgid "DesignManagement|Go to previous design" msgid "DesignManagement|Go to previous design"
msgstr "" msgstr ""
msgid "DesignManagement|Requested design version does not exist"
msgstr ""
msgid "DesignManagement|Requested design version does not exist. Showing latest version instead" msgid "DesignManagement|Requested design version does not exist. Showing latest version instead"
msgstr "" msgstr ""
...@@ -15195,6 +15192,9 @@ msgstr "" ...@@ -15195,6 +15192,9 @@ msgstr ""
msgid "Requested %{time_ago}" msgid "Requested %{time_ago}"
msgstr "" msgstr ""
msgid "Requested design version does not exist"
msgstr ""
msgid "Requests Profiles" msgid "Requests Profiles"
msgstr "" 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