diff --git a/packages/geoview-core/public/configs/raw-data-table.json b/packages/geoview-core/public/configs/raw-data-table.json index 21bea2d2d80..2739fd7e775 100644 --- a/packages/geoview-core/public/configs/raw-data-table.json +++ b/packages/geoview-core/public/configs/raw-data-table.json @@ -18,10 +18,12 @@ { "geoviewLayerId": "esriFeatureLYR4", "geoviewLayerName": { - "en": "Water quality at monitoring sites" + "en": "Water quality at monitoring sites", + "fr": "Water quality at monitoring sites" }, "metadataAccessPath": { - "en": "https://maps-cartes.ec.gc.ca/arcgis/rest/services/DMS/DEU_CSO_Volume/MapServer" + "en": "https://maps-cartes.ec.gc.ca/arcgis/rest/services/DMS/DEU_CSO_Volume/MapServer", + "fr": "https://maps-cartes.ec.gc.ca/arcgis/rest/services/DMS/DEU_CSO_Volume/MapServer" }, "geoviewLayerType": "esriFeature", "initialSettings": { @@ -37,10 +39,12 @@ "geoviewLayerId": "historical-flood", "serviceDateFormat": "yyyy/mm/ddThh:mm:ssz", "geoviewLayerName": { - "en": "Historical Flood Events (HFE)" + "en": "Historical Flood Events (HFE)", + "fr": "Historical Flood Events (HFE)" }, "metadataAccessPath": { - "en": "https://maps-cartes.services.geo.ca/server_serveur/rest/services/NRCan/historical_flood_event_en/MapServer" + "en": "https://maps-cartes.services.geo.ca/server_serveur/rest/services/NRCan/historical_flood_event_en/MapServer", + "fr": "https://maps-cartes.services.geo.ca/server_serveur/rest/services/NRCan/historical_flood_event_en/MapServer" }, "geoviewLayerType": "esriFeature", "listOfLayerEntryConfig": [ @@ -52,10 +56,12 @@ { "geoviewLayerId": "geojsonLYR5", "geoviewLayerName": { - "en": "GeoJSON Sample" + "en": "GeoJSON Sample", + "fr": "GeoJSON Sample" }, "metadataAccessPath": { - "en": "./geojson/metadata.json" + "en": "./geojson/metadata.json", + "fr": "./geojson/metadata.json" }, "geoviewLayerType": "GeoJSON", "initialSettings": { @@ -65,20 +71,23 @@ { "layerId": "polygons.json", "layerName": { - "en": "Polygons" + "en": "Polygons", + "fr": "Polygons" } }, { "layerId": "lines.json", "layerName": { - "en": "Lines" + "en": "Lines", + "fr": "Lines" } }, { "entryType": "group", "layerId": "point-feature-group", "layerName": { - "en": "point-feature-group" + "en": "point-feature-group", + "fr": "point-feature-group" }, "listOfLayerEntryConfig": [ { @@ -87,7 +96,8 @@ "visible": "no" }, "layerName": { - "en": "Icons" + "en": "Icons", + "fr": "Icons" } }, { @@ -96,7 +106,8 @@ "visible": "always" }, "layerName": { - "en": "Points" + "en": "Points", + "fr": "Points" } } ] @@ -105,7 +116,7 @@ } ] }, - "theme": "dark", + "theme": "light", "navBar": [ "zoom", "fullscreen", @@ -117,9 +128,12 @@ "north-arrow", "overview-map" ], - "corePackages": [], + "corePackages": [ + "footer-panel" + ], "externalPackages": [], "suportedLanguages": [ + "fr", "en" ] } \ No newline at end of file diff --git a/packages/geoview-core/public/locales/en/translation.json b/packages/geoview-core/public/locales/en/translation.json index fa152f78e21..0929c57a601 100644 --- a/packages/geoview-core/public/locales/en/translation.json +++ b/packages/geoview-core/public/locales/en/translation.json @@ -130,7 +130,7 @@ "downloadAsCSV": "Download as CSV", "filterMap": "Filter Map", "stopFilterMap": "Stop Filter Map", - "leftPanelHaeding": "Available Categories", + "leftPanelHeading": "Available Categories", "rightPanelHeading": "Selected Category", "rowsSelected": "{rowsSelected} of {totalRows} row(s) selected", "rowsFiltered": "{rowsFiltered} of {totalRows} row(s) filtered" diff --git a/packages/geoview-core/public/locales/fr/translation.json b/packages/geoview-core/public/locales/fr/translation.json index aec3513c863..2ed8b3e9f2f 100644 --- a/packages/geoview-core/public/locales/fr/translation.json +++ b/packages/geoview-core/public/locales/fr/translation.json @@ -130,9 +130,9 @@ "downloadAsCSV": "Télécharger la CSV", "filterMap": "Filtrer la carte", "stopFilterMap": "Filtrer la carte d'arrêt", - "leftPanelHaeding": "Available Categories - FR", - "rightPanelHeading": "Selected Category - FR", - "rowsSelected": "{rowsSelected} of {totalRows} row(s) selected - FR", - "rowsFiltered": "{rowsFiltered} of {totalRows} row(s) filtered -FR" + "leftPanelHeading": "Tables disponible", + "rightPanelHeading": "Table sélectionnée", + "rowsSelected": "{rowsSelected} sur {totalRows} ligne(s) sélectionnée(s)", + "rowsFiltered": "{rowsFiltered} sur {totalRows} ligne(s) filtrée(s)" } } \ No newline at end of file diff --git a/packages/geoview-core/public/templates/raw-data-table.html b/packages/geoview-core/public/templates/raw-data-table.html index 9493cc39a86..02821e076c3 100644 --- a/packages/geoview-core/public/templates/raw-data-table.html +++ b/packages/geoview-core/public/templates/raw-data-table.html @@ -47,7 +47,12 @@

