datocms / ruby-datocms-client

Ruby client for the DatoCMS API.
https://www.datocms.com/docs/content-management-api/using-the-ruby-client
MIT License
20 stars 14 forks source link

api or library has dropped locale support ;-/ #3

Closed ahoward closed 7 years ago

ahoward commented 7 years ago

clickclean-site (master)*$ cat dato.config.rb

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)*$ ./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

image

ahoward commented 7 years ago

cause: https://github.com/datocms/ruby-datocms-client/issues/4