Commit 8a6c0f8a7d419883e533878fe4c320a9f3862113
1 parent
d60bfad3
Exists in
master
and in
29 other branches
ActionItem18: marking templates for translation
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@385 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
8 changed files
with
56 additions
and
53 deletions
Show diff stats
app/views/comatose_admin/_form.rhtml
... | ... | @@ -3,27 +3,27 @@ |
3 | 3 | <% form_for :page, @page do |f| %> |
4 | 4 | |
5 | 5 | <div class='comatose_field'> |
6 | - <label for="page_title">Title</label> | |
7 | - <%= f.text_field :title, :tabindex => 1, :maxlength => 255, :size => 30 %> <%= link_to_function "More...", "ComatoseEditForm.toggle_extra_fields(this)", :id => 'more-options' %> | |
6 | + <label for="page_title"><%= _("Title") %></label> | |
7 | + <%= f.text_field :title, :tabindex => 1, :maxlength => 255, :size => 30 %> <%= link_to_function "More...", "ComatoseEditForm.toggle_extra_fields(this, '%s', '%s')" % [_('More...'), _('Less...')], :id => 'more-options' %> | |
8 | 8 | </div> |
9 | 9 | |
10 | 10 | <div class='comatose_field' id='slug_row'> |
11 | - <label for="page_slug">Slug</label> | |
11 | + <label for="page_slug"><%= _('Slug') %></label> | |
12 | 12 | <%= f.text_field :slug, :tabindex=>6, :maxlength=>255, :size=>50, :disabled=>@root_pages.include?(@page) %> |
13 | 13 | </div> |
14 | 14 | |
15 | 15 | <div class='comatose_field' id='keywords_row'> |
16 | 16 | <% if show_field? 'keywords' %> |
17 | - <label for="page_keywords">Keywords</label> | |
17 | + <label for="page_keywords"><%= _('Keywords') %></label> | |
18 | 18 | <%= f.text_field :keywords, :tabindex=>7, :maxlength=>1000, :size=>50 %> |
19 | 19 | <% end %> |
20 | 20 | </div> |
21 | 21 | |
22 | 22 | <div class='comatose_field' id='parent_row'> |
23 | 23 | <% if show_field? 'parent' %> |
24 | - <label for="page_parent">Parent</label> | |
24 | + <label for="page_parent"><%= _('Parent') %></label> | |
25 | 25 | <% if mode != :new and @root_pages.include? @page %> |
26 | - <select id="page_parent" disabled="true"><option><%= @page.title %> is a root page</option></select> | |
26 | + <select id="page_parent" disabled="true"><option><%= _('%s is a root page') % @page.title %></option></select> | |
27 | 27 | <% else %> |
28 | 28 | <select id="page_parent" name="page[parent_id]" tabindex="8"><%= tree_select_box @root_pages, @page.parent_id, @page.id %></select> |
29 | 29 | <% end %> |
... | ... | @@ -31,21 +31,21 @@ |
31 | 31 | </div> |
32 | 32 | |
33 | 33 | <div class='comatose_field'> |
34 | - <label for="page_body">Body</label> | |
34 | + <label for="page_body"><%= _('Content') %></label> | |
35 | 35 | <%= f.text_area :body, :rows => 14, :tabindex => 2 %> |
36 | 36 | </div> |
37 | 37 | |
38 | 38 | <div class='comatose_field' id='filter_row'> |
39 | 39 | <% if show_field? 'filter' %> |
40 | - <label for="page_filter_type">Filter</label> | |
40 | + <label for="page_filter_type"><%= _("Filter") %></label> | |
41 | 41 | <%= select_tag 'page[filter_type]', options_for_select(TextFilters.all_titles.sort, @page.filter_type || Comatose.config.default_filter), :tabindex=>3, :id=>'page_filter_type' %> |
42 | - <span class="field-help">Converts plain text into html</span> | |
42 | + <span class="field-help"><%= _('Converts plain text into HTML') %></span> | |
43 | 43 | <% end %> |
44 | 44 | </div> |
45 | 45 | |
46 | 46 | <div class='comatose_field' id='created_row'> |
47 | 47 | <% if show_field? 'created_on' %> |
48 | - <label for="page_created_on">Created</label> | |
48 | + <label for="page_created_on"><%= _('Created') %></label> | |
49 | 49 | <%= f.datetime_select :created_on %> |
50 | 50 | <% end %> |
51 | 51 | </div> |
... | ... | @@ -54,33 +54,32 @@ |
54 | 54 | <% unless @page.updated_on.nil? %> |
55 | 55 | <div class="last-update"> |
56 | 56 | <label> |
57 | - Updated <%= time_ago_in_words @page.updated_on, true %> ago by | |
58 | - <%= @page.author %>. | |
59 | - <%= link_to(pluralize(@page.versions.length, 'revision', 'revisions'), :action=>'versions', :id=>@page) if @page.versions.length > 0 %> | |
57 | + <%= link_to(n_("One revision", "%d revisions", @page.versions.length) % @page.versions.length, :action=>'versions', :id=>@page) if @page.versions.length > 0 %> | |
60 | 58 | </label> |
61 | 59 | </div> |
62 | 60 | <% end %> |
61 | + | |
63 | 62 | <%= image_tag 'comatose/spinner.gif', :id=>'spinner', :align=>'absmiddle', :style=>'display:none;' %> |
64 | - <%= button_to_function('Preview', "ComatoseEditForm.preview_content('#{url_for :controller=>controller.controller_name, :action=>'preview', :id=>@page}')", :tabindex=>3, :id=>'preview-btn' ) if show_field? 'preview' %> | |
65 | - <%= submit_tag ((mode == :edit) ? 'Save Changes' : 'Create Page'), :tabindex=>4 %> | |
63 | + <%= button_to_function('Preview', "ComatoseEditForm.preview_content('#{url_for :controller=>controller.controller_name, :action=>'preview', :id=>@page}', '%s')" % _('Loading preview ...'), :tabindex=>3, :id=>'preview-btn' ) if show_field? 'preview' %> | |
64 | + <%= submit_tag ((mode == :edit) ? _('Save Changes') : _('Create Page')), :tabindex=>4 %> | |
66 | 65 | <% if @page.versions.length > 0 %> |
67 | - <%= link_to "Revert", :action=>'versions', :id=>@page %> | |
66 | + <%= link_to _("Revert"), :action=>'versions', :id=>@page %> | |
68 | 67 | <% end %> |
69 | 68 | or |
70 | - <a href="<%= url_for :controller=>controller.controller_name, :action=>'index' %>" onlick="ComatoseEditForm.cancel(this.href); return false;" tabindex="5">Cancel</a> | |
69 | + <a href="<%= url_for :controller=>controller.controller_name, :action=>'index' %>" onlick="ComatoseEditForm.cancel(this.href, '<%= _('Changes detected. You will lose all the updates you have made if you proceed...') %>'); return false;" tabindex="5"><%= _("Cancel") %></a> | |
71 | 70 | </div> |
72 | 71 | <% end %> |
73 | 72 | |
74 | 73 | <div id="preview-area" style='display: none;'> |
75 | 74 | <fieldset> |
76 | - <legend>Page Preview</legend> | |
75 | + <legend><%= _('Page Preview') %></legend> | |
77 | 76 | <div class="preview-body"> |
78 | - <div id="preview-panel"><span style='color:blue;'>Loading Preview...</span></div> | |
77 | + <div id="preview-panel"><span style='color:blue;'><%= _('Loading Preview...') %></span></div> | |
79 | 78 | <div style="clear:both"></div> |
80 | 79 | </div> |
81 | 80 | </fieldset> |
82 | 81 | <div class="commands"> |
83 | - <a href="#" onclick="$('preview-area').hide();">Close Preview</a> or <a href="#">Back to top</a> | |
82 | + <a href="#" onclick="$('preview-area').hide();"><%= _("Close Preview") %></a><% _("or") %><a href="#"><%= _('Back to top') %></a> | |
84 | 83 | </div> |
85 | 84 | </div> |
86 | 85 | ... | ... |
app/views/comatose_admin/_page_list_item.rhtml
... | ... | @@ -13,9 +13,9 @@ |
13 | 13 | # Create the page-level links... |
14 | 14 | links = [] |
15 | 15 | links << link_to(pluralize(page.versions.length, 'revision', 'revisions'), :action=>'versions', :id=>page) if page.versions.length > 0 |
16 | -links << link_to('add child page', {:action=>'new', :parent=>page}, :title=>"Add a child to '#{page.title}'", :class=>'add-page') | |
17 | -links << link_to_function('reorder children', "ComatoseList.toggle_reorder('page_list_#{page.id}',this,#{page.id})", :title=>"Reorder children of '#{page.title}'", :class=>'reorder-children', :href=>url_for(:action=>'reorder', :id=>page)) if !page.children.empty? and page.children.length > 1 | |
18 | -links << link_to('delete', {:action=>'delete', :id=>page}, :confirm=>'This will delete this page, and any children. Are you sure?', :title=>"Delete page '#{page.title}' and all it's children", :class=>'delete-page', :method=>'post', :onmouseover=>"ComatoseList.item_hover('page_#{page.id}', 'over', true)", :onmouseout=>"ComatoseList.item_hover('page_#{page.id}', 'out', true)") unless @root_pages.include? page | |
16 | +links << link_to('add child page', {:action=>'new', :parent=>page}, :title=> _("Add a child to '%s'") % page.title, :class=>'add-page') | |
17 | +links << link_to_function('reorder children', "ComatoseList.toggle_reorder('page_list_#{page.id}',this,#{page.id}, '%s', '%s')" % [_('reorder children'), _('finished reordering')], :title=> _("Reorder children of '%s'") % page.title, :class=>'reorder-children', :href=>url_for(:action=>'reorder', :id=>page)) if !page.children.empty? and page.children.length > 1 | |
18 | +links << link_to('delete', {:action=>'delete', :id=>page}, :confirm=> _('This will delete this page, and any children. Are you sure?'), :title=> _("Delete page '%s' and all it's children") % page.title, :class=>'delete-page', :method=>'post', :onmouseover=>"ComatoseList.item_hover('page_#{page.id}', 'over', true)", :onmouseout=>"ComatoseList.item_hover('page_#{page.id}', 'out', true)") unless @root_pages.include? page | |
19 | 19 | # Level check, one, two, three... |
20 | 20 | collapse_children = (level >= Comatose.config.default_tree_level) |
21 | 21 | %> |
... | ... | @@ -32,7 +32,7 @@ collapse_children = (level >= Comatose.config.default_tree_level) |
32 | 32 | </td> |
33 | 33 | <td valign="center"> |
34 | 34 | <%= icon_for_document(page) %> |
35 | - <span class="handle">DRAG</span> | |
35 | + <span class="handle"><%= _('DRAG') %></span> | |
36 | 36 | </td> |
37 | 37 | <td> |
38 | 38 | <%= link_to page.title, {:action=>'edit', :id=>page}, :title=>"Path:#{page.full_path}", :class=>'page' %> | ... | ... |
app/views/comatose_admin/delete.rhtml
... | ... | @@ -3,16 +3,16 @@ |
3 | 3 | </h1> |
4 | 4 | |
5 | 5 | <blockquote> |
6 | - <p>Are you sure you want to delete the page titled "<b><%= @page.title %></b>"?</p> | |
7 | -<% unless @page.children.empty? %> | |
8 | - <p>It has <b><%= @page.children.length %></b> child pages that will also be deleted...</p> | |
6 | + <p><%= _('Are you sure you want to delete the page titled "%s"?') % content_tag('strong', @page.title) %> </p> | |
7 | + <% unless @page.children.empty? %> | |
8 | + <p><%= _("It has %s child pages that will also be deleted...") % content_tag('strong', @page.children.length) %></p> | |
9 | 9 | <% end %> |
10 | 10 | </blockquote> |
11 | 11 | |
12 | 12 | <%= start_form_tag %> |
13 | 13 | <div id="button-group"> |
14 | - <%= submit_tag "Yes, Delete The Page" %> | |
14 | + <%= submit_tag _("Yes, Delete The Page") %> | |
15 | 15 | or |
16 | - <%= link_to "Cancel", :action=>'index' %> | |
16 | + <%= link_to _("Cancel"), :action=>'index' %> | |
17 | 17 | </div> |
18 | 18 | <%= end_form_tag %> | ... | ... |
app/views/comatose_admin/edit.rhtml
app/views/comatose_admin/index.rhtml
app/views/comatose_admin/new.rhtml
app/views/comatose_admin/reorder.rhtml
1 | -<h1>Reorder Pages</h1> | |
1 | +<h1><%= _('Reorder Pages') %></h1> | |
2 | 2 | |
3 | -<h3>"<%= @page.title %>" child pages:</h3> | |
3 | +<h3><%= _('"%s" child pages:') % @page.title %></h3> | |
4 | 4 | |
5 | 5 | <ul class="page-list"> |
6 | 6 | <% @page.children.each do |page| %> |
... | ... | @@ -16,8 +16,8 @@ |
16 | 16 | </tr> |
17 | 17 | <tr> |
18 | 18 | <td class="commands"> |
19 | - <%= link_to "Move Up", :action=>'reorder', :cmd=>'up', :page=>page.id %>, | |
20 | - <%= link_to "Move Down", :action=>'reorder', :cmd=>'down', :page=>page.id %> | |
19 | + <%= link_to _("Move Up"), :action=>'reorder', :cmd=>'up', :page=>page.id %>, | |
20 | + <%= link_to _("Move Down"), :action=>'reorder', :cmd=>'down', :page=>page.id %> | |
21 | 21 | </td> |
22 | 22 | </tr> |
23 | 23 | </table> |
... | ... | @@ -26,5 +26,5 @@ |
26 | 26 | </ul> |
27 | 27 | |
28 | 28 | <div id="button-group"> |
29 | - <%= link_to "Finished", :action=>'index' %> | |
30 | -</div> | |
31 | 29 | \ No newline at end of file |
30 | + <%= link_to _("Finished"), :action=>'index' %> | |
31 | +</div> | ... | ... |
app/views/comatose_admin/versions.rhtml
1 | -<h1>Page Revisions</h1> | |
1 | +<h1><%= _('Page Revisions') %></h1> | |
2 | 2 | <form> |
3 | 3 | <div class="revisions older-content"> |
4 | 4 | <div class="header"> |
5 | 5 | <div class="header-actions"> |
6 | 6 | <% form_tag :action => 'versions', :id => @page, :html => { :method => :get } do %> |
7 | - View Version: <%= select_tag "version", options_from_collection_for_select(@page.versions, 'version', 'version', @version_num), {'onchange'=>'this.form.submit();'} %> | |
7 | + <%= _('View Version:') %><%= select_tag "version", options_from_collection_for_select(@page.versions, 'version', 'version', @version_num), {'onchange'=>'this.form.submit();'} %> | |
8 | 8 | <%= submit_tag 'Go', {'id'=>'go-btn'} %> |
9 | 9 | <% end %> |
10 | 10 | </div> |
11 | - Version <%= @version_num %> | |
11 | + <%= _('Version %s') % @version_num %> | |
12 | 12 | </div> |
13 | 13 | <div class="meta"> |
14 | - <label class="title"><span>Title:</span><%= @version.title %></label> | |
15 | - <label><span>Slug:</span> <%= @version.slug %></label> | |
16 | - <label><span>Keywords:</span> <%= @version.keywords %></label> | |
14 | + <label class="title"><span><%= _('Title:') %></span><%= @version.title %></label> | |
15 | + <label><span><%= _('Slug:') %></span> <%= @version.slug %></label> | |
16 | + <% if show_field? 'keywords' %> | |
17 | + <label><span><%= _("Keywords:") %></span> <%= @version.keywords %></label> | |
18 | + <% end %> | |
17 | 19 | </div> |
18 | 20 | <%= @version.body.split("\n").join('<br/>') unless @version.body.nil? %> |
19 | 21 | <div id="button-group" class="footer"> |
20 | 22 | <% form_tag :action=>'set_version', :id => @page, :version => @version_num do %> |
21 | - <%= submit_tag "Set As Current Version" %> | |
22 | - or | |
23 | - <%= link_to "Cancel", :action=>'index' %> | |
23 | + <%= submit_tag _("Set As Current Version") %> | |
24 | + <%= _('or') %> | |
25 | + <%= link_to _("Cancel"), :action=>'index' %> | |
24 | 26 | <% end %> |
25 | 27 | </div> |
26 | 28 | </div> |
27 | 29 | |
28 | 30 | <div class="revisions current-content"> |
29 | 31 | <div class="header"> |
30 | - Current Version | |
32 | + <% _('Current Version') %> | |
31 | 33 | </div> |
32 | 34 | <div class="meta"> |
33 | - <label class="title"><span>Title:</span><%= @page.title %></label> | |
34 | - <label><span>Slug:</span> <%= @page.slug %></label> | |
35 | - <label><span>Keywords:</span> <%= @page.keywords %></label> | |
35 | + <label class="title"><span><%= _('Title:') %></span><%= @page.title %></label> | |
36 | + <label><span><%= _('Slug:') %></span> <%= @page.slug %></label> | |
37 | + <% if show_field? 'keywords' %> | |
38 | + <label><span><%= _('Keywords:') %></span> <%= @page.keywords %></label> | |
39 | + <% end %> | |
36 | 40 | </div> |
37 | 41 | <%= @page.body.split("\n").join('<br/>') unless @page.body.nil? %> |
38 | 42 | </div> | ... | ... |