@@ -5,7 +5,7 @@ import {connect} from 'react-redux';
5
5
import { neos } from '@neos-project/neos-ui-decorators' ;
6
6
7
7
import { Button , Dialog , Icon } from '@neos-project/react-ui-components' ;
8
- import I18n , { translate } from '@neos-project/neos-ui-i18n' ;
8
+ import { translate } from '@neos-project/neos-ui-i18n' ;
9
9
10
10
import { InsertModeSelector } from '@neos-project/neos-ui-containers' ;
11
11
@@ -81,41 +81,22 @@ export default class InsertModeModal extends PureComponent {
81
81
82
82
renderTitle ( ) {
83
83
const { subjectContextPaths, referenceContextPath, operationType} = this . props ;
84
-
84
+ const parameters = {
85
+ source : this . renderNodeLabel ( subjectContextPaths ) ,
86
+ target : this . renderNodeLabel ( [ referenceContextPath ] )
87
+ } ;
88
+
89
+ let label = '' ;
90
+ if ( operationType === actionTypes . CR . Nodes . COPY ) {
91
+ label = translate ( 'Neos.Neos:Main:copy__from__to--title' , '' , parameters ) ;
92
+ } else if ( operationType === actionTypes . CR . Nodes . CUT || operationType === actionTypes . CR . Nodes . MOVE ) {
93
+ label = translate ( 'Neos.Neos:Main:move__from__to--title' , '' , parameters ) ;
94
+ }
85
95
return (
86
96
< div >
87
97
< Icon icon = "clipboard" />
88
98
< span className = { style . modalTitle } >
89
- { operationType === actionTypes . CR . Nodes . COPY &&
90
- < I18n
91
- key = "copy"
92
- id = "Neos.Neos:Main:copy__from__to--title"
93
- params = { {
94
- source : this . renderNodeLabel ( subjectContextPaths ) ,
95
- target : this . renderNodeLabel ( [ referenceContextPath ] )
96
- } }
97
- />
98
- }
99
- { operationType === actionTypes . CR . Nodes . CUT &&
100
- < I18n
101
- key = "move"
102
- id = "Neos.Neos:Main:move__from__to--title"
103
- params = { {
104
- source : this . renderNodeLabel ( subjectContextPaths ) ,
105
- target : this . renderNodeLabel ( [ referenceContextPath ] )
106
- } }
107
- />
108
- }
109
- { operationType === actionTypes . CR . Nodes . MOVE &&
110
- < I18n
111
- key = "move"
112
- id = "Neos.Neos:Main:move__from__to--title"
113
- params = { {
114
- source : this . renderNodeLabel ( subjectContextPaths ) ,
115
- target : this . renderNodeLabel ( [ referenceContextPath ] )
116
- } }
117
- />
118
- }
99
+ { label }
119
100
</ span >
120
101
</ div >
121
102
) ;
@@ -173,13 +154,7 @@ export default class InsertModeModal extends PureComponent {
173
154
>
174
155
< div className = { style . modalContents } >
175
156
< p >
176
- < I18n
177
- id = "Neos.Neos:Main:copy__from__to--description"
178
- params = { {
179
- source : this . renderNodeLabel ( subjectContextPaths ) ,
180
- target : this . renderNodeLabel ( [ referenceContextPath ] )
181
- } }
182
- />
157
+ { translate ( 'Neos.Neos:Main:copy__from__to--description' , '' , { source : this . renderNodeLabel ( subjectContextPaths ) , target : this . renderNodeLabel ( [ referenceContextPath ] ) } ) }
183
158
</ p >
184
159
< InsertModeSelector
185
160
mode = { this . state . mode }
0 commit comments