I18n.enforce_available_locales = false
dato.available_locales.each do |locale|
directory "data/dato/#{locale}" do
I18n.with_locale(locale) do
create_data_file "site.yml", :yaml, dato.site.to_hash
dato.item_types.each do |item_type|
create_data_file "#{item_type.api_key}.yml", :yaml,
dato.items_of_type(item_type).map(&:to_hash)
end
end
end
end
clickclean-site (master)$ grep title data/dato//score_card.yml
data/dato/en/score_card.yml: title: Netflix in English
data/dato/en/score_card.yml: title: foo
data/dato/es/score_card.yml: title: Netflix in English
data/dato/es/score_card.yml: title: foo
clickclean-site (master)*$ cat dato.config.rb
clickclean-site (master)*$ ./bin/dato dump --token=144af37c0500df7d1e6671fed6b685e91378ff7ce88212719e
clickclean-site (master)$ grep title data/dato//score_card.yml data/dato/en/score_card.yml: title: Netflix in English data/dato/en/score_card.yml: title: foo data/dato/es/score_card.yml: title: Netflix in English data/dato/es/score_card.yml: title: foo