From a450dbd529bb787962668fb65500061568016a80 Mon Sep 17 00:00:00 2001 From: GrazienoPellegrino Date: Tue, 19 Aug 2008 18:24:23 +0000 Subject: [PATCH] ActionItem622: Patchs for translate "friends" to "contacts" --- app/models/friends_block.rb | 7 +++---- app/views/blocks/profile_info_actions/person.rhtml | 2 +- app/views/friends/add.rhtml | 10 +++++----- app/views/friends/index.rhtml | 6 +++--- app/views/friends/remove.rhtml | 8 ++++---- app/views/profile/friends.rhtml | 4 ++-- app/views/profile_editor/index.rhtml | 2 +- lib/zen3_terminology.rb | 20 ++++++++++++++++++-- 8 files changed, 37 insertions(+), 22 deletions(-) diff --git a/app/models/friends_block.rb b/app/models/friends_block.rb index ec2b5e0..202456e 100644 --- a/app/models/friends_block.rb +++ b/app/models/friends_block.rb @@ -1,17 +1,17 @@ class FriendsBlock < ProfileListBlock def self.description - _('A block that displays your friends') + __('A block that displays your friends') end def default_title - _('Friends') + __('Friends') end def footer owner_id = owner.identifier lambda do - link_to _('All friends'), :profile => owner_id, :controller => 'profile', :action => 'friends' + link_to __('All friends'), :profile => owner_id, :controller => 'profile', :action => 'friends' end end @@ -25,5 +25,4 @@ class FriendsBlock < ProfileListBlock @profile_finder ||= FriendsBlock::Finder.new(self) end - end diff --git a/app/views/blocks/profile_info_actions/person.rhtml b/app/views/blocks/profile_info_actions/person.rhtml index 17308e1..5310917 100644 --- a/app/views/blocks/profile_info_actions/person.rhtml +++ b/app/views/blocks/profile_info_actions/person.rhtml @@ -1,5 +1,5 @@ diff --git a/app/views/friends/add.rhtml b/app/views/friends/add.rhtml index 5957bd2..b50e790 100644 --- a/app/views/friends/add.rhtml +++ b/app/views/friends/add.rhtml @@ -1,12 +1,12 @@ -

<%= _('Adding %s as a friend') % @friend.name %>

+

<%= __('Adding %s as a friend') % @friend.name %>

-<%= _('Are you sure you want to add %s as your friend?') % @friend.name %> +<%= __('Are you sure you want to add %s as your friend?') % @friend.name %>

-<%= _('Note that %s will need to accept being added as your friend.') % @friend.name %> +<%= __('Note that %s will need to accept being added as your friend.') % @friend.name %>

@@ -14,13 +14,13 @@ <%= hidden_field_tag(:confirmation, 1) %>
- <%= _('Classify your new friend %s: ') % @friend.name %> + <%= __('Classify your new friend %s: ') % @friend.name %> <%= text_field_with_local_autocomplete('group', profile.suggested_friend_groups) %>

<%= _('Suggestions: %s') % profile.suggested_friend_groups.join(', ') %>

- <%= submit_button(:ok, _("Yes, I want to add %s as my friend") % @friend.name) %> + <%= submit_button(:ok, __("Yes, I want to add %s as my friend") % @friend.name) %> <%= button(:cancel, _("No, I don't want"), :action => 'index') %> <% end %> diff --git a/app/views/friends/index.rhtml b/app/views/friends/index.rhtml index 71b8777..5e3b6cc 100644 --- a/app/views/friends/index.rhtml +++ b/app/views/friends/index.rhtml @@ -1,6 +1,6 @@
-

<%= _("%s's friends") % profile.name %>

+

<%= __("%s's friends") % profile.name %>

@@ -24,7 +24,7 @@ <% if @friends.empty? %>

- <%= _('You have no friends yet. Go make some.') %> + <%= __('You have no friends yet. Go make some.') %>

<% end %> diff --git a/app/views/friends/remove.rhtml b/app/views/friends/remove.rhtml index 8318c1a..786a523 100644 --- a/app/views/friends/remove.rhtml +++ b/app/views/friends/remove.rhtml @@ -1,23 +1,23 @@
-

<%= _('Removing friend: %s') % @friend.name %>

+

<%= __('Removing friend: %s') % @friend.name %>

<%= profile_image @friend, :thumb, :class => 'friend_picture' %>

-<%= _('Are you sure you want to remove %s from your friends list?') % @friend.name %> +<%= __('Are you sure you want to remove %s from your friends list?') % @friend.name %>

