made em-webfinger errors translatable

This commit is contained in:
MrZYX 2010-11-26 18:55:36 +01:00
parent e83271ef22
commit d6f95445c5
2 changed files with 5 additions and 2 deletions

View file

@ -391,3 +391,6 @@ en:
stream_helper:
show_comments: "show comments"
hide_comments: "hide comments"
webfinger:
fetch_failed: "failed to fetch webfinger profile for %{profile_url}"
hcard_fetch_failed: "there was a problem fetching the hcard for #{@account}"

View file

@ -64,7 +64,7 @@ class EMWebfinger
def get_webfinger_profile(profile_url)
http = EventMachine::HttpRequest.new(profile_url).get OPTS
http.callback{ make_person_from_webfinger(http.response) }
http.errback{ process_callbacks "failed to fetch webfinger profile for #{profile_url}"}
http.errback{ process_callbacks I18n.t('webfinger.fetch_failed', :profile_url => profile_url) }
end
def make_person_from_webfinger(webfinger_profile)
@ -86,7 +86,7 @@ class EMWebfinger
process_callbacks "No person could be constructed from this hcard."
end
}
http.errback{process_callbacks "there was a problem fetching the hcard for #{@account}"}
http.errback{process_callbacks I18n.t('webfinger.hcard_fetch_failed', :account => @account) }
end
end