Skip to content

Commit

Permalink
feat: add note to language picker
Browse files Browse the repository at this point in the history
  • Loading branch information
stonith404 committed Jul 23, 2023
1 parent f4c88ae commit 7f0c31c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions frontend/src/components/account/LanguagePicker.tsx
Original file line number Diff line number Diff line change
@@ -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()
);
Expand All @@ -15,6 +17,7 @@ const LanguagePicker = () => {
return (
<Select
value={selectedLanguage}
description={t("account.card.language.description")}
onChange={(value) => {
setSelectedLanguage(value ?? "en");
setCookie("language", value, {
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/i18n/translations/en-US.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7f0c31c

Please sign in to comment.