Prioritize English and Spanish in dev seeds

These locales are officially maintained by CONSUL developers, so we're
using them when available.

This way we'll be able to use `random_locales` in places where we're
manually using English and Spanish, giving support to other locales
while maintaining compatibility with the current version.
This commit is contained in:
Javi Martín
2021-11-09 21:47:58 +01:00
parent dd28ea7713
commit 9514ece2c2

View File

@@ -18,7 +18,7 @@ def log(msg)
end end
def random_locales def random_locales
[I18n.default_locale, *I18n.available_locales.sample(4)].uniq [I18n.default_locale, *(I18n.available_locales & %i[en es]), *I18n.available_locales.sample(4)].uniq.take(5)
end end
require_relative "dev_seeds/settings" require_relative "dev_seeds/settings"