diff --git a/assets/jsons/translations/en.json b/assets/jsons/translations/en.json index 0c3adea24..37c4ab7e1 100644 --- a/assets/jsons/translations/en.json +++ b/assets/jsons/translations/en.json @@ -88,6 +88,11 @@ "buttons":{ "support": "Support BSManager", "supporters":"Supporters 👀" + }, + "view":{ + "no-supporters": "No supporter yet", + "sponsors":"Sponsors", + "supporters":"Supporters" } }, "contribution":{ diff --git a/assets/jsons/translations/es.json b/assets/jsons/translations/es.json index 69d637524..a525200d8 100644 --- a/assets/jsons/translations/es.json +++ b/assets/jsons/translations/es.json @@ -88,6 +88,11 @@ "buttons":{ "support": "Apoyo BSManager", "supporters":"Apoyos 👀" + }, + "view":{ + "no-supporters": "Todavía no hay apoyos", + "sponsors":"Patrocinadores", + "supporters":"Apoyos" } }, "contribution":{ diff --git a/assets/jsons/translations/fr.json b/assets/jsons/translations/fr.json index 99ada0230..6d4923429 100644 --- a/assets/jsons/translations/fr.json +++ b/assets/jsons/translations/fr.json @@ -88,6 +88,11 @@ "buttons":{ "support": "Soutenir BSManager", "supporters":"Supporteurs 👀" + }, + "view":{ + "no-supporters": "Pas encore de supporteurs", + "sponsors":"Sponsors", + "supporters":"Supporteurs" } }, "contribution":{ diff --git a/src/renderer/components/settings/supporters-view/supporters-block.component.tsx b/src/renderer/components/settings/supporters-view/supporters-block.component.tsx index caa4f931e..0e422917b 100644 --- a/src/renderer/components/settings/supporters-view/supporters-block.component.tsx +++ b/src/renderer/components/settings/supporters-view/supporters-block.component.tsx @@ -1,3 +1,4 @@ +import { useTranslation } from "renderer/hooks/use-translation.hook"; import { Supporter } from "shared/models/supporters"; import { SupporterItem } from "./supporter-item.component"; @@ -5,6 +6,8 @@ interface Props {className?: string, title: string, supporters: Supporter[]} export function SupportersBlock({className, title, supporters}: Props) { + const t = useTranslation(); + const someDelay = () => { const [min, max] = [0, .55] const baseDelay = .15; @@ -13,7 +16,7 @@ export function SupportersBlock({className, title, supporters}: Props) { return (
-

{title}

+

{t(title)}

{supporters.map(s => )}
diff --git a/src/renderer/components/settings/supporters-view/supporters-view.component.tsx b/src/renderer/components/settings/supporters-view/supporters-view.component.tsx index 961c0467a..847e97f13 100644 --- a/src/renderer/components/settings/supporters-view/supporters-view.component.tsx +++ b/src/renderer/components/settings/supporters-view/supporters-view.component.tsx @@ -6,12 +6,14 @@ import { SupportersService } from "renderer/services/supporters.service"; import { SupportersBlock } from "./supporters-block.component"; import ManheraChanGif from "../../../../../assets/images/gifs/menhera-chan.gif" import ManheraSadGif from "../../../../../assets/images/gifs/menhera-sad.gif" +import { useTranslation } from "renderer/hooks/use-translation.hook"; interface Props {isVisible: boolean, setVisible: (b: boolean) => void} export function SupportersView({isVisible, setVisible}: Props) { const supportersService = SupportersService.getInstance(); + const t = useTranslation(); const [supporters, setSupporters] = useState([] as Supporter[]); const [sponsors, setSponsors] = useState([] as Supporter[]); @@ -33,11 +35,11 @@ export function SupportersView({isVisible, setVisible}: Props) { setVisible(false)}> {(!!sponsors.length || !!supporters.length) && }
- {!!sponsors.length && } - {!!supporters.length && } + {!!sponsors.length && } + {!!supporters.length && } {(!sponsors.length && !supporters.length) && ( <> -

No supporter yet

+

{t("pages.settings.patreon.view.no-supporters")}

)}