Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
448d0bc3
Commit
448d0bc3
authored
Apr 03, 2019
by
Sergiu Marton
Committed by
Annabel Dunstone Gray
Apr 03, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace 'x seconds ago' with 'just now'
parent
3de43994
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
6 deletions
+12
-6
app/assets/javascripts/lib/utils/datetime_utility.js
app/assets/javascripts/lib/utils/datetime_utility.js
+7
-3
changelogs/unreleased/fix-issues-time-counter.yml
changelogs/unreleased/fix-issues-time-counter.yml
+5
-0
locale/gitlab.pot
locale/gitlab.pot
+0
-3
No files found.
app/assets/javascripts/lib/utils/datetime_utility.js
View file @
448d0bc3
...
@@ -92,7 +92,7 @@ export const getTimeago = () => {
...
@@ -92,7 +92,7 @@ export const getTimeago = () => {
const
timeAgoLocaleRemaining
=
[
const
timeAgoLocaleRemaining
=
[
()
=>
[
s__
(
'
Timeago|just now
'
),
s__
(
'
Timeago|right now
'
)],
()
=>
[
s__
(
'
Timeago|just now
'
),
s__
(
'
Timeago|right now
'
)],
()
=>
[
s__
(
'
Timeago|
%s seconds ago
'
),
s__
(
'
Timeago|%s seconds remaining
'
)],
()
=>
[
s__
(
'
Timeago|
just now
'
),
s__
(
'
Timeago|%s seconds remaining
'
)],
()
=>
[
s__
(
'
Timeago|1 minute ago
'
),
s__
(
'
Timeago|1 minute remaining
'
)],
()
=>
[
s__
(
'
Timeago|1 minute ago
'
),
s__
(
'
Timeago|1 minute remaining
'
)],
()
=>
[
s__
(
'
Timeago|%s minutes ago
'
),
s__
(
'
Timeago|%s minutes remaining
'
)],
()
=>
[
s__
(
'
Timeago|%s minutes ago
'
),
s__
(
'
Timeago|%s minutes remaining
'
)],
()
=>
[
s__
(
'
Timeago|1 hour ago
'
),
s__
(
'
Timeago|1 hour remaining
'
)],
()
=>
[
s__
(
'
Timeago|1 hour ago
'
),
s__
(
'
Timeago|1 hour remaining
'
)],
...
@@ -121,7 +121,7 @@ export const getTimeago = () => {
...
@@ -121,7 +121,7 @@ export const getTimeago = () => {
const
timeAgoLocale
=
[
const
timeAgoLocale
=
[
()
=>
[
s__
(
'
Timeago|just now
'
),
s__
(
'
Timeago|right now
'
)],
()
=>
[
s__
(
'
Timeago|just now
'
),
s__
(
'
Timeago|right now
'
)],
()
=>
[
s__
(
'
Timeago|
%s seconds ago
'
),
s__
(
'
Timeago|in %s seconds
'
)],
()
=>
[
s__
(
'
Timeago|
just now
'
),
s__
(
'
Timeago|in %s seconds
'
)],
()
=>
[
s__
(
'
Timeago|1 minute ago
'
),
s__
(
'
Timeago|in 1 minute
'
)],
()
=>
[
s__
(
'
Timeago|1 minute ago
'
),
s__
(
'
Timeago|in 1 minute
'
)],
()
=>
[
s__
(
'
Timeago|%s minutes ago
'
),
s__
(
'
Timeago|in %s minutes
'
)],
()
=>
[
s__
(
'
Timeago|%s minutes ago
'
),
s__
(
'
Timeago|in %s minutes
'
)],
()
=>
[
s__
(
'
Timeago|1 hour ago
'
),
s__
(
'
Timeago|in 1 hour
'
)],
()
=>
[
s__
(
'
Timeago|1 hour ago
'
),
s__
(
'
Timeago|in 1 hour
'
)],
...
@@ -160,7 +160,11 @@ export const getTimeago = () => {
...
@@ -160,7 +160,11 @@ export const getTimeago = () => {
* @param {Boolean} setTimeago
* @param {Boolean} setTimeago
*/
*/
export
const
localTimeAgo
=
(
$timeagoEls
,
setTimeago
=
true
)
=>
{
export
const
localTimeAgo
=
(
$timeagoEls
,
setTimeago
=
true
)
=>
{
getTimeago
().
render
(
$timeagoEls
,
timeagoLanguageCode
);
getTimeago
();
$timeagoEls
.
each
((
i
,
el
)
=>
{
$
(
el
).
text
(
timeagoInstance
.
format
(
$
(
el
).
attr
(
'
datetime
'
),
timeagoLanguageCode
));
});
if
(
!
setTimeago
)
{
if
(
!
setTimeago
)
{
return
;
return
;
...
...
changelogs/unreleased/fix-issues-time-counter.yml
0 → 100644
View file @
448d0bc3
---
title
:
Make time counters show 'just now' for everything under one minute
merge_request
:
25992
author
:
Sergiu Marton
type
:
changed
locale/gitlab.pot
View file @
448d0bc3
...
@@ -8359,9 +8359,6 @@ msgstr ""
...
@@ -8359,9 +8359,6 @@ msgstr ""
msgid "Timeago|%s months remaining"
msgid "Timeago|%s months remaining"
msgstr ""
msgstr ""
msgid "Timeago|%s seconds ago"
msgstr ""
msgid "Timeago|%s seconds remaining"
msgid "Timeago|%s seconds remaining"
msgstr ""
msgstr ""
...
...
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