diff --git a/web/src/components/MemoEditor/ActionButton/MarkdownMenu.tsx b/web/src/components/MemoEditor/ActionButton/MarkdownMenu.tsx index 8a32109c..ddc31b75 100644 --- a/web/src/components/MemoEditor/ActionButton/MarkdownMenu.tsx +++ b/web/src/components/MemoEditor/ActionButton/MarkdownMenu.tsx @@ -1,6 +1,7 @@ import { Dropdown, Menu, MenuButton, MenuItem, Link } from "@mui/joy"; import { Button } from "@usememos/mui"; import { CheckSquareIcon, Code2Icon, SquareSlashIcon } from "lucide-react"; +import { useTranslate } from "@/utils/i18n"; import { EditorRefActions } from "../Editor"; interface Props { @@ -8,6 +9,8 @@ interface Props { } const MarkdownMenu = (props: Props) => { + const t = useTranslate(); + const { editorRef } = props; const handleCodeBlockClick = () => { @@ -67,15 +70,15 @@ const MarkdownMenu = (props: Props) => { - Code block + {t("markdown.code-block")} - Checkbox + {t("markdown.checkbox")}
- Content syntax + {t("markdown.content-syntax")}
diff --git a/web/src/components/Settings/AccessTokenSection.tsx b/web/src/components/Settings/AccessTokenSection.tsx index 6d48017d..2dc9a92c 100644 --- a/web/src/components/Settings/AccessTokenSection.tsx +++ b/web/src/components/Settings/AccessTokenSection.tsx @@ -56,10 +56,10 @@ const AccessTokenSection = () => {

- Access Tokens + {t("setting.access-token-section.title")}

-

A list of all access tokens for your account.

+

{t("setting.access-token-section.description")}

- Disallow user registration + {t("setting.workspace-section.disallow-user-registration")} updatePartialSetting({ disallowUserRegistration: event.target.checked })} />
- Disallow password auth + {t("setting.workspace-section.disallow-password-auth")} updatePartialSetting({ disallowPasswordAuth: event.target.checked })} />
- Disallow Change Username + {t("setting.workspace-section.disallow-change-username")} updatePartialSetting({ disallowChangeUsername: event.target.checked })} />
- Disallow Change Nickname + {t("setting.workspace-section.disallow-change-nickname")} updatePartialSetting({ disallowChangeNickname: event.target.checked })} />
- Week start day + {t("setting.workspace-section.week-start-day")}
diff --git a/web/src/locales/en.json b/web/src/locales/en.json index f3ed9864..4301742b 100644 --- a/web/src/locales/en.json +++ b/web/src/locales/en.json @@ -235,7 +235,9 @@ "template": "Template", "token-endpoint": "Token endpoint", "update-sso": "Update SSO", - "user-endpoint": "User endpoint" + "user-endpoint": "User endpoint", + "no-sso-found": "No SSO found.", + "configuring-keycloak-for-authentication": "Configuring Keycloak for Authentication" }, "storage": "Storage", "storage-section": { @@ -299,7 +301,38 @@ "max-upload-size-hint": "Recommended value is 32 MiB.", "server-name": "Server Name" }, - "memo-related": "Memo" + "memo-related": "Memo", + "access-token-section":{ + "title": "Access Tokens", + "description": "A list of all access tokens for your account.", + "created-at": "Created At", + "expires-at": "Expires At", + "token": "Token" + }, + "webhook-section": { + "title": "Webhooks", + "url": "Url", + "no-webhooks-found": "No webhooks found." + }, + "workspace-section": { + "disallow-user-registration": "Disallow user registration", + "disallow-password-auth": "Disallow password auth", + "disallow-change-username": "Disallow Change Username", + "disallow-change-nickname": "Disallow Change Nickname", + "week-start-day": "Week start day", + "saturday": "Saturday", + "sunday": "Sunday", + "monday": "Monday" + }, + "memo-related-settings": { + "title": "Memo related settings", + "enable-link-preview": "Enable link preview", + "enable-memo-comments": "Enable memo comments", + "enable-memo-location": "Enable memo location", + "content-lenght-limit": "Content length limit(Byte)", + "reactions": "Reactions" + }, + "version": "Version" }, "tag": { "all-tags": "All Tags", @@ -308,5 +341,10 @@ "delete-confirm": "Are you sure to delete this tag? All related memos will be archived.", "delete-tag": "Delete Tag", "no-tag-found": "No tag found" + }, + "markdown": { + "code-block": "Code block", + "checkbox": "Checkbox", + "content-syntax": "Content syntax" } } diff --git a/web/src/locales/pt-PT.json b/web/src/locales/pt-PT.json index 1a7f9520..5f23d6d5 100644 --- a/web/src/locales/pt-PT.json +++ b/web/src/locales/pt-PT.json @@ -235,7 +235,9 @@ "template": "Modelo", "token-endpoint": "Ponto de Token", "update-sso": "Atualizar SSO", - "user-endpoint": "Ponto do Utilizador" + "user-endpoint": "Ponto do Utilizador", + "no-sso-found": "Nenhum SSO encontrado.", + "configuring-keycloak-for-authentication": "A configurar o Keycloak para autenticação." }, "storage": "Armazenamento", "storage-section": { @@ -299,7 +301,38 @@ "max-upload-size-hint": "32 MiB é recomendado.", "server-name": "Nome do Servidor" }, - "memo-related": "Memo" + "memo-related": "Memo", + "access-token-section": { + "title": "Tokens de Acesso", + "description": "Uma lista de todos os tokens de acesso para a sua conta.", + "created-at": "Criado Em", + "expires-at": "Expira Em", + "token": "Token" + }, + "webhook-section": { + "title": "Webhooks", + "url": "Url", + "no-webhooks-found": "Nenhum webhook encontrado." + }, + "workspace-section": { + "disallow-user-registration": "Desativar registo de utilizadores", + "disallow-password-auth": "Desativar autenticação por palavra-passe", + "disallow-change-username": "Desativar alteração de nome de utilizador", + "disallow-change-nickname": "Desativar alteração de nome ou apelido", + "week-start-day": "Dia de início da semana", + "saturday": "Sábado", + "sunday": "Domingo", + "monday": "Segunda-feira" + }, + "memo-related-settings": { + "title": "Definições relacionadas com memos", + "enable-link-preview": "Ativar pré-visualização de links", + "enable-memo-comments": "Ativar comentários em memos", + "enable-memo-location": "Ativar localização em memos", + "content-lenght-limit": "Limite de comprimento do conteúdo (Bytes)", + "reactions": "Reações" + }, + "version": "Versão" }, "tag": { "all-tags": "Todas as Etiquetas", @@ -308,5 +341,10 @@ "delete-confirm": "Tem a certeza que quer eliminar esta etiqueta? Memos associados serão arquivados.", "delete-tag": "Eliminar Etiqueta", "no-tag-found": "Nenhuma etiqueta encontrada" + }, + "markdown": { + "code-block": "Bloco de código", + "checkbox": "Caixa de seleção", + "content-syntax": "Sintaxe de conteúdo" } } diff --git a/web/src/pages/Setting.tsx b/web/src/pages/Setting.tsx index f6a95b88..77b07eee 100644 --- a/web/src/pages/Setting.tsx +++ b/web/src/pages/Setting.tsx @@ -114,7 +114,9 @@ const Setting = () => { onClick={() => handleSectionSelectorItemClick(item)} /> ))} - Version: v{commonContext.profile.version} + + {t("setting.version")}: v{commonContext.profile.version} +
) : null}