Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add translation for redlining draw layer #329

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions plugins/Redlining.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class Redlining extends React.Component {
if (vectorLayers.length >= 1) {
this.props.changeRedliningState({layer: vectorLayers[0].id, layerTitle: vectorLayers[0].title});
} else if (this.props.redlining.layer !== 'redlining') {
this.props.changeRedliningState({layer: 'redlining', layerTitle: 'Redlining'});
this.props.changeRedliningState({layer: 'redlining', layerTitle: LocaleUtils.tr('redlining.drawlayer')});
}
}
}
Expand Down Expand Up @@ -152,7 +152,7 @@ class Redlining extends React.Component {
let vectorLayers = this.props.layers.filter(layer => layer.type === "vector" && layer.role === LayerRole.USERLAYER && !layer.readonly);
// Ensure list always contains at least a "Redlining" layer
if (vectorLayers.length === 0) {
vectorLayers = [{id: 'redlining', title: 'Redlining'}, ...vectorLayers];
vectorLayers = [{id: 'redlining', title: LocaleUtils.tr('redlining.drawlayer')}, ...vectorLayers];
}
const haveLayer = this.props.layers.find(l => l.id === this.props.redlining.layer) !== undefined;

Expand Down
3 changes: 2 additions & 1 deletion plugins/map/RedliningSupport.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import NumericInputWindow from '../../components/NumericInputWindow';
import {OlLayerAdded, OlLayerUpdated} from '../../components/map/OlLayer';
import displayCrsSelector from '../../selectors/displaycrs';
import FeatureStyles from '../../utils/FeatureStyles';
import LocaleUtils from '../../utils/LocaleUtils';
import MapUtils from '../../utils/MapUtils';
import MeasureUtils from '../../utils/MeasureUtils';

Expand Down Expand Up @@ -574,7 +575,7 @@ class RedliningSupport extends React.Component {
feature.crs = this.props.mapCrs;
const layer = {
id: this.props.redlining.layer,
title: this.props.redlining.layerTitle,
title: LocaleUtils.tr(this.props.redlining.layerTitle),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line here is incorrect, layerTitle is already translated (see line 81 in Redlining.jsx).

Copy link
Contributor Author

@cazitouni cazitouni Jul 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I belived too, but if I do not use it here it goes back to it's untranslated state as soon as you add a point or anything in the layer.

role: LayerRole.USERLAYER,
queryable: false
};
Expand Down
2 changes: 1 addition & 1 deletion reducers/redlining.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const defaultState = {
text: ""
},
layer: 'redlining',
layerTitle: 'Redlining',
layerTitle: 'redlining.drawlayer',
selectedFeature: null,
drawMultiple: true,
measurements: false,
Expand Down
1 change: 1 addition & 0 deletions translations/ca-ES.json
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,7 @@
"circle": "Circle",
"delete": "Eliminar",
"draw": "Dibuixar",
"drawlayer": "",
"edit": "Editar",
"ellipse": "El·lipse",
"freehand": "Dibuix a ma alçada",
Expand Down
1 change: 1 addition & 0 deletions translations/cs-CZ.json
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,7 @@
"circle": "",
"delete": "",
"draw": "",
"drawlayer": "",
"edit": "",
"ellipse": "",
"freehand": "",
Expand Down
1 change: 1 addition & 0 deletions translations/de-CH.json
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,7 @@
"circle": "Kreis",
"delete": "Löschen",
"draw": "Zeichnen",
"drawlayer": "",
"edit": "Bearbeiten",
"ellipse": "Ellipse",
"freehand": "Freihand",
Expand Down
1 change: 1 addition & 0 deletions translations/de-DE.json
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,7 @@
"circle": "Kreis",
"delete": "Löschen",
"draw": "Zeichnen",
"drawlayer": "",
"edit": "Bearbeiten",
"ellipse": "Ellipse",
"freehand": "Freihand",
Expand Down
1 change: 1 addition & 0 deletions translations/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,7 @@
"circle": "Circle",
"delete": "Delete",
"draw": "Draw",
"drawlayer": "Redlining",
"edit": "Edit",
"ellipse": "Ellipse",
"freehand": "Freehand drawing",
Expand Down
1 change: 1 addition & 0 deletions translations/es-ES.json
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,7 @@
"circle": "Círculo",
"delete": "Eliminar",
"draw": "Dibujar",
"drawlayer": "",
"edit": "Editar",
"ellipse": "Elipse",
"freehand": "Dibujo a mano alzada",
Expand Down
1 change: 1 addition & 0 deletions translations/fi-FI.json
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,7 @@
"circle": "Ympyrä",
"delete": "Poista",
"draw": "Piirrä",
"drawlayer": "",
"edit": "Editoi",
"ellipse": "",
"freehand": "Vapaa piirto",
Expand Down
1 change: 1 addition & 0 deletions translations/fr-FR.json
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,7 @@
"circle": "Cercle",
"delete": "Effacer",
"draw": "Dessiner",
"drawlayer": "Dessin",
"edit": "Editer",
"ellipse": "Ellipse",
"freehand": "Dessin à main libre",
Expand Down
1 change: 1 addition & 0 deletions translations/hu-HU.json
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,7 @@
"circle": "",
"delete": "",
"draw": "",
"drawlayer": "",
"edit": "",
"ellipse": "",
"freehand": "",
Expand Down
1 change: 1 addition & 0 deletions translations/it-IT.json
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,7 @@
"circle": "Cerchio",
"delete": "Elimina",
"draw": "Disegna",
"drawlayer": "",
"edit": "Modifica",
"ellipse": "Ellisse",
"freehand": "Mano libera",
Expand Down
1 change: 1 addition & 0 deletions translations/no-NO.json
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,7 @@
"circle": "",
"delete": "Slett",
"draw": "Tegn",
"drawlayer": "",
"edit": "Rediger",
"ellipse": "",
"freehand": "Frihånd",
Expand Down
1 change: 1 addition & 0 deletions translations/pl-PL.json
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,7 @@
"circle": "",
"delete": "Usuń",
"draw": "Rysuj",
"drawlayer": "",
"edit": "Edytuj",
"ellipse": "",
"freehand": "",
Expand Down
1 change: 1 addition & 0 deletions translations/pt-BR.json
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,7 @@
"circle": "Círculo",
"delete": "Excluir",
"draw": "Traçar",
"drawlayer": "",
"edit": "Editar",
"ellipse": "Elipse",
"freehand": "Desenho à mão livre ",
Expand Down
1 change: 1 addition & 0 deletions translations/pt-PT.json
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,7 @@
"circle": "Círculo",
"delete": "Excluir",
"draw": "Desenhar",
"drawlayer": "",
"edit": "Editar",
"ellipse": "Elipse",
"freehand": "Desenho à mão livre",
Expand Down
1 change: 1 addition & 0 deletions translations/ro-RO.json
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,7 @@
"circle": "Cerc",
"delete": "Elimină",
"draw": "Desenare",
"drawlayer": "",
"edit": "Modifică",
"ellipse": "Elipsă",
"freehand": "Desen liber",
Expand Down
1 change: 1 addition & 0 deletions translations/ru-RU.json
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,7 @@
"circle": "",
"delete": "",
"draw": "",
"drawlayer": "",
"edit": "",
"ellipse": "",
"freehand": "",
Expand Down
1 change: 1 addition & 0 deletions translations/sv-SE.json
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,7 @@
"circle": "",
"delete": "Radera",
"draw": "Rita",
"drawlayer": "",
"edit": "Redigera",
"ellipse": "",
"freehand": "",
Expand Down
1 change: 1 addition & 0 deletions translations/tr-TR.json
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,7 @@
"circle": "Daire",
"delete": "Sil",
"draw": "Çiz",
"drawlayer": "",
"edit": "Düzenle",
"ellipse": "Elips",
"freehand": "Serbest çizim",
Expand Down
1 change: 1 addition & 0 deletions translations/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,7 @@
"redlining.circle",
"redlining.delete",
"redlining.draw",
"redlining.drawlayer",
"redlining.edit",
"redlining.ellipse",
"redlining.freehand",
Expand Down
Loading