Commit a4556b6
authored
Translate labels for belongs_to/_form if available (#2590)
Currently, if a model (e.g., `Customer`) has a translation (e.g., `Client`),
the translated label is correctly displayed on the Show page. However,
on the Edit and New pages, the original label (e.g., `Customer`) is
displayed instead of the translated one.
This commit ensures that the translated label for `BelongsTo` fields is
consistently displayed across all pages. Specifically, it modifies the
`belongs_to`/`_form` partial to display the translated label (if available)
instead of the original one.
Fixes #625.1 parent 826fe48 commit a4556b6
File tree
2 files changed
+41
-1
lines changed- app/views/fields/belongs_to
- spec/features
2 files changed
+41
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
31 | 51 | | |
32 | 52 | | |
33 | 53 | | |
| |||
92 | 112 | | |
93 | 113 | | |
94 | 114 | | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
95 | 135 | | |
96 | 136 | | |
97 | 137 | | |
| |||
0 commit comments