// Detect possible HTML-string false matches: a JS string literal that now // contains an injected {t(...)} (e.g. '{t('x')}'). const fs = require('fs'); const files = [ "src/components/devices/DeviceControl.tsx","src/components/devices/deviceController.js","src/components/devices/DeviceOverviewPage.tsx","src/components/devices/RobotTaskPage.tsx","src/components/LanguageSwitcher.tsx","src/components/SystemSetting/AlarmSettingsManagement.tsx","src/components/SystemSetting/AllDeviceManagement.tsx","src/components/SystemSetting/BasicSettings.tsx","src/components/SystemSetting/CameraManagement.tsx","src/components/SystemSetting/DeviceAccessPage.tsx","src/components/SystemSetting/DeviceManagement.tsx","src/components/SystemSetting/DroneManagement.tsx","src/components/SystemSetting/FlvPlayer.tsx","src/components/SystemSetting/LogManagement.tsx","src/components/SystemSetting/MenuList.tsx","src/components/SystemSetting/OnlineUser.tsx","src/components/SystemSetting/Organization.tsx","src/components/SystemSetting/SerialNumGenerate.jsx","src/components/SystemSetting/SmartDeviceManagement.tsx","src/components/SystemSetting/StationManage.tsx","src/components/SystemSetting/SystemMaintain.tsx","src/components/SystemSetting/UserPage.tsx","src/components/SystemSetting/VideoManagement.tsx","src/components/SystemSetting/WorkOrderSettingsManagement.tsx","src/components/VideoPlayer.tsx","src/pages/Agri.jsx","src/pages/AIAnalysis.tsx","src/pages/CleanOptimization.tsx","src/pages/Home.tsx","src/pages/RealTimeMonitor.tsx","src/pages/SystemSetting.tsx","src/pages/VideoMonitorPage.tsx","src/pages/WorkOrder.tsx" ]; const rx = /(['"`])<[^'"`]*\{t\(/g; let total = 0; for (const f of files) { const lines = fs.readFileSync(f, 'utf8').split('\n'); lines.forEach((line, idx) => { rx.lastIndex = 0; let m; while ((m = rx.exec(line))) { console.log(f.replace('src\\', '') + ' L' + (idx + 1) + ': ' + line.trim()); total++; } }); } console.log('Potential HTML-string false matches:', total);