@@ -127,7 +127,7 @@ export default function FileManageModal(props: FileManageModalProps) {
127127 triggerProjectUpdate ( ) ;
128128 } catch ( error ) {
129129 console . error ( 'Error renaming module:' , error ) ;
130- props . setAlertErrorMessage ( 'Failed to rename module' ) ;
130+ props . setAlertErrorMessage ( t ( 'FAILED_TO_RENAME_MODULE' ) ) ;
131131 }
132132
133133 setRenameModalOpen ( false ) ;
@@ -150,7 +150,7 @@ export default function FileManageModal(props: FileManageModalProps) {
150150 const originalModule = modules . find ( ( module ) => module . path === origModule . path ) ;
151151 if ( ! originalModule ) {
152152 console . error ( 'Original module not found for copying:' , origModule . path ) ;
153- props . setAlertErrorMessage ( 'Original module not found for copying' ) ;
153+ props . setAlertErrorMessage ( t ( 'MODULE_NOT_FOUND_FOR_COPYING' ) ) ;
154154 return ;
155155 }
156156
@@ -165,7 +165,7 @@ export default function FileManageModal(props: FileManageModalProps) {
165165 triggerProjectUpdate ( ) ;
166166 } catch ( error ) {
167167 console . error ( 'Error copying module:' , error ) ;
168- props . setAlertErrorMessage ( 'Failed to copy module' ) ;
168+ props . setAlertErrorMessage ( t ( 'FAILED_TO_COPY_MODULE' ) ) ;
169169 }
170170
171171 setCopyModalOpen ( false ) ;
@@ -243,14 +243,14 @@ export default function FileManageModal(props: FileManageModalProps) {
243243 /** Opens the copy modal for a specific module. */
244244 const openCopyModal = ( record : Module ) : void => {
245245 setCurrentRecord ( record ) ;
246- setName ( record . title + 'Copy' ) ;
246+ setName ( t ( 'COPY_SUFFIX' , { name : record . title } ) ) ;
247247 setCopyModalOpen ( true ) ;
248248 } ;
249249
250250 /** Table column configuration. */
251251 const columns : Antd . TableProps < Module > [ 'columns' ] = [
252252 {
253- title : 'Name' ,
253+ title : t ( 'NAME' ) ,
254254 dataIndex : 'title' ,
255255 key : 'title' ,
256256 ellipsis : {
@@ -263,12 +263,12 @@ export default function FileManageModal(props: FileManageModalProps) {
263263 ) ,
264264 } ,
265265 {
266- title : 'Actions' ,
266+ title : t ( 'ACTIONS' ) ,
267267 key : 'actions' ,
268268 width : ACTIONS_COLUMN_WIDTH ,
269269 render : ( _ , record : Module ) => (
270270 < Antd . Space size = "small" >
271- < Antd . Tooltip title = { t ( 'Rename ' ) } >
271+ < Antd . Tooltip title = { t ( 'RENAME ' ) } >
272272 < Antd . Button
273273 type = "text"
274274 size = "small"
@@ -279,7 +279,7 @@ export default function FileManageModal(props: FileManageModalProps) {
279279 } }
280280 />
281281 </ Antd . Tooltip >
282- < Antd . Tooltip title = { t ( 'Copy ' ) } >
282+ < Antd . Tooltip title = { t ( 'COPY ' ) } >
283283 < Antd . Button
284284 type = "text"
285285 size = "small"
@@ -292,8 +292,8 @@ export default function FileManageModal(props: FileManageModalProps) {
292292 </ Antd . Tooltip >
293293 < Antd . Tooltip title = { t ( 'Delete' ) } >
294294 < Antd . Popconfirm
295- title = { `Delete ${ record . title } ?` }
296- description = "This action cannot be undone."
295+ title = { t ( 'DELETE_MODULE_CONFIRM' , { title : record . title } ) }
296+ description = { t ( 'DELETE_CANNOT_BE_UNDONE' ) }
297297 onConfirm = { ( ) => handleDeleteConfirm ( record ) }
298298 okText = { t ( 'Delete' ) }
299299 cancelText = { t ( 'Cancel' ) }
@@ -315,29 +315,35 @@ export default function FileManageModal(props: FileManageModalProps) {
315315
316316 /** Gets the modal title based on module type. */
317317 const getModalTitle = ( ) : string => {
318- return ` ${ TabTypeUtils . toString ( props . tabType ) } Management` ;
318+ return t ( 'TYPE_MANAGEMENT' , { type : TabTypeUtils . toString ( props . tabType ) } ) ;
319319 } ;
320320
321321 /** Gets the rename modal title. */
322322 const getRenameModalTitle = ( ) : string => {
323323 if ( ! currentRecord ) {
324- return 'Rename' ;
324+ return t ( 'RENAME' ) ;
325325 }
326- return `Rename ${ TabTypeUtils . toString ( currentRecord . type ) } : ${ currentRecord . title } ` ;
326+ return t ( 'RENAME_TYPE_TITLE' , {
327+ type : TabTypeUtils . toString ( currentRecord . type ) ,
328+ title : currentRecord . title
329+ } ) ;
327330 } ;
328331
329332 /** Gets the copy modal title. */
330333 const getCopyModalTitle = ( ) : string => {
331334 if ( ! currentRecord ) {
332- return 'Copy' ;
335+ return t ( 'COPY' ) ;
333336 }
334- return `Copy ${ TabTypeUtils . toString ( currentRecord . type ) } : ${ currentRecord . title } ` ;
337+ return t ( 'COPY_TYPE_TITLE' , {
338+ type : TabTypeUtils . toString ( currentRecord . type ) ,
339+ title : currentRecord . title
340+ } ) ;
335341 } ;
336342
337343 /** Gets the empty table text based on tab type. */
338344 const getEmptyText = ( ) : string => {
339345 const tabTypeString = TabTypeUtils . toString ( props . tabType || TabType . OPMODE ) ;
340- return `No ${ tabTypeString . toLowerCase ( ) } files found` ;
346+ return t ( 'NO_FILES_FOUND' , { type : tabTypeString . toLowerCase ( ) } ) ;
341347 } ;
342348
343349 return (
@@ -417,7 +423,7 @@ export default function FileManageModal(props: FileManageModalProps) {
417423 showSizeChanger : false ,
418424 showQuickJumper : false ,
419425 showTotal : ( total , range ) =>
420- ` ${ range [ 0 ] } - ${ range [ 1 ] } of ${ total } items` ,
426+ t ( 'PAGINATION_TOTAL' , { start : range [ 0 ] , end : range [ 1 ] , total } ) ,
421427 } : false }
422428 bordered
423429 locale = { {
0 commit comments