1. Default Configuration

+
+
+
+
diff --git a/packages/geoview-core/src/core/components/data-table/data-panel.tsx b/packages/geoview-core/src/core/components/data-table/data-panel.tsx index 0b6bdfb9ba9..fb66342e11f 100644 --- a/packages/geoview-core/src/core/components/data-table/data-panel.tsx +++ b/packages/geoview-core/src/core/components/data-table/data-panel.tsx @@ -1,5 +1,6 @@ import React, { useState, useCallback, useEffect } from 'react'; import { Projection } from 'ol/proj'; +import { useTranslation } from 'react-i18next'; import { Box, Grid, @@ -51,6 +52,7 @@ const sxClasses = { */ export function Datapanel({ layerData, mapId, projectionConfig, layerKeys, layerIds }: DatapanelProps) { + const { t } = useTranslation(); const [selectedLayerIndex, setSelectedLayerIndex] = useState(0); const [isLoading, setisLoading] = useState(false); @@ -114,13 +116,13 @@ export function Datapanel({ layerData, mapId, projectionConfig, layerKeys, layer - Available Categories + {t('dataTable.leftPanelHeading')} - Selected Category + {t('dataTable.rightPanelHeading')} diff --git a/packages/geoview-core/src/core/components/data-table/map-data-table.tsx b/packages/geoview-core/src/core/components/data-table/map-data-table.tsx index ae1be464dd0..3c9598d9bd3 100644 --- a/packages/geoview-core/src/core/components/data-table/map-data-table.tsx +++ b/packages/geoview-core/src/core/components/data-table/map-data-table.tsx @@ -132,6 +132,7 @@ const sxClasses = { function MapDataTable({ data, layerId, mapId, layerKey, projectionConfig }: MapDataTableProps) { const { t, i18n } = useTranslation(); + const locale = i18n.language === 'fr' ? 'fr-ca' : 'en'; const dataTableLocalization = i18n.language === 'fr' ? MRTLocalizationFR : MRTLocalizationEN;