@@ -186,7 +186,7 @@ export function Component(props: TabsProps): React.JSX.Element {
186186 triggerProjectUpdate ( ) ;
187187 } catch ( error ) {
188188 console . error ( 'Error renaming module:' , error ) ;
189- props . setAlertErrorMessage ( 'Failed to rename module' ) ;
189+ props . setAlertErrorMessage ( t ( 'FAILED_TO_RENAME_MODULE' ) ) ;
190190 }
191191
192192 setRenameModalOpen ( false ) ;
@@ -213,7 +213,7 @@ export function Component(props: TabsProps): React.JSX.Element {
213213
214214 if ( ! originalTab ) {
215215 console . error ( 'Original tab not found for copying:' , key ) ;
216- props . setAlertErrorMessage ( 'Original tab not found for copying' ) ;
216+ props . setAlertErrorMessage ( t ( 'MODULE_NOT_FOUND_FOR_COPYING' ) ) ;
217217 return ;
218218 }
219219
@@ -223,7 +223,7 @@ export function Component(props: TabsProps): React.JSX.Element {
223223 triggerProjectUpdate ( ) ;
224224 } catch ( error ) {
225225 console . error ( 'Error copying module:' , error ) ;
226- props . setAlertErrorMessage ( 'Failed to copy module' ) ;
226+ props . setAlertErrorMessage ( t ( 'FAILED_TO_COPY_MODULE' ) ) ;
227227 }
228228
229229 setCopyModalOpen ( false ) ;
@@ -260,11 +260,11 @@ export function Component(props: TabsProps): React.JSX.Element {
260260 const titleToShow = currentTab ? currentTab . title : tab . title ;
261261
262262 modal . confirm ( {
263- title : ` ${ t ( 'Delete' ) } ${ TabTypeUtils . toString ( tab . type ) } : ${ titleToShow } `,
264- content : t ( 'Are you sure you want to delete this? This action cannot be undone. ' ) ,
265- okText : t ( 'Delete ' ) ,
263+ title : t ( 'DELETE_MODULE_CONFIRM' , { title : ` ${ TabTypeUtils . toString ( tab . type ) } : ${ titleToShow } ` } ) ,
264+ content : t ( 'DELETE_CANNOT_BE_UNDONE ' ) ,
265+ okText : t ( 'DELETE ' ) ,
266266 okType : 'danger' ,
267- cancelText : t ( 'Cancel ' ) ,
267+ cancelText : t ( 'CANCEL ' ) ,
268268 onOk : async ( ) : Promise < void > => {
269269 const newTabs = props . tabList . filter ( ( t ) => t . key !== tab . key ) ;
270270 props . setTabList ( newTabs ) ;
@@ -290,35 +290,35 @@ export function Component(props: TabsProps): React.JSX.Element {
290290 const createTabContextMenuItems = ( tab : TabItem ) : any [ ] => [
291291 {
292292 key : 'close' ,
293- label : t ( 'Close Tab ' ) ,
293+ label : t ( 'CLOSE_TAB ' ) ,
294294 onClick : ( ) => handleTabEdit ( tab . key , 'remove' ) ,
295295 disabled : tab . type === TabType . ROBOT ,
296296 icon : < CloseOutlined /> ,
297297 } ,
298298 {
299299 key : 'close-others' ,
300- label : t ( 'Close Other tabs ' ) ,
300+ label : t ( 'CLOSE_OTHER_TABS ' ) ,
301301 onClick : ( ) => handleCloseOtherTabs ( tab . key ) ,
302302 disabled : props . tabList . length <= getMinTabsForCloseOthers ( tab . type ) ,
303303 icon : < CloseCircleOutlined /> ,
304304 } ,
305305 {
306306 key : 'rename' ,
307- label : t ( 'Rename... ' ) ,
307+ label : t ( 'RENAME_ELLIPSIS ' ) ,
308308 disabled : tab . type === TabType . ROBOT ,
309309 onClick : ( ) => handleOpenRenameModal ( tab ) ,
310310 icon : < EditOutlined /> ,
311311 } ,
312312 {
313313 key : 'delete' ,
314- label : t ( 'Delete... ' ) ,
314+ label : t ( 'DELETE_ELLIPSIS ' ) ,
315315 disabled : tab . type === TabType . ROBOT ,
316316 icon : < DeleteOutlined /> ,
317317 onClick : ( ) => handleDeleteTab ( tab ) ,
318318 } ,
319319 {
320320 key : 'copy' ,
321- label : t ( 'Copy... ' ) ,
321+ label : t ( 'COPY_ELLIPSIS ' ) ,
322322 disabled : tab . type === TabType . ROBOT ,
323323 icon : < CopyOutlined /> ,
324324 onClick : ( ) => handleOpenCopyModal ( tab ) ,
@@ -366,17 +366,16 @@ export function Component(props: TabsProps): React.JSX.Element {
366366 />
367367
368368 < Antd . Modal
369- title = { `Rename ${ currentTab ? TabTypeUtils . toString ( currentTab . type ) : '' } : ${ currentTab ? currentTab . title : ''
370- } `}
369+ title = { t ( 'RENAME_TYPE_TITLE' , { type : currentTab ? TabTypeUtils . toString ( currentTab . type ) : '' , title : currentTab ? currentTab . title : '' } ) }
371370 open = { renameModalOpen }
372371 onCancel = { ( ) => setRenameModalOpen ( false ) }
373372 onOk = { ( ) => {
374373 if ( currentTab ) {
375374 handleRename ( currentTab . key , name ) ;
376375 }
377376 } }
378- okText = { t ( 'Rename ' ) }
379- cancelText = { t ( 'Cancel ' ) }
377+ okText = { t ( 'RENAME ' ) }
378+ cancelText = { t ( 'CANCEL ' ) }
380379 >
381380 { currentTab && (
382381 < ClassNameComponent
@@ -396,17 +395,16 @@ export function Component(props: TabsProps): React.JSX.Element {
396395 </ Antd . Modal >
397396
398397 < Antd . Modal
399- title = { `Copy ${ currentTab ? TabTypeUtils . toString ( currentTab . type ) : '' } : ${ currentTab ? currentTab . title : ''
400- } `}
398+ title = { t ( 'COPY_TYPE_TITLE' , { type : currentTab ? TabTypeUtils . toString ( currentTab . type ) : '' , title : currentTab ? currentTab . title : '' } ) }
401399 open = { copyModalOpen }
402400 onCancel = { ( ) => setCopyModalOpen ( false ) }
403401 onOk = { ( ) => {
404402 if ( currentTab ) {
405403 handleCopy ( currentTab . key , name ) ;
406404 }
407405 } }
408- okText = { t ( 'Copy ' ) }
409- cancelText = { t ( 'Cancel ' ) }
406+ okText = { t ( 'COPY ' ) }
407+ cancelText = { t ( 'CANCEL ' ) }
410408 >
411409 { currentTab && (
412410 < ClassNameComponent
0 commit comments