Skip to content

Instantly share code, notes, and snippets.

@cmc333333
Created February 10, 2015 00:01
Show Gist options
  • Save cmc333333/8091607b4f2829a63995 to your computer and use it in GitHub Desktop.
Save cmc333333/8091607b4f2829a63995 to your computer and use it in GitHub Desktop.
Use i18n
diff --git a/app/views/shared/_cart_properties.html.erb b/app/views/shared/_cart_properties.html.erb
index 9f04e3d..1b8e98b 100644
--- a/app/views/shared/_cart_properties.html.erb
+++ b/app/views/shared/_cart_properties.html.erb
@@ -8,7 +8,8 @@
<%- unless cart.property_exclusions.include? property %>
<tr class="cart_item_information">
<td class="results-list" align="left">
- <strong><%= property.underscore.humanize %></strong>
+ <strong><%= I18n.t('helpers.label.cart.' + property,
+ default: property.underscore.humanize) %></strong>
</td>
<td>
<%= value %>
diff --git a/config/locales/en.yml b/config/locales/en.yml
index 83b7b33..45e01e8 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -26,3 +26,9 @@ en:
time:
formats:
default: "%b %-d, %Y at %I:%M%p %Z"
+ helpers:
+ label:
+ ncr/proposal:
+ rwa_number: "RWA Number"
+ cart:
+ rwa_number: "RWA Number"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment