Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
22c80b3c
G
gitlab-foss
项目概览
李少辉-开发者
/
gitlab-foss
通知
15
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
gitlab-foss
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
22c80b3c
编写于
6月 01, 2017
作者:
R
Ruben Davila
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add translations for elapsed time in words
上级
6e82de21
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
72 addition
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
未找到文件。
app/serializers/entity_date_helper.rb
浏览文件 @
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
浏览文件 @
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
浏览文件 @
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
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录