Commit Graph

12 Commits

Author SHA1 Message Date
Javi Martín
ea2aeab383 Apply rubocop Rails/FindBy rule everywhere
We didn't detect these cases because by default the rule only searches
for offenses in `app/models/`.
2019-11-08 19:15:04 +01:00
Javi Martín
9fe8c47528 Apply Rails/SafeNavigation rubocop rule 2019-09-10 21:43:39 +02:00
decabeza
a2cb7501f7 Create new basic tab for admin information texts 2019-05-21 14:06:58 +02:00
Javi Martín
1135441cbd Simplify getting I18nContent translations
This code might be slightly slower because it performs one query per
field in the form, but I didn't notice any differences on my development
machine, and the code is now much easier to understand.
2019-05-21 13:53:39 +02:00
Javi Martín
00983200d4 Update information texts translatable fields
This part used the code we deleted in order to make it easier to
refactor the rest of the translatable models. Now we add the code back.
2018-10-22 16:36:12 +02:00
Angel Perez
8bba09aac3 Extract translation logic to helper method 2018-10-22 16:30:32 +02:00
Javi Martín
124b8496de Simplify methods defining translation styles
This refactor is going to be useful when we change these rules within
the next few commits.
2018-10-22 16:28:53 +02:00
Marko Lovic
c7fcdd9b0e Use standard locale names for Globalize
It turns out it is not necessary to downcase and underscore
locale names to use the globalize-accessor gem. The gem
will automatically underscore the locale name when defining and
calling the accessor methods.
2018-09-11 18:48:14 +02:00
Marko Lovic
ca5f8719a8 Fix helper to merge style option correctly 2018-09-11 18:48:05 +02:00
Marko Lovic
cb716e07d7 Extract translation helper from translatable form views
So that individual form partials don't depend on the implementation
of how translations are deleted.
2018-09-10 17:17:47 +02:00
rgarcia
78a5c0356e Add globalization javascript interface specs 2018-07-26 20:49:00 -04:00
Raúl Fuentes
c18479e3ac Add translations management pages
In the admin section of the application, a new page
has been added so that the admins are able to manage
the selected texts for translate.

The texts have been divided in different "sections",
depending on the nature of themselves (budgets, polls,
proposals, management, etc.). Each section has become a tab
with a form associated to edit all the texts for her.

When a language is added, it's added for ALL the texts in the
application. That means that, if an admin adds french for debates,
the french form will appear for the rest of the texts. That doesn't
mean that they need to fill all the texts, only that the languages
work for all of them instead of individually.
2018-07-26 19:05:58 -04:00