-<%= _('Note that %s will still have you as a friend, unless he/she also wants to remove you from his/her friend list.') % @friend.name %> +<%= __('Note that %s will still have you as a friend, unless he/she also wants to remove you from his/her friend list.') % @friend.name %>

<% form_tag do %> <%= hidden_field_tag(:confirmation, 1) %> - <%= submit_button(:ok, _("Yes, I want to remove %s from my friend list") % @friend.name) %> + <%= submit_button(:ok, __("Yes, I want to remove %s from my friend list") % @friend.name) %> <%= button(:cancel, _("No, I don't want"), :action => 'index') %> <% end %> diff --git a/app/views/profile/friends.rhtml b/app/views/profile/friends.rhtml index 4c9825e..f9257c3 100644 --- a/app/views/profile/friends.rhtml +++ b/app/views/profile/friends.rhtml @@ -1,7 +1,7 @@
+ help="<%= __('Here are all %s\'s friends.') % profile.name %>"> -

<%= _("%s' friends") % profile.name %>

+

<%= __("%s' friends") % profile.name %>

    <% @friends.each do |friend| %> diff --git a/app/views/profile_editor/index.rhtml b/app/views/profile_editor/index.rhtml index 898bb1e..605d6f9 100644 --- a/app/views/profile_editor/index.rhtml +++ b/app/views/profile_editor/index.rhtml @@ -24,7 +24,7 @@ <%= file_manager_button(_('Change Password'), 'icons-app/change-password.png', :controller => 'account', :action => 'change_password') if profile.person? %> - <%= file_manager_button(_('Manage friends'), 'icons-app/friends.png', :controller => 'friends', :action => 'index') if profile.person? %> + <%= file_manager_button(__('Manage friends'), 'icons-app/friends.png', :controller => 'friends', :action => 'index') if profile.person? %> <%= file_manager_button(_('Manage Members'), 'icons-app/members.png', :controller => 'profile_members') if profile.organization? && user.has_permission?(:manage_memberships, profile) %> diff --git a/lib/zen3_terminology.rb b/lib/zen3_terminology.rb index 23c6594..79e449e 100644 --- a/lib/zen3_terminology.rb +++ b/lib/zen3_terminology.rb @@ -8,16 +8,15 @@ class Zen3Terminology < Noosfero::Terminology::Custom super({ 'My Home Page' => N_('My ePortfolio'), 'Homepage' => N_('ePortfolio'), - 'Communities' => N_('Groups'), 'A block that displays your communities' => N_('A block that displays your groups'), + 'A block that displays your friends' => N_('A block that displays your contacts') 'The communities in which the user is a member' => N_('The groups in which the user is a member'), 'All communities' => N_('All groups'), 'Community' => N_('Group'), 'One community' => N_('One group'), '%{num} communities' => N_('%{num} groups'), 'Disable search for communities' => N_('Disable search for groups'), - 'Enterprises' => N_('Organizations'), 'The enterprises where this user works.' => N_('The organizations where this user works.'), 'A block that displays your enterprises' => N_('A block that displays your organizations.'), @@ -42,6 +41,23 @@ class Zen3Terminology < Noosfero::Terminology::Custom '%d friends' => N_('%d contacts'), 'One community' => N_('One group'), '%d communities' => N_('%d groups'), + 'Are you sure you want to remove %s from your friends list?' => N_('Are you sure you want to remove %s from your contacts list?'), + 'Note that %s will still have you as a friend, unless he/she also wants to remove you from his/her friend list.' => N_('Note that %s will still have you as a friend, unless he/she also wants to remove you from his/her contact list.'), + 'Yes, I want to remove %s from my friend list' => N_('Yes, I want to remove %s from my contact list'), + 'Adding %s as a friend' => N_('Adding %s as a contact'), + 'Are you sure you want to add %s as your friend?' => N_('Are you sure you want to add %s as your contact?'), + 'Note that %s will need to accept being added as your friend.' => N_('Note that %s will need to accept being added as your contact.'), + 'Classify your new friend %s: ' => N_('Classify your new contact %s: '), + 'Yes, I want to add %s as my friend' => N_('Yes, I want to add %s as my contact'), + 'Manage friends' => N_('Manage contacts'), + 'Add friend' => N_('Add contact'), + 'Removing friend: %s' => N_('Removing friend: %s'), + 'Clicking on this button will remove your friend relation with %s.' => N_('Clicking on this button will remove your contact relation with %s.'), + 'You have no friends yet. Go make some.' => N_('You have no contacts yet. Go make some.'), + '%s\'s friends' => N_('%s\'s contacts'), + '%s\' friends' => N_('%s\' contacts'), + 'Here are all %s\'s friends.' => N_('Here are all %s\'s friends.'), + }) end -- libgit2 0.21.2