Commit c1892eb
authored
fix(ui): use correct translation key for collection version restore modal (#15757)
### What?
Fixed the restore version confirmation modal always showing the "global
document" message, even for collection documents.
### Why?
The `Restore` component unconditionally used the
`version:aboutToRestoreGlobal` translation key. This caused the modal to
display text like "Globale Dokument" (German) or "the global {label}"
(English) when restoring a collection document version, which is
incorrect.
### How?
Conditionally select the translation key based on whether `globalConfig`
is present:
- `globalConfig` exists → `version:aboutToRestoreGlobal`
- Otherwise → `version:aboutToRestore`
Also removed an unused `serverURL` destructuring.1 parent 929203c commit c1892eb
1 file changed
Lines changed: 7 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
52 | 51 | | |
53 | 52 | | |
54 | 53 | | |
| |||
58 | 57 | | |
59 | 58 | | |
60 | 59 | | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
65 | 67 | | |
66 | 68 | | |
67 | 69 | | |
| |||
0 commit comments