| @@ -269,9 +269,13 @@ | ||
| 269 | 269 | } |
| 270 | 270 | } |
| 271 | 271 | |
| 272 | 272 | return $this->success_response([ |
| 273 | - 'message' => sprintf(__('%d records imported successfully', 'yatra'), $imported_count), | |
| 273 | + 'message' => sprintf( | |
| 274 | + /* translators: %d: number of records imported. */ | |
| 275 | + __('%d records imported successfully', 'yatra'), | |
| 276 | + $imported_count | |
| 277 | + ), | |
| 274 | 278 | 'imported_count' => $imported_count |
| 275 | 279 | ]); |
| 276 | 280 | |
| 277 | 281 | } catch (\Exception $e) { |
| @@ -377,9 +381,13 @@ | ||
| 377 | 381 | |
| 378 | 382 | Logger::info("Logs cleared: {$type}"); |
| 379 | 383 | |
| 380 | 384 | return $this->success_response([ |
| 381 | - 'message' => sprintf(__('%s logs cleared successfully', 'yatra'), ucfirst($type)), | |
| 385 | + 'message' => sprintf( | |
| 386 | + /* translators: %s: log type label (e.g. "Error", "Payment"). */ | |
| 387 | + __('%s logs cleared successfully', 'yatra'), | |
| 388 | + ucfirst($type) | |
| 389 | + ), | |
| 382 | 390 | 'cleared_count' => $cleared |
| 383 | 391 | ]); |
| 384 | 392 | |
| 385 | 393 | } catch (\Exception $e) { |
| @@ -1189,9 +1197,13 @@ | ||
| 1189 | 1197 | Logger::info("Manually triggered cron job: {$hook}"); |
| 1190 | 1198 | |
| 1191 | 1199 | return $this->success_response([ |
| 1192 | 1200 | 'success' => true, |
| 1193 | - 'message' => sprintf(__('Cron job "%s" executed successfully', 'yatra'), $hook), | |
| 1201 | + 'message' => sprintf( | |
| 1202 | + /* translators: %s: cron hook name. */ | |
| 1203 | + __('Cron job "%s" executed successfully', 'yatra'), | |
| 1204 | + $hook | |
| 1205 | + ), | |
| 1194 | 1206 | ]); |
| 1195 | 1207 | |
| 1196 | 1208 | } catch (\Exception $e) { |
| 1197 | 1209 | Logger::error('Failed to run cron job: ' . $e->getMessage()); |