Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
canifa_note
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Vũ Hoàng Anh
canifa_note
Commits
40a5503d
Commit
40a5503d
authored
May 08, 2024
by
Steven
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: tweak i18n locales
parent
16670b6b
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
13 additions
and
55 deletions
+13
-55
ChangeMemoCreatedTsDialog.tsx
web/src/components/ChangeMemoCreatedTsDialog.tsx
+1
-1
CreateMemoRelationDialog.tsx
web/src/components/CreateMemoRelationDialog.tsx
+1
-1
AddMemoRelationButton.tsx
...ponents/MemoEditor/ActionButton/AddMemoRelationButton.tsx
+1
-3
MemberSection.tsx
web/src/components/Settings/MemberSection.tsx
+1
-1
WorkspaceSection.tsx
web/src/components/Settings/WorkspaceSection.tsx
+2
-2
ShareMemoDialog.tsx
web/src/components/ShareMemoDialog.tsx
+1
-5
UpdateCustomizedProfileDialog.tsx
web/src/components/UpdateCustomizedProfileDialog.tsx
+2
-2
en.json
web/src/locales/en.json
+2
-38
SignIn.tsx
web/src/pages/SignIn.tsx
+1
-1
SignUp.tsx
web/src/pages/SignUp.tsx
+1
-1
No files found.
web/src/components/ChangeMemoCreatedTsDialog.tsx
View file @
40a5503d
...
...
@@ -48,7 +48,7 @@ const ChangeMemoCreatedTsDialog: React.FC<Props> = (props: Props) => {
},
[
"created_ts"
],
);
toast
.
success
(
t
(
"message.memo-updated-datetime"
)
);
toast
.
success
(
"Updated memo created time successfully."
);
handleCloseBtnClick
();
}
catch
(
error
:
any
)
{
console
.
error
(
error
);
...
...
web/src/components/CreateMemoRelationDialog.tsx
View file @
40a5503d
...
...
@@ -96,7 +96,7 @@ const CreateMemoRelationDialog: React.FC<Props> = (props: Props) => {
size=
"md"
clearOnBlur
disableClearable
placeholder=
{
t
(
"reference.search-
bar-
placeholder"
)
}
placeholder=
{
t
(
"reference.search-placeholder"
)
}
noOptionsText=
{
t
(
"reference.no-memos-found"
)
}
options=
{
filteredMemos
}
loading=
{
isFetching
}
...
...
web/src/components/MemoEditor/ActionButton/AddMemoRelationButton.tsx
View file @
40a5503d
...
...
@@ -5,7 +5,6 @@ import toast from "react-hot-toast";
import
showCreateMemoRelationDialog
from
"@/components/CreateMemoRelationDialog"
;
import
Icon
from
"@/components/Icon"
;
import
{
MemoRelation_Type
}
from
"@/types/proto/api/v1/memo_relation_service"
;
import
{
useTranslate
}
from
"@/utils/i18n"
;
import
{
EditorRefActions
}
from
"../Editor"
;
import
{
MemoEditorContext
}
from
"../types"
;
...
...
@@ -16,7 +15,6 @@ interface Props {
const
AddMemoRelationButton
=
(
props
:
Props
)
=>
{
const
{
editorRef
}
=
props
;
const
context
=
useContext
(
MemoEditorContext
);
const
t
=
useTranslate
();
const
handleAddMemoRelationBtnClick
=
()
=>
{
showCreateMemoRelationDialog
({
...
...
@@ -24,7 +22,7 @@ const AddMemoRelationButton = (props: Props) => {
// If embedded mode is enabled, embed the memo instead of creating a relation.
if
(
embedded
)
{
if
(
!
editorRef
.
current
)
{
toast
.
error
(
t
(
"message.failed-to-embed-memo"
)
);
toast
.
error
(
"Failed to embed memo"
);
return
;
}
...
...
web/src/components/Settings/MemberSection.tsx
View file @
40a5503d
...
...
@@ -71,7 +71,7 @@ const MemberSection = () => {
const
handleCreateUserBtnClick
=
async
()
=>
{
if
(
state
.
creatingUser
.
username
===
""
||
state
.
creatingUser
.
password
===
""
)
{
toast
.
error
(
t
(
"message.fill-
form
"
));
toast
.
error
(
t
(
"message.fill-
all
"
));
return
;
}
...
...
web/src/components/Settings/WorkspaceSection.tsx
View file @
40a5503d
...
...
@@ -103,7 +103,7 @@ const WorkspaceSection = () => {
console
.
error
(
error
);
return
;
}
toast
.
success
(
t
(
"message.
succeed-update-additional-style
"
));
toast
.
success
(
t
(
"message.
update-succeed
"
));
};
const
handleAdditionalScriptChanged
=
(
value
:
string
)
=>
{
...
...
@@ -123,7 +123,7 @@ const WorkspaceSection = () => {
console
.
error
(
error
);
return
;
}
toast
.
success
(
t
(
"message.
succeed-update-additional-script
"
));
toast
.
success
(
t
(
"message.
update-succeed
"
));
};
const
handleDisablePublicMemosChanged
=
async
(
value
:
boolean
)
=>
{
...
...
web/src/components/ShareMemoDialog.tsx
View file @
40a5503d
...
...
@@ -75,11 +75,7 @@ const ShareMemoDialog: React.FC<Props> = (props: Props) => {
const
handleCopyLinkBtnClick
=
()
=>
{
copy
(
`
${
window
.
location
.
origin
}
/m/
${
memo
.
uid
}
`
);
if
(
memo
.
visibility
!==
Visibility
.
PUBLIC
)
{
toast
.
success
(
t
(
"message.succeed-copy-link-not-public"
));
}
else
{
toast
.
success
(
t
(
"message.succeed-copy-link"
));
}
toast
.
success
(
t
(
"message.succeed-copy-link"
));
};
const
handleMemoVisibilityOptionChanged
=
async
(
visibility
:
Visibility
)
=>
{
...
...
web/src/components/UpdateCustomizedProfileDialog.tsx
View file @
40a5503d
...
...
@@ -78,7 +78,7 @@ const UpdateCustomizedProfileDialog: React.FC<Props> = ({ destroy }: Props) => {
const
handleSaveButtonClick
=
async
()
=>
{
if
(
customProfile
.
title
===
""
)
{
toast
.
error
(
t
(
"message.fill-server-name"
)
);
toast
.
error
(
"Title cannot be empty."
);
return
;
}
...
...
@@ -94,7 +94,7 @@ const UpdateCustomizedProfileDialog: React.FC<Props> = ({ destroy }: Props) => {
console
.
error
(
error
);
return
;
}
toast
.
success
(
t
(
"message.
succeed-update-customized-profile
"
));
toast
.
success
(
t
(
"message.
update-succeed
"
));
destroy
();
};
...
...
web/src/locales/en.json
View file @
40a5503d
...
...
@@ -89,19 +89,12 @@
"any-thoughts"
:
"Any thoughts..."
,
"save"
:
"Save"
},
"embed-memo"
:
{
"copy"
:
"Copy"
,
"only-public-supported"
:
"* Only public memos can be embedded."
,
"text"
:
"Copy and paste the below code into your blog or website."
,
"title"
:
"Embed Memo"
},
"inbox"
:
{
"memo-comment"
:
"{{user}} has a comment on your {{memo}}."
,
"version-update"
:
"New version {{version}} is available now!"
},
"memo"
:
{
"archived-at"
:
"Archived at"
,
"archived-memos"
:
"Archived Memos"
,
"comment"
:
{
"no-comment"
:
"No comment"
,
"self"
:
"Comments"
...
...
@@ -128,42 +121,17 @@
"message"
:
{
"archived-successfully"
:
"Archived successfully"
,
"change-memo-created-time"
:
"Change memo created time"
,
"change-resource-filename"
:
"Change resource filename"
,
"click-to-save-the-image"
:
"Click to save the image"
,
"copied"
:
"Copied"
,
"count-selected-resources"
:
"Total selected"
,
"deleted-successfully"
:
"Deleted successfully"
,
"failed-to-embed-memo"
:
"Failed to embed memo"
,
"fill-all"
:
"Please fill in all fields."
,
"fill-form"
:
"Please fill out this form"
,
"fill-server-name"
:
"Please fill in the server name"
,
"generating-the-screenshot"
:
"Generating the screenshot…"
,
"image-load-failed"
:
"Image load failed"
,
"invalid-created-datetime"
:
"Invalid created datetime."
,
"invalid-resource-filename"
:
"Invalid filename."
,
"login-failed"
:
"Login failed"
,
"maximum-upload-size-is"
:
"Maximum allowed upload size is {{size}} MiB"
,
"memo-not-found"
:
"Memo not found."
,
"memo-updated-datetime"
:
"Memo created datetime changed."
,
"memos-ready"
:
"all memos are ready"
,
"new-password-not-match"
:
"New passwords do not match."
,
"no-data"
:
"No data found."
,
"password-changed"
:
"Password Changed"
,
"password-not-match"
:
"Passwords do not match."
,
"private-only"
:
"This memo is set to private."
,
"resource-filename-updated"
:
"Resource filename changed."
,
"resource-ready"
:
"all resource are ready"
,
"restored-successfully"
:
"Restored successfully"
,
"signup-failed"
:
"Signup failed"
,
"succeed-copy-code"
:
"Code copied successfully."
,
"succeed-copy-content"
:
"Content copied successfully."
,
"succeed-copy-link"
:
"Link copied successfully."
,
"succeed-copy-link-not-public"
:
"Content copied successfully. This memo is not accessible without logging in."
,
"succeed-copy-resource-link"
:
"Resource link copied successfully."
,
"succeed-update-additional-script"
:
"Additional script updated successfully."
,
"succeed-update-additional-style"
:
"Additional style updated successfully."
,
"succeed-update-customized-profile"
:
"Profile successfully customized."
,
"succeed-vacuum-database"
:
"Successfully vacuumed database."
,
"update-succeed"
:
"Update succeeded"
,
"user-not-found"
:
"User not found"
},
...
...
@@ -171,7 +139,7 @@
"add-references"
:
"Add references"
,
"embedded-usage"
:
"Use as Embedded Content"
,
"no-memos-found"
:
"No memos found"
,
"search-
bar-
placeholder"
:
"Search content"
"search-placeholder"
:
"Search content"
},
"resource"
:
{
"clear"
:
"Clear"
,
...
...
@@ -203,11 +171,7 @@
"no-unused-resources"
:
"No unused resources"
,
"reset-link"
:
"Reset Link"
,
"reset-link-prompt"
:
"Are you sure to reset the link? This will break all current link usages. THIS ACTION IS IRREVERSIBLE"
,
"reset-resource-link"
:
"Reset Resource Link"
,
"search-bar-placeholder"
:
"Search resource"
,
"upload-successfully"
:
"Upload successfully"
,
"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"
"reset-resource-link"
:
"Reset Resource Link"
},
"router"
:
{
"back-to-top"
:
"Back to Top"
,
...
...
web/src/pages/SignIn.tsx
View file @
40a5503d
...
...
@@ -85,7 +85,7 @@ const SignIn = () => {
navigateTo
(
"/"
);
}
catch
(
error
:
any
)
{
console
.
error
(
error
);
toast
.
error
((
error
as
ClientError
).
details
||
t
(
"message.login-failed"
)
);
toast
.
error
((
error
as
ClientError
).
details
||
"Failed to sign in."
);
}
actionBtnLoadingState
.
setFinish
();
};
...
...
web/src/pages/SignUp.tsx
View file @
40a5503d
...
...
@@ -66,7 +66,7 @@ const SignUp = () => {
navigateTo
(
"/"
);
}
catch
(
error
:
any
)
{
console
.
error
(
error
);
toast
.
error
((
error
as
ClientError
).
details
||
t
(
"message.signup-failed"
)
);
toast
.
error
((
error
as
ClientError
).
details
||
"Sign up failed"
);
}
actionBtnLoadingState
.
setFinish
();
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment