i18n
https://github.com/svenfuchs/i18n
Ruby
Internationalization (i18n) library for Ruby
I18n::Backend::Flatten#flatten_keys
Flatten keys for nested Hashes by chaining up keys:
>> { "a" => { "b" => { "c" => "d", "e" => "f" }, "g" => "h" }, "i" => "j"}.wind
=> { "a.b.c" => "d", "a.b.e" => "f", "a.g" => "h", "i" => "j" }Edit
git clone [email protected]:svenfuchs/i18n.git
cd i18n
open lib/i18n/backend/flatten.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-I18n--Backend--Flatten-flatten_keys-for-pr
# Commit to gitgit add lib/i18n/backend/flatten.rbgit commit -m "better docs for I18n::Backend::Flatten#flatten_keys"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-I18n--Backend--Flatten-flatten_keys-for-pr
hub pull-request
# Celebrate!