Skip to content

Instantly share code, notes, and snippets.

@mrcasals
Created August 12, 2020 12:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mrcasals/9ec30f254d8a1fe579ff08db71401dc2 to your computer and use it in GitHub Desktop.
Save mrcasals/9ec30f254d8a1fe579ff08db71401dc2 to your computer and use it in GitHub Desktop.
Gather locale files for Decidim - REQUIRES ZSH
# THIS REQUIRES ZSH
# Create the file structure:
system("ls decidim-*/config/locales/*.yml | xargs -I % dirname % | xargs -I % mkdir -p yamls/%")
# List of official locales
official_locales = %w(
bg
hr
cs
da
nl
en
et
fi
fr
de
el
hu
ga
it
lv
lt
mt
po
pr
ro
sr
sk
sl
es
)
official_locales.each do |locale|
system("ls decidim-*/config/locales/#{locale}.yml | xargs -I % cp % yamls/%")
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment