From e34a827c4841d0ffc923ad345510f2076efead16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Fri, 21 Dec 2018 19:31:03 +0100 Subject: [PATCH] Add translations for rails date order Not doing so caused crashes on applications which don't fall back to English when a translation is missing. We're adding them in a separate file so we can exclude it from crowdin and so translators don't translate symbols as if they were words which need translation. --- app/views/verification/residence/new.html.erb | 4 +++- config/i18n-tasks.yml | 2 ++ config/locales/ar/rails_date_order.yml | 6 ++++++ config/locales/ast/rails_date_order.yml | 6 ++++++ config/locales/ca/rails_date_order.yml | 6 ++++++ config/locales/de-DE/rails_date_order.yml | 6 ++++++ config/locales/en-GB/rails_date_order.yml | 6 ++++++ config/locales/en-US/rails_date_order.yml | 6 ++++++ config/locales/en/rails_date_order.yml | 6 ++++++ config/locales/es-AR/rails_date_order.yml | 6 ++++++ config/locales/es-BO/rails_date_order.yml | 6 ++++++ config/locales/es-CL/rails_date_order.yml | 6 ++++++ config/locales/es-CO/rails_date_order.yml | 6 ++++++ config/locales/es-CR/rails_date_order.yml | 6 ++++++ config/locales/es-DO/rails_date_order.yml | 6 ++++++ config/locales/es-EC/rails_date_order.yml | 6 ++++++ config/locales/es-GT/rails_date_order.yml | 6 ++++++ config/locales/es-HN/rails_date_order.yml | 6 ++++++ config/locales/es-MX/rails_date_order.yml | 6 ++++++ config/locales/es-NI/rails_date_order.yml | 6 ++++++ config/locales/es-PA/rails_date_order.yml | 6 ++++++ config/locales/es-PE/rails_date_order.yml | 6 ++++++ config/locales/es-PR/rails_date_order.yml | 6 ++++++ config/locales/es-PY/rails_date_order.yml | 6 ++++++ config/locales/es-SV/rails_date_order.yml | 6 ++++++ config/locales/es-UY/rails_date_order.yml | 6 ++++++ config/locales/es-VE/rails_date_order.yml | 6 ++++++ config/locales/es/rails_date_order.yml | 6 ++++++ config/locales/eu-ES/rails_date_order.yml | 6 ++++++ config/locales/fa-IR/rails_date_order.yml | 6 ++++++ config/locales/fi-FI/rails_date_order.yml | 6 ++++++ config/locales/fr/rails_date_order.yml | 6 ++++++ config/locales/gl/rails_date_order.yml | 6 ++++++ config/locales/he/rails_date_order.yml | 6 ++++++ config/locales/id-ID/rails_date_order.yml | 6 ++++++ config/locales/it/rails_date_order.yml | 6 ++++++ config/locales/nl/rails_date_order.yml | 6 ++++++ config/locales/pap-PAP/rails_date_order.yml | 6 ++++++ config/locales/pl-PL/rails_date_order.yml | 6 ++++++ config/locales/pt-BR/rails_date_order.yml | 6 ++++++ config/locales/ru/rails_date_order.yml | 6 ++++++ config/locales/sl-SI/rails_date_order.yml | 6 ++++++ config/locales/so-SO/rails_date_order.yml | 6 ++++++ config/locales/sq-AL/rails_date_order.yml | 6 ++++++ config/locales/sv-FI/rails_date_order.yml | 6 ++++++ config/locales/sv-SE/rails_date_order.yml | 6 ++++++ config/locales/tr-TR/rails_date_order.yml | 6 ++++++ config/locales/val/rails_date_order.yml | 6 ++++++ config/locales/zh-CN/rails_date_order.yml | 6 ++++++ config/locales/zh-TW/rails_date_order.yml | 6 ++++++ crowdin.yml | 2 ++ .../verification/level_two_verification_spec.rb | 15 +++++++++++++++ spec/support/common_actions/verifications.rb | 8 +++++--- 53 files changed, 315 insertions(+), 4 deletions(-) create mode 100644 config/locales/ar/rails_date_order.yml create mode 100644 config/locales/ast/rails_date_order.yml create mode 100644 config/locales/ca/rails_date_order.yml create mode 100644 config/locales/de-DE/rails_date_order.yml create mode 100644 config/locales/en-GB/rails_date_order.yml create mode 100644 config/locales/en-US/rails_date_order.yml create mode 100644 config/locales/en/rails_date_order.yml create mode 100644 config/locales/es-AR/rails_date_order.yml create mode 100644 config/locales/es-BO/rails_date_order.yml create mode 100644 config/locales/es-CL/rails_date_order.yml create mode 100644 config/locales/es-CO/rails_date_order.yml create mode 100644 config/locales/es-CR/rails_date_order.yml create mode 100644 config/locales/es-DO/rails_date_order.yml create mode 100644 config/locales/es-EC/rails_date_order.yml create mode 100644 config/locales/es-GT/rails_date_order.yml create mode 100644 config/locales/es-HN/rails_date_order.yml create mode 100644 config/locales/es-MX/rails_date_order.yml create mode 100644 config/locales/es-NI/rails_date_order.yml create mode 100644 config/locales/es-PA/rails_date_order.yml create mode 100644 config/locales/es-PE/rails_date_order.yml create mode 100644 config/locales/es-PR/rails_date_order.yml create mode 100644 config/locales/es-PY/rails_date_order.yml create mode 100644 config/locales/es-SV/rails_date_order.yml create mode 100644 config/locales/es-UY/rails_date_order.yml create mode 100644 config/locales/es-VE/rails_date_order.yml create mode 100644 config/locales/es/rails_date_order.yml create mode 100644 config/locales/eu-ES/rails_date_order.yml create mode 100644 config/locales/fa-IR/rails_date_order.yml create mode 100644 config/locales/fi-FI/rails_date_order.yml create mode 100644 config/locales/fr/rails_date_order.yml create mode 100644 config/locales/gl/rails_date_order.yml create mode 100644 config/locales/he/rails_date_order.yml create mode 100644 config/locales/id-ID/rails_date_order.yml create mode 100644 config/locales/it/rails_date_order.yml create mode 100644 config/locales/nl/rails_date_order.yml create mode 100644 config/locales/pap-PAP/rails_date_order.yml create mode 100644 config/locales/pl-PL/rails_date_order.yml create mode 100644 config/locales/pt-BR/rails_date_order.yml create mode 100644 config/locales/ru/rails_date_order.yml create mode 100644 config/locales/sl-SI/rails_date_order.yml create mode 100644 config/locales/so-SO/rails_date_order.yml create mode 100644 config/locales/sq-AL/rails_date_order.yml create mode 100644 config/locales/sv-FI/rails_date_order.yml create mode 100644 config/locales/sv-SE/rails_date_order.yml create mode 100644 config/locales/tr-TR/rails_date_order.yml create mode 100644 config/locales/val/rails_date_order.yml create mode 100644 config/locales/zh-CN/rails_date_order.yml create mode 100644 config/locales/zh-TW/rails_date_order.yml diff --git a/app/views/verification/residence/new.html.erb b/app/views/verification/residence/new.html.erb index 7c2910581..2994f470a 100644 --- a/app/views/verification/residence/new.html.erb +++ b/app/views/verification/residence/new.html.erb @@ -93,7 +93,9 @@
- <%= f.submit t("verification.residence.new.verify_residence"), class: "button success expanded" %> + <%= f.submit t("verification.residence.new.verify_residence"), + id: "new_residence_submit", + class: "button success expanded" %>
<% end %> diff --git a/config/i18n-tasks.yml b/config/i18n-tasks.yml index 23190a660..b7b6ca9d2 100644 --- a/config/i18n-tasks.yml +++ b/config/i18n-tasks.yml @@ -22,6 +22,7 @@ data: ## Another gem (replace %#= with %=): # - "<%#= %x[bundle show vagrant].chomp %>/templates/locales/%{locale}.yml" - config/locales/custom/%{locale}/*.yml + - config/locales/%{locale}/rails_date_order.yml - config/locales/%{locale}/general.yml - config/locales/%{locale}/activerecord.yml - config/locales/%{locale}/activemodel.yml @@ -124,6 +125,7 @@ ignore_unused: - 'budgets.index.section_header.*' - 'activerecord.*' - 'activemodel.*' + - 'date.order' - 'unauthorized.*' - 'admin.officials.level_*' - 'admin.comments.index.filter*' diff --git a/config/locales/ar/rails_date_order.yml b/config/locales/ar/rails_date_order.yml new file mode 100644 index 000000000..0d90fabb1 --- /dev/null +++ b/config/locales/ar/rails_date_order.yml @@ -0,0 +1,6 @@ +ar: + date: + order: + - :year + - :month + - :day diff --git a/config/locales/ast/rails_date_order.yml b/config/locales/ast/rails_date_order.yml new file mode 100644 index 000000000..be93be996 --- /dev/null +++ b/config/locales/ast/rails_date_order.yml @@ -0,0 +1,6 @@ +ast: + date: + order: + - :day + - :month + - :year diff --git a/config/locales/ca/rails_date_order.yml b/config/locales/ca/rails_date_order.yml new file mode 100644 index 000000000..9d1c9becf --- /dev/null +++ b/config/locales/ca/rails_date_order.yml @@ -0,0 +1,6 @@ +ca: + date: + order: + - :day + - :month + - :year diff --git a/config/locales/de-DE/rails_date_order.yml b/config/locales/de-DE/rails_date_order.yml new file mode 100644 index 000000000..8aba29f9a --- /dev/null +++ b/config/locales/de-DE/rails_date_order.yml @@ -0,0 +1,6 @@ +de: + date: + order: + - :year + - :month + - :day diff --git a/config/locales/en-GB/rails_date_order.yml b/config/locales/en-GB/rails_date_order.yml new file mode 100644 index 000000000..f3e65e60f --- /dev/null +++ b/config/locales/en-GB/rails_date_order.yml @@ -0,0 +1,6 @@ +en-GB: + date: + order: + - :year + - :month + - :day diff --git a/config/locales/en-US/rails_date_order.yml b/config/locales/en-US/rails_date_order.yml new file mode 100644 index 000000000..de0a04145 --- /dev/null +++ b/config/locales/en-US/rails_date_order.yml @@ -0,0 +1,6 @@ +en-US: + date: + order: + - :year + - :month + - :day diff --git a/config/locales/en/rails_date_order.yml b/config/locales/en/rails_date_order.yml new file mode 100644 index 000000000..6bd522ca6 --- /dev/null +++ b/config/locales/en/rails_date_order.yml @@ -0,0 +1,6 @@ +en: + date: + order: + - :year + - :month + - :day diff --git a/config/locales/es-AR/rails_date_order.yml b/config/locales/es-AR/rails_date_order.yml new file mode 100644 index 000000000..461b525e6 --- /dev/null +++ b/config/locales/es-AR/rails_date_order.yml @@ -0,0 +1,6 @@ +es-AR: + date: + order: + - :day + - :month + - :year diff --git a/config/locales/es-BO/rails_date_order.yml b/config/locales/es-BO/rails_date_order.yml new file mode 100644 index 000000000..a7068fabb --- /dev/null +++ b/config/locales/es-BO/rails_date_order.yml @@ -0,0 +1,6 @@ +es-BO: + date: + order: + - :day + - :month + - :year diff --git a/config/locales/es-CL/rails_date_order.yml b/config/locales/es-CL/rails_date_order.yml new file mode 100644 index 000000000..c90d13afe --- /dev/null +++ b/config/locales/es-CL/rails_date_order.yml @@ -0,0 +1,6 @@ +es-CL: + date: + order: + - :day + - :month + - :year diff --git a/config/locales/es-CO/rails_date_order.yml b/config/locales/es-CO/rails_date_order.yml new file mode 100644 index 000000000..a857bb531 --- /dev/null +++ b/config/locales/es-CO/rails_date_order.yml @@ -0,0 +1,6 @@ +es-CO: + date: + order: + - :day + - :month + - :year diff --git a/config/locales/es-CR/rails_date_order.yml b/config/locales/es-CR/rails_date_order.yml new file mode 100644 index 000000000..2badc36d0 --- /dev/null +++ b/config/locales/es-CR/rails_date_order.yml @@ -0,0 +1,6 @@ +es-CR: + date: + order: + - :day + - :month + - :year diff --git a/config/locales/es-DO/rails_date_order.yml b/config/locales/es-DO/rails_date_order.yml new file mode 100644 index 000000000..ccf122e83 --- /dev/null +++ b/config/locales/es-DO/rails_date_order.yml @@ -0,0 +1,6 @@ +es-DO: + date: + order: + - :day + - :month + - :year diff --git a/config/locales/es-EC/rails_date_order.yml b/config/locales/es-EC/rails_date_order.yml new file mode 100644 index 000000000..959849ec7 --- /dev/null +++ b/config/locales/es-EC/rails_date_order.yml @@ -0,0 +1,6 @@ +es-EC: + date: + order: + - :day + - :month + - :year diff --git a/config/locales/es-GT/rails_date_order.yml b/config/locales/es-GT/rails_date_order.yml new file mode 100644 index 000000000..93ec0eb23 --- /dev/null +++ b/config/locales/es-GT/rails_date_order.yml @@ -0,0 +1,6 @@ +es-GT: + date: + order: + - :day + - :month + - :year diff --git a/config/locales/es-HN/rails_date_order.yml b/config/locales/es-HN/rails_date_order.yml new file mode 100644 index 000000000..cdb1ace9d --- /dev/null +++ b/config/locales/es-HN/rails_date_order.yml @@ -0,0 +1,6 @@ +es-HN: + date: + order: + - :day + - :month + - :year diff --git a/config/locales/es-MX/rails_date_order.yml b/config/locales/es-MX/rails_date_order.yml new file mode 100644 index 000000000..33553e45f --- /dev/null +++ b/config/locales/es-MX/rails_date_order.yml @@ -0,0 +1,6 @@ +es-MX: + date: + order: + - :day + - :month + - :year diff --git a/config/locales/es-NI/rails_date_order.yml b/config/locales/es-NI/rails_date_order.yml new file mode 100644 index 000000000..c683a8e62 --- /dev/null +++ b/config/locales/es-NI/rails_date_order.yml @@ -0,0 +1,6 @@ +es-NI: + date: + order: + - :day + - :month + - :year diff --git a/config/locales/es-PA/rails_date_order.yml b/config/locales/es-PA/rails_date_order.yml new file mode 100644 index 000000000..1b967f208 --- /dev/null +++ b/config/locales/es-PA/rails_date_order.yml @@ -0,0 +1,6 @@ +es-PA: + date: + order: + - :day + - :month + - :year diff --git a/config/locales/es-PE/rails_date_order.yml b/config/locales/es-PE/rails_date_order.yml new file mode 100644 index 000000000..f3daa7f47 --- /dev/null +++ b/config/locales/es-PE/rails_date_order.yml @@ -0,0 +1,6 @@ +es-PE: + date: + order: + - :day + - :month + - :year diff --git a/config/locales/es-PR/rails_date_order.yml b/config/locales/es-PR/rails_date_order.yml new file mode 100644 index 000000000..264d46cc2 --- /dev/null +++ b/config/locales/es-PR/rails_date_order.yml @@ -0,0 +1,6 @@ +es-PR: + date: + order: + - :day + - :month + - :year diff --git a/config/locales/es-PY/rails_date_order.yml b/config/locales/es-PY/rails_date_order.yml new file mode 100644 index 000000000..a9fc713dd --- /dev/null +++ b/config/locales/es-PY/rails_date_order.yml @@ -0,0 +1,6 @@ +es-PY: + date: + order: + - :day + - :month + - :year diff --git a/config/locales/es-SV/rails_date_order.yml b/config/locales/es-SV/rails_date_order.yml new file mode 100644 index 000000000..7f8a94e38 --- /dev/null +++ b/config/locales/es-SV/rails_date_order.yml @@ -0,0 +1,6 @@ +es-SV: + date: + order: + - :day + - :month + - :year diff --git a/config/locales/es-UY/rails_date_order.yml b/config/locales/es-UY/rails_date_order.yml new file mode 100644 index 000000000..a8ada3084 --- /dev/null +++ b/config/locales/es-UY/rails_date_order.yml @@ -0,0 +1,6 @@ +es-UY: + date: + order: + - :day + - :month + - :year diff --git a/config/locales/es-VE/rails_date_order.yml b/config/locales/es-VE/rails_date_order.yml new file mode 100644 index 000000000..3e6ecb35c --- /dev/null +++ b/config/locales/es-VE/rails_date_order.yml @@ -0,0 +1,6 @@ +es-VE: + date: + order: + - :day + - :month + - :year diff --git a/config/locales/es/rails_date_order.yml b/config/locales/es/rails_date_order.yml new file mode 100644 index 000000000..1d16323be --- /dev/null +++ b/config/locales/es/rails_date_order.yml @@ -0,0 +1,6 @@ +es: + date: + order: + - :day + - :month + - :year diff --git a/config/locales/eu-ES/rails_date_order.yml b/config/locales/eu-ES/rails_date_order.yml new file mode 100644 index 000000000..b43a345ce --- /dev/null +++ b/config/locales/eu-ES/rails_date_order.yml @@ -0,0 +1,6 @@ +eu: + date: + order: + - :year + - :month + - :day diff --git a/config/locales/fa-IR/rails_date_order.yml b/config/locales/fa-IR/rails_date_order.yml new file mode 100644 index 000000000..22a908d70 --- /dev/null +++ b/config/locales/fa-IR/rails_date_order.yml @@ -0,0 +1,6 @@ +fa: + date: + order: + - :year + - :month + - :day diff --git a/config/locales/fi-FI/rails_date_order.yml b/config/locales/fi-FI/rails_date_order.yml new file mode 100644 index 000000000..aeba2c658 --- /dev/null +++ b/config/locales/fi-FI/rails_date_order.yml @@ -0,0 +1,6 @@ +fi: + date: + order: + - :year + - :month + - :day diff --git a/config/locales/fr/rails_date_order.yml b/config/locales/fr/rails_date_order.yml new file mode 100644 index 000000000..be17764b7 --- /dev/null +++ b/config/locales/fr/rails_date_order.yml @@ -0,0 +1,6 @@ +fr: + date: + order: + - :year + - :month + - :day diff --git a/config/locales/gl/rails_date_order.yml b/config/locales/gl/rails_date_order.yml new file mode 100644 index 000000000..ba1c6c814 --- /dev/null +++ b/config/locales/gl/rails_date_order.yml @@ -0,0 +1,6 @@ +gl: + date: + order: + - :day + - :month + - :year diff --git a/config/locales/he/rails_date_order.yml b/config/locales/he/rails_date_order.yml new file mode 100644 index 000000000..1ee23e7c0 --- /dev/null +++ b/config/locales/he/rails_date_order.yml @@ -0,0 +1,6 @@ +he: + date: + order: + - :year + - :month + - :day diff --git a/config/locales/id-ID/rails_date_order.yml b/config/locales/id-ID/rails_date_order.yml new file mode 100644 index 000000000..e891a106a --- /dev/null +++ b/config/locales/id-ID/rails_date_order.yml @@ -0,0 +1,6 @@ +id: + date: + order: + - :year + - :month + - :day diff --git a/config/locales/it/rails_date_order.yml b/config/locales/it/rails_date_order.yml new file mode 100644 index 000000000..82c3c2696 --- /dev/null +++ b/config/locales/it/rails_date_order.yml @@ -0,0 +1,6 @@ +it: + date: + order: + - :year + - :month + - :day diff --git a/config/locales/nl/rails_date_order.yml b/config/locales/nl/rails_date_order.yml new file mode 100644 index 000000000..234ec25f8 --- /dev/null +++ b/config/locales/nl/rails_date_order.yml @@ -0,0 +1,6 @@ +nl: + date: + order: + - :year + - :month + - :day diff --git a/config/locales/pap-PAP/rails_date_order.yml b/config/locales/pap-PAP/rails_date_order.yml new file mode 100644 index 000000000..96ac32fc5 --- /dev/null +++ b/config/locales/pap-PAP/rails_date_order.yml @@ -0,0 +1,6 @@ +pap: + date: + order: + - :year + - :month + - :day diff --git a/config/locales/pl-PL/rails_date_order.yml b/config/locales/pl-PL/rails_date_order.yml new file mode 100644 index 000000000..a20a3eeca --- /dev/null +++ b/config/locales/pl-PL/rails_date_order.yml @@ -0,0 +1,6 @@ +pl: + date: + order: + - :year + - :month + - :day diff --git a/config/locales/pt-BR/rails_date_order.yml b/config/locales/pt-BR/rails_date_order.yml new file mode 100644 index 000000000..00780374d --- /dev/null +++ b/config/locales/pt-BR/rails_date_order.yml @@ -0,0 +1,6 @@ +pt-BR: + date: + order: + - :year + - :month + - :day diff --git a/config/locales/ru/rails_date_order.yml b/config/locales/ru/rails_date_order.yml new file mode 100644 index 000000000..9bd47d6ed --- /dev/null +++ b/config/locales/ru/rails_date_order.yml @@ -0,0 +1,6 @@ +ru: + date: + order: + - :year + - :month + - :day diff --git a/config/locales/sl-SI/rails_date_order.yml b/config/locales/sl-SI/rails_date_order.yml new file mode 100644 index 000000000..d8173e0fe --- /dev/null +++ b/config/locales/sl-SI/rails_date_order.yml @@ -0,0 +1,6 @@ +sl: + date: + order: + - :year + - :month + - :day diff --git a/config/locales/so-SO/rails_date_order.yml b/config/locales/so-SO/rails_date_order.yml new file mode 100644 index 000000000..185aa4b5f --- /dev/null +++ b/config/locales/so-SO/rails_date_order.yml @@ -0,0 +1,6 @@ +so: + date: + order: + - :year + - :month + - :day diff --git a/config/locales/sq-AL/rails_date_order.yml b/config/locales/sq-AL/rails_date_order.yml new file mode 100644 index 000000000..1f78adbc7 --- /dev/null +++ b/config/locales/sq-AL/rails_date_order.yml @@ -0,0 +1,6 @@ +sq: + date: + order: + - :year + - :month + - :day diff --git a/config/locales/sv-FI/rails_date_order.yml b/config/locales/sv-FI/rails_date_order.yml new file mode 100644 index 000000000..d9f60e884 --- /dev/null +++ b/config/locales/sv-FI/rails_date_order.yml @@ -0,0 +1,6 @@ +sv-FI: + date: + order: + - :year + - :month + - :day diff --git a/config/locales/sv-SE/rails_date_order.yml b/config/locales/sv-SE/rails_date_order.yml new file mode 100644 index 000000000..50a3eb333 --- /dev/null +++ b/config/locales/sv-SE/rails_date_order.yml @@ -0,0 +1,6 @@ +sv: + date: + order: + - :year + - :month + - :day diff --git a/config/locales/tr-TR/rails_date_order.yml b/config/locales/tr-TR/rails_date_order.yml new file mode 100644 index 000000000..05f7a71d0 --- /dev/null +++ b/config/locales/tr-TR/rails_date_order.yml @@ -0,0 +1,6 @@ +tr: + date: + order: + - :year + - :month + - :day diff --git a/config/locales/val/rails_date_order.yml b/config/locales/val/rails_date_order.yml new file mode 100644 index 000000000..5f6241b89 --- /dev/null +++ b/config/locales/val/rails_date_order.yml @@ -0,0 +1,6 @@ +val: + date: + order: + - :year + - :month + - :day diff --git a/config/locales/zh-CN/rails_date_order.yml b/config/locales/zh-CN/rails_date_order.yml new file mode 100644 index 000000000..340918e4b --- /dev/null +++ b/config/locales/zh-CN/rails_date_order.yml @@ -0,0 +1,6 @@ +zh-CN: + date: + order: + - :year + - :month + - :day diff --git a/config/locales/zh-TW/rails_date_order.yml b/config/locales/zh-TW/rails_date_order.yml new file mode 100644 index 000000000..8eed63526 --- /dev/null +++ b/config/locales/zh-TW/rails_date_order.yml @@ -0,0 +1,6 @@ +zh-TW: + date: + order: + - :year + - :month + - :day diff --git a/crowdin.yml b/crowdin.yml index 6f1561d54..29d5cf169 100644 --- a/crowdin.yml +++ b/crowdin.yml @@ -1,6 +1,8 @@ files: - source: /config/locales/en/**.yml translation: /config/locales/%locale%/%original_file_name% + ignore: + - /config/locales/**/rails_date_order.yml update_option: update_without_changes languages_mapping: locale: diff --git a/spec/features/verification/level_two_verification_spec.rb b/spec/features/verification/level_two_verification_spec.rb index 64673f82c..0c6c0f349 100644 --- a/spec/features/verification/level_two_verification_spec.rb +++ b/spec/features/verification/level_two_verification_spec.rb @@ -24,4 +24,19 @@ feature 'Level two verification' do expect(page).to have_content 'Code correct' end + context "In Spanish, with no fallbacks" do + before do + skip unless I18n.available_locales.include?(:es) + allow(I18n.fallbacks).to receive(:[]).and_return([:es]) + end + + scenario "Works normally" do + user = create(:user) + login_as(user) + + visit verification_path(locale: :es) + verify_residence + end + end + end diff --git a/spec/support/common_actions/verifications.rb b/spec/support/common_actions/verifications.rb index 28364a759..af5896121 100644 --- a/spec/support/common_actions/verifications.rb +++ b/spec/support/common_actions/verifications.rb @@ -10,12 +10,14 @@ module Verifications def verify_residence select 'DNI', from: 'residence_document_type' fill_in 'residence_document_number', with: "12345678Z" - select_date '31-December-1980', from: 'residence_date_of_birth' + select_date "31-#{I18n.l(Date.current.at_end_of_year, format: "%B")}-1980", + from: "residence_date_of_birth" + fill_in 'residence_postal_code', with: '28013' check 'residence_terms_of_service' - click_button 'Verify residence' - expect(page).to have_content 'Residence verified' + click_button "new_residence_submit" + expect(page).to have_content I18n.t("verification.residence.create.flash.success") end def officing_verify_residence