Skip to content

Commit

Permalink
Move nMoreEventsPrev to translations
Browse files Browse the repository at this point in the history
  • Loading branch information
lil5 committed Dec 7, 2023
1 parent 62c6114 commit 263052c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
1 change: 1 addition & 0 deletions frontend/public/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@
"other": "Other",
"events": "Events",
"previousEvents": "Previous Events",
"nMoreEventsPrev": "<s>{{ n }}</s> more events<br/>previously posted",
"allEvents": "All Events",
"eventName": "Event name",
"sorryNoEvents": "Sorry, there are no events that match these filters.",
Expand Down
16 changes: 10 additions & 6 deletions frontend/src/pages/Events.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Helmet } from "react-helmet";
import { useState, useContext, useEffect } from "react";
import { useTranslation } from "react-i18next";
import { Trans, useTranslation } from "react-i18next";
import { Link, useHistory } from "react-router-dom";

import { Event } from "../api/types";
Expand Down Expand Up @@ -277,11 +277,15 @@ export default function Events() {
{nMorePrevEvents ? (
<div className="flex justify-center">
<h4 className="font-semibold text-black/90 px-3 my-6">
<span className="text-4xl text-accent">
{nMorePrevEvents}
</span>{" "}
more events
<br /> previously entered
<Trans
i18nKey="nMoreEventsPrev"
values={{
n: nMorePrevEvents,
}}
components={{
s: <span className="text-4xl text-accent" />,
}}
/>
</h4>
</div>
) : null}
Expand Down

0 comments on commit 263052c

Please sign in to comment.