Skip to content

Commit

Permalink
🐛 Fix review messages (#1548)
Browse files Browse the repository at this point in the history
  • Loading branch information
ibolton336 authored Nov 16, 2023
1 parent 695e01e commit c376994
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
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

0 comments on commit c376994

Please sign in to comment.