Skip to content

armgit / memos

Public Imported from GitHub
0

Memos is an open-source, self-hosted note-taking app that brings your everyday thoughts together in a personal timeline. Your data stays yours, and you choose what to keep private or share.

chore: improve localization (#3190)

imikod8356ebc46b6e
diff --git a/web/src/components/CreateMemoRelationDialog.tsx b/web/src/components/CreateMemoRelationDialog.tsx
index 32d82cb0e..0fb68b6ef 100644
--- a/web/src/components/CreateMemoRelationDialog.tsx
+++ b/web/src/components/CreateMemoRelationDialog.tsx
@@ -85,7 +85,7 @@ const CreateMemoRelationDialog: React.FC<Props> = (props: Props) => {
return (
<>
<div className="dialog-header-container !w-96">
- <p className="title-text">{"Add references"}</p>
+ <p className="title-text">{t("reference.add-references")}</p>
<IconButton size="sm" onClick={() => destroy()}>
<Icon.X className="w-5 h-auto" />
</IconButton>
@@ -96,8 +96,8 @@ const CreateMemoRelationDialog: React.FC<Props> = (props: Props) => {
size="md"
clearOnBlur
disableClearable
- placeholder={"Search content"}
- noOptionsText={"No memos found"}
+ placeholder={t("reference.search-bar-placeholder")}
+ noOptionsText={t("reference.no-memos-found")}
options={filteredMemos}
loading={isFetching}
inputValue={searchText}
@@ -130,7 +130,7 @@ const CreateMemoRelationDialog: React.FC<Props> = (props: Props) => {
onChange={(_, value) => setSelectedMemos(value)}
/>
<div className="mt-3">
- <Checkbox label={"Use as Embedded Content"} checked={embedded} onChange={(e) => setEmbedded(e.target.checked)} />
+ <Checkbox label={t("reference.embedded-usage")} checked={embedded} onChange={(e) => setEmbedded(e.target.checked)} />
</div>
<div className="mt-4 w-full flex flex-row justify-end items-center space-x-1">
<Button variant="plain" color="neutral" onClick={handleCloseDialog}>
diff --git a/web/src/components/PersonalStatistics.tsx b/web/src/components/PersonalStatistics.tsx
index 0afe9b073..b3175dae7 100644
--- a/web/src/components/PersonalStatistics.tsx
+++ b/web/src/components/PersonalStatistics.tsx
@@ -43,21 +43,21 @@ const PersonalStatistics = (props: Props) => {
<div className="w-full flex justify-between items-center">
<div className="w-full flex justify-start items-center">
<Icon.CalendarDays className="w-4 h-auto mr-1" />
- <span className="block text-base sm:text-sm">Days</span>
+ <span className="block text-base sm:text-sm">{t("common.days")}</span>
</div>
<span className="font-mono">{days}</span>
</div>
<div className="w-full flex justify-between items-center">
<div className="w-full flex justify-start items-center">
<Icon.Library className="w-4 h-auto mr-1" />
- <span className="block text-base sm:text-sm">Memos</span>
+ <span className="block text-base sm:text-sm">{t("common.memos")}</span>
</div>
{isRequesting ? <Icon.Loader className="animate-spin w-4 h-auto text-gray-400" /> : <span className="font-mono">{memoAmount}</span>}
</div>
<div className="w-full flex justify-between items-center">
<div className="w-full flex justify-start items-center">
<Icon.Hash className="w-4 h-auto mr-1" />
- <span className="block text-base sm:text-sm">Tags</span>
+ <span className="block text-base sm:text-sm">{t("common.tags")}</span>
</div>
<span className="font-mono">{tags}</span>
</div>
diff --git a/web/src/locales/en.json b/web/src/locales/en.json
index ad7bb739a..e47dee826 100644
--- a/web/src/locales/en.json
+++ b/web/src/locales/en.json
@@ -62,7 +62,9 @@
"search": "Search",
"role": "Role",
"description": "Description",
- "statistics": "Statistics"
+ "statistics": "Statistics",
+ "days": "Days",
+ "memos": "Memos"
},
"router": {
"go-to-home": "Go to Home",
@@ -107,6 +109,12 @@
},
"show-more": "Show more"
},
+ "reference": {
+ "add-references": "Add references",
+ "search-bar-placeholder": "Search content",
+ "no-memos-found": "No memos found",
+ "embedded-usage": "Use as Embedded Content"
+ },
"resource": {
"no-resources": "No resources.",
"fetching-data": "Fetching data…",