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
Jérome Perrin
gitlab-ce
Commits
22c80b3c
Commit
22c80b3c
authored
Jun 01, 2017
by
Ruben Davila
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add translations for elapsed time in words
parent
6e82de21
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
72 additions
and
1 deletion
+72
-1
app/serializers/entity_date_helper.rb
app/serializers/entity_date_helper.rb
+1
-1
config/locales/en.yml
config/locales/en.yml
+36
-0
config/locales/es.yml
config/locales/es.yml
+35
-0
No files found.
app/serializers/entity_date_helper.rb
View file @
22c80b3c
...
...
@@ -4,7 +4,7 @@ module EntityDateHelper
def
interval_in_words
(
diff
)
return
'Not started'
unless
diff
"
#{
distance_of_time_in_words
(
Time
.
now
,
diff
)
}
ago"
distance_of_time_in_words
(
Time
.
now
,
diff
,
scope:
'datetime.time_ago_in_words'
)
end
# Converts seconds into a hash such as:
...
...
config/locales/en.yml
View file @
22c80b3c
...
...
@@ -13,3 +13,39 @@ en:
pagination
:
previous
:
"
Prev"
next
:
"
Next"
datetime
:
time_ago_in_words
:
half_a_minute
:
"
half
a
minute
ago"
less_than_x_seconds
:
one
:
"
less
than
1
second
ago"
other
:
"
less
than
%{count}
seconds
ago"
x_seconds
:
one
:
"
1
second
ago"
other
:
"
%{count}
seconds
ago"
less_than_x_minutes
:
one
:
"
less
than
a
minute
ago"
other
:
"
less
than
%{count}
minutes
ago"
x_minutes
:
one
:
"
1
minute
ago"
other
:
"
%{count}
minutes
ago"
about_x_hours
:
one
:
"
about
1
hour
ago"
other
:
"
about
%{count}
hours
ago"
x_days
:
one
:
"
1
day
ago"
other
:
"
%{count}
days
ago"
about_x_months
:
one
:
"
about
1
month
ago"
other
:
"
about
%{count}
months
ago"
x_months
:
one
:
"
1
month
ago"
other
:
"
%{count}
months
ago"
about_x_years
:
one
:
"
about
1
year
ago"
other
:
"
about
%{count}
years
ago"
over_x_years
:
one
:
"
over
1
year
ago"
other
:
"
over
%{count}
years
ago"
almost_x_years
:
one
:
"
almost
1
year
ago"
other
:
"
almost
%{count}
years
ago"
config/locales/es.yml
View file @
22c80b3c
...
...
@@ -61,6 +61,41 @@ es:
-
:month
-
:year
datetime
:
time_ago_in_words
:
half_a_minute
:
"
hace
medio
minuto"
less_than_x_seconds
:
one
:
"
hace
menos
de
1
segundo"
other
:
"
hace
menos
de
%{count}
segundos"
x_seconds
:
one
:
"
hace
1
segundo"
other
:
"
hace
%{count}
segundos"
less_than_x_minutes
:
one
:
"
hace
menos
de
un
minuto"
other
:
"
hace
menos
de
%{count}
minutos"
x_minutes
:
one
:
"
hace
1
minuto"
other
:
"
hace
%{count}
minutos"
about_x_hours
:
one
:
"
hace
alrededor
de
1
hora"
other
:
"
hace
alrededor
de
%{count}
horas"
x_days
:
one
:
"
hace
un
día"
other
:
"
hace
%{count}
días"
about_x_months
:
one
:
"
hace
alrededor
de
1
mes"
other
:
"
hace
alrededor
de
%{count}
meses"
x_months
:
one
:
"
hace
1
mes"
other
:
"
hace
%{count}
meses"
about_x_years
:
one
:
"
hace
alrededor
de
1
año"
other
:
"
hace
alrededor
de
%{count}
años"
over_x_years
:
one
:
"
hace
más
de
1
año"
other
:
"
hace
%{count}
años"
almost_x_years
:
one
:
"
hace
casi
1
año"
other
:
"
hace
casi
%{count}
años"
distance_in_words
:
about_x_hours
:
one
:
alrededor de 1 hora
...
...
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