Skip to content

📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!

better unused lookup

Blue Mousee12c6ee208c4
diff --git a/web/find_unused_keys.js b/web/find_unused_keys.js
index 56a507d30..d49444a18 100644
--- a/web/find_unused_keys.js
+++ b/web/find_unused_keys.js
@@ -17,7 +17,6 @@ flatten(locales)
const dynamicPrefixes = [
'dashboard.',
- 'common.',
'profileSettings.',
'apiNotifications.',
'experiments.status.',
@@ -46,6 +45,9 @@ const dynamicPrefixes = [
'project.settings.difficultyLevels.',
]
+// Exact keys that are dynamically constructed and should be excluded
+const dynamicExactKeys = ['common.is', 'common.isNot', 'common.connected', 'common.notConnected']
+
function getFiles(dir) {
let results = []
const list = fs.readdirSync(dir)
@@ -71,6 +73,10 @@ const unusedKeys = allKeys.filter((key) => {
return false
}
+ if (dynamicExactKeys.includes(key)) {
+ return false
+ }
+
const isUsed = fileContents.some((content) => content.includes(key))
if (isUsed) {
return false
diff --git a/web/public/locales/en.json b/web/public/locales/en.json
index 05f819302..163379ae0 100644
--- a/web/public/locales/en.json
+++ b/web/public/locales/en.json
@@ -91,13 +91,10 @@
"status": "Status",
"connect": "Connect",
"disconnect": "Disconnect",
- "features": "Features",
"docs": "Docs",
"bookACall": "Book a call with the founder",
- "getStarted": "Get started",
"billing": "Billing",
"pricing": "Pricing",
- "faqs": "FAQs",
"loading": "Loading...",
"accountSettings": "Account settings",
"liveDemo": "Live demo",