diff --git a/src/common/data/copy.json b/src/common/data/copy.json index c121446..e2ba701 100644 --- a/src/common/data/copy.json +++ b/src/common/data/copy.json @@ -65,7 +65,7 @@ "Testimonio Grupo 03", "Otras categorias" ], - "info": "Eventos ocurridos entre", + "info": "%n eventos ocurridos entre", "default_categories_label": "Eventos" }, "cardstack": { @@ -160,7 +160,7 @@ "Testimony Group 03", "Other" ], - "info": "Seeing events that occurred between", + "info": "Seeing %n events that occurred between", "default_categories_label": "" }, "cardstack": { diff --git a/src/components/time/Timeline.js b/src/components/time/Timeline.js index 6581985..4eda796 100644 --- a/src/components/time/Timeline.js +++ b/src/components/time/Timeline.js @@ -28,7 +28,9 @@ class Timeline extends React.Component { this.onSelect = this.onSelect.bind(this); this.svgRef = React.createRef(); this.state = { - isFolded: (searchParams.has('timeline') && searchParams.get('timeline') === 'false'), + isFolded: + searchParams.has("timeline") && + searchParams.get("timeline") === "false", dims: props.dimensions, scaleX: null, scaleY: null, @@ -359,7 +361,8 @@ class Timeline extends React.Component { } render() { - const { isNarrative, app } = this.props; + const { isNarrative, app, domain } = this.props; + let classes = `timeline-wrapper ${this.state.isFolded ? " folded" : ""}`; classes += app.narrative !== null ? " narrative-mode" : ""; const { dims } = this.state; @@ -372,6 +375,11 @@ class Timeline extends React.Component { const contentHeight = { height: dims.contentHeight }; const { activeCategories: categories } = this.props; + const title = copy[this.props.app.language].timeline.info.replace( + "%n", + domain.eventCountInTimeRange + ); + return (