When not yet exists I18nContentTranslation languages,
SiteCustomization::InformationText section render I18n.locale by
default. This was causing that `languages in use` description and
default selected language were incorrectly initialized.
As translatable translations already exists in these specs it has more
sense to me to use select_language intead of adding an already existing
language. Anyway both versions behaves the same and specs pass.
When translations interface is enabled we also want to keep
proper alignment between translatable and not translatable fields.
Co-Authored-By: alessandro <agileontheweb@gmail.com>
Milestones do not have an author so we can not update that attribute.
Adding this conditional fixes this spec: ./spec/features/admin/budget_investment_milestones_spec.rb[1:1:1:10]
We removed these columns from their original tables as Globalize raises a warning when making queries on the corresponding translated columns.
Since then we have decided to migrate from Globalize to Mobility, which does not raise these warnings.
We are still concerned about possible inconsistencies in the database due to maintaining these columns. However until we clear the problems out with the Mobility support team we are bringing them back.
This spec fails if we remove the attribute `name` from `poll_params` in
the `Admin::Poll::PollsController`, which we would usually remove
because it's a translatable attribute.
This fixes a validation error being raised in these specs, as we were
missing some attributes that are required. Using the factory trait the
missing attributes are correctly filled out.
- Add remote_translation_button partial to layout
- Only display button when we have remote_translations and if current
locale is include on available locales from remote translations service.
- Recover available locales from remote translations service.
Use daily_cache to detect every day if remote translation service has
added new available locale.
Co-Authored-By: alessandro <agileontheweb@gmail.com>
We have changed validate_translation method on Globalize concern.
The objective is skip length validations when locale is distinct to
default_locale.
First we force apply :length validations when locale is equal to
default_locale. After we reject :length from options and apply rest
of validation options only when we have more than 1 options.
Ej: options = { length: "maximum: 10" }
When reject :length option in this example, options is equal to a
empty hash and we cant execute validations.