Skip to content

Commit

Permalink
also copy locale file
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Reinsch committed May 20, 2011
1 parent fd21b66 commit ee3e968
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 7 deletions.
8 changes: 1 addition & 7 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
en:
subscription_fu:
subscription:
description: "MyApp %{plan_name} subscription for %{subject_desc}, %{price} per month"
description: "%{plan_name} subscription for %{subject_desc}, %{price} per month"
cancel_notes:
update: "Changed subscription plan"
cancel: "Subscription cancelled"
plan:
options:
profess: Professional
premium: Premium
basic: Basic
free: Free
3 changes: 3 additions & 0 deletions lib/generators/subscription_fu/install_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ def create_migration_file
def copy_initializer
template 'initializer.rb', 'config/initializers/subscription_fu.rb'
end
def copy_language_file
template 'en.yml', 'config/locales/subscription_fu.en.yml'
end
end
end
end
17 changes: 17 additions & 0 deletions lib/generators/subscription_fu/templates/en.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
en:
subscription_fu:
subscription:
# description used for Paypal
description: "%{plan_name} subscription for %{subject_desc}, %{price} per month"
# cancel notes used as description for Paypal
cancel_notes:
update: "Changed subscription plan"
cancel: "Subscription cancelled"
plan:
options:
# match this section with the plan names you are using in
# config/initializers/subscription_fu.rb to get human readable names
profess: Professional
premium: Premium
basic: Basic
free: Free
17 changes: 17 additions & 0 deletions spec/app/config/locales/subscription_fu.en.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
en:
subscription_fu:
subscription:
# description used for Paypal
description: "%{plan_name} subscription for %{subject_desc}, %{price} per month"
# cancel notes used as description for Paypal
cancel_notes:
update: "Changed subscription plan"
cancel: "Subscription cancelled"
plan:
options:
# match this section with the plan names you are using in
# config/initializers/subscription_fu.rb to get human readable names
profess: Professional
premium: Premium
basic: Basic
free: Free

0 comments on commit ee3e968

Please sign in to comment.