diff --git a/CHANGELOG.md b/CHANGELOG.md index feab549db6..80b6da0707 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,17 @@ +## [100.44.2](https://github.com/dhis2/capture-app/compare/v100.44.1...v100.44.2) (2023-11-05) + + +### Bug Fixes + +* **translations:** sync translations from transifex (master) ([0076449](https://github.com/dhis2/capture-app/commit/0076449e545803fa8b5e36b0663d807bb6c7d410)) + +## [100.44.1](https://github.com/dhis2/capture-app/compare/v100.44.0...v100.44.1) (2023-11-02) + + +### Bug Fixes + +* [DHIS2-15945] translations in enrollment widget ([#3433](https://github.com/dhis2/capture-app/issues/3433)) ([c188767](https://github.com/dhis2/capture-app/commit/c1887673e56f2f73cfc594b682d471c10858c0fd)) + # [100.44.0](https://github.com/dhis2/capture-app/compare/v100.43.0...v100.44.0) (2023-11-01) diff --git a/cypress/e2e/EnrollmentPage/StagesAndEventsWidget.feature b/cypress/e2e/EnrollmentPage/StagesAndEventsWidget.feature index 480c827c0a..f50fe17c60 100644 --- a/cypress/e2e/EnrollmentPage/StagesAndEventsWidget.feature +++ b/cypress/e2e/EnrollmentPage/StagesAndEventsWidget.feature @@ -21,15 +21,11 @@ Feature: User interacts with Stages and Events Widget And you see the first 5 events in the table And you see buttons in the footer list - Scenario: User can view more events + Scenario: User can view more events and then view less Given you open the enrollment page which has multiples events and stages When you click show more button in stages&event list Then more events should be displayed And reset button should be displayed - - Scenario: User can reset events - Given you open the enrollment page which has multiples events and stages - When you click show more button in stages&event list And you click reset button Then there should be 5 rows in the table diff --git a/cypress/e2e/WidgetsForEnrollmentPages/WidgetEnrollment/index.js b/cypress/e2e/WidgetsForEnrollmentPages/WidgetEnrollment/index.js index 676a73b3bb..be1a87296a 100644 --- a/cypress/e2e/WidgetsForEnrollmentPages/WidgetEnrollment/index.js +++ b/cypress/e2e/WidgetsForEnrollmentPages/WidgetEnrollment/index.js @@ -15,7 +15,7 @@ Then('the enrollment widget should be closed', () => { Then('the enrollment widget should be opened', () => { cy.get('[data-test="widget-enrollment"]').within(() => { - cy.get('[data-test="widget-contents"]').children().should('exist'); + cy.get('[data-test="widget-enrollment-contents"]').children().should('exist'); }); }); diff --git a/i18n/my.po b/i18n/my.po index 370b8a7761..d5cd6a50f3 100644 --- a/i18n/my.po +++ b/i18n/my.po @@ -3,14 +3,14 @@ # Aung Kyi Min , 2019 # Viktor Varland , 2021 # Wanda , 2021 -# Philip Larsen Donnelly, 2022 +# Philip Larsen Donnelly, 2023 # msgid "" msgstr "" "Project-Id-Version: i18next-conv\n" -"POT-Creation-Date: 2023-09-04T07:07:59.195Z\n" +"POT-Creation-Date: 2023-09-12T06:24:49.265Z\n" "PO-Revision-Date: 2019-06-27 07:31+0000\n" -"Last-Translator: Philip Larsen Donnelly, 2022\n" +"Last-Translator: Philip Larsen Donnelly, 2023\n" "Language-Team: Burmese (https://app.transifex.com/hisp-uio/teams/100509/my/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -154,6 +154,15 @@ msgstr "Coordinate" msgid "Enrollment" msgstr "" +msgid "Complete event" +msgstr "" + +msgid "{{ stageName }} - Basic info" +msgstr "" + +msgid "{{ stageName }} - Status" +msgstr "" + msgid "Please select {{categoryName}}" msgstr "" @@ -172,13 +181,16 @@ msgstr "ပယ်ဖျက်သည်" msgid "Metadata error. see log for details" msgstr "" -msgid "Assigned user" +msgid "{{ stageName }} - Details" msgstr "" -msgid "Search for user" +msgid "{{ stageName }} - {{ sectionName }}" msgstr "" -msgid "Complete event" +msgid "Assigned user" +msgstr "" + +msgid "Search for user" msgstr "" msgid "Basic info" @@ -511,6 +523,9 @@ msgstr "" msgid "suggestions could not be retrieved" msgstr "" +msgid "No results found" +msgstr "No results found" + msgid "No items to display" msgstr "" @@ -914,11 +929,20 @@ msgstr "" msgid "Organisation unit could not be loaded" msgstr "" -msgid "Possible duplicates found" +msgid "Selected program" msgstr "" -msgid "No results found" -msgstr "No results found" +msgid "Search {{uniqueAttrName}}" +msgstr "" + +msgid "Search by attributes" +msgstr "" + +msgid "Could not retrieve metadata. Please try again later." +msgstr "" + +msgid "Possible duplicates found" +msgstr "" msgid "An error occurred loading possible duplicates" msgstr "" @@ -978,9 +1002,6 @@ msgstr "" msgid "Search by {{name}}" msgstr "" -msgid "Search by attributes" -msgstr "" - msgid "all programs" msgstr "" @@ -1032,12 +1053,6 @@ msgstr "" msgid "Results found" msgstr "" -msgid "Selected program" -msgstr "" - -msgid "Search {{uniqueAttrName}}" -msgstr "" - msgid "Saved lists in this program" msgstr "" @@ -1312,13 +1327,47 @@ msgstr "" msgid "Stages and Events" msgstr "" -msgid "Working list could not be loaded" +msgid "New TEI Relationship" msgstr "" -msgid "Download as JSON" +msgid "Missing implementation step" +msgstr "" + +msgid "Go back without saving relationship" +msgstr "" + +msgid "New Relationship" +msgstr "" + +msgid "Link to an existing {{tetName}}" +msgstr "" + +msgid "An error occurred while adding the relationship" msgstr "" -msgid "Download as XML" +msgid "" +"Something went wrong while loading relationships. Please try again later." +msgstr "" + +msgid "{{trackedEntityTypeName}} relationships" +msgstr "" + +msgid "To open this relationship, please wait until saving is complete" +msgstr "" + +msgid "Type" +msgstr "ပုံစံ" + +msgid "Created date" +msgstr "" + +msgid "Program stage name" +msgstr "" + +msgid "Working list could not be loaded" +msgstr "" + +msgid "Download as JSON" msgstr "" msgid "Download as CSV" diff --git a/i18n/ps.po b/i18n/ps.po index eadda919e9..51a9bdd72a 100644 --- a/i18n/ps.po +++ b/i18n/ps.po @@ -1,14 +1,14 @@ # # Translators: -# phil_dhis2, 2022 # Viktor Varland , 2023 +# Philip Larsen Donnelly, 2023 # msgid "" msgstr "" "Project-Id-Version: i18next-conv\n" -"POT-Creation-Date: 2023-06-27T06:20:33.460Z\n" +"POT-Creation-Date: 2023-09-12T06:24:49.265Z\n" "PO-Revision-Date: 2019-06-27 07:31+0000\n" -"Last-Translator: Viktor Varland , 2023\n" +"Last-Translator: Philip Larsen Donnelly, 2023\n" "Language-Team: Pashto (https://app.transifex.com/hisp-uio/teams/100509/ps/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -67,6 +67,16 @@ msgstr "" msgid "Last updated" msgstr "د وروستي ځل لپاره تجدید شوې" +msgid "error encountered during field validation" +msgstr "" + +msgid "error" +msgstr "" + +msgid "" +"Plugins are not yet available - Please contact your system administrator" +msgstr "" + msgid "This value is validating" msgstr "" @@ -142,6 +152,15 @@ msgstr "همغږي کول" msgid "Enrollment" msgstr "شاملول یا نوم لیکنه" +msgid "Complete event" +msgstr "" + +msgid "{{ stageName }} - Basic info" +msgstr "" + +msgid "{{ stageName }} - Status" +msgstr "" + msgid "Please select {{categoryName}}" msgstr "" @@ -160,13 +179,16 @@ msgstr "رد یې کړئ [ ژباړه ـ ردول ]" msgid "Metadata error. see log for details" msgstr "" -msgid "Assigned user" +msgid "{{ stageName }} - Details" msgstr "" -msgid "Search for user" +msgid "{{ stageName }} - {{ sectionName }}" msgstr "" -msgid "Complete event" +msgid "Assigned user" +msgstr "" + +msgid "Search for user" msgstr "" msgid "Basic info" @@ -356,9 +378,6 @@ msgstr "" msgid "Operations running" msgstr "" -msgid "Sort" -msgstr "" - msgid "" "This event has unsaved changes. Leaving this page without saving will lose " "these changes. Are you sure you want to discard unsaved changes?" @@ -472,6 +491,12 @@ msgstr "" msgid "Select image" msgstr "" +msgid "Type to filter options" +msgstr "" + +msgid "No match found" +msgstr "" + msgid "Search" msgstr "جستجو" @@ -496,6 +521,9 @@ msgstr "" msgid "suggestions could not be retrieved" msgstr "" +msgid "No results found" +msgstr "هېڅ پایله ترلاسه نه شوه" + msgid "No items to display" msgstr "" @@ -737,7 +765,7 @@ msgstr "مهالوېش یې وټاکئ" msgid "Refer" msgstr "" -msgid "You can’t add any more {{ programStageName }} events" +msgid "You can't add any more {{ programStageName }} events" msgstr "" msgid "Cancel without saving" @@ -801,6 +829,9 @@ msgstr "" msgid "New Enrollment in program{{escape}} {{programName}}" msgstr "" +msgid "Save {{trackedEntityTypeName}}" +msgstr "" + msgid "Save {{trackedEntityName}}" msgstr "" @@ -896,11 +927,20 @@ msgstr "" msgid "Organisation unit could not be loaded" msgstr "" -msgid "Possible duplicates found" +msgid "Selected program" +msgstr "انتخاب شوی پروګرام" + +msgid "Search {{uniqueAttrName}}" msgstr "" -msgid "No results found" -msgstr "هېڅ پایله ترلاسه نه شوه" +msgid "Search by attributes" +msgstr "" + +msgid "Could not retrieve metadata. Please try again later." +msgstr "" + +msgid "Possible duplicates found" +msgstr "" msgid "An error occurred loading possible duplicates" msgstr "" @@ -954,20 +994,12 @@ msgstr "" msgid "Choose a type to start searching" msgstr "" -msgid "Fill in at least {{count}} attribute to search" -msgid_plural "Fill in at least {{count}} attribute to search" -msgstr[0] "" -msgstr[1] "" - msgid "Search {{name}}" msgstr "" msgid "Search by {{name}}" msgstr "" -msgid "Search by attributes" -msgstr "" - msgid "all programs" msgstr "" @@ -1019,12 +1051,6 @@ msgstr "" msgid "Results found" msgstr "" -msgid "Selected program" -msgstr "انتخاب شوی پروګرام" - -msgid "Search {{uniqueAttrName}}" -msgstr "" - msgid "Saved lists in this program" msgstr "" @@ -1111,6 +1137,9 @@ msgstr "" msgid "Mark for follow-up" msgstr "د تعقيب لپاره يې په نښه کړئ" +msgid "Existing dates for auto-generated events will not be updated." +msgstr "" + msgid "Enrollment date" msgstr "د نوم ثبتونې نېټه" @@ -1199,24 +1228,12 @@ msgid "" "The scheduled date matches the suggested date, but can be changed if needed." msgstr "" -msgid "The scheduled date is {{count}} days {{position}} the suggested date." -msgid_plural "" -"The scheduled date is {{count}} days {{position}} the suggested date." -msgstr[0] "" -msgstr[1] "" - msgid "after" msgstr "" msgid "before" msgstr "" -msgid "There are {{count}} scheduled event in {{orgUnitName}} on this day." -msgid_plural "" -"There are {{count}} scheduled event in {{orgUnitName}} on this day." -msgstr[0] "" -msgstr[1] "" - msgid "" "Scheduling an event in {{stageName}} for {{programName}} in {{orgUnitName}}" msgstr "" @@ -1260,9 +1277,6 @@ msgstr "" msgid "Try again or contact your system administrator for support" msgstr "" -msgid "tracked entity instance" -msgstr "" - msgid "Fix errors in the form to continue." msgstr "" @@ -1275,6 +1289,9 @@ msgstr "" msgid "Edit" msgstr "درست یې کړئ" +msgid "tracked entity instance" +msgstr "" + msgid "New {{ eventName }} event" msgstr "" @@ -1308,13 +1325,47 @@ msgstr "" msgid "Stages and Events" msgstr "" -msgid "Working list could not be loaded" +msgid "New TEI Relationship" msgstr "" -msgid "Download as JSON" +msgid "Missing implementation step" +msgstr "" + +msgid "Go back without saving relationship" +msgstr "" + +msgid "New Relationship" +msgstr "" + +msgid "Link to an existing {{tetName}}" msgstr "" -msgid "Download as XML" +msgid "An error occurred while adding the relationship" +msgstr "" + +msgid "" +"Something went wrong while loading relationships. Please try again later." +msgstr "" + +msgid "{{trackedEntityTypeName}} relationships" +msgstr "" + +msgid "To open this relationship, please wait until saving is complete" +msgstr "" + +msgid "Type" +msgstr "نمونه/ډول" + +msgid "Created date" +msgstr "" + +msgid "Program stage name" +msgstr "د پروګرام د پړاو یا مرحلې نوم" + +msgid "Working list could not be loaded" +msgstr "" + +msgid "Download as JSON" msgstr "" msgid "Download as CSV" @@ -1464,9 +1515,6 @@ msgstr "" msgid "Set coordinate" msgstr "همغږي ترتیب کړئ" -msgid "Page {{currentPage}}" -msgstr "" - msgid "Date" msgstr "نېټه" @@ -1485,10 +1533,7 @@ msgstr "" msgid "To time" msgstr "" -msgid "error encountered during field validation" -msgstr "" - -msgid "error" +msgid "Page {{currentPage}}" msgstr "" msgid "Delete polygon" diff --git a/i18n/pt_BR.po b/i18n/pt_BR.po index 0ec8fcac15..cca4b80e6f 100644 --- a/i18n/pt_BR.po +++ b/i18n/pt_BR.po @@ -1,15 +1,15 @@ # # Translators: # Oscar Mesones Lapouble , 2021 -# Viktor Varland , 2021 -# Philip Larsen Donnelly, 2022 +# Viktor Varland , 2023 +# Philip Larsen Donnelly, 2023 # msgid "" msgstr "" "Project-Id-Version: i18next-conv\n" -"POT-Creation-Date: 2023-09-04T07:07:59.195Z\n" +"POT-Creation-Date: 2023-09-12T06:24:49.265Z\n" "PO-Revision-Date: 2019-06-27 07:31+0000\n" -"Last-Translator: Philip Larsen Donnelly, 2022\n" +"Last-Translator: Philip Larsen Donnelly, 2023\n" "Language-Team: Portuguese (Brazil) (https://app.transifex.com/hisp-uio/teams/100509/pt_BR/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -153,6 +153,15 @@ msgstr "" msgid "Enrollment" msgstr "" +msgid "Complete event" +msgstr "" + +msgid "{{ stageName }} - Basic info" +msgstr "" + +msgid "{{ stageName }} - Status" +msgstr "" + msgid "Please select {{categoryName}}" msgstr "" @@ -171,13 +180,16 @@ msgstr "Cancelar" msgid "Metadata error. see log for details" msgstr "" -msgid "Assigned user" +msgid "{{ stageName }} - Details" msgstr "" -msgid "Search for user" +msgid "{{ stageName }} - {{ sectionName }}" msgstr "" -msgid "Complete event" +msgid "Assigned user" +msgstr "" + +msgid "Search for user" msgstr "" msgid "Basic info" @@ -510,6 +522,9 @@ msgstr "" msgid "suggestions could not be retrieved" msgstr "" +msgid "No results found" +msgstr "" + msgid "No items to display" msgstr "" @@ -913,10 +928,19 @@ msgstr "" msgid "Organisation unit could not be loaded" msgstr "" -msgid "Possible duplicates found" +msgid "Selected program" msgstr "" -msgid "No results found" +msgid "Search {{uniqueAttrName}}" +msgstr "" + +msgid "Search by attributes" +msgstr "" + +msgid "Could not retrieve metadata. Please try again later." +msgstr "" + +msgid "Possible duplicates found" msgstr "" msgid "An error occurred loading possible duplicates" @@ -977,9 +1001,6 @@ msgstr "" msgid "Search by {{name}}" msgstr "" -msgid "Search by attributes" -msgstr "" - msgid "all programs" msgstr "" @@ -1031,12 +1052,6 @@ msgstr "" msgid "Results found" msgstr "" -msgid "Selected program" -msgstr "" - -msgid "Search {{uniqueAttrName}}" -msgstr "" - msgid "Saved lists in this program" msgstr "" @@ -1311,13 +1326,47 @@ msgstr "" msgid "Stages and Events" msgstr "" -msgid "Working list could not be loaded" +msgid "New TEI Relationship" msgstr "" -msgid "Download as JSON" +msgid "Missing implementation step" +msgstr "" + +msgid "Go back without saving relationship" +msgstr "" + +msgid "New Relationship" +msgstr "" + +msgid "Link to an existing {{tetName}}" +msgstr "" + +msgid "An error occurred while adding the relationship" msgstr "" -msgid "Download as XML" +msgid "" +"Something went wrong while loading relationships. Please try again later." +msgstr "" + +msgid "{{trackedEntityTypeName}} relationships" +msgstr "" + +msgid "To open this relationship, please wait until saving is complete" +msgstr "" + +msgid "Type" +msgstr "Tipo" + +msgid "Created date" +msgstr "" + +msgid "Program stage name" +msgstr "Nome do estágio do programa" + +msgid "Working list could not be loaded" +msgstr "" + +msgid "Download as JSON" msgstr "" msgid "Download as CSV" diff --git a/i18n/sv.po b/i18n/sv.po index 095c7c794d..12f88faefd 100644 --- a/i18n/sv.po +++ b/i18n/sv.po @@ -1,15 +1,15 @@ # # Translators: -# Philip Larsen Donnelly, 2022 # Viktor Varland , 2023 # Jason Pickering , 2023 +# Philip Larsen Donnelly, 2023 # msgid "" msgstr "" "Project-Id-Version: i18next-conv\n" -"POT-Creation-Date: 2023-09-04T07:07:59.195Z\n" +"POT-Creation-Date: 2023-09-12T06:24:49.265Z\n" "PO-Revision-Date: 2019-06-27 07:31+0000\n" -"Last-Translator: Jason Pickering , 2023\n" +"Last-Translator: Philip Larsen Donnelly, 2023\n" "Language-Team: Swedish (https://app.transifex.com/hisp-uio/teams/100509/sv/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -153,6 +153,15 @@ msgstr "Coordinate" msgid "Enrollment" msgstr "" +msgid "Complete event" +msgstr "" + +msgid "{{ stageName }} - Basic info" +msgstr "" + +msgid "{{ stageName }} - Status" +msgstr "" + msgid "Please select {{categoryName}}" msgstr "" @@ -171,13 +180,16 @@ msgstr "Annullera" msgid "Metadata error. see log for details" msgstr "" -msgid "Assigned user" +msgid "{{ stageName }} - Details" msgstr "" -msgid "Search for user" +msgid "{{ stageName }} - {{ sectionName }}" msgstr "" -msgid "Complete event" +msgid "Assigned user" +msgstr "" + +msgid "Search for user" msgstr "" msgid "Basic info" @@ -510,6 +522,9 @@ msgstr "" msgid "suggestions could not be retrieved" msgstr "" +msgid "No results found" +msgstr "Inga resultat hittades" + msgid "No items to display" msgstr "" @@ -913,11 +928,20 @@ msgstr "" msgid "Organisation unit could not be loaded" msgstr "" -msgid "Possible duplicates found" +msgid "Selected program" msgstr "" -msgid "No results found" -msgstr "Inga resultat hittades" +msgid "Search {{uniqueAttrName}}" +msgstr "" + +msgid "Search by attributes" +msgstr "" + +msgid "Could not retrieve metadata. Please try again later." +msgstr "" + +msgid "Possible duplicates found" +msgstr "" msgid "An error occurred loading possible duplicates" msgstr "" @@ -977,9 +1001,6 @@ msgstr "" msgid "Search by {{name}}" msgstr "" -msgid "Search by attributes" -msgstr "" - msgid "all programs" msgstr "" @@ -1031,12 +1052,6 @@ msgstr "" msgid "Results found" msgstr "" -msgid "Selected program" -msgstr "" - -msgid "Search {{uniqueAttrName}}" -msgstr "" - msgid "Saved lists in this program" msgstr "" @@ -1311,13 +1326,47 @@ msgstr "" msgid "Stages and Events" msgstr "" -msgid "Working list could not be loaded" +msgid "New TEI Relationship" msgstr "" -msgid "Download as JSON" +msgid "Missing implementation step" +msgstr "" + +msgid "Go back without saving relationship" +msgstr "" + +msgid "New Relationship" +msgstr "" + +msgid "Link to an existing {{tetName}}" +msgstr "" + +msgid "An error occurred while adding the relationship" msgstr "" -msgid "Download as XML" +msgid "" +"Something went wrong while loading relationships. Please try again later." +msgstr "" + +msgid "{{trackedEntityTypeName}} relationships" +msgstr "" + +msgid "To open this relationship, please wait until saving is complete" +msgstr "" + +msgid "Type" +msgstr "Typ" + +msgid "Created date" +msgstr "" + +msgid "Program stage name" +msgstr "" + +msgid "Working list could not be loaded" +msgstr "" + +msgid "Download as JSON" msgstr "" msgid "Download as CSV" diff --git a/i18n/tet.po b/i18n/tet.po index 316f197e1b..12ce131f18 100644 --- a/i18n/tet.po +++ b/i18n/tet.po @@ -1,14 +1,14 @@ # # Translators: # Viktor Varland , 2019 -# phil_dhis2, 2022 +# Philip Larsen Donnelly, 2023 # msgid "" msgstr "" "Project-Id-Version: i18next-conv\n" -"POT-Creation-Date: 2023-05-15T10:06:53.276Z\n" +"POT-Creation-Date: 2023-09-12T06:24:49.265Z\n" "PO-Revision-Date: 2019-06-27 07:31+0000\n" -"Last-Translator: phil_dhis2, 2022\n" +"Last-Translator: Philip Larsen Donnelly, 2023\n" "Language-Team: Tetum (Tetun) (https://app.transifex.com/hisp-uio/teams/100509/tet/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -67,6 +67,16 @@ msgstr "" msgid "Last updated" msgstr "Atualizasaun ikus" +msgid "error encountered during field validation" +msgstr "" + +msgid "error" +msgstr "" + +msgid "" +"Plugins are not yet available - Please contact your system administrator" +msgstr "" + msgid "This value is validating" msgstr "" @@ -142,6 +152,15 @@ msgstr "" msgid "Enrollment" msgstr "" +msgid "Complete event" +msgstr "" + +msgid "{{ stageName }} - Basic info" +msgstr "" + +msgid "{{ stageName }} - Status" +msgstr "" + msgid "Please select {{categoryName}}" msgstr "" @@ -160,13 +179,16 @@ msgstr "Kansela" msgid "Metadata error. see log for details" msgstr "" -msgid "Assigned user" +msgid "{{ stageName }} - Details" msgstr "" -msgid "Search for user" +msgid "{{ stageName }} - {{ sectionName }}" msgstr "" -msgid "Complete event" +msgid "Assigned user" +msgstr "" + +msgid "Search for user" msgstr "" msgid "Basic info" @@ -251,7 +273,7 @@ msgstr "" msgid "Go back to event without saving relationship" msgstr "" -msgid "Unsaved changes" +msgid "Discard unsaved changes?" msgstr "" msgid "" @@ -259,10 +281,10 @@ msgid "" "relationship" msgstr "" -msgid "Yes, discard" +msgid "Yes, discard changes" msgstr "" -msgid "No, stay here" +msgid "No, cancel" msgstr "" msgid "New event" @@ -332,21 +354,9 @@ msgstr "" msgid "Do you want to create another event?" msgstr "" -msgid "No, cancel" -msgstr "" - msgid "Yes, create new event" msgstr "" -msgid "Leaving this page will discard the changes you made to this event." -msgstr "" - -msgid "Warnings found" -msgstr "" - -msgid "Abort" -msgstr "" - msgid "Back to form" msgstr "" @@ -368,7 +378,9 @@ msgstr "" msgid "Operations running" msgstr "" -msgid "Sort" +msgid "" +"This event has unsaved changes. Leaving this page without saving will lose " +"these changes. Are you sure you want to discard unsaved changes?" msgstr "" msgid "No events to display" @@ -479,6 +491,12 @@ msgstr "" msgid "Select image" msgstr "" +msgid "Type to filter options" +msgstr "" + +msgid "No match found" +msgstr "" + msgid "Search" msgstr "" @@ -503,6 +521,9 @@ msgstr "" msgid "suggestions could not be retrieved" msgstr "" +msgid "No results found" +msgstr "" + msgid "No items to display" msgstr "" @@ -575,12 +596,42 @@ msgstr "" msgid "Write comment" msgstr "" +msgid "was blanked out and hidden by your last action" +msgstr "" + +msgid "Notice" +msgstr "" + +msgid "Close the notice" +msgstr "" + msgid "Use new Enrollment dashboard for {{programName}}" msgstr "" msgid "Opt in for {{programName}}" msgstr "" +msgid "" +"By clicking opt-in below, you will start using the new enrollment dashboard " +"in the Capture app for this Tracker program. At the moment, there is certain" +" functionality from Tracker Capture that has not yet been added, including " +"relationship and referral functionality. The work on including this Tracker " +"functionality in Capture is ongoing and will be added in upcoming app " +"releases." +msgstr "" + +msgid "" +"The core team appreciates any feedback on this new functionality which is " +"currently being beta tested, please report any issues and feedback in the " +"DHIS2 JIRA project." +msgstr "" + +msgid "" +"Click the button below to opt-in to the new enrollment dashboard " +"functionality in the Capture app (beta) for this Tracker program for all " +"users." +msgstr "" + msgid "Yes, opt in" msgstr "" @@ -714,7 +765,7 @@ msgstr "" msgid "Refer" msgstr "" -msgid "You can’t add any more {{ programStageName }} events" +msgid "You can't add any more {{ programStageName }} events" msgstr "" msgid "Cancel without saving" @@ -778,6 +829,9 @@ msgstr "" msgid "New Enrollment in program{{escape}} {{programName}}" msgstr "" +msgid "Save {{trackedEntityTypeName}}" +msgstr "" + msgid "Save {{trackedEntityName}}" msgstr "" @@ -826,196 +880,189 @@ msgstr "" msgid "Register" msgstr "" -msgid "" -"Fill in at least {{minAttributesRequiredToSearch}} attributes to search" -msgstr "" - -msgid "Search {{name}}" -msgstr "" - -msgid "Search by {{name}}" -msgstr "" +msgid "Back" +msgstr "Ba kotuk" -msgid "Search by attributes" +msgid "events" msgstr "" -msgid "Fill in these fields to search{{escape}} {{ searchableAttributes }}" +msgid "event" msgstr "" -msgid "" -"Fill in at least {{minAttributesRequiredToSearch}} of these fields to " -"search{{escape}} {{searchableAttributes}}" +msgid "You don't have access to edit this event" msgstr "" -msgid "Fill in this field to search{{escape}} {{searchableAttributes}}" +msgid "Edit event" msgstr "" -msgid "No results found" +msgid "Event details" msgstr "" msgid "" -"You can change your search terms and search again to find what you are " -"looking for." +"Leaving this page will discard any selections you made for a new " +"relationship" msgstr "" -msgid "Register a user" +msgid "No one is assigned to this event" msgstr "" -msgid "Back to search" +msgid "Assign" msgstr "" -msgid "An error has occurred" +msgid "Event assigned to {{name}}" msgstr "" -msgid "Too many results" +msgid "Feedbacks" msgstr "" -msgid "Cannot search in all programs" +msgid "Show all events" msgstr "" -msgid "Back" -msgstr "Ba kotuk" - -msgid "Search for {{titleText}}" +msgid "Event could not be loaded. Are you sure it exists?" msgstr "" -msgid "Search for" +msgid "Event could not be loaded" msgstr "" -msgid "" -"You can also choose a program from the top bar and search in that program" +msgid "Organisation unit could not be loaded" msgstr "" -msgid "Choose a type to start searching" +msgid "Selected program" msgstr "" -msgid "all programs" +msgid "Search {{uniqueAttrName}}" msgstr "" -msgid "" -"Not finding the results you were looking for? Try to search all programs " -"that use type " +msgid "Search by attributes" msgstr "" -msgid "Search in all programs" +msgid "Could not retrieve metadata. Please try again later." msgstr "" -msgid "If none of search results match, you can create a new " +msgid "Possible duplicates found" msgstr "" -msgid "Create new" +msgid "An error occurred loading possible duplicates" msgstr "" -msgid "Saved lists in this program" +msgid "You don't have access to delete this relationship" msgstr "" -msgid "Saved lists offer quick access to your most used views in a program." +msgid "You don't have access to create any relationships" msgstr "" -msgid "" -"There are no saved lists in this program yet, create one using the button " -"below." +msgid "Add relationship" msgstr "" -msgid "Create saved list" +msgid "No results found for " msgstr "" -msgid "events" +msgid "Registering unit" msgstr "" -msgid "event" +msgid "Choose a registering unit" msgstr "" -msgid "You don't have access to edit this event" +msgid "Clear selection" msgstr "" -msgid "Edit event" +msgid "No programs available." msgstr "" -msgid "Event details" +msgid "Search for a program" msgstr "" -msgid "" -"Leaving this page will discard any selections you made for a new " -"relationship" +msgid "Some programs are being filtered by the chosen registering unit" msgstr "" -msgid "No one is assigned to this event" +msgid "Show all programs" msgstr "" -msgid "Assign" +msgid "Choose a program" msgstr "" -msgid "Event assigned to {{name}}" +msgid "Search for {{titleText}}" msgstr "" -msgid "Feedbacks" +msgid "Search for" msgstr "" -msgid "Show all events" +msgid "" +"You can also choose a program from the top bar and search in that program" msgstr "" -msgid "Event could not be loaded. Are you sure it exists?" +msgid "Choose a type to start searching" msgstr "" -msgid "Event could not be loaded" +msgid "Search {{name}}" msgstr "" -msgid "Organisation unit could not be loaded" +msgid "Search by {{name}}" msgstr "" -msgid "Possible duplicates found" +msgid "all programs" msgstr "" -msgid "An error occurred loading possible duplicates" +msgid "" +"Not finding the results you were looking for? Try to search all programs " +"that use type " msgstr "" -msgid "You don't have access to delete this relationship" +msgid "Search in all programs" msgstr "" -msgid "You don't have access to create any relationships" +msgid "If none of search results match, you can create a new " msgstr "" -msgid "Add relationship" +msgid "Create new" msgstr "" -msgid "No results found for " +msgid "Fill in these fields to search{{escape}} {{ searchableAttributes }}" msgstr "" -msgid "Registering unit" +msgid "" +"Fill in at least {{minAttributesRequiredToSearch}} of these fields to " +"search{{escape}} {{searchableAttributes}}" msgstr "" -msgid "Choose a registering unit" +msgid "Fill in this field to search{{escape}} {{searchableAttributes}}" msgstr "" -msgid "Clear selection" +msgid "" +"You can change your search terms and search again to find what you are " +"looking for." msgstr "" -msgid "No programs available." +msgid "Back to search" msgstr "" -msgid "Search for a program" +msgid "An error has occurred" msgstr "" -msgid "Some programs are being filtered by the chosen registering unit" +msgid "Too many results" msgstr "" -msgid "Show all programs" +msgid "Cannot search in all programs" msgstr "" -msgid "Choose a program" +msgid "Missing search criteria" msgstr "" msgid "Results found" msgstr "" -msgid "Selected program" +msgid "Saved lists in this program" msgstr "" -msgid "Search {{uniqueAttrName}}" +msgid "Saved lists offer quick access to your most used views in a program." +msgstr "" + +msgid "" +"There are no saved lists in this program yet, create one using the button " +"below." msgstr "" -msgid "Fill in at least {{minAttributesRequired}} attributes to search" +msgid "Create saved list" msgstr "" msgid "New {{trackedEntityName}} in {{programName}}" @@ -1090,6 +1137,9 @@ msgstr "" msgid "Mark for follow-up" msgstr "" +msgid "Existing dates for auto-generated events will not be updated." +msgstr "" + msgid "Enrollment date" msgstr "" @@ -1178,22 +1228,12 @@ msgid "" "The scheduled date matches the suggested date, but can be changed if needed." msgstr "" -msgid "The scheduled date is {{count}} days {{position}} the suggested date." -msgid_plural "" -"The scheduled date is {{count}} days {{position}} the suggested date." -msgstr[0] "" - msgid "after" msgstr "" msgid "before" msgstr "" -msgid "There are {{count}} scheduled event in {{orgUnitName}} on this day." -msgid_plural "" -"There are {{count}} scheduled event in {{orgUnitName}} on this day." -msgstr[0] "" - msgid "" "Scheduling an event in {{stageName}} for {{programName}} in {{orgUnitName}}" msgstr "" @@ -1237,9 +1277,6 @@ msgstr "" msgid "Try again or contact your system administrator for support" msgstr "" -msgid "tracked entity instance" -msgstr "" - msgid "Fix errors in the form to continue." msgstr "" @@ -1252,10 +1289,13 @@ msgstr "" msgid "Edit" msgstr "Edita" +msgid "tracked entity instance" +msgstr "" + msgid "New {{ eventName }} event" msgstr "" -msgid "This event is not yet preserved and cannot be edited" +msgid "To open this event, please wait until saving is complete" msgstr "" msgid "Show {{ rest }} more" @@ -1285,13 +1325,47 @@ msgstr "" msgid "Stages and Events" msgstr "" -msgid "Working list could not be loaded" +msgid "New TEI Relationship" msgstr "" -msgid "Download as JSON" +msgid "Missing implementation step" +msgstr "" + +msgid "Go back without saving relationship" +msgstr "" + +msgid "New Relationship" +msgstr "" + +msgid "Link to an existing {{tetName}}" +msgstr "" + +msgid "An error occurred while adding the relationship" +msgstr "" + +msgid "" +"Something went wrong while loading relationships. Please try again later." +msgstr "" + +msgid "{{trackedEntityTypeName}} relationships" +msgstr "" + +msgid "To open this relationship, please wait until saving is complete" +msgstr "" + +msgid "Type" +msgstr "Tipu" + +msgid "Created date" +msgstr "" + +msgid "Program stage name" msgstr "" -msgid "Download as XML" +msgid "Working list could not be loaded" +msgstr "" + +msgid "Download as JSON" msgstr "" msgid "Download as CSV" @@ -1306,6 +1380,9 @@ msgstr "" msgid "an error occurred loading working lists" msgstr "" +msgid "Assigned to" +msgstr "" + msgid "Registration Date" msgstr "" @@ -1315,10 +1392,16 @@ msgstr "" msgid "Enrollment status" msgstr "" -msgid "Assigned to" +msgid "Choose a program stage to filter by {{label}}" msgstr "" -msgid "Choose a program stage to filter by {{label}}" +msgid "Active enrollments" +msgstr "" + +msgid "Completed enrollments" +msgstr "" + +msgid "Cancelled enrollments" msgstr "" msgid "Working list could not be updated" @@ -1432,9 +1515,6 @@ msgstr "" msgid "Set coordinate" msgstr "" -msgid "Page {{currentPage}}" -msgstr "" - msgid "Date" msgstr "Data" @@ -1453,10 +1533,7 @@ msgstr "" msgid "To time" msgstr "" -msgid "error encountered during field validation" -msgstr "" - -msgid "error" +msgid "Page {{currentPage}}" msgstr "" msgid "Delete polygon" @@ -1465,5 +1542,8 @@ msgstr "" msgid "Set area" msgstr "" +msgid "Area on map saved" +msgstr "" + msgid "Compatibility mode" msgstr "" diff --git a/i18n/tg.po b/i18n/tg.po index 6280c6636c..e231a3fb60 100644 --- a/i18n/tg.po +++ b/i18n/tg.po @@ -1,14 +1,14 @@ # # Translators: -# Viktor Varland , 2022 -# Philip Larsen Donnelly, 2022 +# Viktor Varland , 2023 +# Philip Larsen Donnelly, 2023 # msgid "" msgstr "" "Project-Id-Version: i18next-conv\n" -"POT-Creation-Date: 2023-09-04T07:07:59.195Z\n" +"POT-Creation-Date: 2023-09-12T06:24:49.265Z\n" "PO-Revision-Date: 2019-06-27 07:31+0000\n" -"Last-Translator: Philip Larsen Donnelly, 2022\n" +"Last-Translator: Philip Larsen Donnelly, 2023\n" "Language-Team: Tajik (https://app.transifex.com/hisp-uio/teams/100509/tg/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -152,6 +152,15 @@ msgstr "" msgid "Enrollment" msgstr "" +msgid "Complete event" +msgstr "Рӯйдоди анҷомёфта" + +msgid "{{ stageName }} - Basic info" +msgstr "" + +msgid "{{ stageName }} - Status" +msgstr "" + msgid "Please select {{categoryName}}" msgstr "" @@ -170,15 +179,18 @@ msgstr "Бекор кардан" msgid "Metadata error. see log for details" msgstr "" +msgid "{{ stageName }} - Details" +msgstr "" + +msgid "{{ stageName }} - {{ sectionName }}" +msgstr "" + msgid "Assigned user" msgstr "" msgid "Search for user" msgstr "" -msgid "Complete event" -msgstr "Рӯйдоди анҷомёфта" - msgid "Basic info" msgstr "" @@ -509,6 +521,9 @@ msgstr "" msgid "suggestions could not be retrieved" msgstr "" +msgid "No results found" +msgstr "" + msgid "No items to display" msgstr "" @@ -912,10 +927,19 @@ msgstr "" msgid "Organisation unit could not be loaded" msgstr "" -msgid "Possible duplicates found" +msgid "Selected program" msgstr "" -msgid "No results found" +msgid "Search {{uniqueAttrName}}" +msgstr "" + +msgid "Search by attributes" +msgstr "" + +msgid "Could not retrieve metadata. Please try again later." +msgstr "" + +msgid "Possible duplicates found" msgstr "" msgid "An error occurred loading possible duplicates" @@ -976,9 +1000,6 @@ msgstr "" msgid "Search by {{name}}" msgstr "" -msgid "Search by attributes" -msgstr "" - msgid "all programs" msgstr "" @@ -1030,12 +1051,6 @@ msgstr "" msgid "Results found" msgstr "" -msgid "Selected program" -msgstr "" - -msgid "Search {{uniqueAttrName}}" -msgstr "" - msgid "Saved lists in this program" msgstr "" @@ -1310,13 +1325,47 @@ msgstr "" msgid "Stages and Events" msgstr "" -msgid "Working list could not be loaded" +msgid "New TEI Relationship" msgstr "" -msgid "Download as JSON" +msgid "Missing implementation step" +msgstr "" + +msgid "Go back without saving relationship" +msgstr "" + +msgid "New Relationship" +msgstr "" + +msgid "Link to an existing {{tetName}}" +msgstr "" + +msgid "An error occurred while adding the relationship" msgstr "" -msgid "Download as XML" +msgid "" +"Something went wrong while loading relationships. Please try again later." +msgstr "" + +msgid "{{trackedEntityTypeName}} relationships" +msgstr "" + +msgid "To open this relationship, please wait until saving is complete" +msgstr "" + +msgid "Type" +msgstr "Навъ" + +msgid "Created date" +msgstr "" + +msgid "Program stage name" +msgstr "Номи марҳилаи барнома" + +msgid "Working list could not be loaded" +msgstr "" + +msgid "Download as JSON" msgstr "" msgid "Download as CSV" diff --git a/i18n/uk.po b/i18n/uk.po index 4d2411c675..0697b82144 100644 --- a/i18n/uk.po +++ b/i18n/uk.po @@ -1,17 +1,17 @@ # # Translators: # Wanda , 2021 -# phil_dhis2, 2022 # Nadiia , 2023 # Viktor Varland , 2023 # Éva Tamási, 2023 +# Philip Larsen Donnelly, 2023 # msgid "" msgstr "" "Project-Id-Version: i18next-conv\n" -"POT-Creation-Date: 2023-06-27T06:20:33.460Z\n" +"POT-Creation-Date: 2023-09-12T06:24:49.265Z\n" "PO-Revision-Date: 2019-06-27 07:31+0000\n" -"Last-Translator: Éva Tamási, 2023\n" +"Last-Translator: Philip Larsen Donnelly, 2023\n" "Language-Team: Ukrainian (https://app.transifex.com/hisp-uio/teams/100509/uk/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -70,6 +70,16 @@ msgstr "" msgid "Last updated" msgstr "Останнє оновлення" +msgid "error encountered during field validation" +msgstr "" + +msgid "error" +msgstr "" + +msgid "" +"Plugins are not yet available - Please contact your system administrator" +msgstr "" + msgid "This value is validating" msgstr "" @@ -145,6 +155,15 @@ msgstr "Координата" msgid "Enrollment" msgstr "Реєстрація" +msgid "Complete event" +msgstr "" + +msgid "{{ stageName }} - Basic info" +msgstr "" + +msgid "{{ stageName }} - Status" +msgstr "" + msgid "Please select {{categoryName}}" msgstr "" @@ -163,15 +182,18 @@ msgstr "Скасувати" msgid "Metadata error. see log for details" msgstr "" +msgid "{{ stageName }} - Details" +msgstr "" + +msgid "{{ stageName }} - {{ sectionName }}" +msgstr "" + msgid "Assigned user" msgstr "Призначений користувач" msgid "Search for user" msgstr "" -msgid "Complete event" -msgstr "" - msgid "Basic info" msgstr "" @@ -359,9 +381,6 @@ msgstr "" msgid "Operations running" msgstr "" -msgid "Sort" -msgstr "" - msgid "" "This event has unsaved changes. Leaving this page without saving will lose " "these changes. Are you sure you want to discard unsaved changes?" @@ -505,6 +524,9 @@ msgstr "" msgid "suggestions could not be retrieved" msgstr "" +msgid "No results found" +msgstr "Результатів не знайдено" + msgid "No items to display" msgstr "" @@ -746,7 +768,7 @@ msgstr "Запланувати" msgid "Refer" msgstr "" -msgid "You can’t add any more {{ programStageName }} events" +msgid "You can't add any more {{ programStageName }} events" msgstr "" msgid "Cancel without saving" @@ -810,6 +832,9 @@ msgstr "" msgid "New Enrollment in program{{escape}} {{programName}}" msgstr "" +msgid "Save {{trackedEntityTypeName}}" +msgstr "" + msgid "Save {{trackedEntityName}}" msgstr "" @@ -905,11 +930,20 @@ msgstr "" msgid "Organisation unit could not be loaded" msgstr "" -msgid "Possible duplicates found" +msgid "Selected program" +msgstr "Обрані програми" + +msgid "Search {{uniqueAttrName}}" msgstr "" -msgid "No results found" -msgstr "Результатів не знайдено" +msgid "Search by attributes" +msgstr "" + +msgid "Could not retrieve metadata. Please try again later." +msgstr "" + +msgid "Possible duplicates found" +msgstr "" msgid "An error occurred loading possible duplicates" msgstr "" @@ -963,22 +997,12 @@ msgstr "" msgid "Choose a type to start searching" msgstr "" -msgid "Fill in at least {{count}} attribute to search" -msgid_plural "Fill in at least {{count}} attribute to search" -msgstr[0] "" -msgstr[1] "" -msgstr[2] "" -msgstr[3] "" - msgid "Search {{name}}" msgstr "" msgid "Search by {{name}}" msgstr "" -msgid "Search by attributes" -msgstr "" - msgid "all programs" msgstr "" @@ -1030,12 +1054,6 @@ msgstr "" msgid "Results found" msgstr "" -msgid "Selected program" -msgstr "Обрані програми" - -msgid "Search {{uniqueAttrName}}" -msgstr "" - msgid "Saved lists in this program" msgstr "" @@ -1122,6 +1140,9 @@ msgstr "" msgid "Mark for follow-up" msgstr "Позначте для подальших дій" +msgid "Existing dates for auto-generated events will not be updated." +msgstr "" + msgid "Enrollment date" msgstr "Дата реєстрації" @@ -1210,28 +1231,12 @@ msgid "" "The scheduled date matches the suggested date, but can be changed if needed." msgstr "" -msgid "The scheduled date is {{count}} days {{position}} the suggested date." -msgid_plural "" -"The scheduled date is {{count}} days {{position}} the suggested date." -msgstr[0] "" -msgstr[1] "" -msgstr[2] "" -msgstr[3] "" - msgid "after" msgstr "" msgid "before" msgstr "" -msgid "There are {{count}} scheduled event in {{orgUnitName}} on this day." -msgid_plural "" -"There are {{count}} scheduled event in {{orgUnitName}} on this day." -msgstr[0] "" -msgstr[1] "" -msgstr[2] "" -msgstr[3] "" - msgid "" "Scheduling an event in {{stageName}} for {{programName}} in {{orgUnitName}}" msgstr "" @@ -1323,13 +1328,47 @@ msgstr "" msgid "Stages and Events" msgstr "" -msgid "Working list could not be loaded" +msgid "New TEI Relationship" msgstr "" -msgid "Download as JSON" +msgid "Missing implementation step" +msgstr "" + +msgid "Go back without saving relationship" +msgstr "" + +msgid "New Relationship" msgstr "" -msgid "Download as XML" +msgid "Link to an existing {{tetName}}" +msgstr "" + +msgid "An error occurred while adding the relationship" +msgstr "" + +msgid "" +"Something went wrong while loading relationships. Please try again later." +msgstr "" + +msgid "{{trackedEntityTypeName}} relationships" +msgstr "" + +msgid "To open this relationship, please wait until saving is complete" +msgstr "" + +msgid "Type" +msgstr "Тип" + +msgid "Created date" +msgstr "" + +msgid "Program stage name" +msgstr "Назва етапу програми" + +msgid "Working list could not be loaded" +msgstr "" + +msgid "Download as JSON" msgstr "" msgid "Download as CSV" @@ -1479,9 +1518,6 @@ msgstr "" msgid "Set coordinate" msgstr "Встановити координату" -msgid "Page {{currentPage}}" -msgstr "" - msgid "Date" msgstr "Дата" @@ -1500,10 +1536,7 @@ msgstr "" msgid "To time" msgstr "" -msgid "error encountered during field validation" -msgstr "" - -msgid "error" +msgid "Page {{currentPage}}" msgstr "" msgid "Delete polygon" diff --git a/i18n/zh.po b/i18n/zh.po index be0d020568..78121cdf22 100644 --- a/i18n/zh.po +++ b/i18n/zh.po @@ -1,16 +1,16 @@ # # Translators: # Philip Larsen Donnelly, 2022 -# easylin , 2023 # Viktor Varland , 2023 # 晓东 林 <13981924470@126.com>, 2023 +# easylin , 2023 # msgid "" msgstr "" "Project-Id-Version: i18next-conv\n" "POT-Creation-Date: 2023-09-12T06:24:49.265Z\n" "PO-Revision-Date: 2019-06-27 07:31+0000\n" -"Last-Translator: 晓东 林 <13981924470@126.com>, 2023\n" +"Last-Translator: easylin , 2023\n" "Language-Team: Chinese (https://app.transifex.com/hisp-uio/teams/100509/zh/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -525,6 +525,9 @@ msgstr "开始输入搜索内容" msgid "suggestions could not be retrieved" msgstr "建议不能提取" +msgid "No results found" +msgstr "没有结果" + msgid "No items to display" msgstr "无条目可显示" @@ -941,14 +944,11 @@ msgid "Search by attributes" msgstr "按属性搜索" msgid "Could not retrieve metadata. Please try again later." -msgstr "" +msgstr "无法检索元数据。请稍后再试。" msgid "Possible duplicates found" msgstr "发现可能的重复" -msgid "No results found" -msgstr "没有结果" - msgid "An error occurred loading possible duplicates" msgstr "加载可能的重复项时发生错误" @@ -1335,38 +1335,38 @@ msgid "Stages and Events" msgstr "阶段与活动" msgid "New TEI Relationship" -msgstr "" +msgstr "新加TEI 关系" msgid "Missing implementation step" -msgstr "" +msgstr "缺少实施步骤" msgid "Go back without saving relationship" -msgstr "" +msgstr "不保存关系返回" msgid "New Relationship" -msgstr "" +msgstr "新建关系" msgid "Link to an existing {{tetName}}" -msgstr "" +msgstr "链接到现有的 {{tetName}}" msgid "An error occurred while adding the relationship" -msgstr "" +msgstr "添加关系时出错" msgid "" "Something went wrong while loading relationships. Please try again later." -msgstr "" +msgstr "加载关系时出现问题。请稍后再试。" msgid "{{trackedEntityTypeName}} relationships" -msgstr "" +msgstr "{{trackedEntityTypeName}} 关系" msgid "To open this relationship, please wait until saving is complete" -msgstr "" +msgstr "要打开此关系,请等待保存完成" msgid "Type" msgstr "类型" msgid "Created date" -msgstr "" +msgstr "创建日期" msgid "Program stage name" msgstr "项目阶段名称" diff --git a/i18n/zh_CN.po b/i18n/zh_CN.po index 518c9ef3d8..215b2766d8 100644 --- a/i18n/zh_CN.po +++ b/i18n/zh_CN.po @@ -1,14 +1,14 @@ # # Translators: -# easylin , 2023 # 晓东 林 <13981924470@126.com>, 2023 +# easylin , 2023 # msgid "" msgstr "" "Project-Id-Version: i18next-conv\n" "POT-Creation-Date: 2023-09-12T06:24:49.265Z\n" "PO-Revision-Date: 2019-06-27 07:31+0000\n" -"Last-Translator: 晓东 林 <13981924470@126.com>, 2023\n" +"Last-Translator: easylin , 2023\n" "Language-Team: Chinese (China) (https://app.transifex.com/hisp-uio/teams/100509/zh_CN/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -77,7 +77,7 @@ msgstr "错误" msgid "" "Plugins are not yet available - Please contact your system administrator" -msgstr "" +msgstr "插件尚不可用 - 请联系您的系统管理员" msgid "This value is validating" msgstr "值正在被验证" @@ -158,10 +158,10 @@ msgid "Complete event" msgstr "完成事件" msgid "{{ stageName }} - Basic info" -msgstr "" +msgstr "{{ stageName }} - 基本信息" msgid "{{ stageName }} - Status" -msgstr "" +msgstr "{{ stageName }} - 状态" msgid "Please select {{categoryName}}" msgstr "请选择{{categoryName}}" @@ -182,10 +182,10 @@ msgid "Metadata error. see log for details" msgstr "元数据错误" msgid "{{ stageName }} - Details" -msgstr "" +msgstr "{{ stageName }} - 详细信息" msgid "{{ stageName }} - {{ sectionName }}" -msgstr "" +msgstr "{{ 阶段名称 }} - {{ 部分名称 }}" msgid "Assigned user" msgstr "分配的用户" @@ -284,7 +284,7 @@ msgid "" msgstr "离开本页将丢掉你的新关系的选择" msgid "Yes, discard changes" -msgstr "" +msgstr "是的,放弃更改" msgid "No, cancel" msgstr "不,取消" @@ -383,7 +383,7 @@ msgstr "运作中" msgid "" "This event has unsaved changes. Leaving this page without saving will lose " "these changes. Are you sure you want to discard unsaved changes?" -msgstr "" +msgstr "此事件有未保存的更改。离开此页面而不保存将丢失这些更改。您确定要放弃未保存的更改吗?" msgid "No events to display" msgstr "无事件可显示" @@ -494,7 +494,7 @@ msgid "Select image" msgstr "选择图像" msgid "Type to filter options" -msgstr "" +msgstr "输入筛选选项" msgid "No match found" msgstr "未找到匹配项" @@ -523,6 +523,9 @@ msgstr "开始输入搜索内容" msgid "suggestions could not be retrieved" msgstr "建议不能提取" +msgid "No results found" +msgstr "没有结果" + msgid "No items to display" msgstr "无条目可显示" @@ -596,13 +599,13 @@ msgid "Write comment" msgstr "写备注" msgid "was blanked out and hidden by your last action" -msgstr "" +msgstr "被你的最后一个动作清空并隐藏" msgid "Notice" -msgstr "" +msgstr "注意" msgid "Close the notice" -msgstr "" +msgstr "关闭通知" msgid "Use new Enrollment dashboard for {{programName}}" msgstr "为 {{programName}} 使用新的注册仪表板" @@ -768,7 +771,7 @@ msgid "Refer" msgstr "转诊" msgid "You can't add any more {{ programStageName }} events" -msgstr "" +msgstr "您无法添加更多的 {{ programStageName }} 事件" msgid "Cancel without saving" msgstr "取消而不保存" @@ -832,7 +835,7 @@ msgid "New Enrollment in program{{escape}} {{programName}}" msgstr "项目{{escape}} {{programName}}的新报名" msgid "Save {{trackedEntityTypeName}}" -msgstr "" +msgstr "保存{{trackedEntityTypeName}}" msgid "Save {{trackedEntityName}}" msgstr "保存{{trackedEntityName}}" @@ -939,14 +942,11 @@ msgid "Search by attributes" msgstr "按属性搜索" msgid "Could not retrieve metadata. Please try again later." -msgstr "" +msgstr "无法检索元数据。请稍后再试。" msgid "Possible duplicates found" msgstr "发现可能的重复" -msgid "No results found" -msgstr "没有结果" - msgid "An error occurred loading possible duplicates" msgstr "加载可能的重复项时发生错误" @@ -1145,7 +1145,7 @@ msgid "Mark for follow-up" msgstr "后续标记" msgid "Existing dates for auto-generated events will not be updated." -msgstr "" +msgstr "自动生成的事件的现有日期将不会更新。" msgid "Enrollment date" msgstr "报名日期" @@ -1333,38 +1333,38 @@ msgid "Stages and Events" msgstr "阶段与活动" msgid "New TEI Relationship" -msgstr "" +msgstr "新的 TEI 关系" msgid "Missing implementation step" -msgstr "" +msgstr "缺少实施步骤" msgid "Go back without saving relationship" -msgstr "" +msgstr "不保存关系返回" msgid "New Relationship" -msgstr "" +msgstr "新关系" msgid "Link to an existing {{tetName}}" -msgstr "" +msgstr "链接到现有的 {{tetName}}" msgid "An error occurred while adding the relationship" -msgstr "" +msgstr "添加关系时出错" msgid "" "Something went wrong while loading relationships. Please try again later." -msgstr "" +msgstr "加载关系时出现问题。请稍后再试。" msgid "{{trackedEntityTypeName}} relationships" -msgstr "" +msgstr "{{trackedEntityTypeName}} 关系" msgid "To open this relationship, please wait until saving is complete" -msgstr "" +msgstr "要打开此关系,请等待保存完成" msgid "Type" msgstr "类型" msgid "Created date" -msgstr "" +msgstr "创建日期" msgid "Program stage name" msgstr "项目阶段名称" diff --git a/package.json b/package.json index 38bd2e119b..8638a37b0c 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "capture-app", "homepage": ".", - "version": "100.44.0", + "version": "100.44.2", "cacheVersion": "7", "serverVersion": "38", "license": "BSD-3-Clause", @@ -10,7 +10,7 @@ "packages/rules-engine" ], "dependencies": { - "@dhis2/rules-engine-javascript": "100.44.0", + "@dhis2/rules-engine-javascript": "100.44.2", "@dhis2/app-runtime": "^3.9.3", "@dhis2/d2-i18n": "^1.1.0", "@dhis2/d2-icons": "^1.0.1", diff --git a/packages/rules-engine/package.json b/packages/rules-engine/package.json index ce24c6d5a3..79c2dd89a8 100644 --- a/packages/rules-engine/package.json +++ b/packages/rules-engine/package.json @@ -1,6 +1,6 @@ { "name": "@dhis2/rules-engine-javascript", - "version": "100.44.0", + "version": "100.44.2", "license": "BSD-3-Clause", "main": "./build/cjs/index.js", "scripts": { diff --git a/packages/rules-engine/src/services/VariableService/variableService.types.js b/packages/rules-engine/src/services/VariableService/variableService.types.js index 5529c58a43..0a0b7e65d2 100644 --- a/packages/rules-engine/src/services/VariableService/variableService.types.js +++ b/packages/rules-engine/src/services/VariableService/variableService.types.js @@ -20,7 +20,6 @@ type EventMain = { +programStageId?: string, +programStageName?: string, +orgUnitId?: string, - +orgUnitName?: string, +trackedEntityInstanceId?: string, +enrollmentId?: string, +enrollmentStatus?: string, diff --git a/src/core_modules/capture-core/components/CardList/CardListItem.component.js b/src/core_modules/capture-core/components/CardList/CardListItem.component.js index d2542d3c1b..328926bdb8 100644 --- a/src/core_modules/capture-core/components/CardList/CardListItem.component.js +++ b/src/core_modules/capture-core/components/CardList/CardListItem.component.js @@ -13,6 +13,7 @@ import { searchScopes } from '../SearchBox'; import { enrollmentTypes } from './CardList.constants'; import { ListEntry } from './ListEntry.component'; import { dataElementTypes, getTrackerProgramThrowIfNotFound } from '../../metaData'; +import { useOrgUnitName } from '../../metadataRetrieval/orgUnitName'; import type { ListItem, RenderCustomCardActions } from './CardList.types'; @@ -96,24 +97,24 @@ const deriveEnrollmentType = return enrollmentTypes.DONT_SHOW_TAG; }; -const deriveEnrollmentOrgUnitAndDate = (enrollments, enrollmentType, currentProgramId): {orgUnitName?: string, enrolledAt?: string} => { +const deriveEnrollmentOrgUnitIdAndDate = (enrollments, enrollmentType, currentProgramId): {orgUnitId?: string, enrolledAt?: string} => { if (!enrollments?.length) { return {}; } if (!currentProgramId && enrollments.length) { - const { orgUnitName, enrolledAt } = enrollments[0]; + const { orgUnit: orgUnitId, enrolledAt } = enrollments[0]; return { - orgUnitName, + orgUnitId, enrolledAt, }; } - const { orgUnitName, enrolledAt } = + const { orgUnit: orgUnitId, enrolledAt } = enrollments .filter(({ program }) => program === currentProgramId) .filter(({ status }) => status === enrollmentType) .sort((a, b) => moment.utc(a.lastUpdated).diff(moment.utc(b.lastUpdated)))[0] || {}; - return { orgUnitName, enrolledAt }; + return { orgUnitId, enrolledAt }; }; const deriveProgramFromEnrollment = (enrollments, currentSearchScopeType) => { @@ -137,7 +138,8 @@ const CardListItemIndex = ({ }: Props) => { const enrollments = item.tei ? item.tei.enrollments : []; const enrollmentType = deriveEnrollmentType(enrollments, currentProgramId); - const { orgUnitName, enrolledAt } = deriveEnrollmentOrgUnitAndDate(enrollments, enrollmentType, currentProgramId); + const { orgUnitId, enrolledAt } = deriveEnrollmentOrgUnitIdAndDate(enrollments, enrollmentType, currentProgramId); + const { displayName: orgUnitName } = useOrgUnitName(orgUnitId); const program = enrollments && enrollments.length ? deriveProgramFromEnrollment(enrollments, currentSearchScopeType) : undefined; diff --git a/src/core_modules/capture-core/components/DataEntries/TeiRegistrationEntry/TeiRegistrationEntry.component.js b/src/core_modules/capture-core/components/DataEntries/TeiRegistrationEntry/TeiRegistrationEntry.component.js index 7b61054364..3e2ea0d8a9 100644 --- a/src/core_modules/capture-core/components/DataEntries/TeiRegistrationEntry/TeiRegistrationEntry.component.js +++ b/src/core_modules/capture-core/components/DataEntries/TeiRegistrationEntry/TeiRegistrationEntry.component.js @@ -9,7 +9,7 @@ import { useScopeInfo } from '../../../hooks/useScopeInfo'; import { scopeTypes } from '../../../metaData'; import { TrackedEntityInstanceDataEntry } from '../TrackedEntityInstance'; import { useCurrentOrgUnitId } from '../../../hooks/useCurrentOrgUnitId'; -import { useCoreOrgUnit } from '../../../metadataRetrieval/coreOrgUnit'; +import { useOrgUnitName } from '../../../metadataRetrieval/orgUnitName'; import type { Props, PlainProps } from './TeiRegistrationEntry.types'; import { DiscardDialog } from '../../Dialogs/DiscardDialog.component'; import { withSaveHandler } from '../../DataEntry'; @@ -56,8 +56,7 @@ const TeiRegistrationEntryPlain = const { scopeType } = useScopeInfo(selectedScopeId); const { formId, formFoundation } = useMetadataForRegistrationForm({ selectedScopeId }); const orgUnitId = useCurrentOrgUnitId(); - const { orgUnit } = useCoreOrgUnit(orgUnitId); // Tony: [DHIS2-15814] Change this to new hook - const orgUnitName = orgUnit ? orgUnit.name : ''; + const { displayName: orgUnitName } = useOrgUnitName(orgUnitId); const handleOnCancel = () => { if (!isUserInteractionInProgress) { diff --git a/src/core_modules/capture-core/components/Pages/Enrollment/EnrollmentPageDefault/EnrollmentPageDefault.component.js b/src/core_modules/capture-core/components/Pages/Enrollment/EnrollmentPageDefault/EnrollmentPageDefault.component.js index 05be58a16e..b59ad5a3a5 100644 --- a/src/core_modules/capture-core/components/Pages/Enrollment/EnrollmentPageDefault/EnrollmentPageDefault.component.js +++ b/src/core_modules/capture-core/components/Pages/Enrollment/EnrollmentPageDefault/EnrollmentPageDefault.component.js @@ -75,7 +75,7 @@ export const EnrollmentPageDefaultPlain = ({ }: PlainProps) => { const [mainContentVisible, setMainContentVisibility] = useState(true); const [addRelationShipContainerElement, setAddRelationshipContainerElement] = - useState(undefined); + useState(undefined); const toggleVisibility = useCallback(() => setMainContentVisibility(current => !current), []); diff --git a/src/core_modules/capture-core/components/Pages/Enrollment/EnrollmentPageDefault/hooks/useProgramStages.js b/src/core_modules/capture-core/components/Pages/Enrollment/EnrollmentPageDefault/hooks/useProgramStages.js index ec25eeb48a..a746dfe9e6 100644 --- a/src/core_modules/capture-core/components/Pages/Enrollment/EnrollmentPageDefault/hooks/useProgramStages.js +++ b/src/core_modules/capture-core/components/Pages/Enrollment/EnrollmentPageDefault/hooks/useProgramStages.js @@ -1,11 +1,12 @@ // @flow +import { useMemo } from 'react'; import log from 'loglevel'; import { errorCreator } from 'capture-core-utils'; import i18n from '@dhis2/d2-i18n'; import type { apiProgramStage } from 'capture-core/metaDataStoreLoaders/programs/quickStoreOperations/types'; import { Program } from '../../../../../metaData'; -export const useProgramStages = (program: Program, programStages?: Array) => { +export const useProgramStages = (program: Program, programStages?: Array) => useMemo(() => { const stages = []; if (program && programStages) { program.stages.forEach((item) => { @@ -49,4 +50,4 @@ export const useProgramStages = (program: Program, programStages?: Array { programId: event.program, programStageId: event.programStage, orgUnitId: event.orgUnit, - orgUnitName: event.orgUnitName, trackedEntityInstanceId: event.trackedEntityInstance, enrollmentId: event.enrollment, enrollmentStatus: event.enrollmentStatus, diff --git a/src/core_modules/capture-core/components/ScopeSelector/ScopeSelector.container.js b/src/core_modules/capture-core/components/ScopeSelector/ScopeSelector.container.js index 18557db76b..0aba4ccd71 100644 --- a/src/core_modules/capture-core/components/ScopeSelector/ScopeSelector.container.js +++ b/src/core_modules/capture-core/components/ScopeSelector/ScopeSelector.container.js @@ -3,15 +3,15 @@ import React, { type ComponentType, useEffect, useState } from 'react'; import { useDispatch, useSelector } from 'react-redux'; import { ScopeSelectorComponent } from './ScopeSelector.component'; import type { OwnProps } from './ScopeSelector.types'; -import { useOrganizationUnit } from './hooks'; +import { useOrgUnitName } from '../../metadataRetrieval/orgUnitName'; import { resetOrgUnitIdFromScopeSelector } from './ScopeSelector.actions'; -const deriveReadiness = (lockedSelectorLoads, selectedOrgUnitId, selectedOrgUnitName) => { +const deriveReadiness = (lockedSelectorLoads, selectedOrgUnitId, selectedOrgUnitName, displayName) => { // because we want the orgUnit to be fetched and stored // before allowing the user to view the locked selector - if (selectedOrgUnitId && selectedOrgUnitName) { - return true; + if (selectedOrgUnitId && (!selectedOrgUnitName || selectedOrgUnitName !== displayName)) { + return false; } return !lockedSelectorLoads; }; @@ -32,21 +32,20 @@ export const ScopeSelector: ComponentType = ({ children, }) => { const dispatch = useDispatch(); - const { refetch: refetchOrganisationUnit, displayName } = useOrganizationUnit(); - const [selectedOrgUnit, setSelectedOrgUnit] = useState({ name: displayName, id: selectedOrgUnitId }); + const [selectedOrgUnit, setSelectedOrgUnit] = useState({ name: undefined, id: selectedOrgUnitId }); + const { displayName } = useOrgUnitName(selectedOrgUnit.id); useEffect(() => { - const missName = !selectedOrgUnit.name; - const hasDifferentId = selectedOrgUnit.id !== selectedOrgUnitId; - - selectedOrgUnitId && - (hasDifferentId || missName) && - refetchOrganisationUnit({ variables: { selectedOrgUnitId } }); - }, [selectedOrgUnitId]); // eslint-disable-line react-hooks/exhaustive-deps + if (displayName && selectedOrgUnit.name !== displayName) { + setSelectedOrgUnit(prevSelectedOrgUnit => ({ ...prevSelectedOrgUnit, name: displayName })); + } + }, [displayName, selectedOrgUnit, setSelectedOrgUnit]); useEffect(() => { - displayName && setSelectedOrgUnit(prevSelectedOrgUnit => ({ ...prevSelectedOrgUnit, name: displayName })); - }, [displayName, setSelectedOrgUnit]); + if (selectedOrgUnitId && !selectedOrgUnit.id) { + selectedOrgUnitId && setSelectedOrgUnit(prevSelectedOrgUnit => ({ ...prevSelectedOrgUnit, id: selectedOrgUnitId })); + } + }, [selectedOrgUnitId, selectedOrgUnit, setSelectedOrgUnit]); const handleSetOrgUnit = (orgUnitId, orgUnitObject) => { setSelectedOrgUnit(orgUnitObject); @@ -59,7 +58,7 @@ export const ScopeSelector: ComponentType = ({ previousOrgUnitId: app.previousOrgUnitId, } )); - const ready = deriveReadiness(lockedSelectorLoads, selectedOrgUnitId, selectedOrgUnit.name); + const ready = deriveReadiness(lockedSelectorLoads, selectedOrgUnit.id, selectedOrgUnit.name, displayName); return ( { - const { data, refetch } = useDataQuery( - useMemo( - () => ({ - organisationUnits: { - resource: 'organisationUnits', - id: ({ variables: { selectedOrgUnitId: id } }) => id, - params: { - fields: ['displayName'], - }, - }, - }), - [], - ), - { - lazy: true, - }, - ); - - return { - displayName: data?.organisationUnits?.displayName, - refetch, - }; -}; diff --git a/src/core_modules/capture-core/components/WidgetEnrollment/WidgetEnrollment.component.js b/src/core_modules/capture-core/components/WidgetEnrollment/WidgetEnrollment.component.js index 78c7f1cb08..d9d400d044 100644 --- a/src/core_modules/capture-core/components/WidgetEnrollment/WidgetEnrollment.component.js +++ b/src/core_modules/capture-core/components/WidgetEnrollment/WidgetEnrollment.component.js @@ -19,6 +19,7 @@ import { Status } from './Status'; import { convertValue as convertValueServerToClient } from '../../converters/serverToClient'; import { convertValue as convertValueClientToView } from '../../converters/clientToView'; import { dataElementTypes } from '../../metaData'; +import { useOrgUnitName } from '../../metadataRetrieval/orgUnitName'; import { Date } from './Date'; import { Actions } from './Actions'; @@ -68,6 +69,7 @@ export const WidgetEnrollmentPlain = ({ const [open, setOpenStatus] = useState(true); const { fromServerDate } = useTimeZoneConversion(); const geometryType = getGeometryType(enrollment?.geometry?.type); + const { displayName: orgUnitName } = useOrgUnitName(enrollment.orgUnit); return (
@@ -84,7 +86,7 @@ export const WidgetEnrollmentPlain = ({ )} {loading && } {!initError && !loading && ( -
+
{enrollment.followUp && ( @@ -125,7 +127,7 @@ export const WidgetEnrollmentPlain = ({ {i18n.t('Started at {{orgUnitName}}', { - orgUnitName: enrollment.orgUnitName, + orgUnitName, interpolation: { escapeValue: false }, })}
diff --git a/src/core_modules/capture-core/components/WidgetEnrollment/WidgetEnrollment.container.js b/src/core_modules/capture-core/components/WidgetEnrollment/WidgetEnrollment.container.js index 71a1c43728..c0a388d46a 100644 --- a/src/core_modules/capture-core/components/WidgetEnrollment/WidgetEnrollment.container.js +++ b/src/core_modules/capture-core/components/WidgetEnrollment/WidgetEnrollment.container.js @@ -3,7 +3,7 @@ import React from 'react'; import { errorCreator } from 'capture-core-utils'; import log from 'loglevel'; import { WidgetEnrollment as WidgetEnrollmentComponent } from './WidgetEnrollment.component'; -import { useOrganizationUnit } from './hooks/useOrganizationUnit'; +import { useOrgUnitName } from '../../metadataRetrieval/orgUnitName'; import { useTrackedEntityInstances } from './hooks/useTrackedEntityInstances'; import { useEnrollment } from './hooks/useEnrollment'; import { useProgram } from './hooks/useProgram'; @@ -42,7 +42,7 @@ export const WidgetEnrollment = ({ enrollments, refetch: refetchTEI, } = useTrackedEntityInstances(teiId, programId); - const { error: errorOrgUnit, displayName } = useOrganizationUnit(ownerOrgUnit); + const { error: errorOrgUnit, displayName } = useOrgUnitName(typeof ownerOrgUnit === 'string' ? ownerOrgUnit : undefined); const { error: errorLocale, locale } = useUserLocale(); const canAddNew = enrollments .filter(item => item.program === programId) diff --git a/src/core_modules/capture-core/components/WidgetEnrollment/hooks/useOrganizationUnit.js b/src/core_modules/capture-core/components/WidgetEnrollment/hooks/useOrganizationUnit.js deleted file mode 100644 index 875e86796b..0000000000 --- a/src/core_modules/capture-core/components/WidgetEnrollment/hooks/useOrganizationUnit.js +++ /dev/null @@ -1,32 +0,0 @@ -// @flow -import { useMemo } from 'react'; -import { useDataQuery } from '@dhis2/app-runtime'; - -export const useOrganizationUnit = (ownerOrgUnit: string | boolean) => { - const { error, loading, data, refetch, called } = useDataQuery( - useMemo( - () => ({ - organisationUnits: { - resource: 'organisationUnits', - id: ({ variables: { ownerOrgUnit: id } }) => id, - params: { - fields: ['displayName'], - }, - }, - }), - [], - ), - { - lazy: true, - }, - ); - - if (ownerOrgUnit && !called) { - refetch({ variables: { ownerOrgUnit } }); - } - - return { - error, - displayName: !loading && data?.organisationUnits?.displayName, - }; -}; diff --git a/src/core_modules/capture-core/components/WidgetEnrollmentEventNew/common.types.js b/src/core_modules/capture-core/components/WidgetEnrollmentEventNew/common.types.js index ccdcea6c45..791ff8fa85 100644 --- a/src/core_modules/capture-core/components/WidgetEnrollmentEventNew/common.types.js +++ b/src/core_modules/capture-core/components/WidgetEnrollmentEventNew/common.types.js @@ -25,7 +25,6 @@ export type EnrollmentEvent = {| programId: string, programStageId: string, orgUnitId: string, - orgUnitName: string, trackedEntityInstanceId: string, enrollmentId: string, enrollmentStatus: string, diff --git a/src/core_modules/capture-core/components/WidgetEventSchedule/ScheduleDate/scheduleDate.types.js b/src/core_modules/capture-core/components/WidgetEventSchedule/ScheduleDate/scheduleDate.types.js index 84d5f037e3..e181165e6f 100644 --- a/src/core_modules/capture-core/components/WidgetEventSchedule/ScheduleDate/scheduleDate.types.js +++ b/src/core_modules/capture-core/components/WidgetEventSchedule/ScheduleDate/scheduleDate.types.js @@ -12,6 +12,6 @@ export type Props = {| eventCountInOrgUnit: number, suggestedScheduleDate?: ?string, hideDueDate?: boolean, - orgUnit: Object, + orgUnit: { id: string, name: string }, ...CssClasses, |}; diff --git a/src/core_modules/capture-core/components/WidgetEventSchedule/WidgetEventSchedule.container.js b/src/core_modules/capture-core/components/WidgetEventSchedule/WidgetEventSchedule.container.js index 367ab395bb..489ce42dbc 100644 --- a/src/core_modules/capture-core/components/WidgetEventSchedule/WidgetEventSchedule.container.js +++ b/src/core_modules/capture-core/components/WidgetEventSchedule/WidgetEventSchedule.container.js @@ -4,7 +4,7 @@ import i18n from '@dhis2/d2-i18n'; import { useDispatch } from 'react-redux'; import moment from 'moment'; import { getProgramAndStageForProgram, TrackerProgram, getProgramEventAccess } from '../../metaData'; -import { useOrganisationUnit } from '../../dataQueries'; +import { useOrgUnitName } from '../../metadataRetrieval/orgUnitName'; import { useLocationQuery } from '../../utils/routing'; import type { ContainerProps } from './widgetEventSchedule.types'; import { WidgetEventScheduleComponent } from './WidgetEventSchedule.component'; @@ -35,7 +35,7 @@ export const WidgetEventSchedule = ({ }: ContainerProps) => { const { program, stage } = useMemo(() => getProgramAndStageForProgram(programId, stageId), [programId, stageId]); const dispatch = useDispatch(); - const { orgUnit } = useOrganisationUnit(orgUnitId, 'displayName'); + const orgUnit = { id: orgUnitId, name: useOrgUnitName(orgUnitId).displayName }; const { programStageScheduleConfig } = useScheduleConfigFromProgramStage(stageId); const { programConfig } = useScheduleConfigFromProgram(programId); const suggestedScheduleDate = useDetermineSuggestedScheduleDate({ diff --git a/src/core_modules/capture-core/components/WidgetProfile/DataEntry/hooks/useEvents.js b/src/core_modules/capture-core/components/WidgetProfile/DataEntry/hooks/useEvents.js index 868e1c5889..0c900af9a4 100644 --- a/src/core_modules/capture-core/components/WidgetProfile/DataEntry/hooks/useEvents.js +++ b/src/core_modules/capture-core/components/WidgetProfile/DataEntry/hooks/useEvents.js @@ -2,6 +2,7 @@ import { useMemo } from 'react'; import { convertValue } from '../../../../converters/serverToClient'; import { dataElementTypes } from '../../../../metaData'; +import { useOrgUnitNames } from '../../../../metadataRetrieval/orgUnitName'; const convertDate = date => convertValue(date, dataElementTypes.DATE); @@ -14,16 +15,26 @@ const getClientFormattedDataValuesAsObject = (dataValues, elementsById) => return acc; }, {}); -export const useEvents = (enrollment: any, elementsById: Array) => - useMemo( +const getOrgUnitIds = (enrollment: any): Array => + (enrollment ? enrollment.events.reduce((acc, event) => { + if (event.orgUnit) { + acc.push(event.orgUnit); + } + return acc; + }, []) : []); + +export const useEvents = (enrollment: any, elementsById: Array) => { + const orgUnitIds = useMemo(() => getOrgUnitIds(enrollment), [enrollment]); + const { orgUnitNames } = useOrgUnitNames(orgUnitIds); + return useMemo( () => - enrollment && + enrollment && orgUnitNames && enrollment.events.map(event => ({ eventId: event.event, programId: event.program, programStageId: event.programStage, orgUnitId: event.orgUnit, - orgUnitName: event.orgUnitName, + orgUnitName: orgUnitNames[event.orgUnit], trackedEntityInstanceId: event.trackedEntityInstance, enrollmentId: event.enrollment, enrollmentStatus: event.enrollmentStatus, @@ -32,5 +43,6 @@ export const useEvents = (enrollment: any, elementsById: Array) => dueDate: convertDate(event.dueDate), ...getClientFormattedDataValuesAsObject(event.dataValues, elementsById), })), - [elementsById, enrollment], + [elementsById, enrollment, orgUnitNames], ); +}; diff --git a/src/core_modules/capture-core/components/WidgetStagesAndEvents/Stages/Stage/StageDetail/StageDetail.component.js b/src/core_modules/capture-core/components/WidgetStagesAndEvents/Stages/Stage/StageDetail/StageDetail.component.js index 633ed75b08..9b8034c030 100644 --- a/src/core_modules/capture-core/components/WidgetStagesAndEvents/Stages/Stage/StageDetail/StageDetail.component.js +++ b/src/core_modules/capture-core/components/WidgetStagesAndEvents/Stages/Stage/StageDetail/StageDetail.component.js @@ -104,6 +104,11 @@ const StageDetailPlain = (props: Props) => { onCreateNew(stageId); }, [onCreateNew, stageId]); + const handleShowMore = useCallback(() => { + const nextRowIndex = Math.min(events.length, displayedRowNumber + DEFAULT_NUMBER_OF_ROW); + setDisplayedRowNumber(nextRowIndex); + }, [events, displayedRowNumber, setDisplayedRowNumber]); + function renderHeader() { const headerCells = headerColumns .map(column => ( @@ -182,16 +187,14 @@ const StageDetailPlain = (props: Props) => { } function renderFooter() { - const renderShowMoreButton = () => (events.length > DEFAULT_NUMBER_OF_ROW + const renderShowMoreButton = () => (dataSource && !loading + && events.length > DEFAULT_NUMBER_OF_ROW && displayedRowNumber < events.length ?