Permalink
Browse files

Introduced address_book scope for I18n keys

  • Loading branch information...
romul committed Jan 14, 2013
1 parent 22e5cff commit e64a391f5a0eede325e6e4a49d1601b99a813801
@@ -1,6 +1,6 @@
<%= form_for @address do |f| %>
<fieldset>
- <%= content_tag(:legend, t(:edit_shipping_address)) %>
+ <%= content_tag(:legend, t(:edit_shipping_address, :scope => :address_book)) %>
<div class="inner">
<%= render :partial => 'spree/addresses/form', :locals => {
:address_name => 'address',
@@ -20,7 +20,7 @@
<label><%= form.radio_button "#{address_name}_id", address.id, :checked => (idx == 0) %> <%= address %></label> <%= link_to t(:edit), edit_address_path(address) %><br />
</span>
<% end %>
- <label><%= form.radio_button "#{address_name}_id", 0 %> <%= t('other_address') %></label>
+ <label><%= form.radio_button "#{address_name}_id", 0 %> <%= t('other_address', :scope => :address_book) %></label>
</p>
</div>
<% end %>
@@ -1,4 +1,4 @@
-<h3><%= t(:shipping_addresses) %></h3>
+<h3><%= t(:shipping_addresses, :scope => :address_book) %></h3>
<% if spree_current_user.addresses.present? %>
<table id="user_addresses">
<tbody>
@@ -15,9 +15,9 @@
</table>
<% else %>
<div id="users-address-list-empty">
- <%= t(:no_shipping_addresses_on_file) %>
+ <%= t(:no_shipping_addresses_on_file, :scope => :address_book) %>
</div>
<% end %>
<div id="new_address_link">
- <%= link_to t(:add_new_shipping_address), :controller => :addresses, :action => :new %>
+ <%= link_to t(:add_new_shipping_address, :scope => :address_book), :controller => :addresses, :action => :new %>
</div>
View
@@ -2,14 +2,15 @@
# See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
en:
- other_address: "Other address"
- add_new_shipping_address: "Add new shipping address"
- new_shipping_address: "New Shipping Address"
- edit_shipping_address: "Edit Shipping Address"
- no_shipping_addresses_on_file: "No shipping addresses on file"
- shipping_addresses: "Shipping Addresses"
- successfully_saved: "Saved successfully"
- unsuccessfully_saved: "There was an error while trying to save your address."
- successfully_updated: "Updated successfully"
- unsuccessfully_updated: "There was an update while trying to update your address."
- save: "Save"
+ address_book:
+ other_address: "Other address"
+ add_new_shipping_address: "Add new shipping address"
+ new_shipping_address: "New Shipping Address"
+ edit_shipping_address: "Edit Shipping Address"
+ no_shipping_addresses_on_file: "No shipping addresses on file"
+ shipping_addresses: "Shipping Addresses"
+ successfully_saved: "Saved successfully"
+ unsuccessfully_saved: "There was an error while trying to save your address."
+ successfully_updated: "Updated successfully"
+ unsuccessfully_updated: "There was an update while trying to update your address."
+ save: "Save"
View
@@ -1,2 +1,3 @@
pt-BR:
- other_address: "Outros endereços"
+ address_book:
+ other_address: "Outros endereços"
View
@@ -1,12 +1,13 @@
ru:
- other_address: "Другой адрес"
- add_new_shipping_address: "Добавить новый адрес"
- new_shipping_address: "Новый адрес"
- edit_shipping_address: "Редактирование адреса"
- no_shipping_addresses_on_file: "Вы пока не указали ни одного адреса"
- shipping_addresses: "Адреса"
- successfully_saved: "Успешно сохранен"
- unsuccessfully_saved: "Возникла ошибка при попытке сохранить ваш адрес."
- successfully_updated: "Успешно обновлён"
- unsuccessfully_updated: "Возникла ошибка при попытке обновить ваш адрес."
- save: "Сохранить"
+ address_book:
+ other_address: "Другой адрес"
+ add_new_shipping_address: "Добавить новый адрес"
+ new_shipping_address: "Новый адрес"
+ edit_shipping_address: "Редактирование адреса"
+ no_shipping_addresses_on_file: "Вы пока не указали ни одного адреса"
+ shipping_addresses: "Адреса"
+ successfully_saved: "Успешно сохранен"
+ unsuccessfully_saved: "Возникла ошибка при попытке сохранить ваш адрес."
+ successfully_updated: "Успешно обновлён"
+ unsuccessfully_updated: "Возникла ошибка при попытке обновить ваш адрес."
+ save: "Сохранить"

0 comments on commit e64a391

Please sign in to comment.