mirror of
https://github.com/stonith404/pingvin-share.git
synced 2025-01-15 01:14:27 -05:00
feat: add note to language picker
This commit is contained in:
parent
f4c88aeb08
commit
7f0c31c2e0
2 changed files with 5 additions and 0 deletions
|
@ -1,9 +1,11 @@
|
||||||
import { Select } from "@mantine/core";
|
import { Select } from "@mantine/core";
|
||||||
import { getCookie, setCookie } from "cookies-next";
|
import { getCookie, setCookie } from "cookies-next";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
|
import useTranslate from "../../hooks/useTranslate.hook";
|
||||||
import { LOCALES } from "../../i18n/locales";
|
import { LOCALES } from "../../i18n/locales";
|
||||||
|
|
||||||
const LanguagePicker = () => {
|
const LanguagePicker = () => {
|
||||||
|
const t = useTranslate();
|
||||||
const [selectedLanguage, setSelectedLanguage] = useState(
|
const [selectedLanguage, setSelectedLanguage] = useState(
|
||||||
getCookie("language")?.toString()
|
getCookie("language")?.toString()
|
||||||
);
|
);
|
||||||
|
@ -15,6 +17,7 @@ const LanguagePicker = () => {
|
||||||
return (
|
return (
|
||||||
<Select
|
<Select
|
||||||
value={selectedLanguage}
|
value={selectedLanguage}
|
||||||
|
description={t("account.card.language.description")}
|
||||||
onChange={(value) => {
|
onChange={(value) => {
|
||||||
setSelectedLanguage(value ?? "en");
|
setSelectedLanguage(value ?? "en");
|
||||||
setCookie("language", value, {
|
setCookie("language", value, {
|
||||||
|
|
|
@ -100,6 +100,8 @@ export default {
|
||||||
"account.notify.totp.enable": "TOTP enabled successfully",
|
"account.notify.totp.enable": "TOTP enabled successfully",
|
||||||
|
|
||||||
"account.card.language.title": "Language",
|
"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",
|
"account.card.color.title": "Color scheme",
|
||||||
|
|
||||||
// ThemeSwitcher.tsx
|
// ThemeSwitcher.tsx
|
||||||
|
|
Loading…
Add table
Reference in a new issue