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';
export const designDeletionError = ({ singular = true } = {}) => {
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,
});
};
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__(
'DesignManagement|Could not create new discussion. Please try again.',
);
export const UPLOAD_DESIGN_ERROR = s__(
'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',
'DesignManagement|Error uploading a new design. Please try again.',
);
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
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
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', () => {
});
expect(wrapper.element).toMatchSnapshot();
expect(wrapper.find(GlAlert)).toBeUndefined();
expect(wrapper.find(GlAlert).exists()).toBe(false);
});
describe('when has no discussions', () => {
......
......@@ -5000,12 +5000,18 @@ msgstr ""
msgid "Could not create project"
msgstr ""
msgid "Could not delete %{design}. Please try again."
msgstr ""
msgid "Could not delete chat nickname %{chat_name}."
msgstr ""
msgid "Could not fetch projects"
msgstr ""
msgid "Could not find design"
msgstr ""
msgid "Could not remove the trigger."
msgstr ""
......@@ -6017,18 +6023,12 @@ msgstr ""
msgid "DesignManagement|Are you sure you want to delete the selected designs?"
msgstr ""
msgid "DesignManagement|Could not add a new comment. Please try again"
msgid "DesignManagement|Could not add a new comment. Please try again."
msgstr ""
msgid "DesignManagement|Could not create new discussion. Please try again."
msgstr ""
msgid "DesignManagement|Could not delete %{design}. Please try again"
msgstr ""
msgid "DesignManagement|Could not find design"
msgstr ""
msgid "DesignManagement|Delete"
msgstr ""
......@@ -6041,7 +6041,7 @@ msgstr ""
msgid "DesignManagement|Deselect all"
msgstr ""
msgid "DesignManagement|Error uploading a new design. Please try again"
msgid "DesignManagement|Error uploading a new design. Please try again."
msgstr ""
msgid "DesignManagement|Go back to designs"
......@@ -6053,9 +6053,6 @@ msgstr ""
msgid "DesignManagement|Go to previous design"
msgstr ""
msgid "DesignManagement|Requested design version does not exist"
msgstr ""
msgid "DesignManagement|Requested design version does not exist. Showing latest version instead"
msgstr ""
......@@ -15195,6 +15192,9 @@ msgstr ""
msgid "Requested %{time_ago}"
msgstr ""
msgid "Requested design version does not exist"
msgstr ""
msgid "Requests Profiles"
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