Class: ShoppingCart::TranslateGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/shopping_cart/translate_generator.rb

Instance Method Summary collapse

Instance Method Details

#create_internationalization_fileObject



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# File 'lib/generators/shopping_cart/translate_generator.rb', line 5

def create_internationalization_file
  create_file "config/locales/shopping_cart.en.yml",
"en:
  shopping_cart:
currency: $
back: Back
empty_cart: Your cart is empty
product: Product
price: Price
qty: Quantity
total: Total
subtotal: Subtotal
discount: Discount
clear_cart: Clear your cart
go_shopping: Proceed shopping
coupon: Discount coupon
checkout: Checkout
address: Address
complete: Complete
code: Coupon code
close: Close
send: Send
delivery: Delivery
summary: Order summary
place_order: Place order
first_name: First name
last_name: Last name
city: City
phone: Phone
details: Details
payment: Payment
card_number: Card number
item_added: You added item to cart
cart_updated: You updated a cart
valid_coupon: Your discount is %{amount}% from cart total price
order_placed: Congratulations! Yout order placed successfully. Will get in touch asap."
end