1
0
mirror of https://github.com/stonith404/pingvin-share.git synced 2024-06-27 13:20:48 +02:00

feat: add note to language picker

This commit is contained in:
Elias Schneider 2023-07-23 13:42:10 +02:00
parent f4c88aeb08
commit 7f0c31c2e0
No known key found for this signature in database
GPG Key ID: 07E623B294202B6C
2 changed files with 5 additions and 0 deletions

View File

@ -1,9 +1,11 @@
import { Select } from "@mantine/core";
import { getCookie, setCookie } from "cookies-next";
import { useState } from "react";
import useTranslate from "../../hooks/useTranslate.hook";
import { LOCALES } from "../../i18n/locales";
const LanguagePicker = () => {
const t = useTranslate();
const [selectedLanguage, setSelectedLanguage] = useState(
getCookie("language")?.toString()
);
@ -15,6 +17,7 @@ const LanguagePicker = () => {
return (
<Select
value={selectedLanguage}
description={t("account.card.language.description")}
onChange={(value) => {
setSelectedLanguage(value ?? "en");
setCookie("language", value, {

View File

@ -100,6 +100,8 @@ export default {
"account.notify.totp.enable": "TOTP enabled successfully",
"account.card.language.title": "Language",
"account.card.language.description":
"The project is translated by the community. Some languages might be incomplete.",
"account.card.color.title": "Color scheme",
// ThemeSwitcher.tsx