Sha256: d0f8c423406d79273499f9116236f2ccc679fd6eb1771ff9bce722b4833a5930
Contents?: true
Size: 481 Bytes
Versions: 3
Compression:
Stored size: 481 Bytes
Contents
# frozen_string_literal: true require 'yaml' require 'active_support/inflector' namespace :servitium do desc 'Convert localization keys' task :convert_keys do locs = YAML.load(File.read('./config/locales/en.yml')) locs['en']['services'].each_key do |service| locs['en'][service[0..-9].pluralize] = { 'service' => locs['en']['services'][service].dup } end File.open('./config/locales/en.yml', 'w') do |f| f.write YAML.dump(locs) end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
servitium-1.3.0 | lib/tasks/servitium_tasks.rake |
servitium-1.2.28 | lib/tasks/servitium_tasks.rake |
servitium-1.2.20 | lib/tasks/servitium_tasks.rake |