Skip to content

Commit

Permalink
Move strings from RelatedMaps to translation.json (#7154)
Browse files Browse the repository at this point in the history
* Move strings from RelatedMaps to translation.json

* Add changelog entry
  • Loading branch information
steve9164 committed May 14, 2024
1 parent 43e87de commit b2209bb
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Expand Up @@ -4,6 +4,7 @@

- Add NumberParameterEditor to enable WPS AllowedValues Ranges to be set and use DefaultValue
- Feature info template has access to activeStyle of item having TableTraits.
- Allow related maps UI strings to be translated. Translation support for related maps content is not included.

#### 8.7.1 - 2024-04-16

Expand Down
9 changes: 5 additions & 4 deletions lib/ReactViews/RelatedMaps/RelatedMaps.tsx
Expand Up @@ -28,6 +28,7 @@ class RelatedMaps extends React.Component<PropTypes> {
}

render() {
const t = this.props.t;
const dropdownTheme = {
inner: Styles.dropdownInner,
icon: "gallery"
Expand All @@ -38,15 +39,15 @@ class RelatedMaps extends React.Component<PropTypes> {
return (
<MenuPanel
theme={dropdownTheme}
btnText="Related Maps"
btnText={t("relatedMaps.buttonText")}
smallScreen={smallScreen}
viewState={this.props.viewState}
btnTitle="See related maps"
btnTitle={t("relatedMaps.buttonTitle")}
showDropdownInCenter
>
<h2>Related Maps</h2>
<h2>{t("relatedMaps.panelHeading")}</h2>

<p>Clicking on a map below will open it in a separate window or tab.</p>
<p>{t("relatedMaps.panelText")}</p>

{this.props.relatedMaps.map((map, i) => (
<Box flex key={i}>
Expand Down
6 changes: 6 additions & 0 deletions wwwroot/languages/en/translation.json
Expand Up @@ -2154,5 +2154,11 @@
"colorAdd": "Add",
"colorRemove": "Remove",
"invalid": "Invalid"
},
"relatedMaps": {
"buttonText": "Related Maps",
"buttonTitle": "See related maps",
"panelHeading": "Related Maps",
"panelText": "Clicking on a map below will open it in a separate window or tab."
}
}

0 comments on commit b2209bb

Please sign in to comment.