forked from refinery/refinerycms-i18n
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add config files to generator template and make it actually work.
- Loading branch information
Showing
7 changed files
with
27 additions
and
12 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
module Refinery | ||
class I18nGenerator < Rails::Generators::Base | ||
source_root File.expand_path('../templates', __FILE__) | ||
|
||
def generate_refinery_i18n_initializer | ||
template "config/initializers/refinery_i18n.rb.erb", File.join(destination_root, "config", "initializers", "refinery_i18n.rb") | ||
end | ||
|
||
def generate_i18n_js | ||
template "config/i18n-js.yml", File.join(destination_root, "config", "i18n-js.yml") | ||
end | ||
end | ||
end |
File renamed without changes.
File renamed without changes.
11 changes: 11 additions & 0 deletions
11
lib/generators/refinery/templates/config/initializers/refinery_i18n.rb.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
Refinery::I18n.configure do |config| | ||
# config.enabled = <%= Refinery::I18n.config.enabled %> | ||
|
||
# config.default_locale = :<%= Refinery::I18n.config.default_locale %> | ||
|
||
# config.default_frontend_locale = :<%= Refinery::I18n.config.default_frontend_locale %> | ||
|
||
# config.frontend_locales = <%= Refinery::I18n.config.frontend_locales %> | ||
|
||
# config.locales = <%= Refinery::I18n.config.locales %> | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
require File.expand_path('../refinery/i18n', __FILE__) | ||
require 'refinery/i18n' |