From 7f0a9db2bec445c26a2a02f793338f83e6890fb6 Mon Sep 17 00:00:00 2001 From: chisom chima Date: Sun, 21 Apr 2024 18:54:18 +0100 Subject: [PATCH] fix: fix typeError that crashes app when job overview is clicked fix(geojson-import): only run validator when the use geometry option is selected (#2003) Fixes https://dhis2.atlassian.net/browse/DHIS2-17071 The code will check if the "Import as associated geometry" is checked. If so, then the validator for that will run. Otherwise, it will not run the validator chore(release): cut 101.0.4 [skip release] * **geojson-import:** only run validator when the use geometry option is selected ([#2003](https://github.com/dhis2/import-export-app/issues/2003)) ([77b25f8](https://github.com/dhis2/import-export-app/commit/77b25f84b80f489da7220bd66ad54d3aae3c33c5)) fix(translations): sync translations from transifex (master) Automatically merged. chore(release): cut 101.0.5 [skip release] * **translations:** sync translations from transifex (master) ([232dbc7](https://github.com/dhis2/import-export-app/commit/232dbc71bb9977644813b6cfcde88707dd0d8c41)) --- CHANGELOG.md | 14 ++++ i18n/en.pot | 76 ++++++++++--------- i18n/vi.po | 8 +- package.json | 2 +- .../Geometry/GeometryAttributePicker.js | 2 +- src/components/JobOverview/helper.js | 2 +- 6 files changed, 62 insertions(+), 42 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2cc8fc7ab..6b8d7f5ab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,17 @@ +## [101.0.5](https://github.com/dhis2/import-export-app/compare/v101.0.4...v101.0.5) (2024-04-21) + + +### Bug Fixes + +* **translations:** sync translations from transifex (master) ([232dbc7](https://github.com/dhis2/import-export-app/commit/232dbc71bb9977644813b6cfcde88707dd0d8c41)) + +## [101.0.4](https://github.com/dhis2/import-export-app/compare/v101.0.3...v101.0.4) (2024-04-05) + + +### Bug Fixes + +* **geojson-import:** only run validator when the use geometry option is selected ([#2003](https://github.com/dhis2/import-export-app/issues/2003)) ([77b25f8](https://github.com/dhis2/import-export-app/commit/77b25f84b80f489da7220bd66ad54d3aae3c33c5)) + ## [101.0.3](https://github.com/dhis2/import-export-app/compare/v101.0.2...v101.0.3) (2024-03-11) diff --git a/i18n/en.pot b/i18n/en.pot index 673b83104..f09eb5605 100644 --- a/i18n/en.pot +++ b/i18n/en.pot @@ -5,8 +5,8 @@ msgstr "" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1)\n" -"POT-Creation-Date: 2024-03-01T15:50:32.586Z\n" -"PO-Revision-Date: 2024-03-01T15:50:32.586Z\n" +"POT-Creation-Date: 2024-04-08T11:05:41.338Z\n" +"PO-Revision-Date: 2024-04-08T11:05:41.338Z\n" msgid "Something went wrong when loading the current user!" msgstr "Something went wrong when loading the current user!" @@ -688,6 +688,15 @@ msgstr "Updated" msgid "Total" msgstr "Total" +msgid "Reports" +msgstr "Reports" + +msgid "Error Code" +msgstr "Error Code" + +msgid "Tracker Type" +msgstr "Tracker Type" + msgid "Indexes" msgstr "Indexes" @@ -745,8 +754,8 @@ msgstr "Org unit geometry import" msgid "Metadata import" msgstr "Metadata import" -msgid "TEI import" -msgstr "TEI import" +msgid "Tracked entity import" +msgstr "Tracked entity import" msgid "Data export" msgstr "Data export" @@ -760,8 +769,8 @@ msgstr "Metadata dependency export" msgid "Metadata export" msgstr "Metadata export" -msgid "TEI export" -msgstr "TEI export" +msgid "Tracked entity export" +msgstr "Tracked entity export" msgid "Job overview" msgstr "Job overview" @@ -1117,24 +1126,24 @@ msgstr "" "geometry." msgid "" -"Export event data for programs, stages and tracked entities to JSON, CSV, " -"or DXF2 format." +"Export event data for programs, stages and tracked entities to JSON or CSV " +"format." msgstr "" -"Export event data for programs, stages and tracked entities to JSON, CSV, " -"or DXF2 format." +"Export event data for programs, stages and tracked entities to JSON or CSV " +"format." msgid "Export events" msgstr "Export events" msgid "" -"Import event data for programs, stages and tracked entities to JSON, CSV, " -"or DXF2 format." +"Import event data for programs, stages and tracked entities from JSON or " +"CSV format." msgstr "" -"Import event data for programs, stages and tracked entities to JSON, CSV, " -"or DXF2 format." +"Import event data for programs, stages and tracked entities from JSON or " +"CSV format." -msgid "Supported file types: JSON, CSV, and DXF2." -msgstr "Supported file types: JSON, CSV, and DXF2." +msgid "Supported file types: JSON and CSV." +msgstr "Supported file types: JSON and CSV." msgid "Organisation unit geometry import" msgstr "Organisation unit geometry import" @@ -1165,8 +1174,8 @@ msgstr "Export metadata dependencies" msgid "Export metadata" msgstr "Export metadata" -msgid "Export tracked entity instances" -msgstr "Export tracked entity instances" +msgid "Export tracked entities" +msgstr "Export tracked entities" msgid "Import data" msgstr "Import data" @@ -1183,8 +1192,8 @@ msgstr "Import GeoJSON" msgid "Import metadata" msgstr "Import metadata" -msgid "Import tracked entity instances" -msgstr "Import tracked entity instances" +msgid "Import tracked entities" +msgstr "Import tracked entities" msgid "An overview of all import jobs started this session." msgstr "An overview of all import jobs started this session." @@ -1210,17 +1219,14 @@ msgstr "" "Import metadata, such as data elements and organisation units, using JSON " "or CSV format." -msgid "Supported file types: JSON and CSV." -msgstr "Supported file types: JSON and CSV." - msgid "A class key must be selected" msgstr "A class key must be selected" -msgid "Tracked entity instances export" -msgstr "Tracked entity instances export" +msgid "Tracked entities export" +msgstr "Tracked entities export" -msgid "Export tracked entity instances in JSON, CSV, or DXF2 format." -msgstr "Export tracked entity instances in JSON, CSV, or DXF2 format." +msgid "Export tracked entities in JSON or CSV format." +msgstr "Export tracked entities in JSON or CSV format." msgid "Program to export from" msgstr "Program to export from" @@ -1231,14 +1237,14 @@ msgstr "Enrollment date range" msgid "At least one of the 'last updated' date fields must be specified" msgstr "At least one of the 'last updated' date fields must be specified" -msgid "Tracked entity instances import" -msgstr "Tracked entity instances import" +msgid "Tracked entities import" +msgstr "Tracked entities import" -msgid "Import tracked entity instances using JSON or DXF2 format." -msgstr "Import tracked entity instances using JSON or DXF2 format." +msgid "Import tracked entities using JSON format." +msgstr "Import tracked entities using JSON format." -msgid "Supported file types: JSON and DXF2." -msgstr "Supported file types: JSON and DXF2." +msgid "Supported file types: JSON." +msgstr "Supported file types: JSON." msgid "Job started." msgstr "Job started." @@ -1264,5 +1270,5 @@ msgstr "GML" msgid "Metadata" msgstr "Metadata" -msgid "TEI" -msgstr "TEI" +msgid "Tracked entity" +msgstr "Tracked entity" diff --git a/i18n/vi.po b/i18n/vi.po index 0e7af7301..546d6607a 100644 --- a/i18n/vi.po +++ b/i18n/vi.po @@ -1,16 +1,16 @@ # # Translators: -# Thuy Nguyen , 2022 # Mai Nguyen , 2022 # Viktor Varland , 2022 # Philip Larsen Donnelly, 2022 +# Thuy Nguyen , 2024 # msgid "" msgstr "" "Project-Id-Version: i18next-conv\n" "POT-Creation-Date: 2024-03-01T15:50:32.586Z\n" "PO-Revision-Date: 2019-06-04 17:24+0000\n" -"Last-Translator: Philip Larsen Donnelly, 2022\n" +"Last-Translator: Thuy Nguyen , 2024\n" "Language-Team: Vietnamese (https://app.transifex.com/hisp-uio/teams/100509/vi/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -243,7 +243,7 @@ msgid "ID scheme" msgstr "" msgid "UID" -msgstr "" +msgstr "UID" msgid "Identifier" msgstr "Ký hiệu nhận dạng (ID)" @@ -972,7 +972,7 @@ msgid "The app could not retrieve required data." msgstr "" msgid "Network error" -msgstr "" +msgstr "Lỗi mạng" msgid "Cannot get authorization token for Google Earth Engine." msgstr "" diff --git a/package.json b/package.json index 397229bf7..f450ed45f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "import-export-app", - "version": "101.0.3", + "version": "101.0.5", "description": "", "license": "BSD-3-Clause", "private": true, diff --git a/src/components/Geometry/GeometryAttributePicker.js b/src/components/Geometry/GeometryAttributePicker.js index 595037aa9..9e508f51a 100644 --- a/src/components/Geometry/GeometryAttributePicker.js +++ b/src/components/Geometry/GeometryAttributePicker.js @@ -66,7 +66,7 @@ const GeometryAttributePicker = ({ selectedLabel={SELECTEDLABEL} dataTest={DATATEST} multiSelect={multiSelect} - validator={VALIDATOR} + validator={useAttribute ? VALIDATOR : Function.prototype} autoSelectFirst {...rest} /> diff --git a/src/components/JobOverview/helper.js b/src/components/JobOverview/helper.js index bcc679ac4..61ddea6a6 100644 --- a/src/components/JobOverview/helper.js +++ b/src/components/JobOverview/helper.js @@ -6,7 +6,7 @@ const categoryTypesObj = categoryTypes.reduce((acc, cur) => { }, {}) const jobToPath = (job) => ({ - pathname: `/import/${categoryTypesObj[job.importType].key}`, + pathname: `/import/${categoryTypesObj[job?.importType]?.key}`, query: { id: job.id }, })