@@ -12,7 +12,7 @@ import { SessionToastContainer } from './SessionToastContainer';
12
12
import { SessionToast } from './basic/SessionToast' ;
13
13
import { SessionSpinner } from './loading' ;
14
14
import { Localizer } from './basic/Localizer' ;
15
- import { localize } from '../localization/localeTools' ;
15
+ import { tr } from '../localization/localeTools' ;
16
16
import {
17
17
ModalBasicHeader ,
18
18
ModalActionsContainer ,
@@ -58,16 +58,12 @@ function ClearDataViewButtons({ onCancel }: { onCancel: () => void }) {
58
58
return (
59
59
< ModalActionsContainer >
60
60
< SessionButton
61
- text = { localize ( 'clearDevice' ) . toString ( ) }
61
+ text = { tr ( 'clearDevice' ) }
62
62
buttonColor = { SessionButtonColor . Danger }
63
63
buttonType = { SessionButtonType . Simple }
64
64
onClick = { window . clearLocalData }
65
65
/>
66
- < SessionButton
67
- text = { localize ( 'cancel' ) . toString ( ) }
68
- buttonType = { SessionButtonType . Simple }
69
- onClick = { onCancel }
70
- />
66
+ < SessionButton text = { tr ( 'cancel' ) } buttonType = { SessionButtonType . Simple } onClick = { onCancel } />
71
67
</ ModalActionsContainer >
72
68
) ;
73
69
}
@@ -93,15 +89,15 @@ function PasswordViewButtons({
93
89
< ModalActionsContainer >
94
90
{ showResetElements && (
95
91
< SessionButton
96
- text = { localize ( 'clearDevice' ) . toString ( ) }
92
+ text = { tr ( 'clearDevice' ) }
97
93
buttonColor = { SessionButtonColor . Danger }
98
94
buttonType = { SessionButtonType . Simple }
99
95
onClick = { onShowClearDataView }
100
96
/>
101
97
) }
102
98
{ ! loading && (
103
99
< SessionButton
104
- text = { showResetElements ? localize ( 'tryAgain' ) . toString ( ) : localize ( 'done' ) . toString ( ) }
100
+ text = { showResetElements ? tr ( 'tryAgain' ) : tr ( 'done' ) }
105
101
buttonType = { SessionButtonType . Simple }
106
102
onClick = { initLogin }
107
103
disabled = { loading }
@@ -148,7 +144,7 @@ const PasswordPrompt = ({
148
144
} ) => {
149
145
return (
150
146
< ShowHideSessionInput
151
- placeholder = { localize ( 'passwordEnter' ) . toString ( ) }
147
+ placeholder = { tr ( 'passwordEnter' ) }
152
148
onEnterPressed = { onEnterPressed }
153
149
onValueChanged = { onPasswordChange }
154
150
ariaLabel = "password input"
@@ -194,9 +190,7 @@ const SessionPasswordPromptInner = () => {
194
190
return (
195
191
< SessionWrapperModal
196
192
headerChildren = {
197
- < ModalBasicHeader
198
- title = { localize ( clearDataView ? 'clearDevice' : 'passwordEnter' ) . toString ( ) }
199
- />
193
+ < ModalBasicHeader title = { tr ( clearDataView ? 'clearDevice' : 'passwordEnter' ) } />
200
194
}
201
195
$contentMinWidth = { WrapperModalWidth . narrow }
202
196
buttonChildren = {
0 commit comments