summaryrefslogtreecommitdiff
path: root/lib/tasks
diff options
context:
space:
mode:
Diffstat (limited to 'lib/tasks')
-rw-r--r--lib/tasks/i18n.rake30
1 files changed, 16 insertions, 14 deletions
diff --git a/lib/tasks/i18n.rake b/lib/tasks/i18n.rake
index 896f67e..6ffbb23 100644
--- a/lib/tasks/i18n.rake
+++ b/lib/tasks/i18n.rake
@@ -26,24 +26,26 @@ namespace :i18n do
#
desc "combine config/locales/*.en.yml to lib/en_US.yml"
task :bundle do
- en_yml = File.join(Rails.root, 'lib', 'en_US.yml')
- File.open(en_yml, 'w') do |output|
- output.write("en_US:\n\n"+
- "### Do NOT edit this file directly, as all changes will be overwritten by `rake i18n:bundle`\n"+
- "### Instead, make changes in the appropriate file in config/locales.\n"+
- "### Source strings in transifex are automatically updated from this file (via github url)")
+ Dir.chdir(Rails.root) do
+ en_yml = 'lib/en_US.yml'
+ File.open(en_yml, 'w') do |output|
+ output.write("en_US:\n\n"+
+ "### Do NOT edit this file directly, as all changes will be overwritten by `rake i18n:bundle`\n"+
+ "### Instead, make changes in the appropriate file in config/locales.\n"+
+ "### Source strings in transifex are automatically updated from this file (via github url)")
- Dir.chdir('config/locales/') do
- Dir.glob('*.en.yml').sort.each do |file|
- process_locale_file(output, file)
+ Dir.chdir('config/locales/en') do
+ Dir.glob('*.en.yml').sort.each do |file|
+ process_locale_file(output, file)
+ end
end
- end
- Dir.chdir('engines/') do
- Dir.glob('*/config/locales/en.yml').sort.each do |file|
- process_locale_file(output, file)
+ Dir.chdir('engines') do
+ Dir.glob('*/config/locales/en.yml').sort.each do |file|
+ process_locale_file(output, file)
+ end
end
+ puts "You can now find the bundled locale yml in: #{en_yml}"
end
- puts "You can now find the bundled locale yml in: #{en_yml}"
end
end