Skip to content

Commit 3669ff4

Browse files
authored
Merge pull request #3135 from imagineclarity/master
Fix localization of "time ago in words"
2 parents 0a5a457 + bf4247d commit 3669ff4

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

app/views/rails_admin/main/dashboard.html.haml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@
1818
%span.show= link_to capitalize_first_letter(abstract_model.config.label_plural), index_path, class: 'pjax'
1919
%td
2020
- if last_created
21-
= time_ago_in_words last_created
22-
= t "admin.misc.ago"
21+
= t "admin.misc.time_ago", time: time_ago_in_words(last_created)
2322
%td
2423
- count = @count[abstract_model.model.name]
2524
- percent = count > 0 ? (@max <= 1 ? count : ((Math.log(count+1) * 100.0) / Math.log(@max+1)).to_i) : -1

config/locales/rails_admin.en.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ en:
4343
navigation: "Navigation"
4444
navigation_static_label: "Links"
4545
log_out: "Log out"
46-
ago: "ago"
46+
time_ago: "%{time} ago"
4747
more: "Plus %{count} more %{models_name}"
4848
flash:
4949
successful: "%{name} successfully %{action}"

0 commit comments

Comments
 (0)