From d77500d8411368b087124dd28437b78594333c1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9e=20Martel?= Date: Tue, 23 Aug 2022 09:39:42 -0400 Subject: [PATCH] add custom html for clarification --- .../lib/import-export/import-export.module.ts | 3 ++- .../import-export.component.html | 21 +++++++++++++------ .../import-export/import-export.component.ts | 4 ++++ packages/geo/src/locale/en.geo.json | 2 ++ packages/geo/src/locale/fr.geo.json | 2 ++ 5 files changed, 25 insertions(+), 7 deletions(-) diff --git a/packages/geo/src/lib/import-export/import-export.module.ts b/packages/geo/src/lib/import-export/import-export.module.ts index 64945e9812..e8fe27fcb1 100644 --- a/packages/geo/src/lib/import-export/import-export.module.ts +++ b/packages/geo/src/lib/import-export/import-export.module.ts @@ -14,7 +14,7 @@ import { MatTabsModule } from '@angular/material/tabs'; import { MatTooltipModule } from '@angular/material/tooltip'; import { IgoLanguageModule } from '@igo2/core'; -import { IgoKeyValueModule, IgoDrapDropModule, IgoSpinnerModule } from '@igo2/common'; +import { IgoKeyValueModule, IgoDrapDropModule, IgoSpinnerModule, IgoCustomHtmlModule } from '@igo2/common'; import { ExportButtonComponent } from './export-button/export-button.component'; import { ImportExportComponent } from './import-export/import-export.component'; @@ -40,6 +40,7 @@ import { IgoStyleListModule } from './style-list/style-list.module'; IgoSpinnerModule, IgoKeyValueModule, IgoDrapDropModule, + IgoCustomHtmlModule, IgoStyleListModule.forRoot() ], exports: [ImportExportComponent, DropGeoFileDirective, IgoStyleListModule, ExportButtonComponent], diff --git a/packages/geo/src/lib/import-export/import-export/import-export.component.html b/packages/geo/src/lib/import-export/import-export/import-export.component.html index a84b8882a9..ec8e7a7578 100644 --- a/packages/geo/src/lib/import-export/import-export/import-export.component.html +++ b/packages/geo/src/lib/import-export/import-export/import-export.component.html @@ -51,12 +51,17 @@
-

{{'igo.geo.importExportForm.importClarifications' | translate}}

- +
+

{{'igo.geo.importExportForm.importClarifications' | translate}}

+
    +
  • {{'igo.geo.importExportForm.importSizeMax' | translate: {size: fileSizeMb} }}
  • +
  • {{'igo.geo.importExportForm.importFormatAuthorized' | translate}}
  • +
  • {{'igo.geo.importExportForm.importShpZip' | translate}}
  • +
+
+ +
@@ -167,4 +172,8 @@

{{'igo.geo.importExportForm.exportNoLayersExportable' | translate}}

+ + + diff --git a/packages/geo/src/lib/import-export/import-export/import-export.component.ts b/packages/geo/src/lib/import-export/import-export/import-export.component.ts index 34c2aa02c6..49cb69222e 100644 --- a/packages/geo/src/lib/import-export/import-export/import-export.component.ts +++ b/packages/geo/src/lib/import-export/import-export/import-export.component.ts @@ -81,6 +81,8 @@ export class ImportExportComponent implements OnDestroy, OnInit { private formLayer$$: Subscription; private exportOptions$$: Subscription; + public importHtmlClarifications: string; + public exportHtmlClarifications: string; private espgCodeRegex = new RegExp('^\\d{4,6}'); private clientSideFileSizeMax: number; @@ -167,6 +169,8 @@ export class ImportExportComponent implements OnDestroy, OnInit { this.loadConfig(); this.buildForm(); this.computeProjections(); + this.importHtmlClarifications = this.languageService.translate.instant('igo.geo.importExportForm.importHtmlClarifications'); + this.exportHtmlClarifications = this.languageService.translate.instant('igo.geo.importExportForm.exportHtmlClarifications'); } ngOnInit() { diff --git a/packages/geo/src/locale/en.geo.json b/packages/geo/src/locale/en.geo.json index 79b484d50c..d79699ce36 100644 --- a/packages/geo/src/locale/en.geo.json +++ b/packages/geo/src/locale/en.geo.json @@ -137,6 +137,8 @@ "importSizeMax": "The file size limit is {{size}} Mb", "importFormatAuthorized": "Formats authorized: geojson, kml, gpx, gml, shapefile", "importShpZip": "Shapefiles must be zipped AND geometries stored in Latitude Longitude coordinate (EPSG:4326/WGS:84)", + "importHtmlClarifications": "", + "exportHtmlClarifications": "", "other": "other", "others": "others", "projections": { diff --git a/packages/geo/src/locale/fr.geo.json b/packages/geo/src/locale/fr.geo.json index 3c4b0ff7e7..6a4282020d 100644 --- a/packages/geo/src/locale/fr.geo.json +++ b/packages/geo/src/locale/fr.geo.json @@ -137,6 +137,8 @@ "importSizeMax": "La taille limite du fichier est de {{size}} Mo", "importFormatAuthorized": "Formats autorisés: geojson, kml, gpx, gml, shapefile", "importShpZip": "Les shapefiles doivent être compressés (zippés) ET leurs géométries doivent être en coordonnées Latitude Longitude (EPSG:4326/WGS84)", + "importHtmlClarifications": "", + "exportHtmlClarifications": "", "other": "autre", "others": "autres", "projections": {