@@ -86,23 +86,23 @@ class Toolbar extends React.Component {
8686 this . props . setTextOutput ( true ) ;
8787 this . props . setGridOutput ( true ) ;
8888 } }
89- aria-label = "Play sketch"
89+ aria-label = { this . props . t ( 'Toolbar.PlaySketchARIA' ) }
9090 disabled = { this . props . infiniteLoop }
9191 >
9292 < PlayIcon focusable = "false" aria-hidden = "true" />
9393 </ button >
9494 < button
9595 className = { playButtonClass }
9696 onClick = { this . props . startSketch }
97- aria-label = "Play only visual sketch"
97+ aria-label = { this . props . t ( 'Toolbar.PlayOnlyVisualSketchARIA' ) }
9898 disabled = { this . props . infiniteLoop }
9999 >
100100 < PlayIcon focusable = "false" aria-hidden = "true" />
101101 </ button >
102102 < button
103103 className = { stopButtonClass }
104104 onClick = { this . props . stopSketch }
105- aria-label = "Stop sketch"
105+ aria-label = { this . props . t ( 'Toolbar.StopSketchARIA' ) }
106106 >
107107 < StopIcon focusable = "false" aria-hidden = "true" />
108108 </ button >
@@ -129,7 +129,7 @@ class Toolbar extends React.Component {
129129 }
130130 } }
131131 disabled = { ! canEditProjectName }
132- aria-label = "Edit sketch name"
132+ aria-label = { this . props . t ( 'Toolbar.EditSketchARIA' ) }
133133 >
134134 < span > { this . props . project . name } </ span >
135135 {
@@ -145,7 +145,7 @@ class Toolbar extends React.Component {
145145 type = "text"
146146 maxLength = "128"
147147 className = "toolbar__project-name-input"
148- aria-label = "New sketch name"
148+ aria-label = { this . props . t ( 'Toolbar.NewSketchNameARIA' ) }
149149 value = { this . state . projectNameInputValue }
150150 onChange = { this . handleProjectNameChange }
151151 ref = { ( element ) => { this . projectNameInput = element ; } }
@@ -165,7 +165,7 @@ class Toolbar extends React.Component {
165165 < button
166166 className = { preferencesButtonClass }
167167 onClick = { this . props . openPreferences }
168- aria-label = "Open Preferences"
168+ aria-label = { this . props . t ( 'Toolbar.OpenPreferencesARIA' ) }
169169 >
170170 < PreferencesIcon focusable = "false" aria-hidden = "true" />
171171 </ button >
@@ -200,6 +200,7 @@ Toolbar.propTypes = {
200200 saveProject : PropTypes . func . isRequired ,
201201 currentUser : PropTypes . string ,
202202 t : PropTypes . func . isRequired
203+
203204} ;
204205
205206Toolbar . defaultProps = {
@@ -225,6 +226,5 @@ const mapDispatchToProps = {
225226 ...projectActions ,
226227} ;
227228
228- export const ToolbarComponent = Toolbar ;
229- // export default connect(mapStateToProps, mapDispatchToProps)(Toolbar);
230- export default withTranslation ( ) ( connect ( mapStateToProps , mapDispatchToProps ) ( Toolbar ) ) ;
229+ export const ToolbarComponent = withTranslation ( ) ( Toolbar ) ;
230+ export default connect ( mapStateToProps , mapDispatchToProps ) ( ToolbarComponent ) ;
0 commit comments