Skip to content

Commit 7b6d42d

Browse files
committed
docs(readme-and-docs): document enum translations in filters and tag cols/rows
1 parent 2a1a574 commit 7b6d42d

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ Installing this gem will enable the following changes by default:
6464

6565
* The default date input will be `:datepicker` instead of `:date_select`
6666
* Filters and selects will offer integration with [enumerize](https://github.com/brainspec/enumerize)
67+
* Select filters will show translated values when used with Rails built-in `enums`
6768
* All select boxes will use select2
6869

6970
## Addons

docs/enum_integration.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,3 +86,19 @@ ActiveAdmin.register Invoice do
8686
end
8787
```
8888

89+
## Translation
90+
91+
Tag row and column, as well as the interactive option of the latter, support automatic translation with `I18n` when using Rails built-in `enums`. For this, you just have to define the translations in the correct path in your YAML files:
92+
93+
```yaml
94+
# en.yml
95+
en:
96+
activerecord:
97+
attributes:
98+
invoice:
99+
statuses:
100+
active: Activo
101+
archived: Archivado
102+
```
103+
104+
This is the same structure used for tanslation of select inputs in filters and edit/create forms.

0 commit comments

Comments
 (0)