Skip to content

Commit

Permalink
Added translation
Browse files Browse the repository at this point in the history
  • Loading branch information
ashrafuzzaman committed Jun 17, 2012
1 parent 28a7032 commit b517978
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 14 deletions.
Expand Up @@ -26,6 +26,6 @@
</fieldset>
<div class="form-actions">
<%%= f.submit class: 'btn btn-primary' %>
<%%= link_to 'Back', <%= index_helper %>_path, :class => 'btn' %>
<%%= link_to t(:'links.back'), <%= index_helper %>_path, :class => 'btn' %>
</div>
<%% end %>
@@ -1,4 +1,4 @@
<%%= render 'form' %>

<%%= link_to 'Show', @<%= singular_table_name %> %> |
<%%= link_to 'Back', <%= index_helper %>_path %>
<%%= link_to t(:'links.show'), @<%= singular_table_name %> %> |
<%%= link_to t(:'links.back'), <%= index_helper %>_path %>
Expand Up @@ -16,9 +16,9 @@
<td><%%= <%= singular_table_name %>.<%= attribute.name %> %></td>
<% end -%>
<td>
<%%= link_to 'Show', <%= singular_table_name %>, class: 'btn btn-mini' %>
<%%= link_to 'Edit', edit_<%= singular_table_name %>_path(<%= singular_table_name %>), class: 'btn btn-mini' %>
<%%= link_to 'Destroy', <%= singular_table_name %>, confirm: 'Are you sure?', method: :delete, class: 'btn btn-mini btn-danger' %>
<%%= link_to t(:'links.show'), <%= singular_table_name %>, class: 'btn btn-mini' %>
<%%= link_to t(:'links.edit'), edit_<%= singular_table_name %>_path(<%= singular_table_name %>), class: 'btn btn-mini' %>
<%%= link_to t(:'links.destroy'), <%= singular_table_name %>, confirm: t(:'msg.destroy.confirm'), method: :delete, class: 'btn btn-mini btn-danger' %>
</td>
<%% end %>
</tbody>
Expand All @@ -27,5 +27,5 @@
<br />

<div class="form-actions">
<%%= link_to 'New <%= human_name %>', new_<%= singular_table_name %>_path, class: 'btn btn-primary' %>
<%%= link_to t(:'links.new_<%= human_name %>'), new_<%= singular_table_name %>_path, class: 'btn btn-primary' %>
</div>
@@ -1,3 +1,3 @@
<%%= render 'form' %>

<%%= link_to 'Back', <%= index_helper %>_path %>
<%%= link_to t(:'links.back'), <%= index_helper %>_path %>
Expand Up @@ -12,6 +12,6 @@
</table>

<div class="form-actions">
<%%= link_to 'Edit', edit_<%= singular_table_name %>_path(@<%= singular_table_name %>), :class => 'btn btn-primary' %>
<%%= link_to 'Back', <%= index_helper %>_path, :class => 'btn' %>
<%%= link_to t(:'links.edit'), edit_<%= singular_table_name %>_path(@<%= singular_table_name %>), :class => 'btn btn-primary' %>
<%%= link_to t(:'links.back'), <%= index_helper %>_path, :class => 'btn' %>
</div>
Expand Up @@ -25,9 +25,9 @@ def create

respond_to do |format|
if @<%= orm_instance.save %>
format.html { redirect_to @<%= singular_table_name %>, notice: <%= "'#{human_name} was successfully created.'" %> }
format.html { redirect_to @<%= singular_table_name %>, notice: t(:'<%= "msg.#{singular_table_name}.created" %>') }
format.json { render json: <%= "@#{singular_table_name}" %>, status: :created, location: <%= "@#{singular_table_name}" %> }
format.js { flash[:notice] = <%= "'#{human_name} was created.'" %> }
format.js { flash[:notice] = t(:'<%= "msg.#{singular_table_name}.created" %>') }
else
format.html { render action: "new" }
format.json { render json: <%= "@#{orm_instance.errors}" %>, status: :unprocessable_entity }
Expand All @@ -41,9 +41,9 @@ def update

respond_to do |format|
if @<%= orm_instance.update_attributes("params[:#{singular_table_name}]") %>
format.html { redirect_to @<%= singular_table_name %>, notice: <%= "'#{human_name} was successfully updated.'" %> }
format.html { redirect_to @<%= singular_table_name %>, notice: t(:'<%= "msg.#{singular_table_name}.updated" %>') }
format.json { head :no_content }
format.js { flash[:notice] = <%= "'#{human_name} was successfully updated.'" %> }
format.js { flash[:notice] = t(:'<%= "msg.#{singular_table_name}.updated" %>') }
else
format.html { render action: "edit" }
format.json { render json: <%= "@#{orm_instance.errors}" %>, status: :unprocessable_entity }
Expand Down

0 comments on commit b517978

Please sign in to comment.