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
8911ea16
Unverified
Commit
8911ea16
authored
May 02, 2023
by
boojack
Committed by
GitHub
May 02, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: update related time format (#1621)
chore: update related time
parent
34700a4c
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
29 additions
and
19 deletions
+29
-19
UsageHeatMap.tsx
web/src/components/UsageHeatMap.tsx
+1
-1
datetime.ts
web/src/helpers/datetime.ts
+11
-0
en.json
web/src/locales/en.json
+4
-4
ko.json
web/src/locales/ko.json
+2
-2
pt-BR.json
web/src/locales/pt-BR.json
+3
-3
zh-Hans.json
web/src/locales/zh-Hans.json
+5
-6
zh-Hant.json
web/src/locales/zh-Hant.json
+3
-3
No files found.
web/src/components/UsageHeatMap.tsx
View file @
8911ea16
...
@@ -110,7 +110,7 @@ const UsageHeatMap = () => {
...
@@ -110,7 +110,7 @@ const UsageHeatMap = () => {
// This interpolation is not being used because of the current styling,
// This interpolation is not being used because of the current styling,
// but it can improve translation quality by giving it a more meaningful context
// but it can improve translation quality by giving it a more meaningful context
const
tMemoInOpts
=
{
amount
:
""
,
period
:
""
,
date
:
""
};
const
tMemoInOpts
=
{
amount
:
memoAmount
,
period
:
""
,
date
:
""
};
return
(
return
(
<>
<>
...
...
web/src/helpers/datetime.ts
View file @
8911ea16
...
@@ -121,6 +121,17 @@ export const getRelativeTimeString = (time: number, locale = i18n.language, form
...
@@ -121,6 +121,17 @@ export const getRelativeTimeString = (time: number, locale = i18n.language, form
const
minMillis
=
secMillis
*
60
;
const
minMillis
=
secMillis
*
60
;
const
hourMillis
=
minMillis
*
60
;
const
hourMillis
=
minMillis
*
60
;
const
dayMillis
=
hourMillis
*
24
;
const
dayMillis
=
hourMillis
*
24
;
// Show full date if more than 1 day ago.
if
(
pastTimeMillis
>=
dayMillis
)
{
return
new
Date
(
time
).
toLocaleDateString
(
locale
,
{
year
:
"numeric"
,
month
:
"numeric"
,
day
:
"numeric"
,
hour
:
"numeric"
,
minute
:
"numeric"
,
second
:
"numeric"
,
});
}
// numeric: "auto" provides "yesterday" for 1 day ago, "always" provides "1 day ago"
// numeric: "auto" provides "yesterday" for 1 day ago, "always" provides "1 day ago"
const
formatOpts
=
{
style
:
formatStyle
,
numeric
:
"auto"
}
as
Intl
.
RelativeTimeFormatOptions
;
const
formatOpts
=
{
style
:
formatStyle
,
numeric
:
"auto"
}
as
Intl
.
RelativeTimeFormatOptions
;
...
...
web/src/locales/en.json
View file @
8911ea16
...
@@ -110,7 +110,7 @@
...
@@ -110,7 +110,7 @@
"reset-link-prompt"
:
"Are you sure to reset the link?
\n
This will break all current link usages.
\n\n
THIS ACTION IS IRREVERSIBLE❗"
,
"reset-link-prompt"
:
"Are you sure to reset the link?
\n
This will break all current link usages.
\n\n
THIS ACTION IS IRREVERSIBLE❗"
,
"delete-resource"
:
"Delete Resource"
,
"delete-resource"
:
"Delete Resource"
,
"linked-amount"
:
"Linked amount"
,
"linked-amount"
:
"Linked amount"
,
"warning-text"
:
"Are you sure to delete this resource?
\n\n
THIS ACTION IS IRREVERSIBLE❗"
,
"warning-text"
:
"Are you sure to delete this resource?
\n\n
THIS ACTION IS IRREVERSIBLE❗"
,
"warning-text-unused"
:
"Are you sure to delete these unused resources?
\n\n
THIS ACTION IS IRREVERSIBLE❗"
,
"warning-text-unused"
:
"Are you sure to delete these unused resources?
\n\n
THIS ACTION IS IRREVERSIBLE❗"
,
"no-unused-resources"
:
"No unused resources"
,
"no-unused-resources"
:
"No unused resources"
,
"delete-selected-resources"
:
"Delete Selected Resources"
,
"delete-selected-resources"
:
"Delete Selected Resources"
,
...
@@ -373,8 +373,8 @@
...
@@ -373,8 +373,8 @@
"copy"
:
"Copy"
"copy"
:
"Copy"
},
},
"heatmap"
:
{
"heatmap"
:
{
"memo-in"
:
"
{{amount}}
memo in {{period}}"
,
"memo-in"
:
"memo in {{period}}"
,
"memos-in"
:
"
{{amount}}
memos in {{period}}"
,
"memos-in"
:
"memos in {{period}}"
,
"memo-on"
:
"{{amount}} memo on {{date}}"
,
"memo-on"
:
"{{amount}} memo on {{date}}"
,
"memos-on"
:
"{{amount}} memos on {{date}}"
,
"memos-on"
:
"{{amount}} memos on {{date}}"
,
"day"
:
"day"
,
"day"
:
"day"
,
...
@@ -387,4 +387,4 @@
...
@@ -387,4 +387,4 @@
"powered-by"
:
"Powered by"
,
"powered-by"
:
"Powered by"
,
"other-projects"
:
"Other Projects"
"other-projects"
:
"Other Projects"
}
}
}
}
\ No newline at end of file
web/src/locales/ko.json
View file @
8911ea16
...
@@ -373,8 +373,8 @@
...
@@ -373,8 +373,8 @@
"copy"
:
"복사"
"copy"
:
"복사"
},
},
"heatmap"
:
{
"heatmap"
:
{
"memo-in"
:
"
{{period}}
동안 메모 {{amount}}개 작성"
,
"memo-in"
:
"동안 메모 {{amount}}개 작성"
,
"memos-in"
:
"
{{period}}
동안 메모 {{amount}}개 작성"
,
"memos-in"
:
"동안 메모 {{amount}}개 작성"
,
"memo-on"
:
"{{date}}에 메모 {{amount}}개 작성"
,
"memo-on"
:
"{{date}}에 메모 {{amount}}개 작성"
,
"memos-on"
:
"{{date}}에 메모 {{amount}}개 작성"
,
"memos-on"
:
"{{date}}에 메모 {{amount}}개 작성"
,
"day"
:
"일"
,
"day"
:
"일"
,
...
...
web/src/locales/pt-BR.json
View file @
8911ea16
...
@@ -110,7 +110,7 @@
...
@@ -110,7 +110,7 @@
"reset-link-prompt"
:
"Tem certeza de que deseja redefinir o link?
\n
Isso quebrará todos os vínculos atuais.
\n\n
ESTA AÇÃO É IRREVERSÍVEL❗"
,
"reset-link-prompt"
:
"Tem certeza de que deseja redefinir o link?
\n
Isso quebrará todos os vínculos atuais.
\n\n
ESTA AÇÃO É IRREVERSÍVEL❗"
,
"delete-resource"
:
"Deletar recurso"
,
"delete-resource"
:
"Deletar recurso"
,
"linked-amount"
:
"Quantidade de vínculos"
,
"linked-amount"
:
"Quantidade de vínculos"
,
"warning-text"
:
"Tem certeza de que deseja deletar este recurso?
\n\n
ESTA AÇÃO É IRREVERSÍVEL❗"
,
"warning-text"
:
"Tem certeza de que deseja deletar este recurso?
\n\n
ESTA AÇÃO É IRREVERSÍVEL❗"
,
"warning-text-unused"
:
"Tem certeza de que deseja deletar este recurso não utilizado?
\n\n
ESTA AÇÃO É IRREVERSÍVEL❗"
,
"warning-text-unused"
:
"Tem certeza de que deseja deletar este recurso não utilizado?
\n\n
ESTA AÇÃO É IRREVERSÍVEL❗"
,
"no-unused-resources"
:
"Nenhum recurso não utilizado"
,
"no-unused-resources"
:
"Nenhum recurso não utilizado"
,
"delete-selected-resources"
:
"Deletar recursos selecionados"
,
"delete-selected-resources"
:
"Deletar recursos selecionados"
,
...
@@ -373,8 +373,8 @@
...
@@ -373,8 +373,8 @@
"copy"
:
"Copiar"
"copy"
:
"Copiar"
},
},
"heatmap"
:
{
"heatmap"
:
{
"memo-in"
:
"
{{amount}}
memo em {{period}}"
,
"memo-in"
:
"memo em {{period}}"
,
"memos-in"
:
"
{{amount}}
memos em {{period}}"
,
"memos-in"
:
"memos em {{period}}"
,
"memo-on"
:
"{{amount}} memo em {{date}}"
,
"memo-on"
:
"{{amount}} memo em {{date}}"
,
"memos-on"
:
"{{amount}} memos em {{date}}"
,
"memos-on"
:
"{{amount}} memos em {{date}}"
,
"day"
:
"dia"
,
"day"
:
"dia"
,
...
...
web/src/locales/zh-Hans.json
View file @
8911ea16
...
@@ -98,7 +98,7 @@
...
@@ -98,7 +98,7 @@
"username"
:
"用户名"
,
"username"
:
"用户名"
,
"vacuum"
:
"清理未使用资源"
,
"vacuum"
:
"清理未使用资源"
,
"version"
:
"版本"
,
"version"
:
"版本"
,
"visibility"
:
"可见
度
"
,
"visibility"
:
"可见
性
"
,
"yourself"
:
"你自己"
"yourself"
:
"你自己"
},
},
"daily-review"
:
{
"daily-review"
:
{
...
@@ -155,7 +155,7 @@
...
@@ -155,7 +155,7 @@
"tag"
:
"标签"
,
"tag"
:
"标签"
,
"text"
:
"文本"
,
"text"
:
"文本"
,
"type"
:
"类型"
,
"type"
:
"类型"
,
"visibility"
:
"可见
度
"
"visibility"
:
"可见
性
"
},
},
"value"
:
{
"value"
:
{
"has-attachment"
:
"包含附件"
,
"has-attachment"
:
"包含附件"
,
...
@@ -166,9 +166,9 @@
...
@@ -166,9 +166,9 @@
"heatmap"
:
{
"heatmap"
:
{
"day"
:
"天"
,
"day"
:
"天"
,
"days"
:
"天"
,
"days"
:
"天"
,
"memo-in"
:
"{{period}} 记了 {{amount}} 条备忘录"
,
"memo-in"
:
" 条 memos"
,
"memos-in"
:
" 条 memos"
,
"memo-on"
:
"{{date}} 记了 {{amount}} 条备忘录"
,
"memo-on"
:
"{{date}} 记了 {{amount}} 条备忘录"
,
"memos-in"
:
"{{period}} 记了 {{amount}} 条备忘录"
,
"memos-on"
:
"{{date}} 记了 {{amount}} 条备忘录"
"memos-on"
:
"{{date}} 记了 {{amount}} 条备忘录"
},
},
"memo"
:
{
"memo"
:
{
...
@@ -324,7 +324,6 @@
...
@@ -324,7 +324,6 @@
"daily-review-time-offset"
:
"每日回顾时间偏移"
,
"daily-review-time-offset"
:
"每日回顾时间偏移"
,
"default-memo-sort-option"
:
"备忘录显示时间"
,
"default-memo-sort-option"
:
"备忘录显示时间"
,
"default-memo-visibility"
:
"默认备忘录可见性"
,
"default-memo-visibility"
:
"默认备忘录可见性"
,
"default-resource-visibility"
:
"默认资源可见度"
,
"editor-font-style"
:
"编辑器字体样式"
,
"editor-font-style"
:
"编辑器字体样式"
,
"enable-double-click"
:
"开启双击编辑"
,
"enable-double-click"
:
"开启双击编辑"
,
"enable-folding-memo"
:
"开启折叠备忘录"
,
"enable-folding-memo"
:
"开启折叠备忘录"
,
...
@@ -428,4 +427,4 @@
...
@@ -428,4 +427,4 @@
"tag-name"
:
"标签名称"
,
"tag-name"
:
"标签名称"
,
"tip-text"
:
"输入`#tag`来创建标签"
"tip-text"
:
"输入`#tag`来创建标签"
}
}
}
}
\ No newline at end of file
web/src/locales/zh-Hant.json
View file @
8911ea16
...
@@ -110,7 +110,7 @@
...
@@ -110,7 +110,7 @@
"reset-link-prompt"
:
"您確定要重設連結?
\n
這將會破壞所有目前的使用中的連結。
\n\n
此動作為不可逆❗"
,
"reset-link-prompt"
:
"您確定要重設連結?
\n
這將會破壞所有目前的使用中的連結。
\n\n
此動作為不可逆❗"
,
"delete-resource"
:
"刪除資源"
,
"delete-resource"
:
"刪除資源"
,
"linked-amount"
:
"連結的 Memo 數量"
,
"linked-amount"
:
"連結的 Memo 數量"
,
"warning-text"
:
"您確定要刪除此資源?
\n\n
此動作為不可逆❗"
,
"warning-text"
:
"您確定要刪除此資源?
\n\n
此動作為不可逆❗"
,
"warning-text-unused"
:
"您確定要刪除這些未使用的資源?
\n\n
此動作為不可逆❗"
,
"warning-text-unused"
:
"您確定要刪除這些未使用的資源?
\n\n
此動作為不可逆❗"
,
"no-unused-resources"
:
"無未使用的資源"
,
"no-unused-resources"
:
"無未使用的資源"
,
"delete-selected-resources"
:
"刪除所選的資源"
,
"delete-selected-resources"
:
"刪除所選的資源"
,
...
@@ -373,8 +373,8 @@
...
@@ -373,8 +373,8 @@
"copy"
:
"複製"
"copy"
:
"複製"
},
},
"heatmap"
:
{
"heatmap"
:
{
"memo-in"
:
"
{{amount}}
memo in {{period}}"
,
"memo-in"
:
"memo in {{period}}"
,
"memos-in"
:
"
{{amount}}
memos in {{period}}"
,
"memos-in"
:
"memos in {{period}}"
,
"memo-on"
:
"{{amount}} memo on {{date}}"
,
"memo-on"
:
"{{amount}} memo on {{date}}"
,
"memos-on"
:
"{{amount}} memos on {{date}}"
,
"memos-on"
:
"{{amount}} memos on {{date}}"
,
"day"
:
"天"
,
"day"
:
"天"
,
...
...
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