diff options
author | Raine Virta <rane@kapsi.fi> | 2009-03-04 21:20:45 +0200 |
---|---|---|
committer | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2009-03-05 18:59:08 +0100 |
commit | c00d55c37adacdcf31def6aa67f3e4beaf394950 (patch) | |
tree | cb05c2b354db5af1d17ed9ae9d0c3b77e57be2d8 /data/rbot/plugins/lastfm.rb | |
parent | f5849552e821b847bdb2034052ec91f0bf544be3 (diff) |
lastfm: use gettext in album format
Diffstat (limited to 'data/rbot/plugins/lastfm.rb')
-rw-r--r-- | data/rbot/plugins/lastfm.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/data/rbot/plugins/lastfm.rb b/data/rbot/plugins/lastfm.rb index f97da63f..c43f6e90 100644 --- a/data/rbot/plugins/lastfm.rb +++ b/data/rbot/plugins/lastfm.rb @@ -318,9 +318,9 @@ class LastFmPlugin < Plugin album = if albumtxt year = get_album(artist, albumtxt)[2] if year - "[#{albumtxt}, #{year}]" + _(" [%{albumtext}, %{year}]") % { :albumtext => albumtxt, :year => year } else - "[#{albumtxt}]" + _(" [%{albumtext}]") % { :albumtext => albumtxt } end else nil @@ -336,14 +336,14 @@ class LastFmPlugin < Plugin if @registry.has_key? "#{m.sourcenick}_verb_present" verb = @registry["#{m.sourcenick}_verb_present"] end - reply = _("%{u} %{v} \"%{t}\" by %{a} %{b}") % {:u => user, :v => verb, :t => track, :a => artist, :b => album} + reply = _("%{u} %{v} \"%{t}\" by %{a}%{b}") % {:u => user, :v => verb, :t => track, :a => artist, :b => album} else verb = _("listened to") if @registry.has_key? "#{m.sourcenick}_verb_past" verb = @registry["#{m.sourcenick}_verb_past"] end ago = Utils.timeago(past) - reply = _("%{u} %{v} \"%{t}\" by %{a} %{b} %{p}") % {:u => user, :v => verb, :t => track, :a => artist, :b => album, :p => ago} + reply = _("%{u} %{v} \"%{t}\" by %{a}%{b} %{p}") % {:u => user, :v => verb, :t => track, :a => artist, :b => album, :p => ago} end reply << _("; see %{uri} for more") % { :uri => "http://www.last.fm/user/#{CGI.escape user}"} |