diff --git a/src/index/datacore.ts b/src/index/datacore.ts index 2a29ac6aa..7f547b9d6 100644 --- a/src/index/datacore.ts +++ b/src/index/datacore.ts @@ -126,19 +126,24 @@ export class Datacore extends Component { const init = (this.initializer = new DatacoreInitializer(this)); this.addChild(init); - await init.finished(); + // Wait only for the cache phase to complete, then signal ready immediately. + await init.cacheReady(); this.initialized = true; + this.datastore.touch(); + this.trigger("update", this.revision); + this.trigger("initialized"); + + // Continue waiting for background imports of stale/missing files. + await init.finished(); + this.initializer = undefined; this.removeChild(init); this.datastore.touch(); this.trigger("update", this.revision); - this.trigger("initialized"); // Clean up any documents which no longer exist in the vault. - // TODO: I think this may race with other concurrent operations, so - // this may need to happen at the start of init and not at the end. const currentFiles = this.vault.getFiles().map((file) => file.path); this.persister.synchronize(currentFiles); } @@ -315,6 +320,12 @@ export class DatacoreInitializer extends Component { current: TFile[]; /** Deferred promise which resolves when importing is done. */ done: Deferred; + /** + * Deferred promise which resolves as soon as all cached files have been loaded into the + * datastore. Files that are stale or missing from the cache continue importing in the + * background after this resolves. + */ + cacheReadyDeferred: Deferred; /** The total number of target files to import. */ targetTotal: number; @@ -331,6 +342,9 @@ export class DatacoreInitializer extends Component { /** Total number of cached files. */ cached: number; + /** Files that need a full background import (stale or not in cache). */ + private backgroundQueue: TFile[]; + constructor(public core: Datacore) { super(); @@ -341,18 +355,32 @@ export class DatacoreInitializer extends Component { this.start = Date.now(); this.current = []; this.done = deferred(); + this.cacheReadyDeferred = deferred(); + + this.backgroundQueue = []; this.initialized = this.imported = this.skipped = this.cached = 0; } async onload() { - // Queue BATCH_SIZE elements from the queue to import. this.active = true; - this.runNext(); + // Phase 1: load everything available from the IndexedDB cache. + await this.loadFromCache(); + + // Signal that the index is usable — cached data is now in the datastore. + this.cacheReadyDeferred.resolve(); + + // Phase 2: import files that were stale or missing from the cache in the background. + this.runNextBackground(); + } + + /** Promise that resolves once all cached files have been loaded (plugin is usable). */ + cacheReady(): Promise { + return this.cacheReadyDeferred; } - /** Promise which resolves when the initialization completes. */ + /** Promise which resolves when the full initialization (including background imports) completes. */ finished(): Promise { return this.done; } @@ -361,37 +389,70 @@ export class DatacoreInitializer extends Component { onunload() { if (this.active) { this.active = false; + this.cacheReadyDeferred.resolve(); // unblock callers waiting on cache this.done.reject("Initialization was cancelled before completing."); } } - /** Poll for another task to execute from the queue. */ - private runNext() { - // Do nothing if max number of concurrent operations already running. + /** Phase 1: iterate all vault files and load valid cache entries synchronously (in batches). */ + private async loadFromCache() { + const allFiles = this.queue.slice(); // snapshot + this.queue = []; + + // Process in parallel batches to keep it fast without hammering IndexedDB. + const CACHE_BATCH = 32; + for (let i = 0; i < allFiles.length; i += CACHE_BATCH) { + if (!this.active) break; + + const batch = allFiles.slice(i, i + CACHE_BATCH); + await Promise.all( + batch.map(async (file) => { + try { + const cached = await this.core.persister.loadFile(file.path); + if (cached && cached.time >= file.stat.mtime && cached.version === this.core.version) { + if (file.extension === "md") { + const data = MarkdownPage.from(cached.data as JsonMarkdownPage, (link) => link); + this.core.storeMarkdown(data); + this.cached++; + this.initialized++; + return; + } + } + // Cache miss or stale — queue for background import. + this.backgroundQueue.push(file); + } catch { + this.backgroundQueue.push(file); + } + }) + ); + } + } + + /** Phase 2: import files that weren't in the cache, respecting BATCH_SIZE concurrency. */ + private runNextBackground() { if (!this.active || this.current.length >= DatacoreInitializer.BATCH_SIZE) { return; } - // There is space available to execute another. - const next = this.queue.pop(); + const next = this.backgroundQueue.pop(); if (next) { this.current.push(next); - // Run asynchronously to allow for concurrency. (async () => { try { - const result = await this.init(next); - this.handleResult(next, result); - } catch (error) { - this.handleResult(next, { status: "skipped" }); + await this.core.reload(next); + this.imported++; + } catch { + this.skipped++; } + this.initialized++; + this.current.remove(next); + this.runNextBackground(); })(); - this.runNext(); - } else if (!next && this.current.length == 0) { + this.runNextBackground(); + } else if (this.current.length === 0) { this.active = false; - - // All work is done, resolve. this.done.resolve({ durationMs: Date.now() - this.start, files: this.files, @@ -401,41 +462,6 @@ export class DatacoreInitializer extends Component { }); } } - - /** Process the result of an initialization and queue more runs. */ - private handleResult(file: TFile, result: InitializationResult) { - this.current.remove(file); - this.initialized++; - - if (result.status === "skipped") this.skipped++; - else if (result.status === "imported") this.imported++; - else if (result.status === "cached") this.cached++; - - // Queue more jobs for processing. - this.runNext(); - } - - /** Initialize a specific file. */ - private async init(file: TFile): Promise { - try { - // Handle loading markdown files from cache. - const cached = await this.core.persister.loadFile(file.path); - if (cached && cached.time >= file.stat.mtime && cached.version == this.core.version) { - if (file.extension === "md") { - const data = MarkdownPage.from(cached.data as JsonMarkdownPage, (link) => link); - this.core.storeMarkdown(data); - return { status: "cached" }; - } - } - - // Does not match an existing import type, just reload normally. - await this.core.reload(file); - return { status: "imported" }; - } catch (ex) { - console.log("Datacore: Failed to import file: ", ex); - return { status: "skipped" }; - } - } } /** Statistics about a successful vault initialization. */ @@ -453,6 +479,4 @@ export interface InitializationStats { } /** The result of initializing a file. */ -interface InitializationResult { - status: "skipped" | "imported" | "cached"; -} +// Kept for potential future use. diff --git a/src/lang/helpers.ts b/src/lang/helpers.ts new file mode 100644 index 000000000..75d6b6096 --- /dev/null +++ b/src/lang/helpers.ts @@ -0,0 +1,108 @@ + +import { moment } from "obsidian"; +import af from "./locale/af"; +import ar from "./locale/ar"; +import cz from "./locale/cz"; +import bn from "./locale/bn"; +import da from "./locale/da"; +import de from "./locale/de"; +import en from "./locale/en"; +import enGB from "./locale/en-gb"; +import es from "./locale/es"; +import fr from "./locale/fr"; +import hi from "./locale/hi"; +import id from "./locale/id"; +import it from "./locale/it"; +import ja from "./locale/ja"; +import ko from "./locale/ko"; +import mr from "./locale/mr"; +import nl from "./locale/nl"; +import no from "./locale/no"; +import pl from "./locale/pl"; +import pt from "./locale/pt"; +import ptBR from "./locale/pt-br"; +import ro from "./locale/ro"; +import ru from "./locale/ru"; +import ta from "./locale/ta"; +import te from "./locale/te"; +import th from "./locale/th"; +import tr from "./locale/tr"; +import uk from "./locale/uk"; +import ur from "./locale/ur"; +import vi from "./locale/vi"; +import zhCN from "./locale/zh-cn"; +import zhTW from "./locale/zh-tw"; + +export const localeMap: { [k: string]: Partial } = { + af, + ar, + bn, + cs: cz, + da, + de, + en, + "en-gb": enGB, + es, + fr, + hi, + id, + it, + ja, + ko, + mr, + nl, + nn: no, + pl, + pt, + "pt-br": ptBR, + ro, + ru, + ta, + te, + th, + tr, + uk, + ur, + vi, + "zh-cn": zhCN, + "zh-tw": zhTW, +}; + +/** + * Get the Obsidian locale, falling back to a supported locale if needed + */ +function getObsidianLocale(): string { + const obsidianLocale = moment.locale(); + + if (localeMap[obsidianLocale]) { + return obsidianLocale; + } + const languageCode = obsidianLocale.split("-")[0]; + if (localeMap[languageCode]) { + return languageCode; + } + return "en"; +} + +const locale = localeMap[getObsidianLocale()]; + +// https://stackoverflow.com/a/41015840/ +function interpolate(str: string, params: Record): string { + const names: string[] = Object.keys(params); + const vals: unknown[] = Object.values(params); + return new Function(...names, `return \`${str}\`;`)(...vals); +} + +export function t(str: keyof typeof en, params?: Record): string { + if (!locale) { + console.error(`Datacore: Locale ${getObsidianLocale()} not found.`); + } + + const result = (locale && locale[str]) || en[str] || str; + + if (params) { + return interpolate(result, params); + } + + return result; +} diff --git a/src/lang/locale/af.ts b/src/lang/locale/af.ts new file mode 100644 index 000000000..92720b7ec --- /dev/null +++ b/src/lang/locale/af.ts @@ -0,0 +1,40 @@ +// Afrikaans + +export default { + // General + VIEWS: "Views", + FORMATTING: "Formatting", + PERFORMANCE: "Performance", + + // Views settings + PAGINATION: "Pagination", + PAGINATION_DESC: "If enabled, splits up views into pages of results which can be traversed via buttons at the top and bottom of the view. This substantially improves the performance of large views, and can help with visual clutter. Note that this setting can also be set on a per-view basis.", + DEFAULT_PAGE_SIZE: "Default page size", + DEFAULT_PAGE_SIZE_DESC: "The number of entries to show per page, by default. This can be overriden on a per-view basis.", + SCROLL_ON_PAGE_CHANGE: "Scroll on page change", + SCROLL_ON_PAGE_CHANGE_DESC: "If enabled, table that are paged will scroll to the top of the table when the page changes. This can be overriden on a per-view basis.", + + // Formatting settings + EMPTY_VALUES: "Empty values", + EMPTY_VALUES_DESC: "What to show for unset/empty properties.", + DEFAULT_DATE_FORMAT: "Default date format", + DEFAULT_DATE_FORMAT_DESC: "The default format that dates are rendered in. Uses luxon date formatting.", + DEFAULT_DATETIME_FORMAT: "Default date/time format", + DEFAULT_DATETIME_FORMAT_DESC: "The default format that date-times are rendered in. Uses luxon date formatting.", + + // Performance settings + INLINE_FIELDS: "Inline fields", + INLINE_FIELDS_DESC: "If enabled, inline fields will be parsed in all documents. Finding inline fields requires a full text scan through each document, which noticably slows down indexing for large vaults. Disabling this functionality will mean metadata will only come from tags, links, and Properties / frontmatter", + IMPORTER_THREADS: "Importer threads", + IMPORTER_THREADS_DESC: "The number of importer threads to use for parsing metadata.", + IMPORTER_UTILIZATION: "Importer utilization", + IMPORTER_UTILIZATION_DESC: "How much CPU time each importer thread should use, as a fraction (0.1 - 1.0).", + MAX_RECURSIVE_RENDER_DEPTH: "Maximum recursive render depth", + MAX_RECURSIVE_RENDER_DEPTH_DESC: "Maximum depth that objects will be rendered to (i.e., how many levels of subproperties will be rendered by default). This avoids infinite recursion due to self-referential objects and ensures that rendering objects is acceptably performant.", + + // Commands + REINDEX_VAULT: "Reindex entire vault", + + // Loading + LOADING_TITLE: "Datacore is getting ready...", + VIEW_RENDERING: "< View is rendering >",}; diff --git a/src/lang/locale/ar.ts b/src/lang/locale/ar.ts new file mode 100644 index 000000000..1b9e884db --- /dev/null +++ b/src/lang/locale/ar.ts @@ -0,0 +1,40 @@ +// العربية + +export default { + // General + VIEWS: "Views", + FORMATTING: "Formatting", + PERFORMANCE: "Performance", + + // Views settings + PAGINATION: "Pagination", + PAGINATION_DESC: "If enabled, splits up views into pages of results which can be traversed via buttons at the top and bottom of the view. This substantially improves the performance of large views, and can help with visual clutter. Note that this setting can also be set on a per-view basis.", + DEFAULT_PAGE_SIZE: "Default page size", + DEFAULT_PAGE_SIZE_DESC: "The number of entries to show per page, by default. This can be overriden on a per-view basis.", + SCROLL_ON_PAGE_CHANGE: "Scroll on page change", + SCROLL_ON_PAGE_CHANGE_DESC: "If enabled, table that are paged will scroll to the top of the table when the page changes. This can be overriden on a per-view basis.", + + // Formatting settings + EMPTY_VALUES: "Empty values", + EMPTY_VALUES_DESC: "What to show for unset/empty properties.", + DEFAULT_DATE_FORMAT: "Default date format", + DEFAULT_DATE_FORMAT_DESC: "The default format that dates are rendered in. Uses luxon date formatting.", + DEFAULT_DATETIME_FORMAT: "Default date/time format", + DEFAULT_DATETIME_FORMAT_DESC: "The default format that date-times are rendered in. Uses luxon date formatting.", + + // Performance settings + INLINE_FIELDS: "Inline fields", + INLINE_FIELDS_DESC: "If enabled, inline fields will be parsed in all documents. Finding inline fields requires a full text scan through each document, which noticably slows down indexing for large vaults. Disabling this functionality will mean metadata will only come from tags, links, and Properties / frontmatter", + IMPORTER_THREADS: "Importer threads", + IMPORTER_THREADS_DESC: "The number of importer threads to use for parsing metadata.", + IMPORTER_UTILIZATION: "Importer utilization", + IMPORTER_UTILIZATION_DESC: "How much CPU time each importer thread should use, as a fraction (0.1 - 1.0).", + MAX_RECURSIVE_RENDER_DEPTH: "Maximum recursive render depth", + MAX_RECURSIVE_RENDER_DEPTH_DESC: "Maximum depth that objects will be rendered to (i.e., how many levels of subproperties will be rendered by default). This avoids infinite recursion due to self-referential objects and ensures that rendering objects is acceptably performant.", + + // Commands + REINDEX_VAULT: "Reindex entire vault", + + // Loading + LOADING_TITLE: "Datacore is getting ready...", + VIEW_RENDERING: "< View is rendering >",}; diff --git a/src/lang/locale/bn.ts b/src/lang/locale/bn.ts new file mode 100644 index 000000000..55d14ac6c --- /dev/null +++ b/src/lang/locale/bn.ts @@ -0,0 +1,40 @@ +// Bengali + +export default { + // General + VIEWS: "Views", + FORMATTING: "Formatting", + PERFORMANCE: "Performance", + + // Views settings + PAGINATION: "Pagination", + PAGINATION_DESC: "If enabled, splits up views into pages of results which can be traversed via buttons at the top and bottom of the view. This substantially improves the performance of large views, and can help with visual clutter. Note that this setting can also be set on a per-view basis.", + DEFAULT_PAGE_SIZE: "Default page size", + DEFAULT_PAGE_SIZE_DESC: "The number of entries to show per page, by default. This can be overriden on a per-view basis.", + SCROLL_ON_PAGE_CHANGE: "Scroll on page change", + SCROLL_ON_PAGE_CHANGE_DESC: "If enabled, table that are paged will scroll to the top of the table when the page changes. This can be overriden on a per-view basis.", + + // Formatting settings + EMPTY_VALUES: "Empty values", + EMPTY_VALUES_DESC: "What to show for unset/empty properties.", + DEFAULT_DATE_FORMAT: "Default date format", + DEFAULT_DATE_FORMAT_DESC: "The default format that dates are rendered in. Uses luxon date formatting.", + DEFAULT_DATETIME_FORMAT: "Default date/time format", + DEFAULT_DATETIME_FORMAT_DESC: "The default format that date-times are rendered in. Uses luxon date formatting.", + + // Performance settings + INLINE_FIELDS: "Inline fields", + INLINE_FIELDS_DESC: "If enabled, inline fields will be parsed in all documents. Finding inline fields requires a full text scan through each document, which noticably slows down indexing for large vaults. Disabling this functionality will mean metadata will only come from tags, links, and Properties / frontmatter", + IMPORTER_THREADS: "Importer threads", + IMPORTER_THREADS_DESC: "The number of importer threads to use for parsing metadata.", + IMPORTER_UTILIZATION: "Importer utilization", + IMPORTER_UTILIZATION_DESC: "How much CPU time each importer thread should use, as a fraction (0.1 - 1.0).", + MAX_RECURSIVE_RENDER_DEPTH: "Maximum recursive render depth", + MAX_RECURSIVE_RENDER_DEPTH_DESC: "Maximum depth that objects will be rendered to (i.e., how many levels of subproperties will be rendered by default). This avoids infinite recursion due to self-referential objects and ensures that rendering objects is acceptably performant.", + + // Commands + REINDEX_VAULT: "Reindex entire vault", + + // Loading + LOADING_TITLE: "Datacore is getting ready...", + VIEW_RENDERING: "< View is rendering >",}; diff --git a/src/lang/locale/cz.ts b/src/lang/locale/cz.ts new file mode 100644 index 000000000..d7e928b08 --- /dev/null +++ b/src/lang/locale/cz.ts @@ -0,0 +1,40 @@ +// čeština + +export default { + // General + VIEWS: "Views", + FORMATTING: "Formatting", + PERFORMANCE: "Performance", + + // Views settings + PAGINATION: "Pagination", + PAGINATION_DESC: "If enabled, splits up views into pages of results which can be traversed via buttons at the top and bottom of the view. This substantially improves the performance of large views, and can help with visual clutter. Note that this setting can also be set on a per-view basis.", + DEFAULT_PAGE_SIZE: "Default page size", + DEFAULT_PAGE_SIZE_DESC: "The number of entries to show per page, by default. This can be overriden on a per-view basis.", + SCROLL_ON_PAGE_CHANGE: "Scroll on page change", + SCROLL_ON_PAGE_CHANGE_DESC: "If enabled, table that are paged will scroll to the top of the table when the page changes. This can be overriden on a per-view basis.", + + // Formatting settings + EMPTY_VALUES: "Empty values", + EMPTY_VALUES_DESC: "What to show for unset/empty properties.", + DEFAULT_DATE_FORMAT: "Default date format", + DEFAULT_DATE_FORMAT_DESC: "The default format that dates are rendered in. Uses luxon date formatting.", + DEFAULT_DATETIME_FORMAT: "Default date/time format", + DEFAULT_DATETIME_FORMAT_DESC: "The default format that date-times are rendered in. Uses luxon date formatting.", + + // Performance settings + INLINE_FIELDS: "Inline fields", + INLINE_FIELDS_DESC: "If enabled, inline fields will be parsed in all documents. Finding inline fields requires a full text scan through each document, which noticably slows down indexing for large vaults. Disabling this functionality will mean metadata will only come from tags, links, and Properties / frontmatter", + IMPORTER_THREADS: "Importer threads", + IMPORTER_THREADS_DESC: "The number of importer threads to use for parsing metadata.", + IMPORTER_UTILIZATION: "Importer utilization", + IMPORTER_UTILIZATION_DESC: "How much CPU time each importer thread should use, as a fraction (0.1 - 1.0).", + MAX_RECURSIVE_RENDER_DEPTH: "Maximum recursive render depth", + MAX_RECURSIVE_RENDER_DEPTH_DESC: "Maximum depth that objects will be rendered to (i.e., how many levels of subproperties will be rendered by default). This avoids infinite recursion due to self-referential objects and ensures that rendering objects is acceptably performant.", + + // Commands + REINDEX_VAULT: "Reindex entire vault", + + // Loading + LOADING_TITLE: "Datacore is getting ready...", + VIEW_RENDERING: "< View is rendering >",}; diff --git a/src/lang/locale/da.ts b/src/lang/locale/da.ts new file mode 100644 index 000000000..32f2c1f4d --- /dev/null +++ b/src/lang/locale/da.ts @@ -0,0 +1,40 @@ +// Dansk + +export default { + // General + VIEWS: "Views", + FORMATTING: "Formatting", + PERFORMANCE: "Performance", + + // Views settings + PAGINATION: "Pagination", + PAGINATION_DESC: "If enabled, splits up views into pages of results which can be traversed via buttons at the top and bottom of the view. This substantially improves the performance of large views, and can help with visual clutter. Note that this setting can also be set on a per-view basis.", + DEFAULT_PAGE_SIZE: "Default page size", + DEFAULT_PAGE_SIZE_DESC: "The number of entries to show per page, by default. This can be overriden on a per-view basis.", + SCROLL_ON_PAGE_CHANGE: "Scroll on page change", + SCROLL_ON_PAGE_CHANGE_DESC: "If enabled, table that are paged will scroll to the top of the table when the page changes. This can be overriden on a per-view basis.", + + // Formatting settings + EMPTY_VALUES: "Empty values", + EMPTY_VALUES_DESC: "What to show for unset/empty properties.", + DEFAULT_DATE_FORMAT: "Default date format", + DEFAULT_DATE_FORMAT_DESC: "The default format that dates are rendered in. Uses luxon date formatting.", + DEFAULT_DATETIME_FORMAT: "Default date/time format", + DEFAULT_DATETIME_FORMAT_DESC: "The default format that date-times are rendered in. Uses luxon date formatting.", + + // Performance settings + INLINE_FIELDS: "Inline fields", + INLINE_FIELDS_DESC: "If enabled, inline fields will be parsed in all documents. Finding inline fields requires a full text scan through each document, which noticably slows down indexing for large vaults. Disabling this functionality will mean metadata will only come from tags, links, and Properties / frontmatter", + IMPORTER_THREADS: "Importer threads", + IMPORTER_THREADS_DESC: "The number of importer threads to use for parsing metadata.", + IMPORTER_UTILIZATION: "Importer utilization", + IMPORTER_UTILIZATION_DESC: "How much CPU time each importer thread should use, as a fraction (0.1 - 1.0).", + MAX_RECURSIVE_RENDER_DEPTH: "Maximum recursive render depth", + MAX_RECURSIVE_RENDER_DEPTH_DESC: "Maximum depth that objects will be rendered to (i.e., how many levels of subproperties will be rendered by default). This avoids infinite recursion due to self-referential objects and ensures that rendering objects is acceptably performant.", + + // Commands + REINDEX_VAULT: "Reindex entire vault", + + // Loading + LOADING_TITLE: "Datacore is getting ready...", + VIEW_RENDERING: "< View is rendering >",}; diff --git a/src/lang/locale/de.ts b/src/lang/locale/de.ts new file mode 100644 index 000000000..de59496ba --- /dev/null +++ b/src/lang/locale/de.ts @@ -0,0 +1,40 @@ +// Deutsch + +export default { + // General + VIEWS: "Views", + FORMATTING: "Formatting", + PERFORMANCE: "Performance", + + // Views settings + PAGINATION: "Pagination", + PAGINATION_DESC: "If enabled, splits up views into pages of results which can be traversed via buttons at the top and bottom of the view. This substantially improves the performance of large views, and can help with visual clutter. Note that this setting can also be set on a per-view basis.", + DEFAULT_PAGE_SIZE: "Default page size", + DEFAULT_PAGE_SIZE_DESC: "The number of entries to show per page, by default. This can be overriden on a per-view basis.", + SCROLL_ON_PAGE_CHANGE: "Scroll on page change", + SCROLL_ON_PAGE_CHANGE_DESC: "If enabled, table that are paged will scroll to the top of the table when the page changes. This can be overriden on a per-view basis.", + + // Formatting settings + EMPTY_VALUES: "Empty values", + EMPTY_VALUES_DESC: "What to show for unset/empty properties.", + DEFAULT_DATE_FORMAT: "Default date format", + DEFAULT_DATE_FORMAT_DESC: "The default format that dates are rendered in. Uses luxon date formatting.", + DEFAULT_DATETIME_FORMAT: "Default date/time format", + DEFAULT_DATETIME_FORMAT_DESC: "The default format that date-times are rendered in. Uses luxon date formatting.", + + // Performance settings + INLINE_FIELDS: "Inline fields", + INLINE_FIELDS_DESC: "If enabled, inline fields will be parsed in all documents. Finding inline fields requires a full text scan through each document, which noticably slows down indexing for large vaults. Disabling this functionality will mean metadata will only come from tags, links, and Properties / frontmatter", + IMPORTER_THREADS: "Importer threads", + IMPORTER_THREADS_DESC: "The number of importer threads to use for parsing metadata.", + IMPORTER_UTILIZATION: "Importer utilization", + IMPORTER_UTILIZATION_DESC: "How much CPU time each importer thread should use, as a fraction (0.1 - 1.0).", + MAX_RECURSIVE_RENDER_DEPTH: "Maximum recursive render depth", + MAX_RECURSIVE_RENDER_DEPTH_DESC: "Maximum depth that objects will be rendered to (i.e., how many levels of subproperties will be rendered by default). This avoids infinite recursion due to self-referential objects and ensures that rendering objects is acceptably performant.", + + // Commands + REINDEX_VAULT: "Reindex entire vault", + + // Loading + LOADING_TITLE: "Datacore is getting ready...", + VIEW_RENDERING: "< View is rendering >",}; diff --git a/src/lang/locale/en-gb.ts b/src/lang/locale/en-gb.ts new file mode 100644 index 000000000..33ca33a82 --- /dev/null +++ b/src/lang/locale/en-gb.ts @@ -0,0 +1,40 @@ +// British English + +export default { + // General + VIEWS: "Views", + FORMATTING: "Formatting", + PERFORMANCE: "Performance", + + // Views settings + PAGINATION: "Pagination", + PAGINATION_DESC: "If enabled, splits up views into pages of results which can be traversed via buttons at the top and bottom of the view. This substantially improves the performance of large views, and can help with visual clutter. Note that this setting can also be set on a per-view basis.", + DEFAULT_PAGE_SIZE: "Default page size", + DEFAULT_PAGE_SIZE_DESC: "The number of entries to show per page, by default. This can be overriden on a per-view basis.", + SCROLL_ON_PAGE_CHANGE: "Scroll on page change", + SCROLL_ON_PAGE_CHANGE_DESC: "If enabled, table that are paged will scroll to the top of the table when the page changes. This can be overriden on a per-view basis.", + + // Formatting settings + EMPTY_VALUES: "Empty values", + EMPTY_VALUES_DESC: "What to show for unset/empty properties.", + DEFAULT_DATE_FORMAT: "Default date format", + DEFAULT_DATE_FORMAT_DESC: "The default format that dates are rendered in. Uses luxon date formatting.", + DEFAULT_DATETIME_FORMAT: "Default date/time format", + DEFAULT_DATETIME_FORMAT_DESC: "The default format that date-times are rendered in. Uses luxon date formatting.", + + // Performance settings + INLINE_FIELDS: "Inline fields", + INLINE_FIELDS_DESC: "If enabled, inline fields will be parsed in all documents. Finding inline fields requires a full text scan through each document, which noticably slows down indexing for large vaults. Disabling this functionality will mean metadata will only come from tags, links, and Properties / frontmatter", + IMPORTER_THREADS: "Importer threads", + IMPORTER_THREADS_DESC: "The number of importer threads to use for parsing metadata.", + IMPORTER_UTILIZATION: "Importer utilization", + IMPORTER_UTILIZATION_DESC: "How much CPU time each importer thread should use, as a fraction (0.1 - 1.0).", + MAX_RECURSIVE_RENDER_DEPTH: "Maximum recursive render depth", + MAX_RECURSIVE_RENDER_DEPTH_DESC: "Maximum depth that objects will be rendered to (i.e., how many levels of subproperties will be rendered by default). This avoids infinite recursion due to self-referential objects and ensures that rendering objects is acceptably performant.", + + // Commands + REINDEX_VAULT: "Reindex entire vault", + + // Loading + LOADING_TITLE: "Datacore is getting ready...", + VIEW_RENDERING: "< View is rendering >",}; diff --git a/src/lang/locale/en.ts b/src/lang/locale/en.ts new file mode 100644 index 000000000..0abc3ce66 --- /dev/null +++ b/src/lang/locale/en.ts @@ -0,0 +1,42 @@ +// English + +export default { + + // General + VIEWS: "Views", + FORMATTING: "Formatting", + PERFORMANCE: "Performance", + + // Views settings + PAGINATION: "Pagination", + PAGINATION_DESC: "If enabled, splits up views into pages of results which can be traversed via buttons at the top and bottom of the view. This substantially improves the performance of large views, and can help with visual clutter. Note that this setting can also be set on a per-view basis.", + DEFAULT_PAGE_SIZE: "Default page size", + DEFAULT_PAGE_SIZE_DESC: "The number of entries to show per page, by default. This can be overriden on a per-view basis.", + SCROLL_ON_PAGE_CHANGE: "Scroll on page change", + SCROLL_ON_PAGE_CHANGE_DESC: "If enabled, table that are paged will scroll to the top of the table when the page changes. This can be overriden on a per-view basis.", + + // Formatting settings + EMPTY_VALUES: "Empty values", + EMPTY_VALUES_DESC: "What to show for unset/empty properties.", + DEFAULT_DATE_FORMAT: "Default date format", + DEFAULT_DATE_FORMAT_DESC: "The default format that dates are rendered in. Uses luxon date formatting.", + DEFAULT_DATETIME_FORMAT: "Default date/time format", + DEFAULT_DATETIME_FORMAT_DESC: "The default format that date-times are rendered in. Uses luxon date formatting.", + + // Performance settings + INLINE_FIELDS: "Inline fields", + INLINE_FIELDS_DESC: "If enabled, inline fields will be parsed in all documents. Finding inline fields requires a full text scan through each document, which noticably slows down indexing for large vaults. Disabling this functionality will mean metadata will only come from tags, links, and Properties / frontmatter", + IMPORTER_THREADS: "Importer threads", + IMPORTER_THREADS_DESC: "The number of importer threads to use for parsing metadata.", + IMPORTER_UTILIZATION: "Importer utilization", + IMPORTER_UTILIZATION_DESC: "How much CPU time each importer thread should use, as a fraction (0.1 - 1.0).", + MAX_RECURSIVE_RENDER_DEPTH: "Maximum recursive render depth", + MAX_RECURSIVE_RENDER_DEPTH_DESC: "Maximum depth that objects will be rendered to (i.e., how many levels of subproperties will be rendered by default). This avoids infinite recursion due to self-referential objects and ensures that rendering objects is acceptably performant.", + + // Commands + REINDEX_VAULT: "Reindex entire vault", + + // Loading + LOADING_TITLE: "Datacore is getting ready...", + VIEW_RENDERING: "< View is rendering >", +}; diff --git a/src/lang/locale/es.ts b/src/lang/locale/es.ts new file mode 100644 index 000000000..12e32c8d6 --- /dev/null +++ b/src/lang/locale/es.ts @@ -0,0 +1,40 @@ +// Spanish - Español. + +export default { + // General + VIEWS: "Views", + FORMATTING: "Formatting", + PERFORMANCE: "Performance", + + // Views settings + PAGINATION: "Pagination", + PAGINATION_DESC: "If enabled, splits up views into pages of results which can be traversed via buttons at the top and bottom of the view. This substantially improves the performance of large views, and can help with visual clutter. Note that this setting can also be set on a per-view basis.", + DEFAULT_PAGE_SIZE: "Default page size", + DEFAULT_PAGE_SIZE_DESC: "The number of entries to show per page, by default. This can be overriden on a per-view basis.", + SCROLL_ON_PAGE_CHANGE: "Scroll on page change", + SCROLL_ON_PAGE_CHANGE_DESC: "If enabled, table that are paged will scroll to the top of the table when the page changes. This can be overriden on a per-view basis.", + + // Formatting settings + EMPTY_VALUES: "Empty values", + EMPTY_VALUES_DESC: "What to show for unset/empty properties.", + DEFAULT_DATE_FORMAT: "Default date format", + DEFAULT_DATE_FORMAT_DESC: "The default format that dates are rendered in. Uses luxon date formatting.", + DEFAULT_DATETIME_FORMAT: "Default date/time format", + DEFAULT_DATETIME_FORMAT_DESC: "The default format that date-times are rendered in. Uses luxon date formatting.", + + // Performance settings + INLINE_FIELDS: "Inline fields", + INLINE_FIELDS_DESC: "If enabled, inline fields will be parsed in all documents. Finding inline fields requires a full text scan through each document, which noticably slows down indexing for large vaults. Disabling this functionality will mean metadata will only come from tags, links, and Properties / frontmatter", + IMPORTER_THREADS: "Importer threads", + IMPORTER_THREADS_DESC: "The number of importer threads to use for parsing metadata.", + IMPORTER_UTILIZATION: "Importer utilization", + IMPORTER_UTILIZATION_DESC: "How much CPU time each importer thread should use, as a fraction (0.1 - 1.0).", + MAX_RECURSIVE_RENDER_DEPTH: "Maximum recursive render depth", + MAX_RECURSIVE_RENDER_DEPTH_DESC: "Maximum depth that objects will be rendered to (i.e., how many levels of subproperties will be rendered by default). This avoids infinite recursion due to self-referential objects and ensures that rendering objects is acceptably performant.", + + // Commands + REINDEX_VAULT: "Reindex entire vault", + + // Loading + LOADING_TITLE: "Datacore is getting ready...", + VIEW_RENDERING: "< View is rendering >",}; diff --git a/src/lang/locale/fr.ts b/src/lang/locale/fr.ts new file mode 100644 index 000000000..e3f63c226 --- /dev/null +++ b/src/lang/locale/fr.ts @@ -0,0 +1,40 @@ +// français + +export default { + // General + VIEWS: "Views", + FORMATTING: "Formatting", + PERFORMANCE: "Performance", + + // Views settings + PAGINATION: "Pagination", + PAGINATION_DESC: "If enabled, splits up views into pages of results which can be traversed via buttons at the top and bottom of the view. This substantially improves the performance of large views, and can help with visual clutter. Note that this setting can also be set on a per-view basis.", + DEFAULT_PAGE_SIZE: "Default page size", + DEFAULT_PAGE_SIZE_DESC: "The number of entries to show per page, by default. This can be overriden on a per-view basis.", + SCROLL_ON_PAGE_CHANGE: "Scroll on page change", + SCROLL_ON_PAGE_CHANGE_DESC: "If enabled, table that are paged will scroll to the top of the table when the page changes. This can be overriden on a per-view basis.", + + // Formatting settings + EMPTY_VALUES: "Empty values", + EMPTY_VALUES_DESC: "What to show for unset/empty properties.", + DEFAULT_DATE_FORMAT: "Default date format", + DEFAULT_DATE_FORMAT_DESC: "The default format that dates are rendered in. Uses luxon date formatting.", + DEFAULT_DATETIME_FORMAT: "Default date/time format", + DEFAULT_DATETIME_FORMAT_DESC: "The default format that date-times are rendered in. Uses luxon date formatting.", + + // Performance settings + INLINE_FIELDS: "Inline fields", + INLINE_FIELDS_DESC: "If enabled, inline fields will be parsed in all documents. Finding inline fields requires a full text scan through each document, which noticably slows down indexing for large vaults. Disabling this functionality will mean metadata will only come from tags, links, and Properties / frontmatter", + IMPORTER_THREADS: "Importer threads", + IMPORTER_THREADS_DESC: "The number of importer threads to use for parsing metadata.", + IMPORTER_UTILIZATION: "Importer utilization", + IMPORTER_UTILIZATION_DESC: "How much CPU time each importer thread should use, as a fraction (0.1 - 1.0).", + MAX_RECURSIVE_RENDER_DEPTH: "Maximum recursive render depth", + MAX_RECURSIVE_RENDER_DEPTH_DESC: "Maximum depth that objects will be rendered to (i.e., how many levels of subproperties will be rendered by default). This avoids infinite recursion due to self-referential objects and ensures that rendering objects is acceptably performant.", + + // Commands + REINDEX_VAULT: "Reindex entire vault", + + // Loading + LOADING_TITLE: "Datacore is getting ready...", + VIEW_RENDERING: "< View is rendering >",}; diff --git a/src/lang/locale/hi.ts b/src/lang/locale/hi.ts new file mode 100644 index 000000000..d19533798 --- /dev/null +++ b/src/lang/locale/hi.ts @@ -0,0 +1,40 @@ +// हिन्दी + +export default { + // General + VIEWS: "Views", + FORMATTING: "Formatting", + PERFORMANCE: "Performance", + + // Views settings + PAGINATION: "Pagination", + PAGINATION_DESC: "If enabled, splits up views into pages of results which can be traversed via buttons at the top and bottom of the view. This substantially improves the performance of large views, and can help with visual clutter. Note that this setting can also be set on a per-view basis.", + DEFAULT_PAGE_SIZE: "Default page size", + DEFAULT_PAGE_SIZE_DESC: "The number of entries to show per page, by default. This can be overriden on a per-view basis.", + SCROLL_ON_PAGE_CHANGE: "Scroll on page change", + SCROLL_ON_PAGE_CHANGE_DESC: "If enabled, table that are paged will scroll to the top of the table when the page changes. This can be overriden on a per-view basis.", + + // Formatting settings + EMPTY_VALUES: "Empty values", + EMPTY_VALUES_DESC: "What to show for unset/empty properties.", + DEFAULT_DATE_FORMAT: "Default date format", + DEFAULT_DATE_FORMAT_DESC: "The default format that dates are rendered in. Uses luxon date formatting.", + DEFAULT_DATETIME_FORMAT: "Default date/time format", + DEFAULT_DATETIME_FORMAT_DESC: "The default format that date-times are rendered in. Uses luxon date formatting.", + + // Performance settings + INLINE_FIELDS: "Inline fields", + INLINE_FIELDS_DESC: "If enabled, inline fields will be parsed in all documents. Finding inline fields requires a full text scan through each document, which noticably slows down indexing for large vaults. Disabling this functionality will mean metadata will only come from tags, links, and Properties / frontmatter", + IMPORTER_THREADS: "Importer threads", + IMPORTER_THREADS_DESC: "The number of importer threads to use for parsing metadata.", + IMPORTER_UTILIZATION: "Importer utilization", + IMPORTER_UTILIZATION_DESC: "How much CPU time each importer thread should use, as a fraction (0.1 - 1.0).", + MAX_RECURSIVE_RENDER_DEPTH: "Maximum recursive render depth", + MAX_RECURSIVE_RENDER_DEPTH_DESC: "Maximum depth that objects will be rendered to (i.e., how many levels of subproperties will be rendered by default). This avoids infinite recursion due to self-referential objects and ensures that rendering objects is acceptably performant.", + + // Commands + REINDEX_VAULT: "Reindex entire vault", + + // Loading + LOADING_TITLE: "Datacore is getting ready...", + VIEW_RENDERING: "< View is rendering >",}; diff --git a/src/lang/locale/id.ts b/src/lang/locale/id.ts new file mode 100644 index 000000000..6c3709a05 --- /dev/null +++ b/src/lang/locale/id.ts @@ -0,0 +1,40 @@ +// Bahasa Indonesia + +export default { + // General + VIEWS: "Views", + FORMATTING: "Formatting", + PERFORMANCE: "Performance", + + // Views settings + PAGINATION: "Pagination", + PAGINATION_DESC: "If enabled, splits up views into pages of results which can be traversed via buttons at the top and bottom of the view. This substantially improves the performance of large views, and can help with visual clutter. Note that this setting can also be set on a per-view basis.", + DEFAULT_PAGE_SIZE: "Default page size", + DEFAULT_PAGE_SIZE_DESC: "The number of entries to show per page, by default. This can be overriden on a per-view basis.", + SCROLL_ON_PAGE_CHANGE: "Scroll on page change", + SCROLL_ON_PAGE_CHANGE_DESC: "If enabled, table that are paged will scroll to the top of the table when the page changes. This can be overriden on a per-view basis.", + + // Formatting settings + EMPTY_VALUES: "Empty values", + EMPTY_VALUES_DESC: "What to show for unset/empty properties.", + DEFAULT_DATE_FORMAT: "Default date format", + DEFAULT_DATE_FORMAT_DESC: "The default format that dates are rendered in. Uses luxon date formatting.", + DEFAULT_DATETIME_FORMAT: "Default date/time format", + DEFAULT_DATETIME_FORMAT_DESC: "The default format that date-times are rendered in. Uses luxon date formatting.", + + // Performance settings + INLINE_FIELDS: "Inline fields", + INLINE_FIELDS_DESC: "If enabled, inline fields will be parsed in all documents. Finding inline fields requires a full text scan through each document, which noticably slows down indexing for large vaults. Disabling this functionality will mean metadata will only come from tags, links, and Properties / frontmatter", + IMPORTER_THREADS: "Importer threads", + IMPORTER_THREADS_DESC: "The number of importer threads to use for parsing metadata.", + IMPORTER_UTILIZATION: "Importer utilization", + IMPORTER_UTILIZATION_DESC: "How much CPU time each importer thread should use, as a fraction (0.1 - 1.0).", + MAX_RECURSIVE_RENDER_DEPTH: "Maximum recursive render depth", + MAX_RECURSIVE_RENDER_DEPTH_DESC: "Maximum depth that objects will be rendered to (i.e., how many levels of subproperties will be rendered by default). This avoids infinite recursion due to self-referential objects and ensures that rendering objects is acceptably performant.", + + // Commands + REINDEX_VAULT: "Reindex entire vault", + + // Loading + LOADING_TITLE: "Datacore is getting ready...", + VIEW_RENDERING: "< View is rendering >",}; diff --git a/src/lang/locale/it.ts b/src/lang/locale/it.ts new file mode 100644 index 000000000..a73ac9bb9 --- /dev/null +++ b/src/lang/locale/it.ts @@ -0,0 +1,40 @@ +// Italiano + +export default { + // General + VIEWS: "Views", + FORMATTING: "Formatting", + PERFORMANCE: "Performance", + + // Views settings + PAGINATION: "Pagination", + PAGINATION_DESC: "If enabled, splits up views into pages of results which can be traversed via buttons at the top and bottom of the view. This substantially improves the performance of large views, and can help with visual clutter. Note that this setting can also be set on a per-view basis.", + DEFAULT_PAGE_SIZE: "Default page size", + DEFAULT_PAGE_SIZE_DESC: "The number of entries to show per page, by default. This can be overriden on a per-view basis.", + SCROLL_ON_PAGE_CHANGE: "Scroll on page change", + SCROLL_ON_PAGE_CHANGE_DESC: "If enabled, table that are paged will scroll to the top of the table when the page changes. This can be overriden on a per-view basis.", + + // Formatting settings + EMPTY_VALUES: "Empty values", + EMPTY_VALUES_DESC: "What to show for unset/empty properties.", + DEFAULT_DATE_FORMAT: "Default date format", + DEFAULT_DATE_FORMAT_DESC: "The default format that dates are rendered in. Uses luxon date formatting.", + DEFAULT_DATETIME_FORMAT: "Default date/time format", + DEFAULT_DATETIME_FORMAT_DESC: "The default format that date-times are rendered in. Uses luxon date formatting.", + + // Performance settings + INLINE_FIELDS: "Inline fields", + INLINE_FIELDS_DESC: "If enabled, inline fields will be parsed in all documents. Finding inline fields requires a full text scan through each document, which noticably slows down indexing for large vaults. Disabling this functionality will mean metadata will only come from tags, links, and Properties / frontmatter", + IMPORTER_THREADS: "Importer threads", + IMPORTER_THREADS_DESC: "The number of importer threads to use for parsing metadata.", + IMPORTER_UTILIZATION: "Importer utilization", + IMPORTER_UTILIZATION_DESC: "How much CPU time each importer thread should use, as a fraction (0.1 - 1.0).", + MAX_RECURSIVE_RENDER_DEPTH: "Maximum recursive render depth", + MAX_RECURSIVE_RENDER_DEPTH_DESC: "Maximum depth that objects will be rendered to (i.e., how many levels of subproperties will be rendered by default). This avoids infinite recursion due to self-referential objects and ensures that rendering objects is acceptably performant.", + + // Commands + REINDEX_VAULT: "Reindex entire vault", + + // Loading + LOADING_TITLE: "Datacore is getting ready...", + VIEW_RENDERING: "< View is rendering >",}; diff --git a/src/lang/locale/ja.ts b/src/lang/locale/ja.ts new file mode 100644 index 000000000..ff61361ac --- /dev/null +++ b/src/lang/locale/ja.ts @@ -0,0 +1,40 @@ +// 日本語 + +export default { + // General + VIEWS: "Views", + FORMATTING: "Formatting", + PERFORMANCE: "Performance", + + // Views settings + PAGINATION: "Pagination", + PAGINATION_DESC: "If enabled, splits up views into pages of results which can be traversed via buttons at the top and bottom of the view. This substantially improves the performance of large views, and can help with visual clutter. Note that this setting can also be set on a per-view basis.", + DEFAULT_PAGE_SIZE: "Default page size", + DEFAULT_PAGE_SIZE_DESC: "The number of entries to show per page, by default. This can be overriden on a per-view basis.", + SCROLL_ON_PAGE_CHANGE: "Scroll on page change", + SCROLL_ON_PAGE_CHANGE_DESC: "If enabled, table that are paged will scroll to the top of the table when the page changes. This can be overriden on a per-view basis.", + + // Formatting settings + EMPTY_VALUES: "Empty values", + EMPTY_VALUES_DESC: "What to show for unset/empty properties.", + DEFAULT_DATE_FORMAT: "Default date format", + DEFAULT_DATE_FORMAT_DESC: "The default format that dates are rendered in. Uses luxon date formatting.", + DEFAULT_DATETIME_FORMAT: "Default date/time format", + DEFAULT_DATETIME_FORMAT_DESC: "The default format that date-times are rendered in. Uses luxon date formatting.", + + // Performance settings + INLINE_FIELDS: "Inline fields", + INLINE_FIELDS_DESC: "If enabled, inline fields will be parsed in all documents. Finding inline fields requires a full text scan through each document, which noticably slows down indexing for large vaults. Disabling this functionality will mean metadata will only come from tags, links, and Properties / frontmatter", + IMPORTER_THREADS: "Importer threads", + IMPORTER_THREADS_DESC: "The number of importer threads to use for parsing metadata.", + IMPORTER_UTILIZATION: "Importer utilization", + IMPORTER_UTILIZATION_DESC: "How much CPU time each importer thread should use, as a fraction (0.1 - 1.0).", + MAX_RECURSIVE_RENDER_DEPTH: "Maximum recursive render depth", + MAX_RECURSIVE_RENDER_DEPTH_DESC: "Maximum depth that objects will be rendered to (i.e., how many levels of subproperties will be rendered by default). This avoids infinite recursion due to self-referential objects and ensures that rendering objects is acceptably performant.", + + // Commands + REINDEX_VAULT: "Reindex entire vault", + + // Loading + LOADING_TITLE: "Datacore is getting ready...", + VIEW_RENDERING: "< View is rendering >",}; diff --git a/src/lang/locale/ko.ts b/src/lang/locale/ko.ts new file mode 100644 index 000000000..d84e7d071 --- /dev/null +++ b/src/lang/locale/ko.ts @@ -0,0 +1,40 @@ +// 한국어 + +export default { + // General + VIEWS: "Views", + FORMATTING: "Formatting", + PERFORMANCE: "Performance", + + // Views settings + PAGINATION: "Pagination", + PAGINATION_DESC: "If enabled, splits up views into pages of results which can be traversed via buttons at the top and bottom of the view. This substantially improves the performance of large views, and can help with visual clutter. Note that this setting can also be set on a per-view basis.", + DEFAULT_PAGE_SIZE: "Default page size", + DEFAULT_PAGE_SIZE_DESC: "The number of entries to show per page, by default. This can be overriden on a per-view basis.", + SCROLL_ON_PAGE_CHANGE: "Scroll on page change", + SCROLL_ON_PAGE_CHANGE_DESC: "If enabled, table that are paged will scroll to the top of the table when the page changes. This can be overriden on a per-view basis.", + + // Formatting settings + EMPTY_VALUES: "Empty values", + EMPTY_VALUES_DESC: "What to show for unset/empty properties.", + DEFAULT_DATE_FORMAT: "Default date format", + DEFAULT_DATE_FORMAT_DESC: "The default format that dates are rendered in. Uses luxon date formatting.", + DEFAULT_DATETIME_FORMAT: "Default date/time format", + DEFAULT_DATETIME_FORMAT_DESC: "The default format that date-times are rendered in. Uses luxon date formatting.", + + // Performance settings + INLINE_FIELDS: "Inline fields", + INLINE_FIELDS_DESC: "If enabled, inline fields will be parsed in all documents. Finding inline fields requires a full text scan through each document, which noticably slows down indexing for large vaults. Disabling this functionality will mean metadata will only come from tags, links, and Properties / frontmatter", + IMPORTER_THREADS: "Importer threads", + IMPORTER_THREADS_DESC: "The number of importer threads to use for parsing metadata.", + IMPORTER_UTILIZATION: "Importer utilization", + IMPORTER_UTILIZATION_DESC: "How much CPU time each importer thread should use, as a fraction (0.1 - 1.0).", + MAX_RECURSIVE_RENDER_DEPTH: "Maximum recursive render depth", + MAX_RECURSIVE_RENDER_DEPTH_DESC: "Maximum depth that objects will be rendered to (i.e., how many levels of subproperties will be rendered by default). This avoids infinite recursion due to self-referential objects and ensures that rendering objects is acceptably performant.", + + // Commands + REINDEX_VAULT: "Reindex entire vault", + + // Loading + LOADING_TITLE: "Datacore is getting ready...", + VIEW_RENDERING: "< View is rendering >",}; diff --git a/src/lang/locale/mr.ts b/src/lang/locale/mr.ts new file mode 100644 index 000000000..de27a009d --- /dev/null +++ b/src/lang/locale/mr.ts @@ -0,0 +1,40 @@ +// Marathi + +export default { + // General + VIEWS: "Views", + FORMATTING: "Formatting", + PERFORMANCE: "Performance", + + // Views settings + PAGINATION: "Pagination", + PAGINATION_DESC: "If enabled, splits up views into pages of results which can be traversed via buttons at the top and bottom of the view. This substantially improves the performance of large views, and can help with visual clutter. Note that this setting can also be set on a per-view basis.", + DEFAULT_PAGE_SIZE: "Default page size", + DEFAULT_PAGE_SIZE_DESC: "The number of entries to show per page, by default. This can be overriden on a per-view basis.", + SCROLL_ON_PAGE_CHANGE: "Scroll on page change", + SCROLL_ON_PAGE_CHANGE_DESC: "If enabled, table that are paged will scroll to the top of the table when the page changes. This can be overriden on a per-view basis.", + + // Formatting settings + EMPTY_VALUES: "Empty values", + EMPTY_VALUES_DESC: "What to show for unset/empty properties.", + DEFAULT_DATE_FORMAT: "Default date format", + DEFAULT_DATE_FORMAT_DESC: "The default format that dates are rendered in. Uses luxon date formatting.", + DEFAULT_DATETIME_FORMAT: "Default date/time format", + DEFAULT_DATETIME_FORMAT_DESC: "The default format that date-times are rendered in. Uses luxon date formatting.", + + // Performance settings + INLINE_FIELDS: "Inline fields", + INLINE_FIELDS_DESC: "If enabled, inline fields will be parsed in all documents. Finding inline fields requires a full text scan through each document, which noticably slows down indexing for large vaults. Disabling this functionality will mean metadata will only come from tags, links, and Properties / frontmatter", + IMPORTER_THREADS: "Importer threads", + IMPORTER_THREADS_DESC: "The number of importer threads to use for parsing metadata.", + IMPORTER_UTILIZATION: "Importer utilization", + IMPORTER_UTILIZATION_DESC: "How much CPU time each importer thread should use, as a fraction (0.1 - 1.0).", + MAX_RECURSIVE_RENDER_DEPTH: "Maximum recursive render depth", + MAX_RECURSIVE_RENDER_DEPTH_DESC: "Maximum depth that objects will be rendered to (i.e., how many levels of subproperties will be rendered by default). This avoids infinite recursion due to self-referential objects and ensures that rendering objects is acceptably performant.", + + // Commands + REINDEX_VAULT: "Reindex entire vault", + + // Loading + LOADING_TITLE: "Datacore is getting ready...", + VIEW_RENDERING: "< View is rendering >",}; diff --git a/src/lang/locale/nl.ts b/src/lang/locale/nl.ts new file mode 100644 index 000000000..f4bda0cda --- /dev/null +++ b/src/lang/locale/nl.ts @@ -0,0 +1,40 @@ +// Nederlands + +export default { + // General + VIEWS: "Views", + FORMATTING: "Formatting", + PERFORMANCE: "Performance", + + // Views settings + PAGINATION: "Pagination", + PAGINATION_DESC: "If enabled, splits up views into pages of results which can be traversed via buttons at the top and bottom of the view. This substantially improves the performance of large views, and can help with visual clutter. Note that this setting can also be set on a per-view basis.", + DEFAULT_PAGE_SIZE: "Default page size", + DEFAULT_PAGE_SIZE_DESC: "The number of entries to show per page, by default. This can be overriden on a per-view basis.", + SCROLL_ON_PAGE_CHANGE: "Scroll on page change", + SCROLL_ON_PAGE_CHANGE_DESC: "If enabled, table that are paged will scroll to the top of the table when the page changes. This can be overriden on a per-view basis.", + + // Formatting settings + EMPTY_VALUES: "Empty values", + EMPTY_VALUES_DESC: "What to show for unset/empty properties.", + DEFAULT_DATE_FORMAT: "Default date format", + DEFAULT_DATE_FORMAT_DESC: "The default format that dates are rendered in. Uses luxon date formatting.", + DEFAULT_DATETIME_FORMAT: "Default date/time format", + DEFAULT_DATETIME_FORMAT_DESC: "The default format that date-times are rendered in. Uses luxon date formatting.", + + // Performance settings + INLINE_FIELDS: "Inline fields", + INLINE_FIELDS_DESC: "If enabled, inline fields will be parsed in all documents. Finding inline fields requires a full text scan through each document, which noticably slows down indexing for large vaults. Disabling this functionality will mean metadata will only come from tags, links, and Properties / frontmatter", + IMPORTER_THREADS: "Importer threads", + IMPORTER_THREADS_DESC: "The number of importer threads to use for parsing metadata.", + IMPORTER_UTILIZATION: "Importer utilization", + IMPORTER_UTILIZATION_DESC: "How much CPU time each importer thread should use, as a fraction (0.1 - 1.0).", + MAX_RECURSIVE_RENDER_DEPTH: "Maximum recursive render depth", + MAX_RECURSIVE_RENDER_DEPTH_DESC: "Maximum depth that objects will be rendered to (i.e., how many levels of subproperties will be rendered by default). This avoids infinite recursion due to self-referential objects and ensures that rendering objects is acceptably performant.", + + // Commands + REINDEX_VAULT: "Reindex entire vault", + + // Loading + LOADING_TITLE: "Datacore is getting ready...", + VIEW_RENDERING: "< View is rendering >",}; diff --git a/src/lang/locale/no.ts b/src/lang/locale/no.ts new file mode 100644 index 000000000..1e1836ccb --- /dev/null +++ b/src/lang/locale/no.ts @@ -0,0 +1,40 @@ +// Norsk + +export default { + // General + VIEWS: "Views", + FORMATTING: "Formatting", + PERFORMANCE: "Performance", + + // Views settings + PAGINATION: "Pagination", + PAGINATION_DESC: "If enabled, splits up views into pages of results which can be traversed via buttons at the top and bottom of the view. This substantially improves the performance of large views, and can help with visual clutter. Note that this setting can also be set on a per-view basis.", + DEFAULT_PAGE_SIZE: "Default page size", + DEFAULT_PAGE_SIZE_DESC: "The number of entries to show per page, by default. This can be overriden on a per-view basis.", + SCROLL_ON_PAGE_CHANGE: "Scroll on page change", + SCROLL_ON_PAGE_CHANGE_DESC: "If enabled, table that are paged will scroll to the top of the table when the page changes. This can be overriden on a per-view basis.", + + // Formatting settings + EMPTY_VALUES: "Empty values", + EMPTY_VALUES_DESC: "What to show for unset/empty properties.", + DEFAULT_DATE_FORMAT: "Default date format", + DEFAULT_DATE_FORMAT_DESC: "The default format that dates are rendered in. Uses luxon date formatting.", + DEFAULT_DATETIME_FORMAT: "Default date/time format", + DEFAULT_DATETIME_FORMAT_DESC: "The default format that date-times are rendered in. Uses luxon date formatting.", + + // Performance settings + INLINE_FIELDS: "Inline fields", + INLINE_FIELDS_DESC: "If enabled, inline fields will be parsed in all documents. Finding inline fields requires a full text scan through each document, which noticably slows down indexing for large vaults. Disabling this functionality will mean metadata will only come from tags, links, and Properties / frontmatter", + IMPORTER_THREADS: "Importer threads", + IMPORTER_THREADS_DESC: "The number of importer threads to use for parsing metadata.", + IMPORTER_UTILIZATION: "Importer utilization", + IMPORTER_UTILIZATION_DESC: "How much CPU time each importer thread should use, as a fraction (0.1 - 1.0).", + MAX_RECURSIVE_RENDER_DEPTH: "Maximum recursive render depth", + MAX_RECURSIVE_RENDER_DEPTH_DESC: "Maximum depth that objects will be rendered to (i.e., how many levels of subproperties will be rendered by default). This avoids infinite recursion due to self-referential objects and ensures that rendering objects is acceptably performant.", + + // Commands + REINDEX_VAULT: "Reindex entire vault", + + // Loading + LOADING_TITLE: "Datacore is getting ready...", + VIEW_RENDERING: "< View is rendering >",}; diff --git a/src/lang/locale/pl.ts b/src/lang/locale/pl.ts new file mode 100644 index 000000000..7b65d52ec --- /dev/null +++ b/src/lang/locale/pl.ts @@ -0,0 +1,40 @@ +// język polski + +export default { + // General + VIEWS: "Views", + FORMATTING: "Formatting", + PERFORMANCE: "Performance", + + // Views settings + PAGINATION: "Pagination", + PAGINATION_DESC: "If enabled, splits up views into pages of results which can be traversed via buttons at the top and bottom of the view. This substantially improves the performance of large views, and can help with visual clutter. Note that this setting can also be set on a per-view basis.", + DEFAULT_PAGE_SIZE: "Default page size", + DEFAULT_PAGE_SIZE_DESC: "The number of entries to show per page, by default. This can be overriden on a per-view basis.", + SCROLL_ON_PAGE_CHANGE: "Scroll on page change", + SCROLL_ON_PAGE_CHANGE_DESC: "If enabled, table that are paged will scroll to the top of the table when the page changes. This can be overriden on a per-view basis.", + + // Formatting settings + EMPTY_VALUES: "Empty values", + EMPTY_VALUES_DESC: "What to show for unset/empty properties.", + DEFAULT_DATE_FORMAT: "Default date format", + DEFAULT_DATE_FORMAT_DESC: "The default format that dates are rendered in. Uses luxon date formatting.", + DEFAULT_DATETIME_FORMAT: "Default date/time format", + DEFAULT_DATETIME_FORMAT_DESC: "The default format that date-times are rendered in. Uses luxon date formatting.", + + // Performance settings + INLINE_FIELDS: "Inline fields", + INLINE_FIELDS_DESC: "If enabled, inline fields will be parsed in all documents. Finding inline fields requires a full text scan through each document, which noticably slows down indexing for large vaults. Disabling this functionality will mean metadata will only come from tags, links, and Properties / frontmatter", + IMPORTER_THREADS: "Importer threads", + IMPORTER_THREADS_DESC: "The number of importer threads to use for parsing metadata.", + IMPORTER_UTILIZATION: "Importer utilization", + IMPORTER_UTILIZATION_DESC: "How much CPU time each importer thread should use, as a fraction (0.1 - 1.0).", + MAX_RECURSIVE_RENDER_DEPTH: "Maximum recursive render depth", + MAX_RECURSIVE_RENDER_DEPTH_DESC: "Maximum depth that objects will be rendered to (i.e., how many levels of subproperties will be rendered by default). This avoids infinite recursion due to self-referential objects and ensures that rendering objects is acceptably performant.", + + // Commands + REINDEX_VAULT: "Reindex entire vault", + + // Loading + LOADING_TITLE: "Datacore is getting ready...", + VIEW_RENDERING: "< View is rendering >",}; diff --git a/src/lang/locale/pt-br.ts b/src/lang/locale/pt-br.ts new file mode 100644 index 000000000..fc9987a57 --- /dev/null +++ b/src/lang/locale/pt-br.ts @@ -0,0 +1,41 @@ +// Português do Brasil +// Brazilian Portuguese + +export default { + // General + VIEWS: "Views", + FORMATTING: "Formatting", + PERFORMANCE: "Performance", + + // Views settings + PAGINATION: "Pagination", + PAGINATION_DESC: "If enabled, splits up views into pages of results which can be traversed via buttons at the top and bottom of the view. This substantially improves the performance of large views, and can help with visual clutter. Note that this setting can also be set on a per-view basis.", + DEFAULT_PAGE_SIZE: "Default page size", + DEFAULT_PAGE_SIZE_DESC: "The number of entries to show per page, by default. This can be overriden on a per-view basis.", + SCROLL_ON_PAGE_CHANGE: "Scroll on page change", + SCROLL_ON_PAGE_CHANGE_DESC: "If enabled, table that are paged will scroll to the top of the table when the page changes. This can be overriden on a per-view basis.", + + // Formatting settings + EMPTY_VALUES: "Empty values", + EMPTY_VALUES_DESC: "What to show for unset/empty properties.", + DEFAULT_DATE_FORMAT: "Default date format", + DEFAULT_DATE_FORMAT_DESC: "The default format that dates are rendered in. Uses luxon date formatting.", + DEFAULT_DATETIME_FORMAT: "Default date/time format", + DEFAULT_DATETIME_FORMAT_DESC: "The default format that date-times are rendered in. Uses luxon date formatting.", + + // Performance settings + INLINE_FIELDS: "Inline fields", + INLINE_FIELDS_DESC: "If enabled, inline fields will be parsed in all documents. Finding inline fields requires a full text scan through each document, which noticably slows down indexing for large vaults. Disabling this functionality will mean metadata will only come from tags, links, and Properties / frontmatter", + IMPORTER_THREADS: "Importer threads", + IMPORTER_THREADS_DESC: "The number of importer threads to use for parsing metadata.", + IMPORTER_UTILIZATION: "Importer utilization", + IMPORTER_UTILIZATION_DESC: "How much CPU time each importer thread should use, as a fraction (0.1 - 1.0).", + MAX_RECURSIVE_RENDER_DEPTH: "Maximum recursive render depth", + MAX_RECURSIVE_RENDER_DEPTH_DESC: "Maximum depth that objects will be rendered to (i.e., how many levels of subproperties will be rendered by default). This avoids infinite recursion due to self-referential objects and ensures that rendering objects is acceptably performant.", + + // Commands + REINDEX_VAULT: "Reindex entire vault", + + // Loading + LOADING_TITLE: "Datacore is getting ready...", + VIEW_RENDERING: "< View is rendering >",}; diff --git a/src/lang/locale/pt.ts b/src/lang/locale/pt.ts new file mode 100644 index 000000000..d7519539a --- /dev/null +++ b/src/lang/locale/pt.ts @@ -0,0 +1,40 @@ +// Português + +export default { + // General + VIEWS: "Views", + FORMATTING: "Formatting", + PERFORMANCE: "Performance", + + // Views settings + PAGINATION: "Pagination", + PAGINATION_DESC: "If enabled, splits up views into pages of results which can be traversed via buttons at the top and bottom of the view. This substantially improves the performance of large views, and can help with visual clutter. Note that this setting can also be set on a per-view basis.", + DEFAULT_PAGE_SIZE: "Default page size", + DEFAULT_PAGE_SIZE_DESC: "The number of entries to show per page, by default. This can be overriden on a per-view basis.", + SCROLL_ON_PAGE_CHANGE: "Scroll on page change", + SCROLL_ON_PAGE_CHANGE_DESC: "If enabled, table that are paged will scroll to the top of the table when the page changes. This can be overriden on a per-view basis.", + + // Formatting settings + EMPTY_VALUES: "Empty values", + EMPTY_VALUES_DESC: "What to show for unset/empty properties.", + DEFAULT_DATE_FORMAT: "Default date format", + DEFAULT_DATE_FORMAT_DESC: "The default format that dates are rendered in. Uses luxon date formatting.", + DEFAULT_DATETIME_FORMAT: "Default date/time format", + DEFAULT_DATETIME_FORMAT_DESC: "The default format that date-times are rendered in. Uses luxon date formatting.", + + // Performance settings + INLINE_FIELDS: "Inline fields", + INLINE_FIELDS_DESC: "If enabled, inline fields will be parsed in all documents. Finding inline fields requires a full text scan through each document, which noticably slows down indexing for large vaults. Disabling this functionality will mean metadata will only come from tags, links, and Properties / frontmatter", + IMPORTER_THREADS: "Importer threads", + IMPORTER_THREADS_DESC: "The number of importer threads to use for parsing metadata.", + IMPORTER_UTILIZATION: "Importer utilization", + IMPORTER_UTILIZATION_DESC: "How much CPU time each importer thread should use, as a fraction (0.1 - 1.0).", + MAX_RECURSIVE_RENDER_DEPTH: "Maximum recursive render depth", + MAX_RECURSIVE_RENDER_DEPTH_DESC: "Maximum depth that objects will be rendered to (i.e., how many levels of subproperties will be rendered by default). This avoids infinite recursion due to self-referential objects and ensures that rendering objects is acceptably performant.", + + // Commands + REINDEX_VAULT: "Reindex entire vault", + + // Loading + LOADING_TITLE: "Datacore is getting ready...", + VIEW_RENDERING: "< View is rendering >",}; diff --git a/src/lang/locale/ro.ts b/src/lang/locale/ro.ts new file mode 100644 index 000000000..2ff199e74 --- /dev/null +++ b/src/lang/locale/ro.ts @@ -0,0 +1,40 @@ +// Română + +export default { + // General + VIEWS: "Views", + FORMATTING: "Formatting", + PERFORMANCE: "Performance", + + // Views settings + PAGINATION: "Pagination", + PAGINATION_DESC: "If enabled, splits up views into pages of results which can be traversed via buttons at the top and bottom of the view. This substantially improves the performance of large views, and can help with visual clutter. Note that this setting can also be set on a per-view basis.", + DEFAULT_PAGE_SIZE: "Default page size", + DEFAULT_PAGE_SIZE_DESC: "The number of entries to show per page, by default. This can be overriden on a per-view basis.", + SCROLL_ON_PAGE_CHANGE: "Scroll on page change", + SCROLL_ON_PAGE_CHANGE_DESC: "If enabled, table that are paged will scroll to the top of the table when the page changes. This can be overriden on a per-view basis.", + + // Formatting settings + EMPTY_VALUES: "Empty values", + EMPTY_VALUES_DESC: "What to show for unset/empty properties.", + DEFAULT_DATE_FORMAT: "Default date format", + DEFAULT_DATE_FORMAT_DESC: "The default format that dates are rendered in. Uses luxon date formatting.", + DEFAULT_DATETIME_FORMAT: "Default date/time format", + DEFAULT_DATETIME_FORMAT_DESC: "The default format that date-times are rendered in. Uses luxon date formatting.", + + // Performance settings + INLINE_FIELDS: "Inline fields", + INLINE_FIELDS_DESC: "If enabled, inline fields will be parsed in all documents. Finding inline fields requires a full text scan through each document, which noticably slows down indexing for large vaults. Disabling this functionality will mean metadata will only come from tags, links, and Properties / frontmatter", + IMPORTER_THREADS: "Importer threads", + IMPORTER_THREADS_DESC: "The number of importer threads to use for parsing metadata.", + IMPORTER_UTILIZATION: "Importer utilization", + IMPORTER_UTILIZATION_DESC: "How much CPU time each importer thread should use, as a fraction (0.1 - 1.0).", + MAX_RECURSIVE_RENDER_DEPTH: "Maximum recursive render depth", + MAX_RECURSIVE_RENDER_DEPTH_DESC: "Maximum depth that objects will be rendered to (i.e., how many levels of subproperties will be rendered by default). This avoids infinite recursion due to self-referential objects and ensures that rendering objects is acceptably performant.", + + // Commands + REINDEX_VAULT: "Reindex entire vault", + + // Loading + LOADING_TITLE: "Datacore is getting ready...", + VIEW_RENDERING: "< View is rendering >",}; diff --git a/src/lang/locale/ru.ts b/src/lang/locale/ru.ts new file mode 100644 index 000000000..e247e759d --- /dev/null +++ b/src/lang/locale/ru.ts @@ -0,0 +1,42 @@ +// Русский + +export default { + + // General + VIEWS: "Представления", + FORMATTING: "Форматирование", + PERFORMANCE: "Производительность", + + // Views settings + PAGINATION: "Пагинация", + PAGINATION_DESC: "Если включено, разделяет представления на страницы результатов, между которыми можно переключаться с помощью кнопок вверху и внизу представления. Это существенно улучшает производительность больших представлений и помогает избежать визуального беспорядка. Обратите внимание, что эту настройку также можно установить для каждого представления отдельно.", + DEFAULT_PAGE_SIZE: "Размер страницы по умолчанию", + DEFAULT_PAGE_SIZE_DESC: "Количество записей для отображения на странице по умолчанию. Это можно переопределить для каждого представления отдельно.", + SCROLL_ON_PAGE_CHANGE: "Прокрутка при смене страницы", + SCROLL_ON_PAGE_CHANGE_DESC: "Если включено, таблицы с пагинацией будут прокручиваться к началу таблицы при смене страницы. Это можно переопределить для каждого представления отдельно.", + + // Formatting settings + EMPTY_VALUES: "Пустые значения", + EMPTY_VALUES_DESC: "Что показывать для неустановленных/пустых свойств.", + DEFAULT_DATE_FORMAT: "Формат даты по умолчанию", + DEFAULT_DATE_FORMAT_DESC: "Формат по умолчанию для отображения дат. Использует форматирование дат luxon.", + DEFAULT_DATETIME_FORMAT: "Формат даты/времени по умолчанию", + DEFAULT_DATETIME_FORMAT_DESC: "Формат по умолчанию для отображения даты и времени. Использует форматирование дат luxon.", + + // Performance settings + INLINE_FIELDS: "Встроенные поля", + INLINE_FIELDS_DESC: "Если включено, встроенные поля будут обрабатываться во всех документах. Поиск встроенных полей требует полного сканирования текста каждого документа, что заметно замедляет индексацию для больших хранилищ. Отключение этой функции означает, что метаданные будут поступать только из тегов, ссылок и свойств / frontmatter", + IMPORTER_THREADS: "Потоки импортера", + IMPORTER_THREADS_DESC: "Количество потоков импортера для обработки метаданных.", + IMPORTER_UTILIZATION: "Использование импортера", + IMPORTER_UTILIZATION_DESC: "Сколько процессорного времени должен использовать каждый поток импортера, в виде дроби (0.1 - 1.0).", + MAX_RECURSIVE_RENDER_DEPTH: "Максимальная глубина рекурсивного рендеринга", + MAX_RECURSIVE_RENDER_DEPTH_DESC: "Максимальная глубина, до которой будут отображаться объекты (т.е. сколько уровней подсвойств будет отображаться по умолчанию). Это позволяет избежать бесконечной рекурсии из-за самореферентных объектов и обеспечивает приемлемую производительность рендеринга объектов.", + + // Commands + REINDEX_VAULT: "Переиндексировать всё хранилище", + + // Loading + LOADING_TITLE: "Datacore готовится к работе...", + VIEW_RENDERING: "< Представление загружается >", +}; diff --git a/src/lang/locale/ta.ts b/src/lang/locale/ta.ts new file mode 100644 index 000000000..5a11c6ba6 --- /dev/null +++ b/src/lang/locale/ta.ts @@ -0,0 +1,40 @@ +// Tamil + +export default { + // General + VIEWS: "Views", + FORMATTING: "Formatting", + PERFORMANCE: "Performance", + + // Views settings + PAGINATION: "Pagination", + PAGINATION_DESC: "If enabled, splits up views into pages of results which can be traversed via buttons at the top and bottom of the view. This substantially improves the performance of large views, and can help with visual clutter. Note that this setting can also be set on a per-view basis.", + DEFAULT_PAGE_SIZE: "Default page size", + DEFAULT_PAGE_SIZE_DESC: "The number of entries to show per page, by default. This can be overriden on a per-view basis.", + SCROLL_ON_PAGE_CHANGE: "Scroll on page change", + SCROLL_ON_PAGE_CHANGE_DESC: "If enabled, table that are paged will scroll to the top of the table when the page changes. This can be overriden on a per-view basis.", + + // Formatting settings + EMPTY_VALUES: "Empty values", + EMPTY_VALUES_DESC: "What to show for unset/empty properties.", + DEFAULT_DATE_FORMAT: "Default date format", + DEFAULT_DATE_FORMAT_DESC: "The default format that dates are rendered in. Uses luxon date formatting.", + DEFAULT_DATETIME_FORMAT: "Default date/time format", + DEFAULT_DATETIME_FORMAT_DESC: "The default format that date-times are rendered in. Uses luxon date formatting.", + + // Performance settings + INLINE_FIELDS: "Inline fields", + INLINE_FIELDS_DESC: "If enabled, inline fields will be parsed in all documents. Finding inline fields requires a full text scan through each document, which noticably slows down indexing for large vaults. Disabling this functionality will mean metadata will only come from tags, links, and Properties / frontmatter", + IMPORTER_THREADS: "Importer threads", + IMPORTER_THREADS_DESC: "The number of importer threads to use for parsing metadata.", + IMPORTER_UTILIZATION: "Importer utilization", + IMPORTER_UTILIZATION_DESC: "How much CPU time each importer thread should use, as a fraction (0.1 - 1.0).", + MAX_RECURSIVE_RENDER_DEPTH: "Maximum recursive render depth", + MAX_RECURSIVE_RENDER_DEPTH_DESC: "Maximum depth that objects will be rendered to (i.e., how many levels of subproperties will be rendered by default). This avoids infinite recursion due to self-referential objects and ensures that rendering objects is acceptably performant.", + + // Commands + REINDEX_VAULT: "Reindex entire vault", + + // Loading + LOADING_TITLE: "Datacore is getting ready...", + VIEW_RENDERING: "< View is rendering >",}; diff --git a/src/lang/locale/te.ts b/src/lang/locale/te.ts new file mode 100644 index 000000000..008f2a55a --- /dev/null +++ b/src/lang/locale/te.ts @@ -0,0 +1,40 @@ +// Telugu + +export default { + // General + VIEWS: "Views", + FORMATTING: "Formatting", + PERFORMANCE: "Performance", + + // Views settings + PAGINATION: "Pagination", + PAGINATION_DESC: "If enabled, splits up views into pages of results which can be traversed via buttons at the top and bottom of the view. This substantially improves the performance of large views, and can help with visual clutter. Note that this setting can also be set on a per-view basis.", + DEFAULT_PAGE_SIZE: "Default page size", + DEFAULT_PAGE_SIZE_DESC: "The number of entries to show per page, by default. This can be overriden on a per-view basis.", + SCROLL_ON_PAGE_CHANGE: "Scroll on page change", + SCROLL_ON_PAGE_CHANGE_DESC: "If enabled, table that are paged will scroll to the top of the table when the page changes. This can be overriden on a per-view basis.", + + // Formatting settings + EMPTY_VALUES: "Empty values", + EMPTY_VALUES_DESC: "What to show for unset/empty properties.", + DEFAULT_DATE_FORMAT: "Default date format", + DEFAULT_DATE_FORMAT_DESC: "The default format that dates are rendered in. Uses luxon date formatting.", + DEFAULT_DATETIME_FORMAT: "Default date/time format", + DEFAULT_DATETIME_FORMAT_DESC: "The default format that date-times are rendered in. Uses luxon date formatting.", + + // Performance settings + INLINE_FIELDS: "Inline fields", + INLINE_FIELDS_DESC: "If enabled, inline fields will be parsed in all documents. Finding inline fields requires a full text scan through each document, which noticably slows down indexing for large vaults. Disabling this functionality will mean metadata will only come from tags, links, and Properties / frontmatter", + IMPORTER_THREADS: "Importer threads", + IMPORTER_THREADS_DESC: "The number of importer threads to use for parsing metadata.", + IMPORTER_UTILIZATION: "Importer utilization", + IMPORTER_UTILIZATION_DESC: "How much CPU time each importer thread should use, as a fraction (0.1 - 1.0).", + MAX_RECURSIVE_RENDER_DEPTH: "Maximum recursive render depth", + MAX_RECURSIVE_RENDER_DEPTH_DESC: "Maximum depth that objects will be rendered to (i.e., how many levels of subproperties will be rendered by default). This avoids infinite recursion due to self-referential objects and ensures that rendering objects is acceptably performant.", + + // Commands + REINDEX_VAULT: "Reindex entire vault", + + // Loading + LOADING_TITLE: "Datacore is getting ready...", + VIEW_RENDERING: "< View is rendering >",}; diff --git a/src/lang/locale/th.ts b/src/lang/locale/th.ts new file mode 100644 index 000000000..98f13a34d --- /dev/null +++ b/src/lang/locale/th.ts @@ -0,0 +1,40 @@ +// Thai + +export default { + // General + VIEWS: "Views", + FORMATTING: "Formatting", + PERFORMANCE: "Performance", + + // Views settings + PAGINATION: "Pagination", + PAGINATION_DESC: "If enabled, splits up views into pages of results which can be traversed via buttons at the top and bottom of the view. This substantially improves the performance of large views, and can help with visual clutter. Note that this setting can also be set on a per-view basis.", + DEFAULT_PAGE_SIZE: "Default page size", + DEFAULT_PAGE_SIZE_DESC: "The number of entries to show per page, by default. This can be overriden on a per-view basis.", + SCROLL_ON_PAGE_CHANGE: "Scroll on page change", + SCROLL_ON_PAGE_CHANGE_DESC: "If enabled, table that are paged will scroll to the top of the table when the page changes. This can be overriden on a per-view basis.", + + // Formatting settings + EMPTY_VALUES: "Empty values", + EMPTY_VALUES_DESC: "What to show for unset/empty properties.", + DEFAULT_DATE_FORMAT: "Default date format", + DEFAULT_DATE_FORMAT_DESC: "The default format that dates are rendered in. Uses luxon date formatting.", + DEFAULT_DATETIME_FORMAT: "Default date/time format", + DEFAULT_DATETIME_FORMAT_DESC: "The default format that date-times are rendered in. Uses luxon date formatting.", + + // Performance settings + INLINE_FIELDS: "Inline fields", + INLINE_FIELDS_DESC: "If enabled, inline fields will be parsed in all documents. Finding inline fields requires a full text scan through each document, which noticably slows down indexing for large vaults. Disabling this functionality will mean metadata will only come from tags, links, and Properties / frontmatter", + IMPORTER_THREADS: "Importer threads", + IMPORTER_THREADS_DESC: "The number of importer threads to use for parsing metadata.", + IMPORTER_UTILIZATION: "Importer utilization", + IMPORTER_UTILIZATION_DESC: "How much CPU time each importer thread should use, as a fraction (0.1 - 1.0).", + MAX_RECURSIVE_RENDER_DEPTH: "Maximum recursive render depth", + MAX_RECURSIVE_RENDER_DEPTH_DESC: "Maximum depth that objects will be rendered to (i.e., how many levels of subproperties will be rendered by default). This avoids infinite recursion due to self-referential objects and ensures that rendering objects is acceptably performant.", + + // Commands + REINDEX_VAULT: "Reindex entire vault", + + // Loading + LOADING_TITLE: "Datacore is getting ready...", + VIEW_RENDERING: "< View is rendering >",}; diff --git a/src/lang/locale/tr.ts b/src/lang/locale/tr.ts new file mode 100644 index 000000000..8c2941b6c --- /dev/null +++ b/src/lang/locale/tr.ts @@ -0,0 +1,40 @@ +// Türkçe + +export default { + // General + VIEWS: "Views", + FORMATTING: "Formatting", + PERFORMANCE: "Performance", + + // Views settings + PAGINATION: "Pagination", + PAGINATION_DESC: "If enabled, splits up views into pages of results which can be traversed via buttons at the top and bottom of the view. This substantially improves the performance of large views, and can help with visual clutter. Note that this setting can also be set on a per-view basis.", + DEFAULT_PAGE_SIZE: "Default page size", + DEFAULT_PAGE_SIZE_DESC: "The number of entries to show per page, by default. This can be overriden on a per-view basis.", + SCROLL_ON_PAGE_CHANGE: "Scroll on page change", + SCROLL_ON_PAGE_CHANGE_DESC: "If enabled, table that are paged will scroll to the top of the table when the page changes. This can be overriden on a per-view basis.", + + // Formatting settings + EMPTY_VALUES: "Empty values", + EMPTY_VALUES_DESC: "What to show for unset/empty properties.", + DEFAULT_DATE_FORMAT: "Default date format", + DEFAULT_DATE_FORMAT_DESC: "The default format that dates are rendered in. Uses luxon date formatting.", + DEFAULT_DATETIME_FORMAT: "Default date/time format", + DEFAULT_DATETIME_FORMAT_DESC: "The default format that date-times are rendered in. Uses luxon date formatting.", + + // Performance settings + INLINE_FIELDS: "Inline fields", + INLINE_FIELDS_DESC: "If enabled, inline fields will be parsed in all documents. Finding inline fields requires a full text scan through each document, which noticably slows down indexing for large vaults. Disabling this functionality will mean metadata will only come from tags, links, and Properties / frontmatter", + IMPORTER_THREADS: "Importer threads", + IMPORTER_THREADS_DESC: "The number of importer threads to use for parsing metadata.", + IMPORTER_UTILIZATION: "Importer utilization", + IMPORTER_UTILIZATION_DESC: "How much CPU time each importer thread should use, as a fraction (0.1 - 1.0).", + MAX_RECURSIVE_RENDER_DEPTH: "Maximum recursive render depth", + MAX_RECURSIVE_RENDER_DEPTH_DESC: "Maximum depth that objects will be rendered to (i.e., how many levels of subproperties will be rendered by default). This avoids infinite recursion due to self-referential objects and ensures that rendering objects is acceptably performant.", + + // Commands + REINDEX_VAULT: "Reindex entire vault", + + // Loading + LOADING_TITLE: "Datacore is getting ready...", + VIEW_RENDERING: "< View is rendering >",}; diff --git a/src/lang/locale/uk.ts b/src/lang/locale/uk.ts new file mode 100644 index 000000000..7a80b158e --- /dev/null +++ b/src/lang/locale/uk.ts @@ -0,0 +1,40 @@ +// Ukrainian + +export default { + // General + VIEWS: "Views", + FORMATTING: "Formatting", + PERFORMANCE: "Performance", + + // Views settings + PAGINATION: "Pagination", + PAGINATION_DESC: "If enabled, splits up views into pages of results which can be traversed via buttons at the top and bottom of the view. This substantially improves the performance of large views, and can help with visual clutter. Note that this setting can also be set on a per-view basis.", + DEFAULT_PAGE_SIZE: "Default page size", + DEFAULT_PAGE_SIZE_DESC: "The number of entries to show per page, by default. This can be overriden on a per-view basis.", + SCROLL_ON_PAGE_CHANGE: "Scroll on page change", + SCROLL_ON_PAGE_CHANGE_DESC: "If enabled, table that are paged will scroll to the top of the table when the page changes. This can be overriden on a per-view basis.", + + // Formatting settings + EMPTY_VALUES: "Empty values", + EMPTY_VALUES_DESC: "What to show for unset/empty properties.", + DEFAULT_DATE_FORMAT: "Default date format", + DEFAULT_DATE_FORMAT_DESC: "The default format that dates are rendered in. Uses luxon date formatting.", + DEFAULT_DATETIME_FORMAT: "Default date/time format", + DEFAULT_DATETIME_FORMAT_DESC: "The default format that date-times are rendered in. Uses luxon date formatting.", + + // Performance settings + INLINE_FIELDS: "Inline fields", + INLINE_FIELDS_DESC: "If enabled, inline fields will be parsed in all documents. Finding inline fields requires a full text scan through each document, which noticably slows down indexing for large vaults. Disabling this functionality will mean metadata will only come from tags, links, and Properties / frontmatter", + IMPORTER_THREADS: "Importer threads", + IMPORTER_THREADS_DESC: "The number of importer threads to use for parsing metadata.", + IMPORTER_UTILIZATION: "Importer utilization", + IMPORTER_UTILIZATION_DESC: "How much CPU time each importer thread should use, as a fraction (0.1 - 1.0).", + MAX_RECURSIVE_RENDER_DEPTH: "Maximum recursive render depth", + MAX_RECURSIVE_RENDER_DEPTH_DESC: "Maximum depth that objects will be rendered to (i.e., how many levels of subproperties will be rendered by default). This avoids infinite recursion due to self-referential objects and ensures that rendering objects is acceptably performant.", + + // Commands + REINDEX_VAULT: "Reindex entire vault", + + // Loading + LOADING_TITLE: "Datacore is getting ready...", + VIEW_RENDERING: "< View is rendering >",}; diff --git a/src/lang/locale/ur.ts b/src/lang/locale/ur.ts new file mode 100644 index 000000000..327fcc40a --- /dev/null +++ b/src/lang/locale/ur.ts @@ -0,0 +1,40 @@ +// Urdu + +export default { + // General + VIEWS: "Views", + FORMATTING: "Formatting", + PERFORMANCE: "Performance", + + // Views settings + PAGINATION: "Pagination", + PAGINATION_DESC: "If enabled, splits up views into pages of results which can be traversed via buttons at the top and bottom of the view. This substantially improves the performance of large views, and can help with visual clutter. Note that this setting can also be set on a per-view basis.", + DEFAULT_PAGE_SIZE: "Default page size", + DEFAULT_PAGE_SIZE_DESC: "The number of entries to show per page, by default. This can be overriden on a per-view basis.", + SCROLL_ON_PAGE_CHANGE: "Scroll on page change", + SCROLL_ON_PAGE_CHANGE_DESC: "If enabled, table that are paged will scroll to the top of the table when the page changes. This can be overriden on a per-view basis.", + + // Formatting settings + EMPTY_VALUES: "Empty values", + EMPTY_VALUES_DESC: "What to show for unset/empty properties.", + DEFAULT_DATE_FORMAT: "Default date format", + DEFAULT_DATE_FORMAT_DESC: "The default format that dates are rendered in. Uses luxon date formatting.", + DEFAULT_DATETIME_FORMAT: "Default date/time format", + DEFAULT_DATETIME_FORMAT_DESC: "The default format that date-times are rendered in. Uses luxon date formatting.", + + // Performance settings + INLINE_FIELDS: "Inline fields", + INLINE_FIELDS_DESC: "If enabled, inline fields will be parsed in all documents. Finding inline fields requires a full text scan through each document, which noticably slows down indexing for large vaults. Disabling this functionality will mean metadata will only come from tags, links, and Properties / frontmatter", + IMPORTER_THREADS: "Importer threads", + IMPORTER_THREADS_DESC: "The number of importer threads to use for parsing metadata.", + IMPORTER_UTILIZATION: "Importer utilization", + IMPORTER_UTILIZATION_DESC: "How much CPU time each importer thread should use, as a fraction (0.1 - 1.0).", + MAX_RECURSIVE_RENDER_DEPTH: "Maximum recursive render depth", + MAX_RECURSIVE_RENDER_DEPTH_DESC: "Maximum depth that objects will be rendered to (i.e., how many levels of subproperties will be rendered by default). This avoids infinite recursion due to self-referential objects and ensures that rendering objects is acceptably performant.", + + // Commands + REINDEX_VAULT: "Reindex entire vault", + + // Loading + LOADING_TITLE: "Datacore is getting ready...", + VIEW_RENDERING: "< View is rendering >",}; diff --git a/src/lang/locale/vi.ts b/src/lang/locale/vi.ts new file mode 100644 index 000000000..fdb047e6b --- /dev/null +++ b/src/lang/locale/vi.ts @@ -0,0 +1,40 @@ +// Vietnamese + +export default { + // General + VIEWS: "Views", + FORMATTING: "Formatting", + PERFORMANCE: "Performance", + + // Views settings + PAGINATION: "Pagination", + PAGINATION_DESC: "If enabled, splits up views into pages of results which can be traversed via buttons at the top and bottom of the view. This substantially improves the performance of large views, and can help with visual clutter. Note that this setting can also be set on a per-view basis.", + DEFAULT_PAGE_SIZE: "Default page size", + DEFAULT_PAGE_SIZE_DESC: "The number of entries to show per page, by default. This can be overriden on a per-view basis.", + SCROLL_ON_PAGE_CHANGE: "Scroll on page change", + SCROLL_ON_PAGE_CHANGE_DESC: "If enabled, table that are paged will scroll to the top of the table when the page changes. This can be overriden on a per-view basis.", + + // Formatting settings + EMPTY_VALUES: "Empty values", + EMPTY_VALUES_DESC: "What to show for unset/empty properties.", + DEFAULT_DATE_FORMAT: "Default date format", + DEFAULT_DATE_FORMAT_DESC: "The default format that dates are rendered in. Uses luxon date formatting.", + DEFAULT_DATETIME_FORMAT: "Default date/time format", + DEFAULT_DATETIME_FORMAT_DESC: "The default format that date-times are rendered in. Uses luxon date formatting.", + + // Performance settings + INLINE_FIELDS: "Inline fields", + INLINE_FIELDS_DESC: "If enabled, inline fields will be parsed in all documents. Finding inline fields requires a full text scan through each document, which noticably slows down indexing for large vaults. Disabling this functionality will mean metadata will only come from tags, links, and Properties / frontmatter", + IMPORTER_THREADS: "Importer threads", + IMPORTER_THREADS_DESC: "The number of importer threads to use for parsing metadata.", + IMPORTER_UTILIZATION: "Importer utilization", + IMPORTER_UTILIZATION_DESC: "How much CPU time each importer thread should use, as a fraction (0.1 - 1.0).", + MAX_RECURSIVE_RENDER_DEPTH: "Maximum recursive render depth", + MAX_RECURSIVE_RENDER_DEPTH_DESC: "Maximum depth that objects will be rendered to (i.e., how many levels of subproperties will be rendered by default). This avoids infinite recursion due to self-referential objects and ensures that rendering objects is acceptably performant.", + + // Commands + REINDEX_VAULT: "Reindex entire vault", + + // Loading + LOADING_TITLE: "Datacore is getting ready...", + VIEW_RENDERING: "< View is rendering >",}; diff --git a/src/lang/locale/zh-cn.ts b/src/lang/locale/zh-cn.ts new file mode 100644 index 000000000..da4f769d4 --- /dev/null +++ b/src/lang/locale/zh-cn.ts @@ -0,0 +1,40 @@ +// 简体中文 + +export default { + // General + VIEWS: "Views", + FORMATTING: "Formatting", + PERFORMANCE: "Performance", + + // Views settings + PAGINATION: "Pagination", + PAGINATION_DESC: "If enabled, splits up views into pages of results which can be traversed via buttons at the top and bottom of the view. This substantially improves the performance of large views, and can help with visual clutter. Note that this setting can also be set on a per-view basis.", + DEFAULT_PAGE_SIZE: "Default page size", + DEFAULT_PAGE_SIZE_DESC: "The number of entries to show per page, by default. This can be overriden on a per-view basis.", + SCROLL_ON_PAGE_CHANGE: "Scroll on page change", + SCROLL_ON_PAGE_CHANGE_DESC: "If enabled, table that are paged will scroll to the top of the table when the page changes. This can be overriden on a per-view basis.", + + // Formatting settings + EMPTY_VALUES: "Empty values", + EMPTY_VALUES_DESC: "What to show for unset/empty properties.", + DEFAULT_DATE_FORMAT: "Default date format", + DEFAULT_DATE_FORMAT_DESC: "The default format that dates are rendered in. Uses luxon date formatting.", + DEFAULT_DATETIME_FORMAT: "Default date/time format", + DEFAULT_DATETIME_FORMAT_DESC: "The default format that date-times are rendered in. Uses luxon date formatting.", + + // Performance settings + INLINE_FIELDS: "Inline fields", + INLINE_FIELDS_DESC: "If enabled, inline fields will be parsed in all documents. Finding inline fields requires a full text scan through each document, which noticably slows down indexing for large vaults. Disabling this functionality will mean metadata will only come from tags, links, and Properties / frontmatter", + IMPORTER_THREADS: "Importer threads", + IMPORTER_THREADS_DESC: "The number of importer threads to use for parsing metadata.", + IMPORTER_UTILIZATION: "Importer utilization", + IMPORTER_UTILIZATION_DESC: "How much CPU time each importer thread should use, as a fraction (0.1 - 1.0).", + MAX_RECURSIVE_RENDER_DEPTH: "Maximum recursive render depth", + MAX_RECURSIVE_RENDER_DEPTH_DESC: "Maximum depth that objects will be rendered to (i.e., how many levels of subproperties will be rendered by default). This avoids infinite recursion due to self-referential objects and ensures that rendering objects is acceptably performant.", + + // Commands + REINDEX_VAULT: "Reindex entire vault", + + // Loading + LOADING_TITLE: "Datacore is getting ready...", + VIEW_RENDERING: "< View is rendering >",}; diff --git a/src/lang/locale/zh-tw.ts b/src/lang/locale/zh-tw.ts new file mode 100644 index 000000000..3aee85b46 --- /dev/null +++ b/src/lang/locale/zh-tw.ts @@ -0,0 +1,40 @@ +// 繁體中文 + +export default { + // General + VIEWS: "Views", + FORMATTING: "Formatting", + PERFORMANCE: "Performance", + + // Views settings + PAGINATION: "Pagination", + PAGINATION_DESC: "If enabled, splits up views into pages of results which can be traversed via buttons at the top and bottom of the view. This substantially improves the performance of large views, and can help with visual clutter. Note that this setting can also be set on a per-view basis.", + DEFAULT_PAGE_SIZE: "Default page size", + DEFAULT_PAGE_SIZE_DESC: "The number of entries to show per page, by default. This can be overriden on a per-view basis.", + SCROLL_ON_PAGE_CHANGE: "Scroll on page change", + SCROLL_ON_PAGE_CHANGE_DESC: "If enabled, table that are paged will scroll to the top of the table when the page changes. This can be overriden on a per-view basis.", + + // Formatting settings + EMPTY_VALUES: "Empty values", + EMPTY_VALUES_DESC: "What to show for unset/empty properties.", + DEFAULT_DATE_FORMAT: "Default date format", + DEFAULT_DATE_FORMAT_DESC: "The default format that dates are rendered in. Uses luxon date formatting.", + DEFAULT_DATETIME_FORMAT: "Default date/time format", + DEFAULT_DATETIME_FORMAT_DESC: "The default format that date-times are rendered in. Uses luxon date formatting.", + + // Performance settings + INLINE_FIELDS: "Inline fields", + INLINE_FIELDS_DESC: "If enabled, inline fields will be parsed in all documents. Finding inline fields requires a full text scan through each document, which noticably slows down indexing for large vaults. Disabling this functionality will mean metadata will only come from tags, links, and Properties / frontmatter", + IMPORTER_THREADS: "Importer threads", + IMPORTER_THREADS_DESC: "The number of importer threads to use for parsing metadata.", + IMPORTER_UTILIZATION: "Importer utilization", + IMPORTER_UTILIZATION_DESC: "How much CPU time each importer thread should use, as a fraction (0.1 - 1.0).", + MAX_RECURSIVE_RENDER_DEPTH: "Maximum recursive render depth", + MAX_RECURSIVE_RENDER_DEPTH_DESC: "Maximum depth that objects will be rendered to (i.e., how many levels of subproperties will be rendered by default). This avoids infinite recursion due to self-referential objects and ensures that rendering objects is acceptably performant.", + + // Commands + REINDEX_VAULT: "Reindex entire vault", + + // Loading + LOADING_TITLE: "Datacore is getting ready...", + VIEW_RENDERING: "< View is rendering >",}; diff --git a/src/main.ts b/src/main.ts index e3ab60e12..fdc42d9f5 100644 --- a/src/main.ts +++ b/src/main.ts @@ -3,6 +3,7 @@ import { Datacore } from "index/datacore"; import { DateTime } from "luxon"; import { App, Plugin, PluginSettingTab, Setting } from "obsidian"; import { DEFAULT_SETTINGS, Settings } from "settings"; +import { t } from "lang/helpers"; /** @internal Reactive data engine for your Obsidian.md vault. */ export default class DatacorePlugin extends Plugin { @@ -51,7 +52,7 @@ export default class DatacorePlugin extends Plugin { // Drops the current index and reindexes all items. this.addCommand({ id: "datacore-reindex-vault", - name: "Reindex entire vault", + name: t("REINDEX_VAULT"), callback: async () => { console.log("Datacore: dropping the datastore and reindexing all items."); await this.core.reindex(); @@ -101,16 +102,11 @@ class GeneralSettingsTab extends PluginSettingTab { public display(): void { this.containerEl.empty(); - new Setting(this.containerEl).setName("Views").setHeading(); + new Setting(this.containerEl).setName(t("VIEWS")).setHeading(); new Setting(this.containerEl) - .setName("Pagination") - .setDesc( - "If enabled, splits up views into pages of results which can be traversed " + - "via buttons at the top and bottom of the view. This substantially improves " + - "the performance of large views, and can help with visual clutter. Note that " + - "this setting can also be set on a per-view basis." - ) + .setName(t("PAGINATION")) + .setDesc(t("PAGINATION_DESC")) .addToggle((toggle) => { toggle.setValue(this.plugin.settings.defaultPagingEnabled).onChange(async (value) => { await this.plugin.updateSettings({ defaultPagingEnabled: value }); @@ -118,8 +114,8 @@ class GeneralSettingsTab extends PluginSettingTab { }); new Setting(this.containerEl) - .setName("Default page size") - .setDesc("The number of entries to show per page, by default. This can be overriden on a per-view basis.") + .setName(t("DEFAULT_PAGE_SIZE")) + .setDesc(t("DEFAULT_PAGE_SIZE_DESC")) .addDropdown((dropdown) => { const OPTIONS: Record = { "25": "25", @@ -143,22 +139,19 @@ class GeneralSettingsTab extends PluginSettingTab { }); new Setting(this.containerEl) - .setName("Scroll on page change") - .setDesc( - "If enabled, table that are paged will scroll to the top of the table when the page changes. " + - "This can be overriden on a per-view basis." - ) + .setName(t("SCROLL_ON_PAGE_CHANGE")) + .setDesc(t("SCROLL_ON_PAGE_CHANGE_DESC")) .addToggle((toggle) => { toggle.setValue(this.plugin.settings.scrollOnPageChange).onChange(async (value) => { await this.plugin.updateSettings({ scrollOnPageChange: value }); }); }); - new Setting(this.containerEl).setName("Formatting").setHeading(); + new Setting(this.containerEl).setName(t("FORMATTING")).setHeading(); new Setting(this.containerEl) - .setName("Empty values") - .setDesc("What to show for unset/empty properties.") + .setName(t("EMPTY_VALUES")) + .setDesc(t("EMPTY_VALUES_DESC")) .addText((text) => { text.setValue(this.plugin.settings.renderNullAs).onChange(async (value) => { await this.plugin.updateSettings({ renderNullAs: value }); @@ -166,10 +159,8 @@ class GeneralSettingsTab extends PluginSettingTab { }); new Setting(this.containerEl) - .setName("Default date format") - .setDesc( - "The default format that dates are rendered in. Uses luxon date formatting (https://github.com/moment/luxon/blob/master/docs/formatting.md#formatting-with-tokens-strings-for-cthulhu)." - ) + .setName(t("DEFAULT_DATE_FORMAT")) + .setDesc(t("DEFAULT_DATE_FORMAT_DESC")) .addText((text) => { text.setValue(this.plugin.settings.defaultDateFormat).onChange(async (value) => { // check if date format is valid @@ -183,10 +174,8 @@ class GeneralSettingsTab extends PluginSettingTab { }); new Setting(this.containerEl) - .setName("Default date/time format") - .setDesc( - "The default format that date-times are rendered in. Uses luxon date formatting (https://github.com/moment/luxon/blob/master/docs/formatting.md#formatting-with-tokens-strings-for-cthulhu)." - ) + .setName(t("DEFAULT_DATETIME_FORMAT")) + .setDesc(t("DEFAULT_DATETIME_FORMAT_DESC")) .addText((text) => { text.setValue(this.plugin.settings.defaultDateTimeFormat).onChange(async (value) => { try { @@ -198,15 +187,11 @@ class GeneralSettingsTab extends PluginSettingTab { }); }); - new Setting(this.containerEl).setName("Performance").setHeading(); + new Setting(this.containerEl).setName(t("PERFORMANCE")).setHeading(); new Setting(this.containerEl) - .setName("Inline fields") - .setDesc( - "If enabled, inline fields will be parsed in all documents. Finding inline fields requires a full text scan through each document, " + - "which noticably slows down indexing for large vaults. Disabling this functionality will mean metadata will only come from tags, links, and " + - "Properties / frontmatter" - ) + .setName(t("INLINE_FIELDS")) + .setDesc(t("INLINE_FIELDS_DESC")) .addToggle((toggle) => { toggle.setValue(this.plugin.settings.indexInlineFields).onChange(async (value) => { await this.plugin.updateSettings({ indexInlineFields: value }); @@ -216,8 +201,8 @@ class GeneralSettingsTab extends PluginSettingTab { }); new Setting(this.containerEl) - .setName("Importer threads") - .setDesc("The number of importer threads to use for parsing metadata.") + .setName(t("IMPORTER_THREADS")) + .setDesc(t("IMPORTER_THREADS_DESC")) .addText((text) => { text.setValue("" + this.plugin.settings.importerNumThreads).onChange(async (value) => { const parsed = parseInt(value); @@ -228,8 +213,8 @@ class GeneralSettingsTab extends PluginSettingTab { }); new Setting(this.containerEl) - .setName("Importer utilization") - .setDesc("How much CPU time each importer thread should use, as a fraction (0.1 - 1.0).") + .setName(t("IMPORTER_UTILIZATION")) + .setDesc(t("IMPORTER_UTILIZATION_DESC")) .addText((text) => { text.setValue(this.plugin.settings.importerUtilization.toFixed(2)).onChange(async (value) => { const parsed = parseFloat(value); @@ -241,12 +226,8 @@ class GeneralSettingsTab extends PluginSettingTab { }); new Setting(this.containerEl) - .setName("Maximum recursive render depth") - .setDesc( - "Maximum depth that objects will be rendered to (i.e., how many levels of subproperties " + - "will be rendered by default). This avoids infinite recursion due to self-referential objects " + - "and ensures that rendering objects is acceptably performant." - ) + .setName(t("MAX_RECURSIVE_RENDER_DEPTH")) + .setDesc(t("MAX_RECURSIVE_RENDER_DEPTH_DESC")) .addText((text) => { text.setValue(this.plugin.settings.maxRecursiveRenderDepth.toString()).onChange(async (value) => { const parsed = parseInt(value); diff --git a/src/ui/loading-boundary.tsx b/src/ui/loading-boundary.tsx index fc293f81a..240aca458 100644 --- a/src/ui/loading-boundary.tsx +++ b/src/ui/loading-boundary.tsx @@ -4,6 +4,7 @@ import { useIndexUpdates } from "./hooks"; import { Literal } from "expression/literal"; import { FunctionComponent, JSX, VNode, createElement, isValidElement } from "preact"; import { ErrorMessage, Lit } from "./markdown"; +import { t } from "lang/helpers"; import "./errors.css"; @@ -37,7 +38,7 @@ export function LoadingBoundary({ children, datacore }: PropsWithChildren<{ data } else { return (
-

Datacore is getting ready...

+

{t("LOADING_TITLE")}

@@ -80,7 +81,8 @@ export function ScriptContainer({ throw error; } - return <>{element ?? }; + + return <>{element ?? }; } /** Make a renderable element from the returned object; if this transformation is not possible, throw an exception. */