Newer versions have more capabilities and also fix lot of errors,
usability and accessibility issues.
Note that we're using an external gem to rails-assets.org as it's
not supports the rails-assets pipeline. This gems wraps the
original one and make the code work with the default rails assets
pipeline as usual.
We were already using it because Rails adds the `Hash#except` method for
Ruby 2.7 and earlier, but since the method wasn't part of Ruby itself,
the Rubocop rule only works with Ruby 3.0 and later.
These tests were failing with Ruby 3.0 because we were getting an error
when loading the `translations` association of the dummy class:
```
NameError:
uninitialized constant
DummyBanner::#<Class:0x000055630e4dccd8>::Translation
```
Specifying the `class_name` of the `translations` association solves the
issue.
It's causing annoying behaviour for desktop users when scrolling
the page to the bottom and there is more content below the
map.
The behaviour of touchable devices does not seem to be
affected by this change and keeps behaving the same.
We were using `server` on staging but `server1` and `server2` on
preproduction and production.
The reason behind it is we've always used one server on staging but
sometimes we've used several servers on preproduction and production.
However, this is a bit of a mess on installations which have only one
server on preproduction or production and need to use the `server` key
for the staging environments but `server1` for other environments.
So, in order to keep compatibility with existing Consul installations,
we're now allowing either `server` or `server1` on any environment.
It doesn't make much sense that by default we use one server on
production on two servers on preproduction.
Note we're keeping `server1` instead of using just `server` in order to
keep compatibility with existing installation.
Due to the change of the translator-text gem to the bing_translator gem,
the documentation has been reviewed and changes have been detected
in the links, prices and azure administration panel.
We removed the Google and DeepL prices, since we will not be reviewing
the prices of the different providers and they may be out of date.
I thought SelfClosingTag was enabled since it was on the list and the
`enabled: false` got lost among all the `enabled: true`. ERB Lint 0.1
and later will also add RequireInputAutocomplete as a default linter,
and we're not interested in it, at least for now.
So, just like we do for Rubocop, we're disabling all linters and
enabling the ones we use explicitly.
It has been detected that for the :pt-BR, :zh-CN and :zh-TW locales,
the translate button was being displayed, but when requesting the
translation, the remote translation validation failed due to:
'''
validates :locale, inclusion: { in: ->(_) {
RemoteTranslations::Microsoft::AvailableLocales.available_locales }}
'''
That available_locales method did not contemplate these 3 languages
in the format used by the application.
To solve this problem the api response is mapped to return all
locales in the format expected by the application.
Add remote translation model test to ensure that a remote translation
is valid when its locale is pt-BR.
Co-Authored-By: Javi Martín <35156+javierm@users.noreply.github.com>
TranslatorText isn't compatible with Ruby 3, so we need to use a
different gem.
The 'translator-text' gem response was an array of one or more objects.
Now with the 'bing_translator' gem the response is an array with one or
several translated texts.
We remove the concept of object in the code. And we also remove the
"create_response" method from the specs since it is no longer necessary
to emulate that object and we can simply use arrays with texts to emulate
the new response.
Since we changed the way we integrate coveralls in commit 8ed8cc8b9,
we're getting 6 additional checks displayed in our pull requests.
We don't need these checks, and they only add noise. The only reason we
use coveralls is to know the test coverage in our master branch.
So we're changing the code so coveralls only runs on the master branch.
There's also a chance that the test suite will be faster because it
doesn't need to keep track of the coverage, although I haven't noticed any
significant differences during my tests.
I haven't found a more elegant way to say that a certain step should
only be run on push on master, so I'm setting the environment variable
we were already using.
We were getting many errors when trying to run them, from uninitialized
constant `HTTP` to undefined method `headers`.
We might move these examples to the documentation repository in the
future, but we need to look for possible side-effects first.
Since we're now allowing <h2> and <h3> tags in the description, we
remove the broken <h3> tag from quiz-question class. Since its content
is also in the <title> element, and in order to be consistent with other
show actions in the public area, we change this tag to <h1>.
We add <h2> tag in the "Share" heading and we replace the broken <h4>
tag above adding new styles.