Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 Fix review messages #1548

Merged
merged 2 commits into from
Nov 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions client/public/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@
"applicationsBulkDelete": "The selected application(s) will be deleted.",

"delete": "This action cannot be undone.",
"discardAssessment": "The assessment for <1>{{applicationName}}</1> will be discarded, as well as the review result. Do you wish to continue?",
"discardAssessment": "The assessment(s) for <1>{{applicationName}}</1> will be discarded. Do you wish to continue?",
"discardReview": "The review for <1>{{applicationName}}</1> will be discarded. Do you wish to continue?",
"leavePage": "Are you sure you want to leave this page? Be sure to save your changes, or they will be lost.",
"pageError": "Oops! Something went wrong.",
"refreshPage": "Try to refresh your page or contact your admin.",
Expand Down Expand Up @@ -186,7 +187,7 @@
"overrideAssessmentConfirmation": "Do you want to create a dedicated assessment for this application and override the inherited archetype assessment(s)?",
"overrideArchetypeReviewDescription": "The application {{name}} already is associated with archetypes: {{what}}.",
"overrideArchetypeReviewConfirmation": "Do you want to create a dedicated review for this application and override the inherited archetype review?",
"overrideReviewConfirmation": "This archetype has already been reviewed. Do you want to continue?",
"editArchetypeReviewConfirmation": "This archetype has already been reviewed. Do you want to continue?",
"reasonForError": "The reported reason for the error:",
"reviewInstructions": "Use this section to provide your assessment of the possible migration/modernization plan and effort estimation.",
"savingSelection": "Saving selection",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -686,6 +686,9 @@ export const ApplicationsTable: React.FC = () => {
);
}
};

const applicationName = assessmentToDiscard?.name || "Application name";

return (
<ConditionalRender
when={isFetchingApplications && !(applications || applicationsFetchError)}
Expand Down Expand Up @@ -1150,13 +1153,10 @@ export const ApplicationsTable: React.FC = () => {
<span>
<Trans
i18nKey="dialog.message.discardAssessment"
values={{
applicationName: assessmentToDiscard?.name,
}}
values={{ applicationName }}
>
The assessment(s) for{" "}
<strong>{assessmentToDiscard?.name}</strong> will be discarded.
Do you wish to continue?
The assessment(s) for <strong>{applicationName}</strong> will be
discarded. Do you wish to continue?
</Trans>
</span>
}
Expand Down
2 changes: 1 addition & 1 deletion client/src/app/pages/archetypes/archetypes-page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@ const Archetypes: React.FC = () => {
})}
titleIconVariant={"warning"}
isOpen={reviewToEdit !== null}
message={t("message.overrideArchetypeReviewConfirmation")}
message={t("message.editArchetypeReviewConfirmation")}
confirmBtnVariant={ButtonVariant.primary}
confirmBtnLabel={t("actions.continue")}
cancelBtnLabel={t("actions.cancel")}
Expand Down