Skip to content

Instantly share code, notes, and snippets.

@nordringrayhide
Created September 9, 2010 14:03
Show Gist options
  • Save nordringrayhide/571904 to your computer and use it in GitHub Desktop.
Save nordringrayhide/571904 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
Dir.glob("config/locales/*.yml") do |locale|
puts "Fixing #{locale}"
content = File.read(locale).gsub(/\{\{(.*?)\}\}/,'%{\1}')
File.open(locale, 'w') { |f| f.write content }
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment