Skip to content

Commit

Permalink
add missing translations
Browse files Browse the repository at this point in the history
  • Loading branch information
Zagrios committed Oct 23, 2022
1 parent 6e07adb commit 5817260
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 4 deletions.
5 changes: 5 additions & 0 deletions assets/jsons/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,11 @@
"buttons":{
"support": "Support BSManager",
"supporters":"Supporters 👀"
},
"view":{
"no-supporters": "No supporter yet",
"sponsors":"Sponsors",
"supporters":"Supporters"
}
},
"contribution":{
Expand Down
5 changes: 5 additions & 0 deletions assets/jsons/translations/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,11 @@
"buttons":{
"support": "Apoyo BSManager",
"supporters":"Apoyos 👀"
},
"view":{
"no-supporters": "Todavía no hay apoyos",
"sponsors":"Patrocinadores",
"supporters":"Apoyos"
}
},
"contribution":{
Expand Down
5 changes: 5 additions & 0 deletions assets/jsons/translations/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,11 @@
"buttons":{
"support": "Soutenir BSManager",
"supporters":"Supporteurs 👀"
},
"view":{
"no-supporters": "Pas encore de supporteurs",
"sponsors":"Sponsors",
"supporters":"Supporteurs"
}
},
"contribution":{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
import { useTranslation } from "renderer/hooks/use-translation.hook";
import { Supporter } from "shared/models/supporters";
import { SupporterItem } from "./supporter-item.component";

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;
Expand All @@ -13,7 +16,7 @@ export function SupportersBlock({className, title, supporters}: Props) {

return (
<div className={`mb-10 flex flex-col items-center ${className}`}>
<h2 className="uppercase text-3xl font-bold">{title}</h2>
<h2 className="uppercase text-3xl font-bold">{t(title)}</h2>
<div className="flex justify-center flex-wrap py-5 px-20">
{supporters.map(s => <SupporterItem supporter={s} delay={someDelay()}/>)}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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[]);
Expand All @@ -33,11 +35,11 @@ export function SupportersView({isVisible, setVisible}: Props) {
<BsmButton className="absolute right-10 top-10 !bg-transparent w-7 h-7" icon="cross" withBar={false} onClick={() => setVisible(false)}></BsmButton>
{(!!sponsors.length || !!supporters.length) && <img className="absolute bottom-5 right-5 rotate-45 w-32 h-32" src={ManheraChanGif}/>}
<div className="w-full h-full overflow-y-scroll">
{!!sponsors.length && <SupportersBlock className="mt-12" title="sponsors" supporters={sponsors}/>}
{!!supporters.length && <SupportersBlock className="mt-12" title="supporters" supporters={supporters}/>}
{!!sponsors.length && <SupportersBlock className="mt-12" title="pages.settings.patreon.view.sponsors" supporters={sponsors}/>}
{!!supporters.length && <SupportersBlock className="mt-12" title="pages.settings.patreon.view.supporters" supporters={supporters}/>}
{(!sponsors.length && !supporters.length) && (
<>
<h2 className="w-full text-center text-3xl font-bold mt-10 mb-24">No supporter yet</h2>
<h2 className="w-full text-center text-3xl font-bold mt-10 mb-24">{t("pages.settings.patreon.view.no-supporters")}</h2>
<img className="m-auto" src={ManheraSadGif} />
</>
)}
Expand Down

0 comments on commit 5817260

Please sign in to comment.