From a12252155c3ea23bd84b90487d20fd145255dee0 Mon Sep 17 00:00:00 2001 From: AKSHAT ANAND Date: Tue, 21 Oct 2025 19:00:26 +0530 Subject: [PATCH] Update verify.js --- src/nginxconfig/i18n/verify.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/nginxconfig/i18n/verify.js b/src/nginxconfig/i18n/verify.js index 2dca00a..ed6c0f7 100644 --- a/src/nginxconfig/i18n/verify.js +++ b/src/nginxconfig/i18n/verify.js @@ -83,8 +83,15 @@ const todos = (file) => { for (let i = 0; i < lines.length; i++) { const line = lines[i]; - const match = line.match(/\/\/\s*todo([([].*?[)\]])?\s*:?\s*(.*)/i); - if (match) items.push([i + 1, line, match[0], match[1], match[2]]); + // Match various TODO comment styles and capture the trailing text + const match = line.match(/\/\/\s*todo(?:\s*[::-])?\s*(.*)/i); + if (match) { + // Ignore translation placeholder TODOs (these are expected in many packs) + const text = (match[1] || '').trim(); + if (/^translate$/i.test(text) || (/translate/i.test(text) && text.length < 40)) + continue; + items.push([i + 1, line, match[0], match[1]]); + } } return items;