diff --git a/config/locales/diaspora/en.yml b/config/locales/diaspora/en.yml index 102f1bc42..d780d8f62 100644 --- a/config/locales/diaspora/en.yml +++ b/config/locales/diaspora/en.yml @@ -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}" diff --git a/lib/em-webfinger.rb b/lib/em-webfinger.rb index c63f9575b..155871e89 100644 --- a/lib/em-webfinger.rb +++ b/lib/em-webfinger.rb @@ -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