mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
chore: tweak i18n
This commit is contained in:
@@ -62,7 +62,7 @@ const CreateTagDialog: React.FC<Props> = (props: Props) => {
|
||||
|
||||
const handleSaveBtnClick = async () => {
|
||||
if (!validateTagName(tagName)) {
|
||||
toast.error(t("tag-list.invalid-tag-name"));
|
||||
toast.error(t("tag.invalid-tag-name"));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -90,7 +90,7 @@ const CreateTagDialog: React.FC<Props> = (props: Props) => {
|
||||
return (
|
||||
<>
|
||||
<div className="dialog-header-container">
|
||||
<p className="title-text">{t("tag-list.create-tag")}</p>
|
||||
<p className="title-text">{t("tag.create-tag")}</p>
|
||||
<IconButton size="sm" onClick={() => destroy()}>
|
||||
<Icon.X className="w-5 h-auto" />
|
||||
</IconButton>
|
||||
@@ -99,7 +99,7 @@ const CreateTagDialog: React.FC<Props> = (props: Props) => {
|
||||
<Input
|
||||
className="mb-2"
|
||||
size="md"
|
||||
placeholder={t("tag-list.tag-name")}
|
||||
placeholder={t("tag.tag-name")}
|
||||
value={tagName}
|
||||
onChange={handleTagNameChanged}
|
||||
onKeyDown={handleTagNameInputKeyDown}
|
||||
@@ -109,7 +109,7 @@ const CreateTagDialog: React.FC<Props> = (props: Props) => {
|
||||
/>
|
||||
{tagNameList.length > 0 && (
|
||||
<>
|
||||
<p className="w-full mt-2 mb-1 text-sm text-gray-400">{t("tag-list.all-tags")}</p>
|
||||
<p className="w-full mt-2 mb-1 text-sm text-gray-400">{t("tag.all-tags")}</p>
|
||||
<div className="w-full flex flex-row justify-start items-start flex-wrap">
|
||||
{Array.from(tagNameList)
|
||||
.sort()
|
||||
@@ -130,12 +130,12 @@ const CreateTagDialog: React.FC<Props> = (props: Props) => {
|
||||
{shownSuggestTagNameList.length > 0 && (
|
||||
<>
|
||||
<div className="mt-4 mb-1 text-sm w-full flex flex-row justify-start items-center">
|
||||
<span className="text-gray-400 mr-2">{t("tag-list.tag-suggestions")}</span>
|
||||
<span className="text-gray-400 mr-2">{t("tag.tag-suggestions")}</span>
|
||||
<span
|
||||
className="text-xs border border-gray-200 rounded-md px-1 leading-5 cursor-pointer text-gray-600 hover:shadow dark:border-zinc-700 dark:text-gray-400"
|
||||
onClick={handleToggleShowSuggestionTags}
|
||||
>
|
||||
{showTagSuggestions ? t("tag-list.hide") : t("tag-list.show")}
|
||||
{showTagSuggestions ? t("tag.hide") : t("tag.show")}
|
||||
</span>
|
||||
</div>
|
||||
{showTagSuggestions && (
|
||||
@@ -153,7 +153,7 @@ const CreateTagDialog: React.FC<Props> = (props: Props) => {
|
||||
))}
|
||||
</div>
|
||||
<Button size="sm" variant="outlined" onClick={handleSaveSuggestTagList}>
|
||||
{t("tag-list.save-all")}
|
||||
{t("tag.save-all")}
|
||||
</Button>
|
||||
</>
|
||||
)}
|
||||
|
||||
@@ -45,7 +45,7 @@ const DisablePasswordLoginDialog: React.FC<Props> = ({ destroy }: Props) => {
|
||||
handleCloseBtnClick();
|
||||
} catch (error: any) {
|
||||
console.error(error);
|
||||
toast.error(error.response.data.message || t("message.updating-setting-failed"));
|
||||
toast.error(error.response.data.message);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -6,7 +6,11 @@ import Icon from "../Icon";
|
||||
import MermaidBlock from "./MermaidBlock";
|
||||
import { BaseProps } from "./types";
|
||||
|
||||
const MERMAID_LANGUAGE = "mermaid";
|
||||
// Special languages that are rendered differently.
|
||||
enum SpecialLanguage {
|
||||
HTML = "__html",
|
||||
MERMAID = "mermaid",
|
||||
}
|
||||
|
||||
interface Props extends BaseProps {
|
||||
language: string;
|
||||
@@ -15,17 +19,14 @@ interface Props extends BaseProps {
|
||||
|
||||
const CodeBlock: React.FC<Props> = ({ language, content }: Props) => {
|
||||
const formatedLanguage = (language || "").toLowerCase() || "text";
|
||||
let highlightedCode = content;
|
||||
|
||||
// Users can set Markdown code blocks as `__html` to render HTML directly.
|
||||
if (formatedLanguage === "__html") {
|
||||
if (formatedLanguage === SpecialLanguage.HTML) {
|
||||
return <div className="w-full overflow-auto !my-2" dangerouslySetInnerHTML={{ __html: content }} />;
|
||||
}
|
||||
|
||||
if (formatedLanguage === MERMAID_LANGUAGE) {
|
||||
} else if (formatedLanguage === SpecialLanguage.MERMAID) {
|
||||
return <MermaidBlock content={content} />;
|
||||
}
|
||||
|
||||
let highlightedCode = content;
|
||||
try {
|
||||
const temp = hljs.highlight(content, {
|
||||
language: formatedLanguage,
|
||||
|
||||
@@ -92,7 +92,7 @@ const ShareMemoDialog: React.FC<Props> = (props: Props) => {
|
||||
);
|
||||
|
||||
if (updatedMemo.visibility == visibility) {
|
||||
toast.success(t("common.changed"));
|
||||
toast.success(t("message.update-succeed"));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -166,7 +166,7 @@
|
||||
"storage": "المساحة التخزينية",
|
||||
"system": "النظام"
|
||||
},
|
||||
"tag-list": {
|
||||
"tag": {
|
||||
"all-tags": "جميع العلامات",
|
||||
"create-tag": "انشاء علامة",
|
||||
"hide": "اخفاء",
|
||||
|
||||
@@ -351,7 +351,7 @@
|
||||
"telegram-bot-token-placeholder": "Dein Telegram Bot token"
|
||||
}
|
||||
},
|
||||
"tag-list": {
|
||||
"tag": {
|
||||
"all-tags": "Alle Tags",
|
||||
"create-tag": "Tag erstellen",
|
||||
"hide": "Ausblenden",
|
||||
|
||||
@@ -40,16 +40,11 @@
|
||||
"type": "Type",
|
||||
"title": "Title",
|
||||
"filter": "Filter",
|
||||
"filter-period": "{{from}} to {{to}}",
|
||||
"tags": "Tags",
|
||||
"yourself": "Yourself",
|
||||
"changed": "changed",
|
||||
"fold": "Fold",
|
||||
"expand": "Expand",
|
||||
"image": "Image",
|
||||
"file": "File",
|
||||
"link": "Link",
|
||||
"vacuum": "Vacuum",
|
||||
"select": "Select",
|
||||
"database": "Database",
|
||||
"upload": "Upload",
|
||||
@@ -84,10 +79,7 @@
|
||||
"cancel-edit": "Cancel edit",
|
||||
"save": "Save",
|
||||
"placeholder": "Any thoughts...",
|
||||
"only-image-supported": "Only image file supported.",
|
||||
"cant-empty": "Content can't be empty",
|
||||
"local": "Local",
|
||||
"resources": "Resources"
|
||||
"local": "Local"
|
||||
},
|
||||
"memo": {
|
||||
"view-detail": "View Detail",
|
||||
@@ -106,7 +98,7 @@
|
||||
"disabled": "Public memos are disabled"
|
||||
},
|
||||
"delete-memo": "Delete Memo",
|
||||
"delete-confirm": "Are you sure you want to delete this memo?\n\nTHIS ACTION IS IRREVERSIBLE",
|
||||
"delete-confirm": "Are you sure you want to delete this memo? THIS ACTION IS IRREVERSIBLE",
|
||||
"comment": {
|
||||
"self": "Comments",
|
||||
"no-comment": "No comment"
|
||||
@@ -118,11 +110,11 @@
|
||||
"copy-link": "Copy Link",
|
||||
"reset-link": "Reset Link",
|
||||
"reset-resource-link": "Reset Resource Link",
|
||||
"reset-link-prompt": "Are you sure to reset the link?\nThis will break all current link usages.\n\nTHIS ACTION IS IRREVERSIBLE",
|
||||
"reset-link-prompt": "Are you sure to reset the link? This will break all current link usages. THIS ACTION IS IRREVERSIBLE",
|
||||
"delete-resource": "Delete Resource",
|
||||
"linked-amount": "Linked amount",
|
||||
"warning-text": "Are you sure to delete this resource?\n\nTHIS ACTION IS IRREVERSIBLE",
|
||||
"warning-text-unused": "Are you sure to delete these unused resources?\n\nTHIS ACTION IS IRREVERSIBLE",
|
||||
"warning-text": "Are you sure to delete this resource? THIS ACTION IS IRREVERSIBLE",
|
||||
"warning-text-unused": "Are you sure to delete these unused resources? THIS ACTION IS IRREVERSIBLE",
|
||||
"no-unused-resources": "No unused resources",
|
||||
"delete-selected-resources": "Delete Selected Resources",
|
||||
"no-files-selected": "No files selected",
|
||||
@@ -148,7 +140,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"tag-list": {
|
||||
"tag": {
|
||||
"tip-text": "Input `#tag` to create",
|
||||
"create-tag": "Create Tag",
|
||||
"all-tags": "All Tags",
|
||||
@@ -206,7 +198,7 @@
|
||||
"storage-services": "Storage services",
|
||||
"create-a-service": "Create a service",
|
||||
"update-a-service": "Update a service",
|
||||
"warning-text": "Are you sure to delete storage service \"{{name}}\"?\n\nTHIS ACTION IS IRREVERSIBLE",
|
||||
"warning-text": "Are you sure to delete storage service \"{{name}}\"? THIS ACTION IS IRREVERSIBLE",
|
||||
"delete-storage": "Delete Storage",
|
||||
"local-storage-path": "Local storage path",
|
||||
"update-local-path": "Update Local Storage Path",
|
||||
@@ -237,7 +229,7 @@
|
||||
"archive-member": "Archive member",
|
||||
"archive-warning": "Are you sure to archive {{username}}?",
|
||||
"delete-member": "Delete Member",
|
||||
"delete-warning": "Are you sure to delete {{username}}?\n\nTHIS ACTION IS IRREVERSIBLE"
|
||||
"delete-warning": "Are you sure to delete {{username}}? THIS ACTION IS IRREVERSIBLE"
|
||||
},
|
||||
"system-section": {
|
||||
"server-name": "Server Name",
|
||||
@@ -276,7 +268,7 @@
|
||||
"sso-section": {
|
||||
"sso-list": "SSO List",
|
||||
"delete-sso": "Confirm delete",
|
||||
"confirm-delete": "Are you sure to delete \"{{name}}\" SSO configuration?\n\nTHIS ACTION IS IRREVERSIBLE",
|
||||
"confirm-delete": "Are you sure to delete \"{{name}}\" SSO configuration? THIS ACTION IS IRREVERSIBLE",
|
||||
"create-sso": "Create SSO",
|
||||
"update-sso": "Update SSO",
|
||||
"sso-created": "SSO {{name}} created",
|
||||
@@ -326,7 +318,6 @@
|
||||
"about-memos": "About memos",
|
||||
"memos-description": "memos is a web-based note-taking application that you can use to write, organize, and share notes.",
|
||||
"no-server-description": "No description configured for this server.",
|
||||
"powered-by": "Powered by",
|
||||
"other-projects": "Other Projects"
|
||||
},
|
||||
"message": {
|
||||
@@ -366,11 +357,7 @@
|
||||
"succeed-update-customized-profile": "Profile successfully customized.",
|
||||
"succeed-update-additional-script": "Additional script updated successfully.",
|
||||
"update-succeed": "Update succeeded",
|
||||
"page-not-found": "404 - Page Not Found",
|
||||
"maximum-upload-size-is": "Maximum allowed upload size is {{size}} MiB",
|
||||
"file-exceeds-upload-limit-of": "File {{file}} exceeds upload limit of {{size}} MiB",
|
||||
"updating-setting-failed": "Updating setting failed",
|
||||
"password-login-disabled": "Can't remove last identity provider when password login is disabled"
|
||||
"maximum-upload-size-is": "Maximum allowed upload size is {{size}} MiB"
|
||||
},
|
||||
"inbox": {
|
||||
"memo-comment": "{{user}} has a comment on your {{memo}}.",
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
"disabled": "Las notas públicas están deshabilitadas"
|
||||
}
|
||||
},
|
||||
"tag-list": {
|
||||
"tag": {
|
||||
"tip-text": "Escribe '#etiqueta' para crearlo"
|
||||
},
|
||||
"setting": {
|
||||
|
||||
@@ -360,7 +360,7 @@
|
||||
"telegram-bot-token-placeholder": "Votre jeton de Bot Telegram"
|
||||
}
|
||||
},
|
||||
"tag-list": {
|
||||
"tag": {
|
||||
"all-tags": "Toutes les Étiquettes",
|
||||
"create-tag": "Créer une Étiquette",
|
||||
"hide": "Cacher",
|
||||
|
||||
@@ -262,7 +262,7 @@
|
||||
},
|
||||
"system": "सिस्टम"
|
||||
},
|
||||
"tag-list": {
|
||||
"tag": {
|
||||
"all-tags": "सभी टैग",
|
||||
"create-tag": "टैग बनाएँ",
|
||||
"tag-name": "टैग_नाम",
|
||||
|
||||
@@ -354,7 +354,7 @@
|
||||
"telegram-bot-token-placeholder": "Tvoj Telegram Bot token"
|
||||
}
|
||||
},
|
||||
"tag-list": {
|
||||
"tag": {
|
||||
"all-tags": "Svi Tagovi",
|
||||
"create-tag": "Stvori Tag",
|
||||
"hide": "Sakrij",
|
||||
|
||||
@@ -248,7 +248,7 @@
|
||||
"telegram-bot-token-placeholder": "Telegram bot tokened"
|
||||
}
|
||||
},
|
||||
"tag-list": {
|
||||
"tag": {
|
||||
"all-tags": "Minden címke",
|
||||
"create-tag": "Címke létrehozása",
|
||||
"hide": "Elrejt",
|
||||
|
||||
@@ -341,7 +341,7 @@
|
||||
"telegram-bot-token-placeholder": "Il token del tuo bot Telegram"
|
||||
}
|
||||
},
|
||||
"tag-list": {
|
||||
"tag": {
|
||||
"all-tags": "Tutti i Tags",
|
||||
"create-tag": "Crea Tag",
|
||||
"invalid-tag-name": "Nome tag non valido",
|
||||
|
||||
@@ -148,7 +148,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"tag-list": {
|
||||
"tag": {
|
||||
"tip-text": "作成するには`#tag`のように入力してください",
|
||||
"create-tag": "タグを作成する",
|
||||
"all-tags": "すべてのタグ",
|
||||
|
||||
@@ -351,7 +351,7 @@
|
||||
"telegram-bot-token-placeholder": "서버의 텔레그램 봇 토큰"
|
||||
}
|
||||
},
|
||||
"tag-list": {
|
||||
"tag": {
|
||||
"all-tags": "모든 태그",
|
||||
"create-tag": "태그 생성",
|
||||
"hide": "숨기기",
|
||||
|
||||
@@ -116,7 +116,7 @@
|
||||
},
|
||||
"no-archived-memos": "Geen gearchiveerde memos."
|
||||
},
|
||||
"tag-list": {
|
||||
"tag": {
|
||||
"tip-text": "Typ `#label` om aan te maken",
|
||||
"create-tag": "Label maken",
|
||||
"all-tags": "Alle labels",
|
||||
|
||||
@@ -227,7 +227,7 @@
|
||||
"server-name": "Nazwa serwera"
|
||||
}
|
||||
},
|
||||
"tag-list": {
|
||||
"tag": {
|
||||
"tip-text": "Wprowadź `#tag` aby utworzyć"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -361,7 +361,7 @@
|
||||
"vacuum-hint": "Limpa dados não utilizados."
|
||||
}
|
||||
},
|
||||
"tag-list": {
|
||||
"tag": {
|
||||
"all-tags": "Todas as Tags",
|
||||
"create-tag": "Criar Tag",
|
||||
"hide": "Ocultar",
|
||||
|
||||
@@ -333,7 +333,7 @@
|
||||
"telegram-bot-token-placeholder": "Ваш токен Telegram бота"
|
||||
}
|
||||
},
|
||||
"tag-list": {
|
||||
"tag": {
|
||||
"all-tags": "Все теги",
|
||||
"create-tag": "Создать тег",
|
||||
"tag-name": "Тег",
|
||||
|
||||
@@ -104,7 +104,7 @@
|
||||
"disabled": "Javne beležke so onemogočene"
|
||||
}
|
||||
},
|
||||
"tag-list": {
|
||||
"tag": {
|
||||
"tip-text": "Vnesite `#značka` za izdalavo",
|
||||
"create-tag": "Kreiraj značko",
|
||||
"all-tags": "Vse značke",
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
"disabled": "Offentliga anteckningar är inaktiverade"
|
||||
}
|
||||
},
|
||||
"tag-list": {
|
||||
"tag": {
|
||||
"tip-text": "Ange `#tag ` för att skapa"
|
||||
},
|
||||
"setting": {
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
"disabled": "Halka açık notlar devre dışı bırakıldı"
|
||||
}
|
||||
},
|
||||
"tag-list": {
|
||||
"tag": {
|
||||
"tip-text": "Oluşturmak için #etiket girin"
|
||||
},
|
||||
"setting": {
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
"disabled": "Public memos are disabled"
|
||||
}
|
||||
},
|
||||
"tag-list": {
|
||||
"tag": {
|
||||
"tip-text": "Введіть `#tag` щоб створити"
|
||||
},
|
||||
"setting": {
|
||||
|
||||
@@ -148,7 +148,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"tag-list": {
|
||||
"tag": {
|
||||
"tip-text": "Nhập `#tag` để tạo mới",
|
||||
"create-tag": "Tạo thẻ",
|
||||
"all-tags": "Tất cả thẻ",
|
||||
@@ -377,4 +377,4 @@
|
||||
"version-update": "Phiên bản mới {{version}} đã có sẵn!"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
"about-memos": "关于 Memos",
|
||||
"memos-description": "Memos 是一个基于网页的笔记应用程序,您可以使用它来编写、组织和共享笔记。",
|
||||
"no-server-description": "没有为此服务器配置描述。",
|
||||
"other-projects": "其他的项目",
|
||||
"powered-by": "Powered by"
|
||||
"other-projects": "其他的项目"
|
||||
},
|
||||
"amount-text": {
|
||||
"memo": "MEMO"
|
||||
@@ -101,7 +100,7 @@
|
||||
"editing": "编辑中...",
|
||||
"local": "本地",
|
||||
"only-image-supported": "仅支持图片文件。",
|
||||
"placeholder": "任何想法...",
|
||||
"placeholder": "此刻的想法...",
|
||||
"resources": "资源库",
|
||||
"save": "保存"
|
||||
},
|
||||
@@ -127,7 +126,7 @@
|
||||
"self": "评论"
|
||||
},
|
||||
"copy-link": "复制链接",
|
||||
"delete-confirm": "您确定要删除此备忘录吗?\n\n此操作不可逆",
|
||||
"delete-confirm": "您确定要删除此备忘录吗?此操作不可逆",
|
||||
"delete-memo": "删除备忘录",
|
||||
"embed": "嵌入",
|
||||
"fetch-more": "点击此处获取更多",
|
||||
@@ -357,7 +356,7 @@
|
||||
"telegram-bot-token-placeholder": "您的 Telegram 机器人 Token"
|
||||
}
|
||||
},
|
||||
"tag-list": {
|
||||
"tag": {
|
||||
"all-tags": "全部标签",
|
||||
"create-tag": "创建标签",
|
||||
"hide": "收起",
|
||||
|
||||
@@ -360,7 +360,7 @@
|
||||
"vacuum-hint": "清理未使用的資料"
|
||||
}
|
||||
},
|
||||
"tag-list": {
|
||||
"tag": {
|
||||
"all-tags": "所有標籤",
|
||||
"create-tag": "建立標籤",
|
||||
"hide": "隱藏",
|
||||
|
||||
Reference in New Issue
Block a user