From 9514ece2c2f37d78407f5ac9165bf7b51c47c1de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Tue, 9 Nov 2021 21:47:58 +0100 Subject: [PATCH] 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. --- db/dev_seeds.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/dev_seeds.rb b/db/dev_seeds.rb index 7b8755b30..e5f52289b 100644 --- a/db/dev_seeds.rb +++ b/db/dev_seeds.rb @@ -18,7 +18,7 @@ def log(msg) end 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 require_relative "dev_seeds/settings"