mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-23 23:19:40 +01:00
core: use intl for showing search results count
This commit is contained in:
@@ -41,6 +41,7 @@ import { fuzzy } from "../utils/fuzzy.js";
|
|||||||
import { extractMatchingBlocks } from "../utils/html-parser.js";
|
import { extractMatchingBlocks } from "../utils/html-parser.js";
|
||||||
import { findOrAdd } from "../utils/array.js";
|
import { findOrAdd } from "../utils/array.js";
|
||||||
import { Parser } from "htmlparser2";
|
import { Parser } from "htmlparser2";
|
||||||
|
import { strings } from "@notesnook/intl";
|
||||||
|
|
||||||
type SearchResults<T> = {
|
type SearchResults<T> = {
|
||||||
sorted: (sortOptions?: SortOptions) => Promise<VirtualizedGrouping<T>>;
|
sorted: (sortOptions?: SortOptions) => Promise<VirtualizedGrouping<T>>;
|
||||||
@@ -277,7 +278,21 @@ export default class Lookup {
|
|||||||
ids: results.map((c) => c.id),
|
ids: results.map((c) => c.id),
|
||||||
items: results
|
items: results
|
||||||
};
|
};
|
||||||
}
|
},
|
||||||
|
() =>
|
||||||
|
new Map([
|
||||||
|
[
|
||||||
|
0,
|
||||||
|
{
|
||||||
|
index: 0,
|
||||||
|
group: {
|
||||||
|
id: "0",
|
||||||
|
title: strings.results(matches.ids.length),
|
||||||
|
type: "header"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
])
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user