What changed, and why it matters
This commit simply adds missing translated text labels for a global search feature. It changes hardcoded English hint text into references to the project's translation system so the hints can appear in other languages. There is no security relevance.
No security action required; this is a routine localization fix.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch adds four new localized string keys to the GlobalSearch Razor view and the default translations dictionary, then updates global-search.js to use vm.translate[…] instead of literal English strings for suggested search hints. It is a pure localization/i18n change with no functional, access-control, or data-handling modifications.
Changed components
BTCPayServer.Plugins.GlobalSearchBTCPayServer.Plugins.TranslationsInspect captured patch +13 / −4
diff --git a/BTCPayServer/Plugins/GlobalSearch/Views/NavExtension.cshtml b/BTCPayServer/Plugins/GlobalSearch/Views/NavExtension.cshtml
index 6711dec..7046bf2 100644
--- a/BTCPayServer/Plugins/GlobalSearch/Views/NavExtension.cshtml
+++ b/BTCPayServer/Plugins/GlobalSearch/Views/NavExtension.cshtml
@@ -82,6 +82,10 @@
"Recent": @Safe.Json(StringLocalizer["Recent"].Value),
"Clear history": @Safe.Json(StringLocalizer["Clear history"].Value),
"Suggested": @Safe.Json(StringLocalizer["Suggested"].Value),
+ "Find invoices and requests created today" : @Safe.Json(StringLocalizer["Find invoices and requests created today"].Value),
+ "Find invoices and requests from yesterday" : @Safe.Json(StringLocalizer["Find invoices and requests from yesterday"].Value),
+ "Find by transaction id (prefix supported)" : @Safe.Json(StringLocalizer["Find by transaction id (prefix supported)"].Value),
+ "Jump to server settings pages quickly" : @Safe.Json(StringLocalizer["Jump to server settings pages quickly"].Value),
};
</script>
<link href="~/plugins/GlobalSearch/global-search.css" rel="stylesheet" asp-append-version="true" />
diff --git a/BTCPayServer/Plugins/Translations/Translations.Default.cs b/BTCPayServer/Plugins/Translations/Translations.Default.cs
index 74eaae6..6ccfb0e 100644
--- a/BTCPayServer/Plugins/Translations/Translations.Default.cs
+++ b/BTCPayServer/Plugins/Translations/Translations.Default.cs
@@ -745,6 +745,9 @@ namespace BTCPayServer.Plugins.Translations
"Filter invoices by Custom Range": "",
"Filter payment requests by Custom Range": "",
"Filter transactions by Custom Range": "",
+ "Find by transaction id (prefix supported)": "",
+ "Find invoices and requests created today": "",
+ "Find invoices and requests from yesterday": "",
"Firstname Lastname <email@example.com>": "",
"Fit button inline": "",
"Fixed amount": "",
@@ -917,6 +920,7 @@ namespace BTCPayServer.Plugins.Translations
"Items total": "",
"JSON": "",
"JSON Credentials": "",
+ "Jump to server settings pages quickly": "",
"Keep empty for server-initiated pairing.": "",
"Key": "",
"Key path": "",
@@ -968,6 +972,7 @@ namespace BTCPayServer.Plugins.Translations
"Link": "",
"Link this Pay Button to an app instead. Some features are disabled due to the different endpoint capabilities. You can set which perk/item this button should be targeting.": "",
"Link URL": "",
+ "List wallets": "",
"LND {0}": "",
"LND Seed Backup": "",
"LNURL": "",
diff --git a/BTCPayServer/wwwroot/plugins/GlobalSearch/global-search.js b/BTCPayServer/wwwroot/plugins/GlobalSearch/global-search.js
index 052dc8b..01afe14 100644
--- a/BTCPayServer/wwwroot/plugins/GlobalSearch/global-search.js
+++ b/BTCPayServer/wwwroot/plugins/GlobalSearch/global-search.js
@@ -47,10 +47,10 @@
yesterday.setUTCDate(yesterday.getUTCDate() - 1);
const yesterdayIso = yesterday.toISOString().slice(0, 10);
const suggestedQueries = [
- {query: `date:${todayIso}`, hint: 'Find invoices and requests created today'},
- {query: `date:${yesterdayIso}`, hint: 'Find invoices and requests from yesterday'},
- {query: 'tx:4e3a67', hint: 'Find by transaction id (prefix supported)'},
- {query: 'server settings', hint: 'Jump to server settings pages quickly'}
+ {query: `date:${todayIso}`, hint: vm.translate['Find invoices and requests created today']},
+ {query: `date:${yesterdayIso}`, hint: vm.translate['Find invoices and requests from yesterday']},
+ {query: 'tx:4e3a67', hint: vm.translate['Find by transaction id (prefix supported)']},
+ {query: 'server settings', hint: vm.translate['Jump to server settings pages quickly']}
];
let latestSearchToken = 0;
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.