Skip to content

Commit

Permalink
Translate relative time ago. Closes #85
Browse files Browse the repository at this point in the history
  • Loading branch information
henare committed Nov 19, 2015
1 parent 50d9927 commit 562d921
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/helpers/divisions_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ def member_vote_class(member, division)
end

def relative_time(time)
time < 1.month.ago ? formatted_date(time) : "#{time_ago_in_words(time)} ago"
time < 1.month.ago ? formatted_date(time) : _("%{time} ago") % {time: time_ago_in_words(time)}
end

def division_edit_status_class(division)
Expand Down
7 changes: 5 additions & 2 deletions locale/app.pot
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ msgid ""
msgstr ""
"Project-Id-Version: app 1.0.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-11-17 11:11+1100\n"
"PO-Revision-Date: 2015-11-17 11:11+1100\n"
"POT-Creation-Date: 2015-11-19 17:35+1100\n"
"PO-Revision-Date: 2015-11-19 17:35+1100\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
"Language: \n"
Expand All @@ -18,6 +18,9 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"

msgid "%{time} ago"
msgstr ""

msgid "Electorate / State"
msgstr ""

Expand Down
3 changes: 3 additions & 0 deletions locale/uk/app.edit.po
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ msgstr ""
" && (n%100<10 || n%100>=20) ? 1 : 2;\n"
"\n"

msgid "%{time} ago"
msgstr "%{time} тому"

msgid "Electorate / State"
msgstr "Областю"

Expand Down
3 changes: 3 additions & 0 deletions locale/uk/app.po
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ msgstr ""
" && (n%100<10 || n%100>=20) ? 1 : 2;\n"
"\n"

msgid "%{time} ago"
msgstr "%{time} тому"

msgid "Electorate / State"
msgstr "Областю"

Expand Down

0 comments on commit 562d921

Please sign in to comment.