1313\defined ('_JEXEC ' ) or die;
1414// phpcs:enable PSR1.Files.SideEffects
1515
16+ use Joomla \CMS \Language \Text ;
1617use Joomla \CMS \MVC \Controller \BaseController ;
1718
1819class MigrationController extends BaseController
@@ -21,7 +22,7 @@ public function apply()
2122 {
2223 $ data = $ this ->input ->post ->get ('jform ' , [], 'array ' );
2324 if (empty ($ data )) {
24- $ this ->setMessage (' No data provided for migration. ' , 'error ' );
25+ $ this ->setMessage (Text:: _ ( ' COM_CCM_MESSAGE_MIGRATION_NO_DATA_PROVIDED ' ) , 'error ' );
2526 $ this ->setRedirect ('index.php?option=com_ccm&view=migration ' );
2627 return ;
2728 }
@@ -68,18 +69,18 @@ public function apply()
6869
6970 // Prepare summary message
7071 if (!empty ($ successfulMigrations ) && empty ($ failedMigrations )) {
71- $ this ->setMessage (' All migrations completed successfully: ' . implode (', ' , $ successfulMigrations ));
72+ $ this ->setMessage (Text:: _ ( ' COM_CCM_MESSAGE_MIGRATION_COMPLETED_SUCCESSFULLY ' ) . implode (', ' , $ successfulMigrations ));
7273 } elseif (!empty ($ successfulMigrations ) && !empty ($ failedMigrations )) {
73- $ message = ' Partial migration completed. ' ;
74- $ message .= 'Successful: ' . implode (', ' , $ successfulMigrations ) . '. ' ;
75- $ message .= 'Failed: ' . implode (', ' , $ failedMigrations );
74+ $ message = Text:: _ ( ' COM_CCM_MESSAGE_MIGRATION_COMPLETED_PARTIALLY ' ) ;
75+ $ message .= Text:: _ ( 'Successful: ' ) . implode (', ' , $ successfulMigrations ) . '. ' ;
76+ $ message .= Text:: _ ( 'Failed: ' ) . implode (', ' , $ failedMigrations );
7677 $ this ->setMessage ($ message , 'warning ' );
7778 } else {
78- $ this ->setMessage ('All migrations failed: ' . implode (', ' , $ failedMigrations ), 'error ' );
79+ $ this ->setMessage (Text:: _ ( 'All migrations failed: ' ) . implode (', ' , $ failedMigrations ), 'error ' );
7980 }
8081
8182 } catch (\Exception $ e ) {
82- $ this ->setMessage ('Migration failed: ' . $ e ->getMessage (), 'error ' );
83+ $ this ->setMessage (Text:: _ ( 'Migration failed: ' ) . $ e ->getMessage (), 'error ' );
8384 }
8485 $ this ->setRedirect ('index.php?option=com_ccm&view=migration ' );
8586 }
0 commit comments