From 1d79f10c8ef3ecaab1de4e957387e955fb4fa10b Mon Sep 17 00:00:00 2001 From: Armand Bahi <armand.bahi@veremes.com> Date: Wed, 20 Feb 2019 14:20:08 +0100 Subject: [PATCH] Translate WMS modal --- src/module_vmap/module/lang/lang-en.json | 6 +++ src/module_vmap/module/lang/lang-fr.json | 6 +++ .../layers/mapmodal/wmssuggestions.html | 44 +++++++++---------- 3 files changed, 34 insertions(+), 22 deletions(-) diff --git a/src/module_vmap/module/lang/lang-en.json b/src/module_vmap/module/lang/lang-en.json index 4dccb939..097f79a3 100644 --- a/src/module_vmap/module/lang/lang-en.json +++ b/src/module_vmap/module/lang/lang-en.json @@ -549,6 +549,7 @@ "VMAP_URL": "URL", "VMAP_SERVICE_NAME": "Service name", "VMAP_SERVICE_URL": "Service URL", + "VMAP_TITLE": "Title", "": "", "VMAP_LAYERTREE_DATASETS": "Datasets", "VMAP_LAYERTREE_MAP_1": "Map 1", @@ -678,5 +679,10 @@ "VMAP_MYMAP_DELETE_SHEET": "Remove sheet from map", "": "", "VMAP_MAPMODAL_OSM_TITLE": "Add OSM layer", + "": "", + "VMAP_MAPMODAL_WMS_TITLE": "Add WMS layer", + "VMAP_MAPMODAL_WMS_GET_CONTENT": "Get content", + "VMAP_MAPMODAL_WMS_ID": "Login (not required)", + "VMAP_MAPMODAL_WMS_PASS": "Password (not required)", "": "" } diff --git a/src/module_vmap/module/lang/lang-fr.json b/src/module_vmap/module/lang/lang-fr.json index 4b8046c2..80e4904b 100644 --- a/src/module_vmap/module/lang/lang-fr.json +++ b/src/module_vmap/module/lang/lang-fr.json @@ -550,6 +550,7 @@ "VMAP_URL": "URL", "VMAP_SERVICE_NAME": "Nom du service", "VMAP_SERVICE_URL": "URL du service", + "VMAP_TITLE": "Titre", "": "", "VMAP_LAYERTREE_DATASETS": "Jeux de données", "VMAP_LAYERTREE_MAP_1": "Carte 1", @@ -678,5 +679,10 @@ "VMAP_MYMAP_DELETE_SHEET": "Supprime le calque de la carte", "": "", "VMAP_MAPMODAL_OSM_TITLE": "Ajouter une couche OSM", + "": "", + "VMAP_MAPMODAL_WMS_TITLE": "Ajouter une couche WMS", + "VMAP_MAPMODAL_WMS_GET_CONTENT": "Voir le contenu", + "VMAP_MAPMODAL_WMS_ID": "Identifiant (optionnel)", + "VMAP_MAPMODAL_WMS_PASS": "Mot de passe (optionnel)", "": "" } diff --git a/src/module_vmap/module/template/layers/mapmodal/wmssuggestions.html b/src/module_vmap/module/template/layers/mapmodal/wmssuggestions.html index f3766677..3a162660 100755 --- a/src/module_vmap/module/template/layers/mapmodal/wmssuggestions.html +++ b/src/module_vmap/module/template/layers/mapmodal/wmssuggestions.html @@ -1,23 +1,23 @@ <!-- Liste des cartes utilisables --> -<h3>Ajouter une couche WMS: </h3> +<h3>{{ 'VMAP_MAPMODAL_WMS_TITLE' | translate }}: </h3> <hr> <form ng-submit="ctrl.getCapabilities()"> <div class="row"> <div class="col-xs-3"> - <b>Service: </b> - <select class="form-control" - ng-model="oSelectedService" + <b>{{ 'VMAP_SERVICE' | translate }}: </b> + <select class="form-control" + ng-model="oSelectedService" ng-options="oSelectedService.name for oSelectedService in aServices"></select> </div> <div class="col-xs-9"> - <b>URL: </b> + <b>{{ 'VMAP_URL' | translate }}: </b> <div class="input-group"> - <input type="text" class="form-control" placeholder="Service url" aria-describedby="sizing-addon1" ng-model="oSelectedService.url" ng-change="ctrl.reloadServicesList()"> + <input type="text" class="form-control" placeholder="{{ 'VMAP_SERVICE_URL' | translate }}" aria-describedby="sizing-addon1" ng-model="oSelectedService.url" ng-change="ctrl.reloadServicesList()"> <span class="input-group-btn"> - <button type="submit" class="btn btn-success">Voir le contenu</button> + <button type="submit" class="btn btn-success">{{ 'VMAP_MAPMODAL_WMS_GET_CONTENT' | translate }}</button> </span> </div> </div> @@ -28,13 +28,13 @@ </div> <div class="col-xs-3"> <div class="form-group"> - <b>Identifiant (optionnel):</b> + <b>{{ 'VMAP_MAPMODAL_WMS_ID' | translate }}:</b> <input type="text" class="form-control" ng-model="oSelectedService.login" ng-change="ctrl.reloadServicesList()"> </div> </div> <div class="col-xs-3"> <div class="form-group"> - <b>Mot de passe (optionnel):</b> + <b>{{ 'VMAP_MAPMODAL_WMS_PASS' | translate }}:</b> <input type="password" class="form-control" ng-model="oSelectedService.password" ng-change="ctrl.reloadServicesList()"> </div> </div> @@ -44,18 +44,18 @@ <div id="load-img-wms" style="display: none; text-align: center"><img src="images/ajax-load-big.gif"></div> <div id="wms-suggestions-list" style="display: none"> - <input class="form-control input-sm right margin-sides-10 margin-5" - type="text" - placeholder="Rechercher" + <input class="form-control input-sm right margin-sides-10 margin-5" + type="text" + placeholder="{{ 'VMAP_FIND' | translate }}" style="width: 200px;" ng-model="filter"> <table class="table table-striped"> <thead> <tr> - <th>Titre</th> - <th>Nom</th> - <th>Projection</th> + <th>{{ 'VMAP_TITLE' | translate }}</th> + <th>{{ 'VMAP_NAME' | translate }}</th> + <th>{{ 'VMAP_PROJETION' | translate }}</th> <th></th> </tr> </thead> @@ -66,10 +66,10 @@ <td class="WMSSuggestion">{{node.projections}}</td> <!-- Si la projeciton est bonne --> <td class="WMSSuggestionsButton"> - <button type="button" + <button type="button" class="btn btn-info" ng-class="{'btn-danger': node.projections.indexOf(ctrl.proj) === -1}" - ng-click="ctrl.addLayer(node)">Ajouter</button> + ng-click="ctrl.addLayer(node)">{{ 'VMAP_ADD' | translate }}</button> </td> </tr> </tbody> @@ -89,9 +89,9 @@ ng-submit="ctrl.addLayer(ctrl.oLayerToAdd, oSelectedStyle.Name)"> <div class="row"> <div class="col-xs-12"> - <label>Style</label> - <select class="form-control" - ng-model="oSelectedStyle" + <label>Style</label> + <select class="form-control" + ng-model="oSelectedStyle" ng-options="oStyle.Title for oStyle in ctrl.oLayerToAdd.Style"></select> <br> <div ng-repeat="(key, value) in ctrl.oLayerToAdd.Style[iSelectedStyleIndex]" ng-if="(value | getType) == 'string'"> @@ -102,8 +102,8 @@ </form> </div> <div class="modal-footer"> - <button type="submit" class="btn btn-primary" form="wms-select-style-modal-form">Valider</button> + <button type="submit" class="btn btn-primary" form="wms-select-style-modal-form">{{ 'VMAP_VALIDATE' | translate }}</button> </div> </div> </div> -</div> \ No newline at end of file +</div> -- GitLab