This method will be used by any translatable model that uses pg_search
feature so it's better to have it within globalizable model concern so
all translatable models can use it.
Also fix broken spec after removing translatable attributes from
strong_parameters definition. Now we need to send these attributes
as nested translations attributes.
Use activerecord.yml title attribute label so form helper could load it
from default location.
After adding debate translatable fields to forms, they will be generated with nested translations names and ids so we can no longer
use standard id locator.
Using input label text to fill in fields works with both types of forms.
After adding proposal translatable fields to forms, they will be generated with nested translations names and ids so we can no longer
use standard id locator.
Using input label text to fill in fields works with both types of forms.
After adding new translations to proposal we no longer need this
attributes in proposals database table, but we keep them with a
deprecated name until next release where we drop them completely.
Also related column indexes where dropped.
Adapt retire form to include needed translations and move validations
from controller to model.
Also change sanitizable concern to sanitize not marked for destruction
translations.
Some fields from Budget::Phase are translatable and we no longer need them. This commit will remove the annoying deprecation warning thrown by Globalize gem after gem version update.
Some fields from Budget::Heading are translatable and we no longer need them. This commit will remove the annoying deprecation warning thrown by Globalize gem after gem version update.
Some fields from Budget::Group are translatable and we no longer need them. This commit will remove the annoying deprecation warning thrown by Globalize gem after gem version update.
Some fields from Budget are translatable and we no longer need them. This commit will remove the annoying deprecation warning thrown by Globalize gem after gem version update.
Some fields from Widget::Card are translatable and we no longer need
them. This commit will remove the annoying deprecation warning thrown
by Globalize gem after gem version update.
Some fields from SiteCustomization::page are translatable and we no
longer need them. This commit will remove the annoying deprecation
warning thrown by Globalize gem after gem version update.
Some fields from Legislation::Question::Option are translatable and we
no longer need them. This commit will remove the annoying deprecation
warning thrown by Globalize gem after gem version update.
Some fields from Legislation::Question are translatable and we no
longer need them. This commit will remove the annoying deprecation
warning thrown by Globalize gem after gem version update.
Some fields from Legislation::Process are translatable and we no longer
need them. This commit will remove the annoying deprecation warning
thrown by Globalize gem after gem version update.
Some fields from LegislationDraftVersion are translatable and we no
longer need them. This commit will remove the annoying deprecation
warning thrown by Globalize gem after gem version update.
Some fields from Milestone are translatable and we no longer need them.
This commit will remove the annoying deprecation warning thrown by
Globalize gem after gem version update.
Some fields from AdminNotification are translatable and we no longer
need them. This commit will remove the annoying deprecation warning
thrown by Globalize gem after gem version update.
Some fields from Poll::Question::Answer are translatable and we no
longer need them. This commit will remove the annoying deprecation
warning thrown by Globalize gem after gem version update.
Some fields from Poll::Question are translatable and we no longer need
them. This commit will remove the annoying deprecation warning thrown
by Globalize gem after gem version update.
Some fields from Poll are translatable and we no longer need them. This
commit will remove the annoying deprecation warning thrown by Globalize
gem after gem version update.
Some attributes from Banner are translatable and we no longer need to
have them at database table. This will remove the annoying deprecation
warning thrown by Globalize gem after gem version update.
Proposal, Debate and Comment "globalize_accessors" class method were
loaded before application available locales initialization because of
graphql initializer. This will cause unexpected translation errors at
any translatable classes declared at graphql api definition (api.yml).
Doing GraphQL initialization after application initialization should
solve this issue.
Paranoia is activated on translation classes by reflection, this is
making Rails to load translation classes before to execute migration
that adds the new column.
With this extra check Rails will not execute this code until translation
table has this column created.
- Create remote_available_locales method to recover available locales from microsoft tanslate client. This method will be useful to display the translation button as long as the locale sent is valid.
- Create parse_locale method: Need parse available locales in Consul to will be valid on Microsoft Translate Client
- Conect to remote translation service and translate array of strings
- Create SentencesParser module with texts management methods:
- Detect split position method: When the text requested to translate is too large, we need split it in smaller parts for we can translate. This method search first valid point (dot or whitespace) for split this text so then we can get an response without dividing the word in half.
New version of globalize uses RequestStore gem to store I18n.locale and
Globalize.fallbacks in a per request basis to avoid collissions between
different requests. This gem update broke Globalize.fallback results
because it tries to fetch fallbacks from RequestStore, where there is no
locale fallbacks definition.
Proposal, Debate, Budget Investment and Comment will be translatable
models soon. This commit prepares suggestions script to work well with
translatable forms elements too.