Describe the bug
Organizations with hyphenated locales (e.g. "es-MX") are not working properly when saving forms.
To Reproduce
Some steps to reproduce the behavior:
- A clean instalation of Decidim, with only one organization with one hyphenated locale as the only locale (es-MX).
- Login as Admin user
- Go to AdConfiguración / Editar organización
- Click Actualizar at the bottom of the page
Expected behavior
It should save the form correctly.
Screenshots

Extra data (please complete the following information):
- Device: Desktop
- Device OS: MacOs
- Browser: Firefox
- Decidim Version: 0.25.2
Additional context
I think the problem is related to file https://github.com/decidim/decidim/blob/develop/decidim-core/app/forms/translatable_presence_validator.rb
line 12: translated_attr = "#{attribute}_#{default_locale_for(record)}"
Attribute "admin_terms_of_use_body" with hyphenated locale "es-MX" becomes "admin_terms_of_use_body_es-MX", but it should be "admin_terms_of_use_body_es__MX".
Also, for reference, in a form like in file https://github.com/decidim/decidim/blob/develop/decidim-admin/app/forms/decidim/admin/organization_form.rb
In line 36: translatable_attribute :admin_terms_of_use_body, String gets injected as admin_terms_of_use_body_es__MX when locale is "es-MX".
Describe the bug
Organizations with hyphenated locales (e.g. "es-MX") are not working properly when saving forms.
To Reproduce
Some steps to reproduce the behavior:
Expected behavior
It should save the form correctly.
Screenshots

Extra data (please complete the following information):
Additional context
I think the problem is related to file https://github.com/decidim/decidim/blob/develop/decidim-core/app/forms/translatable_presence_validator.rb
line 12:
translated_attr = "#{attribute}_#{default_locale_for(record)}"Attribute "admin_terms_of_use_body" with hyphenated locale "es-MX" becomes "admin_terms_of_use_body_es-MX", but it should be "admin_terms_of_use_body_es__MX".
Also, for reference, in a form like in file https://github.com/decidim/decidim/blob/develop/decidim-admin/app/forms/decidim/admin/organization_form.rb
In line 36:
translatable_attribute :admin_terms_of_use_body, Stringgets injected asadmin_terms_of_use_body_es__MXwhen locale is "es-MX".