Merge branch 'fix-issues-time-counter' into 'master'
Replace 'x seconds ago' with 'just now' Closes #58425 See merge request gitlab-org/gitlab-ce!25992
This commit is contained in:
commit
14bbc9362a
3 changed files with 12 additions and 6 deletions
|
@ -92,7 +92,7 @@ export const getTimeago = () => {
|
|||
|
||||
const timeAgoLocaleRemaining = [
|
||||
() => [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|%s minutes ago'), s__('Timeago|%s minutes remaining')],
|
||||
() => [s__('Timeago|1 hour ago'), s__('Timeago|1 hour remaining')],
|
||||
|
@ -121,7 +121,7 @@ export const getTimeago = () => {
|
|||
|
||||
const timeAgoLocale = [
|
||||
() => [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|%s minutes ago'), s__('Timeago|in %s minutes')],
|
||||
() => [s__('Timeago|1 hour ago'), s__('Timeago|in 1 hour')],
|
||||
|
@ -160,7 +160,11 @@ export const getTimeago = () => {
|
|||
* @param {Boolean} setTimeago
|
||||
*/
|
||||
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) {
|
||||
return;
|
||||
|
|
5
changelogs/unreleased/fix-issues-time-counter.yml
Normal file
5
changelogs/unreleased/fix-issues-time-counter.yml
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: Make time counters show 'just now' for everything under one minute
|
||||
merge_request: 25992
|
||||
author: Sergiu Marton
|
||||
type: changed
|
|
@ -8359,9 +8359,6 @@ msgstr ""
|
|||
msgid "Timeago|%s months remaining"
|
||||
msgstr ""
|
||||
|
||||
msgid "Timeago|%s seconds ago"
|
||||
msgstr ""
|
||||
|
||||
msgid "Timeago|%s seconds remaining"
|
||||
msgstr ""
|
||||
|
||||
|
|
Loading…
Reference in a new issue