Skip to content

Build your personal knowledge base with Trilium Notes

fix(search): title-case the add search option menu

Elian Doranc1ec95f84f42
diff --git a/apps/client/src/translations/en/translation.json b/apps/client/src/translations/en/translation.json
index 7e4dd56dd1..8e7eb3f4fe 100644
--- a/apps/client/src/translations/en/translation.json
+++ b/apps/client/src/translations/en/translation.json
@@ -1447,18 +1447,8 @@
},
"search_definition": {
"add_search_option": "Add search option",
- "search_string": "search string",
- "search_script": "search script",
- "ancestor": "ancestor",
- "fast_search": "fast search",
- "fast_search_description": "Fast search option disables full text search of note contents which might speed up searching in large databases.",
- "include_archived": "include archived",
"include_archived_notes_description": "Archived notes are by default excluded from search results, with this option they will be included.",
- "order_by": "order by",
- "limit": "limit",
"limit_description": "Limit number of results",
- "debug": "debug",
- "debug_description": "Debug will print extra debugging information into the console to aid in debugging complex queries",
"action": "action",
"option": "option",
"search_button": "Search",
diff --git a/apps/client/src/widgets/search/SearchDefinition.spec.tsx b/apps/client/src/widgets/search/SearchDefinition.spec.tsx
index 114420ac41..4dda0155e8 100644
--- a/apps/client/src/widgets/search/SearchDefinition.spec.tsx
+++ b/apps/client/src/widgets/search/SearchDefinition.spec.tsx
@@ -77,7 +77,7 @@ describe("the search definition", () => {
await act(async () => toggle?.click());
const menu = document.querySelector(".action-add-menu");
- expect(menu?.textContent).toContain("search_definition.limit");
+ expect(menu?.textContent).toContain("limit.limit");
expect(menu?.querySelector(".dropdown-header")?.textContent).toBe("bulk_actions.bulk_actions");
const groups = [ ...menu?.querySelectorAll(".dropdown-submenu") ?? [] ]
diff --git a/apps/client/src/widgets/search/SearchDefinitionOptions.tsx b/apps/client/src/widgets/search/SearchDefinitionOptions.tsx
index 95a55b2c5c..086b707f7d 100644
--- a/apps/client/src/widgets/search/SearchDefinitionOptions.tsx
+++ b/apps/client/src/widgets/search/SearchDefinitionOptions.tsx
@@ -47,7 +47,7 @@ export const SEARCH_OPTIONS: SearchOption[] = [
attributeName: "searchString",
attributeType: "label",
icon: "bx bx-text",
- label: t("search_definition.search_string"),
+ label: t("search_string.title_column"),
component: SearchStringOption
},
{
@@ -55,7 +55,7 @@ export const SEARCH_OPTIONS: SearchOption[] = [
attributeType: "relation",
defaultValue: "root",
icon: "bx bx-code",
- label: t("search_definition.search_script"),
+ label: t("search_script.title"),
component: SearchScriptOption
},
{
@@ -63,7 +63,7 @@ export const SEARCH_OPTIONS: SearchOption[] = [
attributeType: "relation",
defaultValue: "root",
icon: "bx bx-filter-alt",
- label: t("search_definition.ancestor"),
+ label: t("ancestor.label"),
component: AncestorOption,
additionalAttributesToDelete: [ { type: "label", name: "ancestorDepth" } ]
},
@@ -71,15 +71,15 @@ export const SEARCH_OPTIONS: SearchOption[] = [
attributeName: "fastSearch",
attributeType: "label",
icon: "bx bx-run",
- label: t("search_definition.fast_search"),
- tooltip: t("search_definition.fast_search_description"),
+ label: t("fast_search.fast_search"),
+ tooltip: t("fast_search.description"),
component: FastSearchOption
},
{
attributeName: "includeArchivedNotes",
attributeType: "label",
icon: "bx bx-archive",
- label: t("search_definition.include_archived"),
+ label: t("include_archived_notes.include_archived_notes"),
tooltip: t("search_definition.include_archived_notes_description"),
component: IncludeArchivedNotesOption
},
@@ -88,7 +88,7 @@ export const SEARCH_OPTIONS: SearchOption[] = [
attributeType: "label",
defaultValue: "relevancy",
icon: "bx bx-arrow-from-top",
- label: t("search_definition.order_by"),
+ label: t("order_by.order_by"),
component: OrderByOption,
additionalAttributesToDelete: [ { type: "label", name: "orderDirection" } ]
},
@@ -97,7 +97,7 @@ export const SEARCH_OPTIONS: SearchOption[] = [
attributeType: "label",
defaultValue: "10",
icon: "bx bx-stop",
- label: t("search_definition.limit"),
+ label: t("limit.limit"),
tooltip: t("search_definition.limit_description"),
component: LimitOption
},
@@ -105,8 +105,8 @@ export const SEARCH_OPTIONS: SearchOption[] = [
attributeName: "debug",
attributeType: "label",
icon: "bx bx-bug",
- label: t("search_definition.debug"),
- tooltip: t("search_definition.debug_description"),
+ label: t("debug.debug"),
+ tooltip: t("debug.debug_info"),
component: DebugOption
}
];