From 7241177421b4edb6d6b958c47c55b795867d3b44 Mon Sep 17 00:00:00 2001 From: zhitomirskiyi <ilya@joindiaspora.com> Date: Tue, 8 Feb 2011 15:44:12 -0800 Subject: [PATCH] translating the warning about removing the person from the last aspect --- app/views/people/_profile_sidebar.html.haml | 2 +- config/locales/diaspora/en.yml | 2 ++ config/locales/javascript/javascript.en.yml | 4 ++++ public/javascripts/contact-list.js | 3 ++- 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/app/views/people/_profile_sidebar.html.haml b/app/views/people/_profile_sidebar.html.haml index bcefdf6689..d22ac25c70 100644 --- a/app/views/people/_profile_sidebar.html.haml +++ b/app/views/people/_profile_sidebar.html.haml @@ -9,7 +9,7 @@ $(this).closest('li').fadeOut(200); }); $('.delete').bind('ajax:failure', function() { - alert("#{h(t('.cannot_remove', :name => person.name))}"); + alert("#{t('status_message.destroy.failure')}"); }); }); diff --git a/config/locales/diaspora/en.yml b/config/locales/diaspora/en.yml index 1c5a359a71..096f1a502e 100644 --- a/config/locales/diaspora/en.yml +++ b/config/locales/diaspora/en.yml @@ -348,6 +348,8 @@ en: permalink: "permalink" helper: no_message_to_display: "No message to display." + destroy: + failure: "Failed to delete post" people: person: pending_request: "pending request" diff --git a/config/locales/javascript/javascript.en.yml b/config/locales/javascript/javascript.en.yml index 0c31185ca0..91adf6f7a0 100644 --- a/config/locales/javascript/javascript.en.yml +++ b/config/locales/javascript/javascript.en.yml @@ -21,3 +21,7 @@ en: watch: "Watch this video on {{provider}}" unknown: "Unknown video type" search_for: "Search for {{name}}" + shared: + contact_list: + cannot_remove: "Cannot remove person from last aspect. (If you want to disconnect from this person you must remove contact.)" + diff --git a/public/javascripts/contact-list.js b/public/javascripts/contact-list.js index 315c4cd311..b01c821d45 100644 --- a/public/javascripts/contact-list.js +++ b/public/javascripts/contact-list.js @@ -46,10 +46,11 @@ $(document).ready(function() { }); $('.added').live('ajax:failure', function(data, html, xhr) { - Diaspora.widgets.alert.alert("#{t('.cannot_remove')}"); + alert(Diaspora.widgets.i18n.t('shared.contact_list.cannot_remove')); $(this).fadeTo(200,1); }); + $('.add').live('ajax:loading', function() { $(this).fadeTo(200,0.4); }); -- GitLab