Fred-grais / transifex-interface-ruby

A Transifex API interface written in ruby
MIT License
5 stars 12 forks source link

Not able to send YML file path anymore (`Transifex::TransifexError: Could not import file: 'str' object has no attribute 'keys'`) #13

Open caiosba opened 7 years ago

caiosba commented 7 years ago

Until today, I was able to send strings to Transifex from a locale file this way, https://github.com/Fred-grais/transifex-interface-ruby#create-2, by passing the file path only:

params = {:slug => "resource_slug", :name => "Resource created with a file", :i18n_type => "YAML", :content => 'path/to/your/file.yml'}

But now it throws an error: Transifex::TransifexError: Could not import file: 'str' object has no attribute 'keys'.

Works if I send the file contents instead of the file path:

params = {:slug => "resource_slug", :name => "Resource created with a file", :i18n_type => "YAML", :content => File.read('path/to/your/file.yml')}

Did anyone also experience this?

bogren commented 6 years ago

We see the same issue for .strings files.