Fix exception using locales with no help images

In commit 905ac48bb we activated exceptions when assets were not found,
in order to detect places where we were trying to load non-existent
images.

We got an exception for that reason: we were loading images based on the
current locale, but for some locales there was no images.

We're now using fallbacks and loading another image when the original
one isn't available.

Note we're copying the English images to images with a generic name for
the case where there's no fallback with an image. We're copying the
files instead of using symbolic links to make sure they can be
overwritten independently in other CONSUL installations.

Also note we're updating the HTML so the section gets the ID instead of
the header. That way the system test is simple.
This commit is contained in:
Javi Martín
2021-05-18 15:50:34 +02:00
parent 7024f1edf5
commit 5f92252054
10 changed files with 71 additions and 11 deletions

View File

@@ -1,4 +1,4 @@
<%= render Pages::Help::SectionComponent.new("processes", nil) do %>
<%= render Pages::Help::SectionComponent.new("processes") do %>
<p>
<% link = link_to(t("pages.help.processes.link"), legislation_processes_path) %>
<%= sanitize(t("pages.help.processes.description", link: link)) %>