From ad6d6d5efafdfdf8662c04156a9694f1c62611cb Mon Sep 17 00:00:00 2001 From: MrZYX Date: Sat, 27 Nov 2010 02:43:49 +0100 Subject: [PATCH] lib/em-websocket.rb is now even more translatable --- config/locales/diaspora/en.yml | 5 ++++- lib/em-webfinger.rb | 6 +++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/config/locales/diaspora/en.yml b/config/locales/diaspora/en.yml index 3b01cb872..9ab9ac0e7 100644 --- a/config/locales/diaspora/en.yml +++ b/config/locales/diaspora/en.yml @@ -393,7 +393,10 @@ en: 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}" + hcard_fetch_failed: "there was a problem fetching the hcard for %{account}" + xrd_fetch_failed: "there was an error getting the xrd from account %{account}" + not_enabled: "webfinger does not seem to be enabled for %{account}'s host" + no_person_constructed: "No person could be constructed from this hcard." pagination: next: "Next" previous: "Previous" diff --git a/lib/em-webfinger.rb b/lib/em-webfinger.rb index db6006d4e..6db2cbce2 100644 --- a/lib/em-webfinger.rb +++ b/lib/em-webfinger.rb @@ -47,7 +47,7 @@ class EMWebfinger @ssl = false get_xrd else - process_callbacks "webfinger does not seem to be enabled for #{@account}'s host" + process_callbacks I18n.t('webfinger.not_enabled', :account => @account) end } @@ -56,7 +56,7 @@ class EMWebfinger @ssl = false get_xrd else - process_callbacks "there was an error getting the xrd from account#{@account}" + process_callbacks I18n.t('webfinger.xrd_fetch_failed', :account => @account) end } end @@ -83,7 +83,7 @@ class EMWebfinger p = Person.build_from_webfinger(wf_profile, hcard) process_callbacks(p) rescue - process_callbacks "No person could be constructed from this hcard." + process_callbacks I18n.t 'webfinger.no_person_constructed' end } http.errback{process_callbacks I18n.t('webfinger.hcard_fetch_failed', :account => @account) }