Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-web
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-web
Commits
997dd579
Commit
997dd579
authored
3 months ago
by
Léopold Chappuis
Committed by
Adrien Béraud
3 months ago
Browse files
Options
Downloads
Patches
Plain Diff
locales: fix invalid languageTag
Change-Id: I21d27522f034e21a71f48e38ac6c6daae49a8bd2
parent
3b1bd631
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
client/src/utils/dates×.ts
+6
-3
6 additions, 3 deletions
client/src/utils/dates×.ts
with
6 additions
and
3 deletions
client/src/utils/dates×.ts
+
6
−
3
View file @
997dd579
...
@@ -24,12 +24,15 @@ export const formatTime = (time: Dayjs, i18n: i18n) => {
...
@@ -24,12 +24,15 @@ export const formatTime = (time: Dayjs, i18n: i18n) => {
}
}
export
const
formatRelativeDate
=
(
time
:
Dayjs
,
i18n
:
i18n
)
=>
{
export
const
formatRelativeDate
=
(
time
:
Dayjs
,
i18n
:
i18n
)
=>
{
let
languageTag
=
i18n
.
language
languageTag
=
languageTag
.
replace
(
/_/g
,
'
-
'
)
if
(
time
.
isToday
())
{
if
(
time
.
isToday
())
{
return
new
Intl
.
RelativeTimeFormat
(
i18n
.
language
,
{
numeric
:
'
auto
'
}).
format
(
0
,
'
day
'
)
return
new
Intl
.
RelativeTimeFormat
(
language
Tag
,
{
numeric
:
'
auto
'
}).
format
(
0
,
'
day
'
)
}
else
if
(
time
.
isYesterday
())
{
}
else
if
(
time
.
isYesterday
())
{
return
new
Intl
.
RelativeTimeFormat
(
i18n
.
language
,
{
numeric
:
'
auto
'
}).
format
(
-
1
,
'
day
'
)
return
new
Intl
.
RelativeTimeFormat
(
language
Tag
,
{
numeric
:
'
auto
'
}).
format
(
-
1
,
'
day
'
)
}
else
{
}
else
{
return
dayjs
(
time
).
locale
(
i18n
.
language
).
format
(
'
L
'
)
return
dayjs
(
time
).
locale
(
language
Tag
).
format
(
'
L
'
)
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment