Javi Martín
9e74ebccb6
Store texts data in the element using them
...
This way we can have a generic function we can apply in other places.
2019-10-31 15:07:08 +01:00
Javi Martín
b15ae77ddc
Simplify Javascript to pluralize translations
...
We can pass the whole translation hash instead of passing descriptions
individually, and we can replace `%{count}` so we don't need any <span>
tags.
2019-10-31 14:49:46 +01:00
Javi Martín
31c2379a4e
Don't sanitize <span> tags in HTML attributes
...
Doing so will cause the `<span>` tag to be rendered in the document,
instead of being rendered as a data attribute.
2019-10-21 20:24:50 +02:00
Javi Martín
6b1864fbcd
Sanitize translations instead of using _html
...
Using the `_html` suffix in an i18n key is the same as using `html_safe`
on it, which means that translation could potentially be used for XSS
attacks.
2019-10-09 19:46:47 +02:00
Senén Rodero Rodríguez
58164ee2ec
Show validation error at translation interface
...
Only when present
2019-07-02 17:15:27 +02:00
Senén Rodero Rodríguez
97eab7445d
Move translations from admin.yml to general.yml
...
After extract translation interface partials from admin
folder translations should be placed in general.yml file
inside shared context.
2019-07-01 15:03:48 +02:00
Senén Rodero Rodríguez
10939fddb1
Add missing translation and fix indentation
2019-07-01 15:03:48 +02:00
Senén Rodero Rodríguez
b2d8851bcc
Add the option to disable languages managment to cover special cases
...
We understand languages management as the ability to add new languages
or remove existing ones. When no option is passed it will allow language
manipulation by default.
There are 3 special places where we want block languages management:
- admin legislation processes homepage
- admin legislation processes milestones summary
- proposals retired form
Co-Authored-By: Sebastia <sebastia.roig@gmail.com >
2019-07-01 15:03:48 +02:00
Senén Rodero Rodríguez
9fd77d4042
Add languages in use description
...
New interface now shows a description to ensure the user
knows how many languages are currently in use.
2019-07-01 14:49:43 +02:00
Senén Rodero Rodríguez
01bb0b9c6b
Move translation interface to views root shared folder
...
As we are going to call this partial from any application view it will
have more sense to place it at `app/views/shared`.
2019-07-01 14:49:43 +02:00