Commit a450dbd529bb787962668fb65500061568016a80
1 parent
147a5d7c
Exists in
staging
and in
42 other branches
ActionItem622: Patchs for translate "friends" to "contacts"
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@2404 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
8 changed files
with
37 additions
and
22 deletions
Show diff stats
app/models/friends_block.rb
1 | class FriendsBlock < ProfileListBlock | 1 | class FriendsBlock < ProfileListBlock |
2 | 2 | ||
3 | def self.description | 3 | def self.description |
4 | - _('A block that displays your friends') | 4 | + __('A block that displays your friends') |
5 | end | 5 | end |
6 | 6 | ||
7 | def default_title | 7 | def default_title |
8 | - _('Friends') | 8 | + __('Friends') |
9 | end | 9 | end |
10 | 10 | ||
11 | def footer | 11 | def footer |
12 | owner_id = owner.identifier | 12 | owner_id = owner.identifier |
13 | lambda do | 13 | lambda do |
14 | - link_to _('All friends'), :profile => owner_id, :controller => 'profile', :action => 'friends' | 14 | + link_to __('All friends'), :profile => owner_id, :controller => 'profile', :action => 'friends' |
15 | end | 15 | end |
16 | end | 16 | end |
17 | 17 | ||
@@ -25,5 +25,4 @@ class FriendsBlock < ProfileListBlock | @@ -25,5 +25,4 @@ class FriendsBlock < ProfileListBlock | ||
25 | @profile_finder ||= FriendsBlock::Finder.new(self) | 25 | @profile_finder ||= FriendsBlock::Finder.new(self) |
26 | end | 26 | end |
27 | 27 | ||
28 | - | ||
29 | end | 28 | end |
app/views/blocks/profile_info_actions/person.rhtml
1 | <ul> | 1 | <ul> |
2 | <%if logged_in? && (user != profile) && (! user.friends.include?(profile)) && !user.already_request_friendship?(profile) %> | 2 | <%if logged_in? && (user != profile) && (! user.friends.include?(profile)) && !user.already_request_friendship?(profile) %> |
3 | - <li><%= link_to content_tag('span', _('Add friend')), { :profile => user.identifier, :controller => 'friends', :action => 'add', :id => profile.id }, :class => 'button with-text icon-add' %></li> | 3 | + <li><%= link_to content_tag('span', __('Add friend')), { :profile => user.identifier, :controller => 'friends', :action => 'add', :id => profile.id }, :class => 'button with-text icon-add' %></li> |
4 | <% end %> | 4 | <% end %> |
5 | </ul> | 5 | </ul> |
app/views/friends/add.rhtml
1 | -<h1><%= _('Adding %s as a friend') % @friend.name %></h1> | 1 | +<h1><%= __('Adding %s as a friend') % @friend.name %></h1> |
2 | 2 | ||
3 | <p> | 3 | <p> |
4 | -<%= _('Are you sure you want to add %s as your friend?') % @friend.name %> | 4 | +<%= __('Are you sure you want to add %s as your friend?') % @friend.name %> |
5 | </p> | 5 | </p> |
6 | 6 | ||
7 | <p> | 7 | <p> |
8 | <em> | 8 | <em> |
9 | -<%= _('Note that %s will need to accept being added as your friend.') % @friend.name %> | 9 | +<%= __('Note that %s will need to accept being added as your friend.') % @friend.name %> |
10 | </em> | 10 | </em> |
11 | </p> | 11 | </p> |
12 | 12 | ||
@@ -14,13 +14,13 @@ | @@ -14,13 +14,13 @@ | ||
14 | <%= hidden_field_tag(:confirmation, 1) %> | 14 | <%= hidden_field_tag(:confirmation, 1) %> |
15 | 15 | ||
16 | <div> | 16 | <div> |
17 | - <%= _('Classify your new friend %s: ') % @friend.name %> | 17 | + <%= __('Classify your new friend %s: ') % @friend.name %> |
18 | <%= text_field_with_local_autocomplete('group', profile.suggested_friend_groups) %> | 18 | <%= text_field_with_local_autocomplete('group', profile.suggested_friend_groups) %> |
19 | <p> | 19 | <p> |
20 | <%= _('Suggestions: %s') % profile.suggested_friend_groups.join(', ') %> | 20 | <%= _('Suggestions: %s') % profile.suggested_friend_groups.join(', ') %> |
21 | </p> | 21 | </p> |
22 | </div> | 22 | </div> |
23 | 23 | ||
24 | - <%= submit_button(:ok, _("Yes, I want to add %s as my friend") % @friend.name) %> | 24 | + <%= submit_button(:ok, __("Yes, I want to add %s as my friend") % @friend.name) %> |
25 | <%= button(:cancel, _("No, I don't want"), :action => 'index') %> | 25 | <%= button(:cancel, _("No, I don't want"), :action => 'index') %> |
26 | <% end %> | 26 | <% end %> |
app/views/friends/index.rhtml
1 | <div id="manage_friends"> | 1 | <div id="manage_friends"> |
2 | 2 | ||
3 | -<h1><%= _("%s's friends") % profile.name %></h1> | 3 | +<h1><%= __("%s's friends") % profile.name %></h1> |
4 | 4 | ||
5 | <ul class='profile-list'> | 5 | <ul class='profile-list'> |
6 | <% @friends.each do |friend| %> | 6 | <% @friends.each do |friend| %> |
@@ -14,7 +14,7 @@ | @@ -14,7 +14,7 @@ | ||
14 | { :action => 'remove', :id => friend.id }, | 14 | { :action => 'remove', :id => friend.id }, |
15 | :class => 'button icon-delete', | 15 | :class => 'button icon-delete', |
16 | :title => _('remove'), | 16 | :title => _('remove'), |
17 | - :help => _('Clicking on this button will remove your friend relation with %s.') % friend.name %> | 17 | + :help => __('Clicking on this button will remove your friend relation with %s.') % friend.name %> |
18 | </div><!-- end class="controll" --> | 18 | </div><!-- end class="controll" --> |
19 | 19 | ||
20 | </li> | 20 | </li> |
@@ -24,7 +24,7 @@ | @@ -24,7 +24,7 @@ | ||
24 | <% if @friends.empty? %> | 24 | <% if @friends.empty? %> |
25 | <p> | 25 | <p> |
26 | <em> | 26 | <em> |
27 | - <%= _('You have no friends yet. Go make some.') %> | 27 | + <%= __('You have no friends yet. Go make some.') %> |
28 | </em> | 28 | </em> |
29 | </p> | 29 | </p> |
30 | <% end %> | 30 | <% end %> |
app/views/friends/remove.rhtml
1 | <div id="remove_friend"> | 1 | <div id="remove_friend"> |
2 | 2 | ||
3 | -<h1><%= _('Removing friend: %s') % @friend.name %></h1> | 3 | +<h1><%= __('Removing friend: %s') % @friend.name %></h1> |
4 | 4 | ||
5 | <%= profile_image @friend, :thumb, :class => 'friend_picture' %> | 5 | <%= profile_image @friend, :thumb, :class => 'friend_picture' %> |
6 | 6 | ||
7 | <p> | 7 | <p> |
8 | -<%= _('Are you sure you want to remove %s from your friends list?') % @friend.name %> | 8 | +<%= __('Are you sure you want to remove %s from your friends list?') % @friend.name %> |
9 | </p> | 9 | </p> |
10 | 10 | ||
11 | <p> | 11 | <p> |
12 | <em> | 12 | <em> |
13 | -<%= _('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 %> | 13 | +<%= __('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 %> |
14 | </em> | 14 | </em> |
15 | </p> | 15 | </p> |
16 | 16 | ||
17 | <% form_tag do %> | 17 | <% form_tag do %> |
18 | <%= hidden_field_tag(:confirmation, 1) %> | 18 | <%= hidden_field_tag(:confirmation, 1) %> |
19 | 19 | ||
20 | - <%= submit_button(:ok, _("Yes, I want to remove %s from my friend list") % @friend.name) %> | 20 | + <%= submit_button(:ok, __("Yes, I want to remove %s from my friend list") % @friend.name) %> |
21 | <%= button(:cancel, _("No, I don't want"), :action => 'index') %> | 21 | <%= button(:cancel, _("No, I don't want"), :action => 'index') %> |
22 | <% end %> | 22 | <% end %> |
23 | 23 |
app/views/profile/friends.rhtml
1 | <div class="common-profile-list-block" | 1 | <div class="common-profile-list-block" |
2 | - help="<%= _('Here are all <b>%s</b>s friends.') % profile.name %>"> | 2 | + help="<%= __('Here are all <b>%s</b>s friends.') % profile.name %>"> |
3 | 3 | ||
4 | -<h1><%= _("%s' friends") % profile.name %></h1> | 4 | +<h1><%= __("%s' friends") % profile.name %></h1> |
5 | 5 | ||
6 | <ul class='profile-list'> | 6 | <ul class='profile-list'> |
7 | <% @friends.each do |friend| %> | 7 | <% @friends.each do |friend| %> |
app/views/profile_editor/index.rhtml
@@ -24,7 +24,7 @@ | @@ -24,7 +24,7 @@ | ||
24 | 24 | ||
25 | <%= file_manager_button(_('Change Password'), 'icons-app/change-password.png', :controller => 'account', :action => 'change_password') if profile.person? %> | 25 | <%= file_manager_button(_('Change Password'), 'icons-app/change-password.png', :controller => 'account', :action => 'change_password') if profile.person? %> |
26 | 26 | ||
27 | - <%= file_manager_button(_('Manage friends'), 'icons-app/friends.png', :controller => 'friends', :action => 'index') if profile.person? %> | 27 | + <%= file_manager_button(__('Manage friends'), 'icons-app/friends.png', :controller => 'friends', :action => 'index') if profile.person? %> |
28 | 28 | ||
29 | <%= file_manager_button(_('Manage Members'), 'icons-app/members.png', :controller => 'profile_members') if profile.organization? && user.has_permission?(:manage_memberships, profile) %> | 29 | <%= file_manager_button(_('Manage Members'), 'icons-app/members.png', :controller => 'profile_members') if profile.organization? && user.has_permission?(:manage_memberships, profile) %> |
30 | 30 |
lib/zen3_terminology.rb
@@ -8,16 +8,15 @@ class Zen3Terminology < Noosfero::Terminology::Custom | @@ -8,16 +8,15 @@ class Zen3Terminology < Noosfero::Terminology::Custom | ||
8 | super({ | 8 | super({ |
9 | 'My Home Page' => N_('My ePortfolio'), | 9 | 'My Home Page' => N_('My ePortfolio'), |
10 | 'Homepage' => N_('ePortfolio'), | 10 | 'Homepage' => N_('ePortfolio'), |
11 | - | ||
12 | 'Communities' => N_('Groups'), | 11 | 'Communities' => N_('Groups'), |
13 | 'A block that displays your communities' => N_('A block that displays your groups'), | 12 | 'A block that displays your communities' => N_('A block that displays your groups'), |
13 | + 'A block that displays your friends' => N_('A block that displays your contacts') | ||
14 | 'The communities in which the user is a member' => N_('The groups in which the user is a member'), | 14 | 'The communities in which the user is a member' => N_('The groups in which the user is a member'), |
15 | 'All communities' => N_('All groups'), | 15 | 'All communities' => N_('All groups'), |
16 | 'Community' => N_('Group'), | 16 | 'Community' => N_('Group'), |
17 | 'One community' => N_('One group'), | 17 | 'One community' => N_('One group'), |
18 | '%{num} communities' => N_('%{num} groups'), | 18 | '%{num} communities' => N_('%{num} groups'), |
19 | 'Disable search for communities' => N_('Disable search for groups'), | 19 | 'Disable search for communities' => N_('Disable search for groups'), |
20 | - | ||
21 | 'Enterprises' => N_('Organizations'), | 20 | 'Enterprises' => N_('Organizations'), |
22 | 'The enterprises where this user works.' => N_('The organizations where this user works.'), | 21 | 'The enterprises where this user works.' => N_('The organizations where this user works.'), |
23 | 'A block that displays your enterprises' => N_('A block that displays your organizations.'), | 22 | 'A block that displays your enterprises' => N_('A block that displays your organizations.'), |
@@ -42,6 +41,23 @@ class Zen3Terminology < Noosfero::Terminology::Custom | @@ -42,6 +41,23 @@ class Zen3Terminology < Noosfero::Terminology::Custom | ||
42 | '%d friends' => N_('%d contacts'), | 41 | '%d friends' => N_('%d contacts'), |
43 | 'One community' => N_('One group'), | 42 | 'One community' => N_('One group'), |
44 | '%d communities' => N_('%d groups'), | 43 | '%d communities' => N_('%d groups'), |
44 | + '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?'), | ||
45 | + '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.'), | ||
46 | + 'Yes, I want to remove %s from my friend list' => N_('Yes, I want to remove %s from my contact list'), | ||
47 | + 'Adding %s as a friend' => N_('Adding %s as a contact'), | ||
48 | + 'Are you sure you want to add %s as your friend?' => N_('Are you sure you want to add %s as your contact?'), | ||
49 | + '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.'), | ||
50 | + 'Classify your new friend %s: ' => N_('Classify your new contact %s: '), | ||
51 | + 'Yes, I want to add %s as my friend' => N_('Yes, I want to add %s as my contact'), | ||
52 | + 'Manage friends' => N_('Manage contacts'), | ||
53 | + 'Add friend' => N_('Add contact'), | ||
54 | + 'Removing friend: %s' => N_('Removing friend: %s'), | ||
55 | + 'Clicking on this button will remove your friend relation with %s.' => N_('Clicking on this button will remove your contact relation with %s.'), | ||
56 | + 'You have no friends yet. Go make some.' => N_('You have no contacts yet. Go make some.'), | ||
57 | + '%s\'s friends' => N_('%s\'s contacts'), | ||
58 | + '%s\' friends' => N_('%s\' contacts'), | ||
59 | + 'Here are all <b>%s</b>\'s friends.' => N_('Here are all <b>%s</b>\'s friends.'), | ||
60 | + | ||
45 | }) | 61 | }) |
46 | end | 62 | end |
47 | 63 |