Skip to content

Commit

Permalink
Merge branch 'main' into ft-O3-4009
Browse files Browse the repository at this point in the history
  • Loading branch information
usamaidrsk authored Oct 31, 2024
2 parents 0ebbe37 + 9ed992f commit 2358271
Show file tree
Hide file tree
Showing 298 changed files with 12,311 additions and 647 deletions.
3 changes: 1 addition & 2 deletions __mocks__/react-i18next.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,9 @@ useMock.i18n = { language: 'en_US' };

module.exports = {
// this mock makes sure any components using the translate HoC receive the t function as a prop
Trans: ({ children }) => renderNodes(children),
Trans: ({ children }) => (Array.isArray(children) ? renderNodes(children) : renderNodes([children])),
Translation: ({ children }) => children((k) => k, { i18n: {} }),
useTranslation: () => useMock,

// mock if needed
I18nextProvider: reactI18next.I18nextProvider,
initReactI18next: reactI18next.initReactI18next,
Expand Down
4 changes: 2 additions & 2 deletions e2e/specs/attachments.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ test('Add and remove an attachment', async ({ page }) => {
});

await test.step('Then I should see the file I uploaded displayed in the attachments table', async () => {
await expect(page.getByRole('button', { name: /brainScan.jpeg/i })).toBeVisible();
await expect(page.getByRole('button', { name: /brainScan/i })).toBeVisible();
});

await test.step('When I click on the `Table view` tab', async () => {
Expand All @@ -78,7 +78,7 @@ test('Add and remove an attachment', async ({ page }) => {
});

await test.step('And I should not see the deleted attachment in the list', async () => {
await expect(page.getByRole('button', { name: /brainScan.jpeg/i })).not.toBeVisible();
await expect(page.getByRole('button', { name: /brainScan/i })).not.toBeVisible();
});

await test.step('And the attachments table should be empty', async () => {
Expand Down
2 changes: 1 addition & 1 deletion e2e/support/bamboo/playwright.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# The image version should match the Playwright version specified in the package.json file
FROM mcr.microsoft.com/playwright:v1.45.3-jammy
FROM mcr.microsoft.com/playwright:v1.48.2-jammy

ARG USER_ID
ARG GROUP_ID
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
},
"devDependencies": {
"@openmrs/esm-framework": "next",
"@playwright/test": "1.45.3",
"@playwright/test": "1.48.2",
"@swc/cli": "^0.1.62",
"@swc/core": "^1.3.89",
"@swc/jest": "^0.2.29",
Expand Down Expand Up @@ -71,7 +71,7 @@
"sass": "^1.54.3",
"swc-loader": "^0.2.3",
"swr": "^2.2.4",
"turbo": "^2.0.12",
"turbo": "^2.2.3",
"typescript": "^4.0.3",
"webpack-cli": "^4.10.0",
"webpack-dev-server": "^4.15.1"
Expand Down
15 changes: 15 additions & 0 deletions packages/esm-form-engine-app/translations/de.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"cancel": "Cancel",
"closeThisPanel": "Close this panel",
"collapseAll": "Collapse all",
"deleteQuestion": "Delete question",
"deleteQuestionConfirmation": "Are you sure you want to delete this question?",
"deleteQuestionExplainerText": "This action cannot be undone.",
"errorTitle": "There was an error with this form",
"expandAll": "Expand all",
"loading": "Loading",
"or": "or",
"thisList": "this list",
"toggleCollapseOrExpand": "Toggle collapse or expand",
"tryAgainMessage": "Try opening another form from"
}
15 changes: 15 additions & 0 deletions packages/esm-form-engine-app/translations/hi.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"cancel": "Cancel",
"closeThisPanel": "Close this panel",
"collapseAll": "Collapse all",
"deleteQuestion": "Delete question",
"deleteQuestionConfirmation": "Are you sure you want to delete this question?",
"deleteQuestionExplainerText": "This action cannot be undone.",
"errorTitle": "There was an error with this form",
"expandAll": "Expand all",
"loading": "Loading",
"or": "or",
"thisList": "this list",
"toggleCollapseOrExpand": "Toggle collapse or expand",
"tryAgainMessage": "Try opening another form from"
}
15 changes: 15 additions & 0 deletions packages/esm-form-engine-app/translations/id.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"cancel": "Cancel",
"closeThisPanel": "Close this panel",
"collapseAll": "Collapse all",
"deleteQuestion": "Delete question",
"deleteQuestionConfirmation": "Are you sure you want to delete this question?",
"deleteQuestionExplainerText": "This action cannot be undone.",
"errorTitle": "There was an error with this form",
"expandAll": "Expand all",
"loading": "Loading",
"or": "or",
"thisList": "this list",
"toggleCollapseOrExpand": "Toggle collapse or expand",
"tryAgainMessage": "Try opening another form from"
}
15 changes: 15 additions & 0 deletions packages/esm-form-engine-app/translations/it.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"cancel": "Cancel",
"closeThisPanel": "Close this panel",
"collapseAll": "Collapse all",
"deleteQuestion": "Delete question",
"deleteQuestionConfirmation": "Are you sure you want to delete this question?",
"deleteQuestionExplainerText": "This action cannot be undone.",
"errorTitle": "There was an error with this form",
"expandAll": "Expand all",
"loading": "Loading",
"or": "or",
"thisList": "this list",
"toggleCollapseOrExpand": "Toggle collapse or expand",
"tryAgainMessage": "Try opening another form from"
}
15 changes: 15 additions & 0 deletions packages/esm-form-engine-app/translations/pt.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"cancel": "Cancel",
"closeThisPanel": "Close this panel",
"collapseAll": "Collapse all",
"deleteQuestion": "Delete question",
"deleteQuestionConfirmation": "Are you sure you want to delete this question?",
"deleteQuestionExplainerText": "This action cannot be undone.",
"errorTitle": "There was an error with this form",
"expandAll": "Expand all",
"loading": "Loading",
"or": "or",
"thisList": "this list",
"toggleCollapseOrExpand": "Toggle collapse or expand",
"tryAgainMessage": "Try opening another form from"
}
15 changes: 15 additions & 0 deletions packages/esm-form-engine-app/translations/si.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"cancel": "Cancel",
"closeThisPanel": "Close this panel",
"collapseAll": "Collapse all",
"deleteQuestion": "Delete question",
"deleteQuestionConfirmation": "Are you sure you want to delete this question?",
"deleteQuestionExplainerText": "This action cannot be undone.",
"errorTitle": "There was an error with this form",
"expandAll": "Expand all",
"loading": "Loading",
"or": "or",
"thisList": "this list",
"toggleCollapseOrExpand": "Toggle collapse or expand",
"tryAgainMessage": "Try opening another form from"
}
15 changes: 15 additions & 0 deletions packages/esm-form-engine-app/translations/sw.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"cancel": "Cancel",
"closeThisPanel": "Close this panel",
"collapseAll": "Collapse all",
"deleteQuestion": "Delete question",
"deleteQuestionConfirmation": "Are you sure you want to delete this question?",
"deleteQuestionExplainerText": "This action cannot be undone.",
"errorTitle": "There was an error with this form",
"expandAll": "Expand all",
"loading": "Loading",
"or": "or",
"thisList": "this list",
"toggleCollapseOrExpand": "Toggle collapse or expand",
"tryAgainMessage": "Try opening another form from"
}
15 changes: 15 additions & 0 deletions packages/esm-form-engine-app/translations/sw_KE.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"cancel": "Cancel",
"closeThisPanel": "Close this panel",
"collapseAll": "Collapse all",
"deleteQuestion": "Delete question",
"deleteQuestionConfirmation": "Are you sure you want to delete this question?",
"deleteQuestionExplainerText": "This action cannot be undone.",
"errorTitle": "There was an error with this form",
"expandAll": "Expand all",
"loading": "Loading",
"or": "or",
"thisList": "this list",
"toggleCollapseOrExpand": "Toggle collapse or expand",
"tryAgainMessage": "Try opening another form from"
}
15 changes: 15 additions & 0 deletions packages/esm-form-engine-app/translations/tr.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"cancel": "Cancel",
"closeThisPanel": "Close this panel",
"collapseAll": "Collapse all",
"deleteQuestion": "Delete question",
"deleteQuestionConfirmation": "Are you sure you want to delete this question?",
"deleteQuestionExplainerText": "This action cannot be undone.",
"errorTitle": "There was an error with this form",
"expandAll": "Expand all",
"loading": "Loading",
"or": "or",
"thisList": "this list",
"toggleCollapseOrExpand": "Toggle collapse or expand",
"tryAgainMessage": "Try opening another form from"
}
15 changes: 15 additions & 0 deletions packages/esm-form-engine-app/translations/tr_TR.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"cancel": "Cancel",
"closeThisPanel": "Close this panel",
"collapseAll": "Collapse all",
"deleteQuestion": "Delete question",
"deleteQuestionConfirmation": "Are you sure you want to delete this question?",
"deleteQuestionExplainerText": "This action cannot be undone.",
"errorTitle": "There was an error with this form",
"expandAll": "Expand all",
"loading": "Loading",
"or": "or",
"thisList": "this list",
"toggleCollapseOrExpand": "Toggle collapse or expand",
"tryAgainMessage": "Try opening another form from"
}
15 changes: 15 additions & 0 deletions packages/esm-form-engine-app/translations/uk.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"cancel": "Cancel",
"closeThisPanel": "Close this panel",
"collapseAll": "Collapse all",
"deleteQuestion": "Delete question",
"deleteQuestionConfirmation": "Are you sure you want to delete this question?",
"deleteQuestionExplainerText": "This action cannot be undone.",
"errorTitle": "There was an error with this form",
"expandAll": "Expand all",
"loading": "Loading",
"or": "or",
"thisList": "this list",
"toggleCollapseOrExpand": "Toggle collapse or expand",
"tryAgainMessage": "Try opening another form from"
}
15 changes: 15 additions & 0 deletions packages/esm-form-engine-app/translations/vi.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"cancel": "Hủy",
"closeThisPanel": "Close this panel",
"collapseAll": "Collapse all",
"deleteQuestion": "Delete question",
"deleteQuestionConfirmation": "Are you sure you want to delete this question?",
"deleteQuestionExplainerText": "This action cannot be undone.",
"errorTitle": "There was an error with this form",
"expandAll": "Expand all",
"loading": "Đang tải",
"or": "hoặc",
"thisList": "this list",
"toggleCollapseOrExpand": "Toggle collapse or expand",
"tryAgainMessage": "Try opening another form from"
}
70 changes: 70 additions & 0 deletions packages/esm-form-entry-app/translations/de.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
{
"aDayAgo": "a day ago",
"aFewSecondsAgo": "a few seconds ago",
"aMinuteAgo": "a minute ago",
"aMonthAgo": "a month ago",
"aYearAgo": "a year ago",
"add": "Add",
"addHour": "Add a hour",
"addMinute": "Add a minute",
"addSecond": "Add a second",
"anHourAgo": "an hour ago",
"cancel": "Cancel",
"changeToMonthView": "Change to month view",
"chooseMonthAndYear": "Choose month and year",
"clearEntry": "Are you sure you want to clear this entry?",
"closeThisPanel": "Close this panel",
"componentLoadingFailed": "Component Loading failed...",
"daysAgo": " days ago",
"deleteEntry": "Are you sure you want to delete this item?",
"discardButton": "Discard",
"disallowDecimals": "Decimals are not allowed",
"enterMoreCharacters": "Please enter 2 or more characters",
"errorFetchingFormData": "There was an error fetching form data. Details: {detail}",
"errorLoadingForm": "Error loading form",
"errorWithForm": "There was an error with this form",
"fix": "Fix",
"formSubmissionFailed": "An error occurred while processing your form submission. Kindly notify the system administrator and reference the following error : {error}",
"formSubmittedSuccessfully": "The form has been submitted successfully.",
"from": "From",
"futureDateRestriction": "Future date is not allowed!",
"hoursAgo": " hours ago",
"invalidDate": "Provided date is invalid!",
"loading": "Loading...",
"loadingComponent": "Loading Component...",
"max": "Max value should be {max}",
"maxDate": "Max Date should be {maxDate}",
"maxEntries": "Cannot have more than {max} entries",
"maxLength": "Max Length should be {maxLength}",
"min": "Min value should be {min}",
"minDate": "Min Date should be {minDate}",
"minLength": "Min Length should be {minLength}",
"minusHour": "Minus a hour",
"minusMinute": "Minus a minute",
"minusSecond": "Minus a second",
"minutesAgo": " minutes ago",
"monthsAgo": " months ago",
"next": "Next",
"next21Years": "Next 21 years",
"nextMonth": "Next month",
"nextYear": "Next year",
"patientIdentifierDuplication": "Patient identifier duplication",
"patientIdentifierDuplicationDescription": "The identifier provided is already associated with an existing patient. Please check the identifier and try again.",
"orderNumber": "Order number",
"previous": "Previous",
"previous21Years": "Previous 21 years",
"previousMonth": "Previous month",
"previousValue": "Previous Value",
"previousYear": "Previous year",
"remove": "Remove",
"requiredField": "This field is required!",
"saveAndCloseButton": "Save and close",
"selectWeeks": "Select Weeks",
"set": "Set",
"submitting": "Submitting",
"to": "To",
"tryOpeningAnotherForm": "Try opening another form",
"useValue": "Use Value",
"weeks": "Weeks",
"yearsAgo": " years ago"
}
70 changes: 70 additions & 0 deletions packages/esm-form-entry-app/translations/hi.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
{
"aDayAgo": "a day ago",
"aFewSecondsAgo": "a few seconds ago",
"aMinuteAgo": "a minute ago",
"aMonthAgo": "a month ago",
"aYearAgo": "a year ago",
"add": "Add",
"addHour": "Add a hour",
"addMinute": "Add a minute",
"addSecond": "Add a second",
"anHourAgo": "an hour ago",
"cancel": "Cancel",
"changeToMonthView": "Change to month view",
"chooseMonthAndYear": "Choose month and year",
"clearEntry": "Are you sure you want to clear this entry?",
"closeThisPanel": "Close this panel",
"componentLoadingFailed": "Component Loading failed...",
"daysAgo": " days ago",
"deleteEntry": "Are you sure you want to delete this item?",
"discardButton": "Discard",
"disallowDecimals": "Decimals are not allowed",
"enterMoreCharacters": "Please enter 2 or more characters",
"errorFetchingFormData": "There was an error fetching form data. Details: {detail}",
"errorLoadingForm": "Error loading form",
"errorWithForm": "There was an error with this form",
"fix": "Fix",
"formSubmissionFailed": "An error occurred while processing your form submission. Kindly notify the system administrator and reference the following error : {error}",
"formSubmittedSuccessfully": "The form has been submitted successfully.",
"from": "From",
"futureDateRestriction": "Future date is not allowed!",
"hoursAgo": " hours ago",
"invalidDate": "Provided date is invalid!",
"loading": "Loading...",
"loadingComponent": "Loading Component...",
"max": "Max value should be {max}",
"maxDate": "Max Date should be {maxDate}",
"maxEntries": "Cannot have more than {max} entries",
"maxLength": "Max Length should be {maxLength}",
"min": "Min value should be {min}",
"minDate": "Min Date should be {minDate}",
"minLength": "Min Length should be {minLength}",
"minusHour": "Minus a hour",
"minusMinute": "Minus a minute",
"minusSecond": "Minus a second",
"minutesAgo": " minutes ago",
"monthsAgo": " months ago",
"next": "Next",
"next21Years": "Next 21 years",
"nextMonth": "Next month",
"nextYear": "Next year",
"patientIdentifierDuplication": "Patient identifier duplication",
"patientIdentifierDuplicationDescription": "The identifier provided is already associated with an existing patient. Please check the identifier and try again.",
"orderNumber": "Order number",
"previous": "Previous",
"previous21Years": "Previous 21 years",
"previousMonth": "Previous month",
"previousValue": "Previous Value",
"previousYear": "Previous year",
"remove": "Remove",
"requiredField": "This field is required!",
"saveAndCloseButton": "Save and close",
"selectWeeks": "Select Weeks",
"set": "Set",
"submitting": "Submitting",
"to": "To",
"tryOpeningAnotherForm": "Try opening another form",
"useValue": "Use Value",
"weeks": "Weeks",
"yearsAgo": " years ago"
}
Loading

0 comments on commit 2358271

Please sign in to comment.