Closed makadaw closed 8 years ago
Could you clarify a bit more on what this change does? Why is it necessary?
Sure. For example we set up few languages
languages([
"en-US",
"pt", #Portuguese
["pt", "pt_BR"] # Portuguese with Brazilian locale
])
output_directory './screenshots'
Now snapshot will create only 2 directories:
./screenshots/en-US
./screenshots/pt
So screenshots for pt_BR will be placed in pt directory. So I added condition that check if user set locale and with this changes snapshot will create 3 directories:
./screenshots/en-US
./screenshots/pt
./screenshots/pt_BR
Maybe you can improve my code (I'm not very good in Ruby :) )
@makadaw :+1: thanks! this is great!
Now if you provide locale like "pt", ["pt", "pt-BR"] it will save images to the same folder "pt". This fix use locale as folder name is user provide it