Mercurial > gemma
changeset 4595:998f4d7d9626
client: mark diagram strings for translation(fairwayprofile)
author | Fadi Abbud <fadi.abbud@intevation.de> |
---|---|
date | Wed, 09 Oct 2019 14:40:56 +0200 |
parents | 3632cfc44b69 |
children | 800119befa90 bd2999cac246 |
files | client/src/components/fairway/Fairwayprofile.vue |
diffstat | 1 files changed, 27 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- a/client/src/components/fairway/Fairwayprofile.vue Wed Oct 09 12:44:34 2019 +0200 +++ b/client/src/components/fairway/Fairwayprofile.vue Wed Oct 09 14:40:56 2019 +0200 @@ -7,7 +7,9 @@ <span style="background-color: #5995ff; width: 20px; height: 20px;" ></span> - Water + <span class="fix-trans-space" style="display:inline;" v-translate + >Water</span + > </div> <div class="legend"> <span @@ -20,7 +22,9 @@ '; background-clip: padding-box; box-sizing: content-box;' " ></span> - Fairway (LOS 1) + <span class="fix-trans-space" style="display:inline;" v-translate + >Fairway (LOS 1)</span + > </div> <div class="legend"> <span @@ -33,7 +37,9 @@ '; background-clip: padding-box; box-sizing: content-box;' " ></span> - Fairway (LOS 2) + <span class="fix-trans-space" style="display:inline;" v-translate + >Fairway (LOS 2)</span + > </div> <div class="legend"> <span @@ -46,19 +52,25 @@ '; background-clip: padding-box; box-sizing: content-box;' " ></span> - Fairway (LOS 3) + <span class="fix-trans-space" style="display:inline;" v-translate + >Fairway (LOS 3)</span + > </div> <div class="legend"> <span style="width: 14px; height: 14px; background-color: #4a2f06; border: solid 3px black; background-clip: padding-box; box-sizing: content-box;" ></span> - Sediment + <span class="fix-trans-space" style="display:inline;" v-translate + >Sediment</span + > </div> <div class="legend"> <span style="width: 14px; height: 14px; background-color: rgba(74, 47, 6, 0.6); border: solid 3px #943007; background-clip: padding-box; box-sizing: content-box;" ></span> - Sediment (Compare) + <span class="fix-trans-space" style="display:inline;" v-translate + >Sediment (Compare)</span + > </div> <div> <select @@ -349,33 +361,33 @@ this.pdf.doc.setDrawColor("#5995ff"); this.pdf.doc.setFillColor("#5995ff"); this.pdf.doc.circle(x, y, 2, "FD"); - this.pdf.doc.text(x + 3, y + 1, "Water"); + this.pdf.doc.text(x + 3, y + 1, this.$gettext("Water")); this.pdf.doc.setLineDashPattern([0.8], 0); this.pdf.doc.setDrawColor("#0000ff"); this.pdf.doc.setFillColor("#fcfacc"); this.pdf.doc.circle(x, y + 5, 2, "FD"); - this.pdf.doc.text(x + 3, y + 6, "Fairway (LOS 1)"); + this.pdf.doc.text(x + 3, y + 6, this.$gettext("Fairway (LOS 1)")); this.pdf.doc.setLineDashPattern([1.8], 0); this.pdf.doc.setFillColor("#fdfce5"); this.pdf.doc.circle(x, y + 10, 2, "FD"); - this.pdf.doc.text(x + 3, y + 11, "Fairway (LOS 2)"); + this.pdf.doc.text(x + 3, y + 11, this.$gettext("Fairway (LOS 2)")); this.pdf.doc.setLineDashPattern([], 0); this.pdf.doc.setFillColor("#ffffff"); this.pdf.doc.circle(x, y + 15, 2, "FD"); - this.pdf.doc.text(x + 3, y + 16, "Fairway (LOS 3)"); + this.pdf.doc.text(x + 3, y + 16, this.$gettext("Fairway (LOS 3)")); this.pdf.doc.setDrawColor("black"); this.pdf.doc.setFillColor("#4a2e06"); this.pdf.doc.circle(x, y + 20, 2, "FD"); - this.pdf.doc.text(x + 3, y + 21, "Sediment"); + this.pdf.doc.text(x + 3, y + 21, this.$gettext("Sediment")); this.pdf.doc.setDrawColor("#943007"); this.pdf.doc.setFillColor("#928269"); this.pdf.doc.circle(x, y + 25, 2, "FD"); - this.pdf.doc.text(x + 3, y + 26, "Sediment (Compare)"); + this.pdf.doc.text(x + 3, y + 26, this.$gettext("Sediment (Compare)")); }, getPrintLayout(svgHeight, svgWidth) { return { @@ -485,7 +497,7 @@ .attr("x", -dimensions.mainHeight / 2) .attr("fill", "black") .style("text-anchor", "middle") - .text("Depth [m]"); + .text(this.$gettext("Depth [m]")); graph .append("text") .attr("transform", ["rotate(-90)"]) @@ -493,7 +505,7 @@ .attr("x", -dimensions.mainHeight / 2) .attr("fill", "black") .style("text-anchor", "middle") - .text("Waterlevel [m]"); + .text(this.$gettext("Waterlevel [m]")); graph .append("text") .attr("y", 0) @@ -505,7 +517,7 @@ `translate(${dimensions.width / 2} ${dimensions.mainHeight})`, "rotate(0)" ]) - .text("Width [m]"); + .text(this.$gettext("Width [m]")); }, generateScalesAndGraph({ svg, height, width, dimensions, offsetY }) { let xScale = d3