diff client/src/components/gauge/HydrologicalConditions.vue @ 4665:c47c8085cc7e

client: translation: implement marking of diagram labels * mark date/time strings of diagrams labels for translations
author Fadi Abbud <fadi.abbud@intevation.de>
date Mon, 14 Oct 2019 16:26:46 +0200
parents 3632cfc44b69
children fa55e48bbca1
line wrap: on
line diff
--- a/client/src/components/gauge/HydrologicalConditions.vue	Mon Oct 14 16:10:31 2019 +0200
+++ b/client/src/components/gauge/HydrologicalConditions.vue	Mon Oct 14 16:26:46 2019 +0200
@@ -116,6 +116,7 @@
 import { HTTP } from "@/lib/http";
 import { displayError } from "@/lib/errors";
 import { defaultDiagramTemplate } from "@/lib/DefaultDiagramTemplate";
+import { localeDateString } from "@/lib/datelocalization";
 import sanitize from "sanitize-filename";
 
 export default {
@@ -324,6 +325,7 @@
     drawDiagram() {
       // remove old diagram
       d3.select("#" + this.containerId + " svg").remove();
+      d3.timeFormatDefaultLocale(localeDateString);
       const el = document.querySelector("#" + this.containerId);
       if (!this.selectedGaugeD || !this.longtermWaterlevels.length || !el)
         return;