diff --git a/packages/plugin-search/package.json b/packages/plugin-search/package.json index 5be745d5c5..498430868e 100644 --- a/packages/plugin-search/package.json +++ b/packages/plugin-search/package.json @@ -58,6 +58,7 @@ "test": "echo \"Error: no tests specified\"" }, "dependencies": { + "@payloadcms/next": "workspace:*", "@payloadcms/ui": "workspace:*" }, "devDependencies": { diff --git a/packages/plugin-search/src/Search/hooks/syncWithSearch.ts b/packages/plugin-search/src/Search/hooks/syncWithSearch.ts index 154300eb2e..e69b148bb5 100644 --- a/packages/plugin-search/src/Search/hooks/syncWithSearch.ts +++ b/packages/plugin-search/src/Search/hooks/syncWithSearch.ts @@ -1,182 +1,7 @@ -import type { DocToSync, SyncWithSearch } from '../../types.js' +import type { SyncWithSearch } from '../../types.js' -export const syncWithSearch: SyncWithSearch = async (args) => { - const { - collection, - doc, - operation, - pluginConfig, - req: { payload }, - req, - } = args +import { syncDocAsSearchIndex } from '../../utilities/syncDocAsSearchIndex.js' - const { id, _status: status, title } = doc || {} - - const { beforeSync, defaultPriorities, deleteDrafts, searchOverrides, syncDrafts } = pluginConfig - - const searchSlug = searchOverrides?.slug || 'search' - - let dataToSave: DocToSync = { - doc: { - relationTo: collection, - value: id, - }, - title, - } - - if (typeof beforeSync === 'function') { - let docToSyncWith = doc - if (payload.config?.localization) { - docToSyncWith = await payload.findByID({ - id, - collection, - locale: req.locale, - req, - }) - } - dataToSave = await beforeSync({ - originalDoc: docToSyncWith, - payload, - req, - searchDoc: dataToSave, - }) - } - - let defaultPriority = 0 - if (defaultPriorities) { - const { [collection]: priority } = defaultPriorities - - if (typeof priority === 'function') { - try { - defaultPriority = await priority(doc) - } catch (err: unknown) { - payload.logger.error(err) - payload.logger.error( - `Error gathering default priority for ${searchSlug} documents related to ${collection}`, - ) - } - } else { - defaultPriority = priority - } - } - - const doSync = syncDrafts || (!syncDrafts && status !== 'draft') - - try { - if (operation === 'create') { - if (doSync) { - await payload.create({ - collection: searchSlug, - data: { - ...dataToSave, - priority: defaultPriority, - }, - locale: req.locale, - req, - }) - } - } - - if (operation === 'update') { - try { - // find the correct doc to sync with - const searchDocQuery = await payload.find({ - collection: searchSlug, - depth: 0, - locale: req.locale, - req, - where: { - 'doc.relationTo': { - equals: collection, - }, - 'doc.value': { - equals: id, - }, - }, - }) - - const docs: Array<{ - id: number | string - priority?: number - }> = searchDocQuery?.docs || [] - - const [foundDoc, ...duplicativeDocs] = docs - - // delete all duplicative search docs (docs that reference the same page) - // to ensure the same, out-of-date result does not appear twice (where only syncing the first found doc) - if (duplicativeDocs.length > 0) { - try { - const duplicativeDocIDs = duplicativeDocs.map(({ id }) => id) - await payload.delete({ - collection: searchSlug, - req, - where: { id: { in: duplicativeDocIDs } }, - }) - } catch (err: unknown) { - payload.logger.error({ - err, - msg: `Error deleting duplicative ${searchSlug} documents.`, - }) - } - } - - if (foundDoc) { - const { id: searchDocID } = foundDoc - - if (doSync) { - // update the doc normally - try { - await payload.update({ - id: searchDocID, - collection: searchSlug, - data: { - ...dataToSave, - priority: foundDoc.priority || defaultPriority, - }, - locale: req.locale, - req, - }) - } catch (err: unknown) { - payload.logger.error({ err, msg: `Error updating ${searchSlug} document.` }) - } - } - if (deleteDrafts && status === 'draft') { - // do not include draft docs in search results, so delete the record - try { - await payload.delete({ - id: searchDocID, - collection: searchSlug, - req, - }) - } catch (err: unknown) { - payload.logger.error({ err, msg: `Error deleting ${searchSlug} document.` }) - } - } - } else if (doSync) { - try { - await payload.create({ - collection: searchSlug, - data: { - ...dataToSave, - priority: defaultPriority, - }, - locale: req.locale, - req, - }) - } catch (err: unknown) { - payload.logger.error({ err, msg: `Error creating ${searchSlug} document.` }) - } - } - } catch (err: unknown) { - payload.logger.error({ err, msg: `Error finding ${searchSlug} document.` }) - } - } - } catch (err: unknown) { - payload.logger.error({ - err, - msg: `Error syncing ${searchSlug} document related to ${collection} with id: '${id}'.`, - }) - } - - return doc +export const syncWithSearch: SyncWithSearch = (args) => { + return syncDocAsSearchIndex(args) } diff --git a/packages/plugin-search/src/Search/index.ts b/packages/plugin-search/src/Search/index.ts index e3cbfc0ecf..2135f91364 100644 --- a/packages/plugin-search/src/Search/index.ts +++ b/packages/plugin-search/src/Search/index.ts @@ -1,9 +1,17 @@ import type { CollectionConfig, Field } from 'payload' -import type { SearchPluginConfig } from '../types.js' +import type { SearchPluginConfigWithLocales } from '../types.js' + +import { generateReindexHandler } from '../utilities/generateReindexHandler.js' // all settings can be overridden by the config -export const generateSearchCollection = (pluginConfig: SearchPluginConfig): CollectionConfig => { +export const generateSearchCollection = ( + pluginConfig: SearchPluginConfigWithLocales, +): CollectionConfig => { + const searchSlug = pluginConfig?.searchOverrides?.slug || 'search' + const searchCollections = pluginConfig?.collections || [] + const collectionLabels = pluginConfig?.labels + const defaultFields: Field[] = [ { name: 'title', @@ -29,7 +37,7 @@ export const generateSearchCollection = (pluginConfig: SearchPluginConfig): Coll }, index: true, maxDepth: 0, - relationTo: pluginConfig?.collections || [], + relationTo: searchCollections, required: true, }, { @@ -48,13 +56,29 @@ export const generateSearchCollection = (pluginConfig: SearchPluginConfig): Coll const newConfig: CollectionConfig = { ...(pluginConfig?.searchOverrides || {}), - slug: pluginConfig?.searchOverrides?.slug || 'search', + slug: searchSlug, access: { create: (): boolean => false, read: (): boolean => true, ...(pluginConfig?.searchOverrides?.access || {}), }, admin: { + components: { + views: { + list: { + actions: [ + { + path: '@payloadcms/plugin-search/client#ReindexButton', + serverProps: { + collectionLabels, + searchCollections, + searchSlug, + }, + }, + ], + }, + }, + }, defaultColumns: ['title'], description: 'This is a collection of automatically created search results. These results are used by the global site search and will be updated automatically as documents in the CMS are created or updated.', @@ -62,6 +86,14 @@ export const generateSearchCollection = (pluginConfig: SearchPluginConfig): Coll useAsTitle: 'title', ...(pluginConfig?.searchOverrides?.admin || {}), }, + endpoints: [ + ...(pluginConfig?.searchOverrides?.endpoints || []), + { + handler: generateReindexHandler(pluginConfig), + method: 'post', + path: '/reindex', + }, + ], fields: pluginConfig?.searchOverrides?.fields && typeof pluginConfig?.searchOverrides?.fields === 'function' diff --git a/packages/plugin-search/src/Search/ui/index.client.tsx b/packages/plugin-search/src/Search/ui/LinkToDoc/index.client.tsx similarity index 100% rename from packages/plugin-search/src/Search/ui/index.client.tsx rename to packages/plugin-search/src/Search/ui/LinkToDoc/index.client.tsx diff --git a/packages/plugin-search/src/Search/ui/index.tsx b/packages/plugin-search/src/Search/ui/LinkToDoc/index.tsx similarity index 100% rename from packages/plugin-search/src/Search/ui/index.tsx rename to packages/plugin-search/src/Search/ui/LinkToDoc/index.tsx diff --git a/packages/plugin-search/src/Search/ui/ReindexButton/ReindexButtonLabel/index.tsx b/packages/plugin-search/src/Search/ui/ReindexButton/ReindexButtonLabel/index.tsx new file mode 100644 index 0000000000..1d2b03a306 --- /dev/null +++ b/packages/plugin-search/src/Search/ui/ReindexButton/ReindexButtonLabel/index.tsx @@ -0,0 +1,12 @@ +import { ChevronIcon, Pill, useTranslation } from '@payloadcms/ui' + +export const ReindexButtonLabel = () => { + const { + i18n: { t }, + } = useTranslation() + return ( + } pillStyle="light"> + {t('general:reindex')} + + ) +} diff --git a/packages/plugin-search/src/Search/ui/ReindexButton/ReindexConfirmModal/index.scss b/packages/plugin-search/src/Search/ui/ReindexButton/ReindexConfirmModal/index.scss new file mode 100644 index 0000000000..7c79d6fa3d --- /dev/null +++ b/packages/plugin-search/src/Search/ui/ReindexButton/ReindexConfirmModal/index.scss @@ -0,0 +1,39 @@ +@import '../../../../../../ui/src/scss/styles.scss'; + +@layer payload-default { + .reindex-confirm-modal { + @include blur-bg; + display: flex; + align-items: center; + justify-content: center; + height: 100%; + + &__wrapper { + z-index: 1; + position: relative; + display: flex; + flex-direction: column; + gap: base(2); + padding: base(2); + } + + &__content { + display: flex; + flex-direction: column; + gap: base(1); + + > * { + margin: 0; + } + } + + &__controls { + display: flex; + gap: base(0.4); + + .btn { + margin: 0; + } + } + } +} diff --git a/packages/plugin-search/src/Search/ui/ReindexButton/ReindexConfirmModal/index.tsx b/packages/plugin-search/src/Search/ui/ReindexButton/ReindexConfirmModal/index.tsx new file mode 100644 index 0000000000..a4d23439f9 --- /dev/null +++ b/packages/plugin-search/src/Search/ui/ReindexButton/ReindexConfirmModal/index.tsx @@ -0,0 +1,37 @@ +import { Button, Modal, useTranslation } from '@payloadcms/ui' + +import './index.scss' + +type Props = { + description: string + onCancel: () => void + onConfirm: () => void + slug: string + title: string +} + +const baseClass = 'reindex-confirm-modal' + +export const ReindexConfirmModal = ({ slug, description, onCancel, onConfirm, title }: Props) => { + const { + i18n: { t }, + } = useTranslation() + return ( + +
+
+

{title}

+

{description}

+
+
+ + +
+
+
+ ) +} diff --git a/packages/plugin-search/src/Search/ui/ReindexButton/index.client.tsx b/packages/plugin-search/src/Search/ui/ReindexButton/index.client.tsx new file mode 100644 index 0000000000..27fa42ec16 --- /dev/null +++ b/packages/plugin-search/src/Search/ui/ReindexButton/index.client.tsx @@ -0,0 +1,153 @@ +'use client' + +import { + LoadingOverlay, + Popup, + PopupList, + toast, + useLocale, + useModal, + useTranslation, +} from '@payloadcms/ui' +import { useRouter } from 'next/navigation.js' +import React, { useCallback, useMemo, useState } from 'react' + +import type { ReindexButtonProps } from './types.js' + +import { ReindexButtonLabel } from './ReindexButtonLabel/index.js' +import { ReindexConfirmModal } from './ReindexConfirmModal/index.js' + +const confirmReindexModalSlug = 'confirm-reindex-modal' + +export const ReindexButtonClient: React.FC = ({ + collectionLabels, + searchCollections, + searchSlug, +}) => { + const { closeModal, openModal } = useModal() + const { + i18n: { t }, + } = useTranslation() + const locale = useLocale() + const router = useRouter() + + const [reindexCollections, setReindexCollections] = useState([]) + const [isLoading, setLoading] = useState(false) + + const openConfirmModal = useCallback(() => openModal(confirmReindexModalSlug), [openModal]) + const closeConfirmModal = useCallback(() => closeModal(confirmReindexModalSlug), [closeModal]) + + const handleReindexSubmit = useCallback(async () => { + if (isLoading || !reindexCollections.length) { + return + } + + closeConfirmModal() + setLoading(true) + + try { + const endpointRes = await fetch(`/api/${searchSlug}/reindex?locale=${locale.code}`, { + body: JSON.stringify({ + collections: reindexCollections, + }), + method: 'POST', + }) + + const { message } = (await endpointRes.json()) as { message: string } + + if (!endpointRes.ok) { + toast.error(message) + } else { + toast.success(message) + router.refresh() + } + } catch (err: unknown) { + // swallow error, toast shown above + } finally { + setReindexCollections([]) + setLoading(false) + } + }, [closeConfirmModal, isLoading, reindexCollections, router, searchSlug, locale]) + + const handleShowConfirmModal = useCallback( + (collections: string | string[] = searchCollections) => { + setReindexCollections(typeof collections === 'string' ? [collections] : collections) + openConfirmModal() + }, + [openConfirmModal, searchCollections], + ) + + const handlePopupButtonClick = useCallback( + (closePopup: () => void, slug?: string) => { + closePopup() + handleShowConfirmModal(slug) + }, + [handleShowConfirmModal], + ) + + const getPluralizedLabel = useCallback( + (slug: string) => { + const label = collectionLabels[slug] + if (typeof label === 'string') { + return label + } else { + return Object.hasOwn(label, locale.code) ? label[locale.code] : slug + } + }, + [collectionLabels, locale.code], + ) + + const pluralizedLabels = useMemo(() => { + return searchCollections.reduce>((acc, slug) => { + acc[slug] = getPluralizedLabel(slug) + return acc + }, {}) + }, [searchCollections, getPluralizedLabel]) + + const selectedAll = reindexCollections.length === searchCollections.length + const selectedLabels = reindexCollections.map((slug) => pluralizedLabels[slug]).join(', ') + + const modalTitle = selectedAll + ? t('general:confirmReindexAll') + : t('general:confirmReindex', { collections: selectedLabels }) + const modalDescription = selectedAll + ? t('general:confirmReindexDescriptionAll') + : t('general:confirmReindexDescription', { collections: selectedLabels }) + const loadingText = selectedAll + ? t('general:reindexingAll', { collections: t('general:collections') }) + : t('general:reindexingAll', { collections: selectedLabels }) + + return ( +
+ } + render={({ close }) => ( + + {searchCollections.map((collectionSlug) => ( + handlePopupButtonClick(close, collectionSlug)} + > + {pluralizedLabels[collectionSlug]} + + ))} + handlePopupButtonClick(close)}> + {t('general:allCollections')} + + + )} + showScrollbar + size="large" + verticalAlign="bottom" + /> + + {isLoading && } +
+ ) +} diff --git a/packages/plugin-search/src/Search/ui/ReindexButton/index.tsx b/packages/plugin-search/src/Search/ui/ReindexButton/index.tsx new file mode 100644 index 0000000000..fbc341a75c --- /dev/null +++ b/packages/plugin-search/src/Search/ui/ReindexButton/index.tsx @@ -0,0 +1,34 @@ +import type { SearchReindexButtonServerComponent } from './types.js' + +import { ReindexButtonClient } from './index.client.js' + +export const ReindexButton: SearchReindexButtonServerComponent = (props) => { + const { collectionLabels, i18n, searchCollections, searchSlug } = props + + const getStaticLocalizedPluralLabels = () => { + return Object.fromEntries( + searchCollections.map((collection) => { + const labels = collectionLabels[collection] + const pluralLabel = labels?.plural + + if (typeof pluralLabel === 'function') { + return [collection, pluralLabel({ t: i18n.t })] + } + + if (pluralLabel) { + return [collection, pluralLabel] + } + + return [collection, collection] + }), + ) + } + + return ( + + ) +} diff --git a/packages/plugin-search/src/Search/ui/ReindexButton/types.ts b/packages/plugin-search/src/Search/ui/ReindexButton/types.ts new file mode 100644 index 0000000000..78a5a5e3d2 --- /dev/null +++ b/packages/plugin-search/src/Search/ui/ReindexButton/types.ts @@ -0,0 +1,18 @@ +import type { CustomComponent, PayloadServerReactComponent, StaticLabel } from 'payload' + +import type { CollectionLabels } from '../../../types.js' + +export type ReindexButtonProps = { + collectionLabels: Record + searchCollections: string[] + searchSlug: string +} + +type ReindexButtonServerProps = { + collectionLabels: CollectionLabels +} & ReindexButtonProps + +export type SearchReindexButtonClientComponent = ReindexButtonProps +export type SearchReindexButtonServerComponent = PayloadServerReactComponent< + CustomComponent +> diff --git a/packages/plugin-search/src/exports/client.ts b/packages/plugin-search/src/exports/client.ts index f5de342fe4..347daf6394 100644 --- a/packages/plugin-search/src/exports/client.ts +++ b/packages/plugin-search/src/exports/client.ts @@ -1 +1,2 @@ -export { LinkToDoc } from '../Search/ui/index.js' +export { LinkToDoc } from '../Search/ui/LinkToDoc/index.js' +export { ReindexButton } from '../Search/ui/ReindexButton/index.js' diff --git a/packages/plugin-search/src/index.ts b/packages/plugin-search/src/index.ts index 4a28598e21..a43939d1c6 100644 --- a/packages/plugin-search/src/index.ts +++ b/packages/plugin-search/src/index.ts @@ -1,6 +1,6 @@ import type { CollectionAfterChangeHook, CollectionAfterDeleteHook, Config } from 'payload' -import type { SearchPluginConfig } from './types.js' +import type { SearchPluginConfig, SearchPluginConfigWithLocales } from './types.js' import { deleteFromSearch } from './Search/hooks/deleteFromSearch.js' import { syncWithSearch } from './Search/hooks/syncWithSearch.js' @@ -23,9 +23,24 @@ export const searchPlugin = incomingPluginConfig.localize = shouldLocalize if (collections) { - const pluginConfig: SearchPluginConfig = { + const locales = config.localization + ? config.localization.locales.map((localeConfig) => + typeof localeConfig === 'string' ? localeConfig : localeConfig.code, + ) + : [] + + const labels = Object.fromEntries( + collections + .filter(({ slug }) => incomingPluginConfig.collections?.includes(slug)) + .map((collection) => [collection.slug, collection.labels]), + ) + + const pluginConfig: SearchPluginConfigWithLocales = { // write any config defaults here deleteDrafts: true, + labels, + locales, + reindexBatchSize: incomingPluginConfig?.reindexBatchSize || 50, syncDrafts: false, ...incomingPluginConfig, } diff --git a/packages/plugin-search/src/types.ts b/packages/plugin-search/src/types.ts index 41b22419cd..afa6ce766e 100644 --- a/packages/plugin-search/src/types.ts +++ b/packages/plugin-search/src/types.ts @@ -3,8 +3,11 @@ import type { CollectionAfterDeleteHook, CollectionConfig, Field, + LabelFunction, + Locale, Payload, PayloadRequest, + StaticLabel, } from 'payload' export type DocToSync = { @@ -35,18 +38,36 @@ export type SearchPluginConfig = { } deleteDrafts?: boolean localize?: boolean + reindexBatchSize?: number searchOverrides?: { fields?: FieldsOverride } & Partial> syncDrafts?: boolean } +export type CollectionLabels = { + [collection: string]: { + plural?: LabelFunction | StaticLabel + singular?: LabelFunction | StaticLabel + } +} + +export type SearchPluginConfigWithLocales = { + labels?: CollectionLabels + locales?: string[] +} & SearchPluginConfig + +export type SyncWithSearchArgs = { + collection: string + pluginConfig: SearchPluginConfig +} & Omit[0], 'collection'> + +export type SyncDocArgs = { + locale?: string + onSyncError?: () => void +} & Omit + // Extend the `CollectionAfterChangeHook` with more function args // Convert the `collection` arg from `SanitizedCollectionConfig` to a string -export type SyncWithSearch = ( - Args: { - collection: string - pluginConfig: SearchPluginConfig - } & Omit[0], 'collection'>, -) => ReturnType +export type SyncWithSearch = (Args: SyncWithSearchArgs) => ReturnType export type DeleteFromSearch = ( Args: { diff --git a/packages/plugin-search/src/utilities/generateReindexHandler.ts b/packages/plugin-search/src/utilities/generateReindexHandler.ts new file mode 100644 index 0000000000..67b4b98877 --- /dev/null +++ b/packages/plugin-search/src/utilities/generateReindexHandler.ts @@ -0,0 +1,161 @@ +import type { PayloadHandler } from 'payload' + +import { addLocalesToRequestFromData, headersWithCors } from '@payloadcms/next/utilities' +import { commitTransaction, getAccessResults, initTransaction, killTransaction } from 'payload' + +import type { SearchPluginConfigWithLocales } from '../types.js' + +import { syncDocAsSearchIndex } from './syncDocAsSearchIndex.js' + +type ValidationResult = { + isValid: boolean + message?: string +} + +export const generateReindexHandler = + (pluginConfig: SearchPluginConfigWithLocales): PayloadHandler => + async (req) => { + addLocalesToRequestFromData(req) + const { collections = [] } = (await req.json()) as { collections: string[] } + const t = req.t + + const searchSlug = pluginConfig?.searchOverrides?.slug || 'search' + const searchCollections = pluginConfig?.collections || [] + const reindexLocales = pluginConfig?.locales?.length ? pluginConfig.locales : [req.locale] + + const validatePermissions = async (): Promise => { + const accessResults = await getAccessResults({ req }) + const searchAccessResults = accessResults.collections[searchSlug] + + const permissions = [searchAccessResults.delete, searchAccessResults.update] + // plugin doesn't allow create by default: + // if user provided, then add it to check + if (pluginConfig.searchOverrides?.access?.create) { + permissions.push(searchAccessResults.create) + } + // plugin allows reads by anyone by default: + // so if user provided, then add to check + if (pluginConfig.searchOverrides?.access?.read) { + permissions.push(searchAccessResults.read) + } + return permissions.every(Boolean) + ? { isValid: true } + : { isValid: false, message: t('error:notAllowedToPerformAction') } + } + + const validateCollections = (): ValidationResult => { + const collectionsAreValid = collections.every((col) => searchCollections.includes(col)) + return collections.length && collectionsAreValid + ? { isValid: true } + : { isValid: false, message: t('error:invalidRequestArgs', { args: `'collections'` }) } + } + + const headers = headersWithCors({ + headers: new Headers(), + req, + }) + + const { isValid: hasPermissions, message: permissionError } = await validatePermissions() + if (!hasPermissions) { + return Response.json({ message: permissionError }, { headers, status: 401 }) + } + + const { isValid: validCollections, message: collectionError } = validateCollections() + if (!validCollections) { + return Response.json({ message: collectionError }, { headers, status: 400 }) + } + + const payload = req.payload + const batchSize = pluginConfig.reindexBatchSize + + const defaultLocalApiProps = { + overrideAccess: false, + req, + user: req.user, + } + let aggregateErrors = 0 + let aggregateDocs = 0 + + const countDocuments = async (collection: string): Promise => { + const { totalDocs } = await payload.count({ + collection, + ...defaultLocalApiProps, + req: undefined, + }) + return totalDocs + } + + const deleteIndexes = async (collection: string) => { + await payload.delete({ + collection: searchSlug, + depth: 0, + select: { id: true }, + where: { 'doc.relationTo': { equals: collection } }, + ...defaultLocalApiProps, + }) + } + + const reindexCollection = async (collection: string) => { + const totalDocs = await countDocuments(collection) + const totalBatches = Math.ceil(totalDocs / batchSize) + aggregateDocs += totalDocs + + for (let j = 0; j < reindexLocales.length; j++) { + // create first index, then we update with other locales accordingly + const operation = j === 0 ? 'create' : 'update' + const localeToSync = reindexLocales[j] + + for (let i = 0; i < totalBatches; i++) { + const { docs } = await payload.find({ + collection, + limit: batchSize, + locale: localeToSync, + page: i + 1, + ...defaultLocalApiProps, + }) + + const promises = docs.map((doc) => + syncDocAsSearchIndex({ + collection, + doc, + locale: localeToSync, + onSyncError: () => operation === 'create' && aggregateErrors++, + operation, + pluginConfig, + req, + }), + ) + + // Sequentially await promises to avoid transaction issues + for (const promise of promises) { + await promise + } + } + } + } + + await initTransaction(req) + + for (const collection of collections) { + try { + await deleteIndexes(collection) + await reindexCollection(collection) + } catch (err) { + const message = t('error:unableToReindexCollection', { collection }) + payload.logger.error({ err, msg: message }) + + await killTransaction(req) + return Response.json({ message }, { headers, status: 500 }) + } + } + + const message = t('general:successfullyReindexed', { + collections: collections.join(', '), + count: aggregateDocs - aggregateErrors, + total: aggregateDocs, + }) + + await commitTransaction(req) + + return Response.json({ message }, { headers, status: 200 }) + } diff --git a/packages/plugin-search/src/utilities/syncDocAsSearchIndex.ts b/packages/plugin-search/src/utilities/syncDocAsSearchIndex.ts new file mode 100644 index 0000000000..b567c0f26e --- /dev/null +++ b/packages/plugin-search/src/utilities/syncDocAsSearchIndex.ts @@ -0,0 +1,187 @@ +import type { DocToSync, SyncDocArgs } from '../types.js' + +export const syncDocAsSearchIndex = async ({ + collection, + doc, + locale, + onSyncError, + operation, + pluginConfig, + req: { payload }, + req, +}: SyncDocArgs) => { + const { id, _status: status, title } = doc || {} + + const { beforeSync, defaultPriorities, deleteDrafts, searchOverrides, syncDrafts } = pluginConfig + + const searchSlug = searchOverrides?.slug || 'search' + const syncLocale = locale || req.locale + + let dataToSave: DocToSync = { + doc: { + relationTo: collection, + value: id, + }, + title, + } + + if (typeof beforeSync === 'function') { + let docToSyncWith = doc + if (payload.config?.localization) { + docToSyncWith = await payload.findByID({ + id, + collection, + locale: syncLocale, + req, + }) + } + dataToSave = await beforeSync({ + originalDoc: docToSyncWith, + payload, + req, + searchDoc: dataToSave, + }) + } + + let defaultPriority = 0 + if (defaultPriorities) { + const { [collection]: priority } = defaultPriorities + + if (typeof priority === 'function') { + try { + defaultPriority = await priority(doc) + } catch (err: unknown) { + payload.logger.error(err) + payload.logger.error( + `Error gathering default priority for ${searchSlug} documents related to ${collection}`, + ) + } + } else { + defaultPriority = priority + } + } + + const doSync = syncDrafts || (!syncDrafts && status !== 'draft') + + try { + if (operation === 'create') { + if (doSync) { + await payload.create({ + collection: searchSlug, + data: { + ...dataToSave, + priority: defaultPriority, + }, + locale: syncLocale, + req, + }) + } + } + + if (operation === 'update') { + try { + // find the correct doc to sync with + const searchDocQuery = await payload.find({ + collection: searchSlug, + depth: 0, + locale: syncLocale, + req, + where: { + 'doc.relationTo': { + equals: collection, + }, + 'doc.value': { + equals: id, + }, + }, + }) + + const docs: Array<{ + id: number | string + priority?: number + }> = searchDocQuery?.docs || [] + + const [foundDoc, ...duplicativeDocs] = docs + + // delete all duplicative search docs (docs that reference the same page) + // to ensure the same, out-of-date result does not appear twice (where only syncing the first found doc) + if (duplicativeDocs.length > 0) { + try { + const duplicativeDocIDs = duplicativeDocs.map(({ id }) => id) + await payload.delete({ + collection: searchSlug, + req, + where: { id: { in: duplicativeDocIDs } }, + }) + } catch (err: unknown) { + payload.logger.error({ + err, + msg: `Error deleting duplicative ${searchSlug} documents.`, + }) + } + } + + if (foundDoc) { + const { id: searchDocID } = foundDoc + + if (doSync) { + // update the doc normally + try { + await payload.update({ + id: searchDocID, + collection: searchSlug, + data: { + ...dataToSave, + priority: foundDoc.priority || defaultPriority, + }, + locale: syncLocale, + req, + }) + } catch (err: unknown) { + payload.logger.error({ err, msg: `Error updating ${searchSlug} document.` }) + } + } + if (deleteDrafts && status === 'draft') { + // do not include draft docs in search results, so delete the record + try { + await payload.delete({ + id: searchDocID, + collection: searchSlug, + req, + }) + } catch (err: unknown) { + payload.logger.error({ err, msg: `Error deleting ${searchSlug} document.` }) + } + } + } else if (doSync) { + try { + await payload.create({ + collection: searchSlug, + data: { + ...dataToSave, + priority: defaultPriority, + }, + locale: syncLocale, + req, + }) + } catch (err: unknown) { + payload.logger.error({ err, msg: `Error creating ${searchSlug} document.` }) + } + } + } catch (err: unknown) { + payload.logger.error({ err, msg: `Error finding ${searchSlug} document.` }) + } + } + } catch (err: unknown) { + payload.logger.error({ + err, + msg: `Error syncing ${searchSlug} document related to ${collection} with id: '${id}'.`, + }) + + if (onSyncError) { + onSyncError() + } + } + + return doc +} diff --git a/packages/plugin-search/tsconfig.json b/packages/plugin-search/tsconfig.json index ce208f0541..8296b7bf94 100644 --- a/packages/plugin-search/tsconfig.json +++ b/packages/plugin-search/tsconfig.json @@ -20,5 +20,5 @@ "src/**/*.spec.tsx" ], "include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.d.ts", "src/**/*.json"], - "references": [{ "path": "../payload" }, { "path": "../ui" }] + "references": [{ "path": "../payload" }, { "path": "../ui" }, { "path": "../next" }] } diff --git a/packages/translations/src/clientKeys.ts b/packages/translations/src/clientKeys.ts index 82e6de9eb7..c4d59dccf7 100644 --- a/packages/translations/src/clientKeys.ts +++ b/packages/translations/src/clientKeys.ts @@ -68,12 +68,14 @@ export const clientTranslationKeys = createClientTranslationKeys([ 'error:emailOrPasswordIncorrect', 'error:usernameOrPasswordIncorrect', 'error:loadingDocument', + 'error:invalidRequestArgs', 'error:invalidFileType', 'error:logoutFailed', 'error:noMatchedField', 'error:notAllowedToAccessPage', 'error:previewing', 'error:unableToDeleteCount', + 'error:unableToReindexCollection', 'error:unableToUpdateCount', 'error:unauthorized', 'error:unknown', @@ -126,6 +128,7 @@ export const clientTranslationKeys = createClientTranslationKeys([ 'general:addBelow', 'general:addFilter', 'general:adminTheme', + 'general:allCollections', 'general:and', 'general:anotherUser', 'general:anotherUserTakenOver', @@ -144,6 +147,10 @@ export const clientTranslationKeys = createClientTranslationKeys([ 'general:confirmCopy', 'general:confirmDeletion', 'general:confirmDuplication', + 'general:confirmReindex', + 'general:confirmReindexAll', + 'general:confirmReindexDescription', + 'general:confirmReindexDescriptionAll', 'general:copied', 'general:clearAll', 'general:copy', @@ -221,6 +228,8 @@ export const clientTranslationKeys = createClientTranslationKeys([ 'general:payloadSettings', 'general:perPage', 'general:previous', + 'general:reindex', + 'general:reindexingAll', 'general:remove', 'general:reset', 'general:row', @@ -243,6 +252,7 @@ export const clientTranslationKeys = createClientTranslationKeys([ 'general:success', 'general:successfullyCreated', 'general:successfullyDuplicated', + 'general:successfullyReindexed', 'general:takeOver', 'general:thisLanguage', 'general:titleDeleted', diff --git a/packages/translations/src/languages/ar.ts b/packages/translations/src/languages/ar.ts index ec144b0875..a18ae6e35b 100644 --- a/packages/translations/src/languages/ar.ts +++ b/packages/translations/src/languages/ar.ts @@ -92,6 +92,7 @@ export const arTranslations: DefaultTranslationsObject = { incorrectCollection: 'مجموعة غير صحيحة', invalidFileType: 'نوع ملف غير صالح', invalidFileTypeValue: 'نوع ملف غير صالح: {{value}}', + invalidRequestArgs: 'تم تمرير وسيطات غير صالحة في الطلب: {{args}}', loadingDocument: 'حدثت مشكلة أثناء تحميل المستند برقم التعريف {{id}}.', localesNotSaved_one: 'لم يتم حفظ اللغة التالية:', localesNotSaved_other: 'لم يتم حفظ اللغات التالية:', @@ -111,6 +112,7 @@ export const arTranslations: DefaultTranslationsObject = { tokenInvalidOrExpired: 'الرّمز إمّا غير صالح أو منتهي الصّلاحيّة.', tokenNotProvided: 'لم يتم تقديم الرمز.', unableToDeleteCount: 'يتعذّر حذف {{count}} من {{total}} {{label}}.', + unableToReindexCollection: 'خطأ في إعادة فهرسة المجموعة {{collection}}. تم إيقاف العملية.', unableToUpdateCount: 'يتعذّر تحديث {{count}} من {{total}} {{label}}.', unauthorized: 'غير مصرّح لك ، عليك أن تقوم بتسجيل الدّخول لتتمكّن من تقديم هذا الطّلب.', unknown: 'حدث خطأ غير معروف.', @@ -176,6 +178,7 @@ export const arTranslations: DefaultTranslationsObject = { addBelow: 'أضف في الاسفل', addFilter: 'أضف فلتر', adminTheme: 'شكل واجهة المستخدم', + allCollections: 'جميع المجموعات', and: 'و', anotherUser: 'مستخدم آخر', anotherUserTakenOver: 'قام مستخدم آخر بالاستيلاء على تحرير هذا المستند.', @@ -195,6 +198,12 @@ export const arTranslations: DefaultTranslationsObject = { confirmCopy: 'تأكيد النسخ', confirmDeletion: 'تأكيد الحذف', confirmDuplication: 'تأكيد التّكرار', + confirmReindex: 'إعادة فهرسة جميع {{collections}}؟', + confirmReindexAll: 'إعادة فهرسة جميع المجموعات؟', + confirmReindexDescription: + 'سيؤدي هذا إلى إزالة الفهارس الحالية وإعادة فهرسة المستندات في مجموعات {{collections}}.', + confirmReindexDescriptionAll: + 'سيؤدي هذا إلى إزالة الفهارس الحالية وإعادة فهرسة المستندات في جميع المجموعات.', copied: 'تمّ النّسخ', copy: 'نسخ', copying: 'نسخ', @@ -278,6 +287,8 @@ export const arTranslations: DefaultTranslationsObject = { payloadSettings: 'الإعدادات', perPage: 'لكلّ صفحة: {{limit}}', previous: 'سابق', + reindex: 'إعادة الفهرسة', + reindexingAll: 'جاري إعادة فهرسة جميع {{collections}}.', remove: 'إزالة', reset: 'إعادة تعيين', row: 'سطر', @@ -300,6 +311,8 @@ export const arTranslations: DefaultTranslationsObject = { success: 'النجاح', successfullyCreated: '{{label}} تم إنشاؤها بنجاح.', successfullyDuplicated: '{{label}} تم استنساخها بنجاح.', + successfullyReindexed: + 'تم إعادة فهرسة {{count}} من أصل {{total}} مستندات من {{collections}} مجموعات بنجاح.', takeOver: 'تولي', thisLanguage: 'العربية', titleDeleted: 'تم حذف {{label}} "{{title}}" بنجاح.', diff --git a/packages/translations/src/languages/az.ts b/packages/translations/src/languages/az.ts index d154b7ab40..96f69632fa 100644 --- a/packages/translations/src/languages/az.ts +++ b/packages/translations/src/languages/az.ts @@ -92,6 +92,7 @@ export const azTranslations: DefaultTranslationsObject = { incorrectCollection: 'Yanlış Kolleksiya', invalidFileType: 'Yanlış fayl növü', invalidFileTypeValue: 'Yanlış fayl növü: {{value}}', + invalidRequestArgs: 'Sorguda etibarsız arqumentlər təqdim edildi: {{args}}', loadingDocument: '{{id}} ID-li sənədin yüklənməsində problem baş verdi.', localesNotSaved_one: 'Aşağıdakı yerləşdirmə saxlanıla bilmədi:', localesNotSaved_other: 'Aşağıdakı yerləşdirmələr saxlanıla bilmədi:', @@ -111,6 +112,8 @@ export const azTranslations: DefaultTranslationsObject = { tokenInvalidOrExpired: 'Token ya yanlışdır və ya müddəti bitib.', tokenNotProvided: 'Token təqdim edilməyib.', unableToDeleteCount: '{{count}} dən {{total}} {{label}} silinə bilmir.', + unableToReindexCollection: + '{{collection}} kolleksiyasının yenidən indekslənməsi zamanı səhv baş verdi. Əməliyyat dayandırıldı.', unableToUpdateCount: '{{count}} dən {{total}} {{label}} yenilənə bilmir.', unauthorized: 'İcazəniz yoxdur, bu tələbi yerinə yetirmək üçün daxil olmalısınız.', unknown: 'Naməlum bir xəta baş verdi.', @@ -177,6 +180,7 @@ export const azTranslations: DefaultTranslationsObject = { addBelow: 'Aşağıya əlavə et', addFilter: 'Filter əlavə et', adminTheme: 'Admin Mövzusu', + allCollections: 'Bütün kolleksiyalar', and: 'Və', anotherUser: 'Başqa bir istifadəçi', anotherUserTakenOver: 'Başqa bir istifadəçi bu sənədin redaktəsini ələ keçirdi.', @@ -197,6 +201,12 @@ export const azTranslations: DefaultTranslationsObject = { confirmCopy: 'Kopyanı təsdiqləyin', confirmDeletion: 'Silməni təsdiqlə', confirmDuplication: 'Dublikasiyanı təsdiqlə', + confirmReindex: 'Bütün {{collections}} yenidən indekslənsin?', + confirmReindexAll: 'Bütün kolleksiyalar yenidən indekslənsin?', + confirmReindexDescription: + 'Bu, mövcud indeksləri siləcək və {{collections}} kolleksiyalarında sənədləri yenidən indeksləyəcək.', + confirmReindexDescriptionAll: + 'Bu, mövcud indeksləri siləcək və bütün kolleksiyalardakı sənədləri yenidən indeksləyəcək.', copied: 'Kopyalandı', copy: 'Kopyala', copying: 'Kopyalama', @@ -281,6 +291,8 @@ export const azTranslations: DefaultTranslationsObject = { payloadSettings: 'Payload Parametrləri', perPage: 'Hər səhifədə: {{limit}}', previous: 'Əvvəlki', + reindex: 'Yenidən indekslə', + reindexingAll: 'Bütün {{collections}} yenidən indekslənir.', remove: 'Sil', reset: 'Yenidən başlat', row: 'Sətir', @@ -303,6 +315,8 @@ export const azTranslations: DefaultTranslationsObject = { success: 'Uğur', successfullyCreated: '{{label}} uğurla yaradıldı.', successfullyDuplicated: '{{label}} uğurla dublikatlandı.', + successfullyReindexed: + '{{collections}} kolleksiyalarından {{total}} sənəddən {{count}} sənəd uğurla yenidən indeksləndi.', takeOver: 'Əvvəl', thisLanguage: 'Azərbaycan dili', titleDeleted: '{{label}} "{{title}}" uğurla silindi.', diff --git a/packages/translations/src/languages/bg.ts b/packages/translations/src/languages/bg.ts index 791b2e6068..2c7cdeb8df 100644 --- a/packages/translations/src/languages/bg.ts +++ b/packages/translations/src/languages/bg.ts @@ -92,6 +92,7 @@ export const bgTranslations: DefaultTranslationsObject = { incorrectCollection: 'Грешна колекция', invalidFileType: 'Невалиден тип на файл', invalidFileTypeValue: 'Невалиден тип на файл: {{value}}', + invalidRequestArgs: 'Невалидни аргументи в заявката: {{args}}', loadingDocument: 'Имаше проблем при зареждането на документа с идентификатор {{id}}.', localesNotSaved_one: 'Следната локализация не може да бъде запазена:', localesNotSaved_other: 'Следните локализации не могат да бъдат запазени:', @@ -111,6 +112,8 @@ export const bgTranslations: DefaultTranslationsObject = { tokenInvalidOrExpired: 'Ключът е невалиден или изтекъл.', tokenNotProvided: 'Токенът не е предоставен.', unableToDeleteCount: 'Не беше възможно да се изтрият {{count}} от {{total}} {{label}}.', + unableToReindexCollection: + 'Грешка при преиндексиране на колекцията {{collection}}. Операцията е прекратена.', unableToUpdateCount: 'Не беше възможно да се обновят {{count}} от {{total}} {{label}}.', unauthorized: 'Неоторизиран, трябва да влезеш, за да извършиш тази заявка.', unknown: 'Неизвестна грешка.', @@ -177,6 +180,7 @@ export const bgTranslations: DefaultTranslationsObject = { addBelow: 'Добави отдолу', addFilter: 'Добави филтър', adminTheme: 'Цветова тема', + allCollections: 'Всички колекции', and: 'И', anotherUser: 'Друг потребител', anotherUserTakenOver: 'Друг потребител пое редактирането на този документ.', @@ -196,6 +200,12 @@ export const bgTranslations: DefaultTranslationsObject = { confirmCopy: 'Потвърди копирането', confirmDeletion: 'Потвърди изтриване', confirmDuplication: 'Потвърди дупликация', + confirmReindex: 'Да се преиндексират всички {{collections}}?', + confirmReindexAll: 'Да се преиндексират всички колекции?', + confirmReindexDescription: + 'Това ще премахне съществуващите индекси и ще преиндексира документите в колекциите {{collections}}.', + confirmReindexDescriptionAll: + 'Това ще премахне съществуващите индекси и ще преиндексира документите във всички колекции.', copied: 'Копирано', copy: 'Копирай', copying: 'Копиране', @@ -280,6 +290,8 @@ export const bgTranslations: DefaultTranslationsObject = { payloadSettings: 'Настройки на Payload', perPage: 'На страница: {{limit}}', previous: 'Предишен', + reindex: 'Преиндексиране', + reindexingAll: 'Преиндексиране на всички {{collections}}.', remove: 'Премахни', reset: 'Нулиране', row: 'ред', @@ -302,6 +314,8 @@ export const bgTranslations: DefaultTranslationsObject = { success: 'Успех', successfullyCreated: '{{label}} успешно създаден.', successfullyDuplicated: '{{label}} успешно дупликиран.', + successfullyReindexed: + 'Успешно преиндексирани {{count}} от {{total}} документа от {{collections}} колекции.', takeOver: 'Поемане', thisLanguage: 'Български', titleDeleted: '{{label}} "{{title}}" успешно изтрит.', diff --git a/packages/translations/src/languages/cs.ts b/packages/translations/src/languages/cs.ts index 75234f075d..9a9aa61184 100644 --- a/packages/translations/src/languages/cs.ts +++ b/packages/translations/src/languages/cs.ts @@ -92,6 +92,7 @@ export const csTranslations: DefaultTranslationsObject = { incorrectCollection: 'Nesprávná kolekce', invalidFileType: 'Neplatný typ souboru', invalidFileTypeValue: 'Neplatný typ souboru: {{value}}', + invalidRequestArgs: 'Neplatné argumenty v požadavku: {{args}}', loadingDocument: 'Při načítání dokumentu s ID {{id}} došlo k chybě.', localesNotSaved_one: 'Následující lokalitu se nepodařilo uložit:', localesNotSaved_other: 'Následující lokality se nepodařilo uložit:', @@ -111,6 +112,8 @@ export const csTranslations: DefaultTranslationsObject = { tokenInvalidOrExpired: 'Token je neplatný nebo vypršel.', tokenNotProvided: 'Token není poskytnut.', unableToDeleteCount: 'Nelze smazat {{count}} z {{total}} {{label}}', + unableToReindexCollection: + 'Chyba při přeindexování kolekce {{collection}}. Operace byla přerušena.', unableToUpdateCount: 'Nelze aktualizovat {{count}} z {{total}} {{label}}.', unauthorized: 'Neautorizováno, pro zadání tohoto požadavku musíte být přihlášeni.', unknown: 'Došlo k neznámé chybě.', @@ -177,6 +180,7 @@ export const csTranslations: DefaultTranslationsObject = { addBelow: 'Přidat pod', addFilter: 'Přidat filtr', adminTheme: 'Motiv administračního rozhraní', + allCollections: 'Všechny kolekce', and: 'a', anotherUser: 'Jiný uživatel', anotherUserTakenOver: 'Jiný uživatel převzal úpravy tohoto dokumentu.', @@ -196,6 +200,12 @@ export const csTranslations: DefaultTranslationsObject = { confirmCopy: 'Potvrzení kopie', confirmDeletion: 'Potvrdit odstranění', confirmDuplication: 'Potvrdit duplikaci', + confirmReindex: 'Přeindexovat všechny {{collections}}?', + confirmReindexAll: 'Přeindexovat všechny kolekce?', + confirmReindexDescription: + 'Tímto budou odstraněny stávající indexy a dokumenty v kolekcích {{collections}} budou znovu zaindexovány.', + confirmReindexDescriptionAll: + 'Tímto budou odstraněny stávající indexy a dokumenty ve všech kolekcích budou znovu zaindexovány.', copied: 'Zkopírováno', copy: 'Kopírovat', copying: 'Kopírování', @@ -279,6 +289,8 @@ export const csTranslations: DefaultTranslationsObject = { payloadSettings: 'Payload nastavení', perPage: 'Na stránku: {{limit}}', previous: 'Předchozí', + reindex: 'Přeindexovat', + reindexingAll: 'Přeindexování všech {{collections}}.', remove: 'Odstranit', reset: 'Resetovat', row: 'Řádek', @@ -301,6 +313,8 @@ export const csTranslations: DefaultTranslationsObject = { success: 'Úspěch', successfullyCreated: '{{label}} úspěšně vytvořeno.', successfullyDuplicated: '{{label}} úspěšně duplikováno.', + successfullyReindexed: + 'Úspěšně přeindexováno {{count}} z {{total}} dokumentů z {{collections}} kolekcí.', takeOver: 'Převzít', thisLanguage: 'Čeština', titleDeleted: '{{label}} "{{title}}" úspěšně smazáno.', diff --git a/packages/translations/src/languages/da.ts b/packages/translations/src/languages/da.ts index 22b38bb956..180b1c3836 100644 --- a/packages/translations/src/languages/da.ts +++ b/packages/translations/src/languages/da.ts @@ -91,6 +91,7 @@ export const daTranslations: DefaultTranslationsObject = { incorrectCollection: 'Forkert samling', invalidFileType: 'Ugyldig filtype', invalidFileTypeValue: 'Ugyldig filtype: {{value}}', + invalidRequestArgs: 'Ugyldige argumenter i anmodningen: {{args}}', loadingDocument: 'Der opstod et problem med at loade dokumentet med ID {{id}}.', localesNotSaved_one: 'Følgende lokalitet kunne ikke gemmes:', localesNotSaved_other: 'Følgende lokaliteter kunne ikke gemmes:', @@ -110,6 +111,8 @@ export const daTranslations: DefaultTranslationsObject = { tokenInvalidOrExpired: 'Token er enten ugyldig eller udløbet.', tokenNotProvided: 'Token ikke angivet.', unableToDeleteCount: 'Kunne ikke slette {{count}} mangler {{total}} {{label}}.', + unableToReindexCollection: + 'Fejl ved genindeksering af samling {{collection}}. Operationen blev afbrudt.', unableToUpdateCount: 'Kunne ikke slette {{count}} mangler {{total}} {{label}}.', unauthorized: 'Uautoriseret, log in for at gennemføre handlingen.', unknown: 'En ukendt fejl er opstået.', @@ -176,6 +179,7 @@ export const daTranslations: DefaultTranslationsObject = { addBelow: 'Tilføj under', addFilter: 'Tilføj filter', adminTheme: 'Admin tema', + allCollections: 'Alle samlinger', and: 'Og', anotherUser: 'En anden bruger', anotherUserTakenOver: 'En anden bruger har overtaget denne ressource.', @@ -196,6 +200,12 @@ export const daTranslations: DefaultTranslationsObject = { confirmCopy: 'Bekræft kopi', confirmDeletion: 'Bekræft sletning', confirmDuplication: 'Bekræft duplikering', + confirmReindex: 'Genindeksér alle {{collections}}?', + confirmReindexAll: 'Genindeksér alle samlinger?', + confirmReindexDescription: + 'Dette vil fjerne eksisterende indekser og genindeksere dokumenter i {{collections}}-samlingerne.', + confirmReindexDescriptionAll: + 'Dette vil fjerne eksisterende indekser og genindeksere dokumenter i alle samlinger.', copied: 'Kopieret', copy: 'Kopier', copying: 'Kopiering', @@ -279,6 +289,8 @@ export const daTranslations: DefaultTranslationsObject = { payloadSettings: 'Payload-indstillinger', perPage: 'Per side: {{limit}}', previous: 'Tidligere', + reindex: 'Genindekser', + reindexingAll: 'Genindekserer alle {{collections}}.', remove: 'Fjern', reset: 'Nulstil', row: 'Række', @@ -301,6 +313,8 @@ export const daTranslations: DefaultTranslationsObject = { success: 'Succes', successfullyCreated: '{{label}} oprettet.', successfullyDuplicated: '{{label}} duplikeret.', + successfullyReindexed: + '{{count}} ud af {{total}} dokumenter fra {{collections}} samlinger blev genindekseret med succes.', takeOver: 'Overtag', thisLanguage: 'Dansk', titleDeleted: '{{label}} "{{title}}" slettet.', diff --git a/packages/translations/src/languages/de.ts b/packages/translations/src/languages/de.ts index c6af96859e..e244504bf9 100644 --- a/packages/translations/src/languages/de.ts +++ b/packages/translations/src/languages/de.ts @@ -94,6 +94,7 @@ export const deTranslations: DefaultTranslationsObject = { incorrectCollection: 'Falsche Sammlung', invalidFileType: 'Ungültiger Datei-Typ', invalidFileTypeValue: 'Ungültiger Datei-Typ: {{value}}', + invalidRequestArgs: 'Ungültige Argumente in der Anfrage: {{args}}', loadingDocument: 'Es gab ein Problem, das Dokument mit der ID {{id}} zu laden.', localesNotSaved_one: 'Das folgende Gebietsschema konnte nicht gespeichert werden:', localesNotSaved_other: 'Die folgenden Gebietsschemata konnten nicht gespeichert werden:', @@ -113,6 +114,8 @@ export const deTranslations: DefaultTranslationsObject = { tokenInvalidOrExpired: 'Token ist entweder ungültig oder abgelaufen.', tokenNotProvided: 'Token nicht bereitgestellt.', unableToDeleteCount: '{{count}} von {{total}} {{label}} konnte nicht gelöscht werden.', + unableToReindexCollection: + 'Fehler beim Neuindizieren der Sammlung {{collection}}. Vorgang abgebrochen.', unableToUpdateCount: '{{count}} von {{total}} {{label}} konnte nicht aktualisiert werden.', unauthorized: 'Nicht autorisiert - du musst angemeldet sein, um diese Anfrage zu stellen.', unknown: 'Ein unbekannter Fehler ist aufgetreten.', @@ -181,6 +184,7 @@ export const deTranslations: DefaultTranslationsObject = { addBelow: 'Darunter hinzufügen', addFilter: 'Filter hinzufügen', adminTheme: 'Admin-Farbthema', + allCollections: 'Alle Sammlungen', and: 'Und', anotherUser: 'Ein anderer Benutzer', anotherUserTakenOver: 'Ein anderer Benutzer hat die Bearbeitung dieses Dokuments übernommen.', @@ -201,6 +205,12 @@ export const deTranslations: DefaultTranslationsObject = { confirmCopy: 'Kopie bestätigen', confirmDeletion: 'Löschen bestätigen', confirmDuplication: 'Duplizieren bestätigen', + confirmReindex: 'Alle {{collections}} neu indizieren?', + confirmReindexAll: 'Alle Sammlungen neu indizieren?', + confirmReindexDescription: + 'Dies entfernt bestehende Indizes und indiziert die Dokumente in den {{collections}}-Sammlungen neu.', + confirmReindexDescriptionAll: + 'Dies entfernt bestehende Indizes und indiziert die Dokumente in allen Sammlungen neu.', copied: 'Kopiert', copy: 'Kopieren', copying: 'Kopieren', @@ -285,6 +295,8 @@ export const deTranslations: DefaultTranslationsObject = { payloadSettings: 'Payload Einstellungen', perPage: 'Pro Seite: {{limit}}', previous: 'Vorherige', + reindex: 'Neuindizieren', + reindexingAll: 'Alle {{collections}} werden neu indiziert.', remove: 'Entfernen', reset: 'Zurücksetzen', row: 'Zeile', @@ -307,6 +319,8 @@ export const deTranslations: DefaultTranslationsObject = { success: 'Erfolg', successfullyCreated: '{{label}} erfolgreich erstellt.', successfullyDuplicated: '{{label}} wurde erfolgreich dupliziert.', + successfullyReindexed: + 'Erfolgreich {{count}} von {{total}} Dokumenten aus {{collections}} Sammlungen neu indiziert.', takeOver: 'Übernehmen', thisLanguage: 'Deutsch', titleDeleted: '{{label}} {{title}} wurde erfolgreich gelöscht.', diff --git a/packages/translations/src/languages/en.ts b/packages/translations/src/languages/en.ts index 05262ee2f2..ae74f15fd9 100644 --- a/packages/translations/src/languages/en.ts +++ b/packages/translations/src/languages/en.ts @@ -93,6 +93,7 @@ export const enTranslations = { incorrectCollection: 'Incorrect Collection', invalidFileType: 'Invalid file type', invalidFileTypeValue: 'Invalid file type: {{value}}', + invalidRequestArgs: 'Invalid arguments passed in request: {{args}}', loadingDocument: 'There was a problem loading the document with ID of {{id}}.', localesNotSaved_one: 'The following locale could not be saved:', localesNotSaved_other: 'The following locales could not be saved:', @@ -112,6 +113,7 @@ export const enTranslations = { tokenInvalidOrExpired: 'Token is either invalid or has expired.', tokenNotProvided: 'Token not provided.', unableToDeleteCount: 'Unable to delete {{count}} out of {{total}} {{label}}.', + unableToReindexCollection: 'Error reindexing collection {{collection}}. Operation aborted.', unableToUpdateCount: 'Unable to update {{count}} out of {{total}} {{label}}.', unauthorized: 'Unauthorized, you must be logged in to make this request.', unknown: 'An unknown error has occurred.', @@ -178,6 +180,7 @@ export const enTranslations = { addBelow: 'Add Below', addFilter: 'Add Filter', adminTheme: 'Admin Theme', + allCollections: 'All Collections', and: 'And', anotherUser: 'Another user', anotherUserTakenOver: 'Another user has taken over editing this document.', @@ -198,6 +201,12 @@ export const enTranslations = { confirmCopy: 'Confirm copy', confirmDeletion: 'Confirm deletion', confirmDuplication: 'Confirm duplication', + confirmReindex: 'Reindex all {{collections}}?', + confirmReindexAll: 'Reindex all collections?', + confirmReindexDescription: + 'This will remove existing indexes and reindex documents in the {{collections}} collections.', + confirmReindexDescriptionAll: + 'This will remove existing indexes and reindex documents in all collections.', copied: 'Copied', copy: 'Copy', copying: 'Copying', @@ -282,6 +291,8 @@ export const enTranslations = { payloadSettings: 'Payload Settings', perPage: 'Per Page: {{limit}}', previous: 'Previous', + reindex: 'Reindex', + reindexingAll: 'Reindexing all {{collections}}.', remove: 'Remove', reset: 'Reset', row: 'Row', @@ -304,6 +315,8 @@ export const enTranslations = { success: 'Success', successfullyCreated: '{{label}} successfully created.', successfullyDuplicated: '{{label}} successfully duplicated.', + successfullyReindexed: + 'Successfully reindexed {{count}} of {{total}} documents from {{collections}}', takeOver: 'Take over', thisLanguage: 'English', titleDeleted: '{{label}} "{{title}}" successfully deleted.', diff --git a/packages/translations/src/languages/es.ts b/packages/translations/src/languages/es.ts index dd6af3906d..d219e608c7 100644 --- a/packages/translations/src/languages/es.ts +++ b/packages/translations/src/languages/es.ts @@ -92,6 +92,7 @@ export const esTranslations: DefaultTranslationsObject = { incorrectCollection: 'Colección Incorrecta', invalidFileType: 'Tipo de archivo inválido', invalidFileTypeValue: 'Tipo de archivo inválido: {{value}}', + invalidRequestArgs: 'Argumentos no válidos en la solicitud: {{args}}', loadingDocument: 'Ocurrió un problema al cargar el documento con la ID {{id}}.', localesNotSaved_one: 'No se pudo guardar la siguiente configuración regional:', localesNotSaved_other: 'No se pudieron guardar las siguientes configuraciones regionales:', @@ -111,6 +112,8 @@ export const esTranslations: DefaultTranslationsObject = { tokenInvalidOrExpired: 'El token es inválido o ya expiró.', tokenNotProvided: 'Token no proporcionado.', unableToDeleteCount: 'No se pudo eliminar {{count}} de {{total}} {{label}}.', + unableToReindexCollection: + 'Error al reindexar la colección {{collection}}. Operación abortada.', unableToUpdateCount: 'No se puede actualizar {{count}} de {{total}} {{label}}.', unauthorized: 'No autorizado, debes iniciar sesión para realizar esta solicitud.', unknown: 'Ocurrió un error desconocido.', @@ -181,6 +184,7 @@ export const esTranslations: DefaultTranslationsObject = { addBelow: 'Agrega abajo', addFilter: 'Añadir filtro', adminTheme: 'Tema del admin', + allCollections: 'Todas las colecciones', and: 'Y', anotherUser: 'Otro usuario', anotherUserTakenOver: 'Otro usuario ha tomado el control de la edición de este documento.', @@ -201,6 +205,12 @@ export const esTranslations: DefaultTranslationsObject = { confirmCopy: 'Confirmar copia', confirmDeletion: 'Confirmar eliminación', confirmDuplication: 'Confirmar duplicado', + confirmReindex: '¿Reindexar todas las {{collections}}?', + confirmReindexAll: '¿Reindexar todas las colecciones?', + confirmReindexDescription: + 'Esto eliminará los índices existentes y volverá a indexar los documentos en las colecciones {{collections}}.', + confirmReindexDescriptionAll: + 'Esto eliminará los índices existentes y volverá a indexar los documentos en todas las colecciones.', copied: 'Copiado', copy: 'Copiar', copying: 'Copiando', @@ -285,6 +295,8 @@ export const esTranslations: DefaultTranslationsObject = { payloadSettings: 'Configuración de la carga', perPage: 'Por página: {{limit}}', previous: 'Anterior', + reindex: 'Reindexar', + reindexingAll: 'Reindexando todas las {{collections}}.', remove: 'Remover', reset: 'Reiniciar', row: 'Fila', @@ -307,6 +319,8 @@ export const esTranslations: DefaultTranslationsObject = { success: 'Éxito', successfullyCreated: '{{label}} creado correctamente.', successfullyDuplicated: '{{label}} duplicado correctamente.', + successfullyReindexed: + 'Se reindexaron con éxito {{count}} de {{total}} documentos de {{collections}} colecciones.', takeOver: 'Tomar el control', thisLanguage: 'Español', titleDeleted: '{{label}} {{title}} eliminado correctamente.', diff --git a/packages/translations/src/languages/fa.ts b/packages/translations/src/languages/fa.ts index df4f5bca9f..1a195913ce 100644 --- a/packages/translations/src/languages/fa.ts +++ b/packages/translations/src/languages/fa.ts @@ -91,6 +91,7 @@ export const faTranslations: DefaultTranslationsObject = { incorrectCollection: 'مجموعه نادرست', invalidFileType: 'نوع رسانه نامعتبر است', invalidFileTypeValue: 'نوع رسانه نامعتبر: {{value}}', + invalidRequestArgs: 'آرگومان‌های نامعتبر در درخواست ارسال شدند: {{args}}', loadingDocument: 'مشکلی در بارگیری رسانه با شناسه {{id}} پیش آمد.', localesNotSaved_one: 'امکان ذخیره‌سازی تنظیمات محلی زیر وجود ندارد:', localesNotSaved_other: 'امکان ذخیره‌سازی تنظیمات محلی زیر وجود ندارد:', @@ -110,6 +111,7 @@ export const faTranslations: DefaultTranslationsObject = { tokenInvalidOrExpired: 'ژتون شما نامعتبر یا منقضی شده است.', tokenNotProvided: 'توکن ارائه نشده است.', unableToDeleteCount: 'نمی‌توان {{count}} از {{total}} {{label}} را حذف کرد.', + unableToReindexCollection: 'خطا در بازنمایه‌سازی مجموعه {{collection}}. عملیات متوقف شد.', unableToUpdateCount: 'امکان به روز رسانی {{count}} خارج از {{total}} {{label}} وجود ندارد.', unauthorized: 'درخواست نامعتبر، جهت فرستادن این درخواست باید وارد شوید.', unknown: 'یک خطای ناشناخته رخ داد.', @@ -176,6 +178,7 @@ export const faTranslations: DefaultTranslationsObject = { addBelow: 'افزودن به زیر', addFilter: 'افزودن علامت', adminTheme: 'پوسته پیشخوان', + allCollections: 'همه مجموعه‌ها', and: 'و', anotherUser: 'کاربر دیگر', anotherUserTakenOver: 'کاربر دیگری ویرایش این سند را به دست گرفته است.', @@ -196,6 +199,12 @@ export const faTranslations: DefaultTranslationsObject = { confirmCopy: 'تأیید کپی', confirmDeletion: 'تأئید عملیات حذف', confirmDuplication: 'تأئید رونوشت', + confirmReindex: 'آیا همه {{collections}} بازایندکس شوند؟', + confirmReindexAll: 'آیا همه مجموعه‌ها بازایندکس شوند؟', + confirmReindexDescription: + 'این کار ایندکس‌های موجود را حذف کرده و اسناد را در مجموعه‌های {{collections}} بازایندکس می‌کند.', + confirmReindexDescriptionAll: + 'این کار ایندکس‌های موجود را حذف کرده و اسناد را در همه مجموعه‌ها بازایندکس می‌کند.', copied: 'رونوشت شده', copy: 'رونوشت', copying: 'کپی کردن', @@ -280,6 +289,8 @@ export const faTranslations: DefaultTranslationsObject = { payloadSettings: 'تنظیمات پی‌لود', perPage: 'هر برگه: {{limit}}', previous: 'قبلی', + reindex: 'بازنمایه‌سازی', + reindexingAll: 'در حال بازایندکس همه {{collections}}.', remove: 'برداشتن', reset: 'بازنشانی', row: 'ردیف', @@ -302,6 +313,8 @@ export const faTranslations: DefaultTranslationsObject = { success: 'موفقیت', successfullyCreated: '{{label}} با موفقیت ساخته شد.', successfullyDuplicated: '{{label}} با موفقیت رونوشت شد.', + successfullyReindexed: + '{{count}} از {{total}} سند از {{collections}} مجموعه با موفقیت بازنمایه‌سازی شدند.', takeOver: 'تحویل گرفتن', thisLanguage: 'فارسی', titleDeleted: '{{label}} "{{title}}" با موفقیت پاک شد.', diff --git a/packages/translations/src/languages/fr.ts b/packages/translations/src/languages/fr.ts index 5dd8899d4f..db068e1b85 100644 --- a/packages/translations/src/languages/fr.ts +++ b/packages/translations/src/languages/fr.ts @@ -94,6 +94,7 @@ export const frTranslations: DefaultTranslationsObject = { incorrectCollection: 'Collection incorrecte', invalidFileType: 'Type de fichier invalide', invalidFileTypeValue: 'Type de fichier invalide : {{value}}', + invalidRequestArgs: 'Arguments non valides dans la requête : {{args}}', loadingDocument: 'Un problème est survenu lors du chargement du document qui a pour identifiant {{id}}.', localesNotSaved_one: 'Le paramètre régional suivant n’a pas pu être enregistré :', @@ -114,6 +115,8 @@ export const frTranslations: DefaultTranslationsObject = { tokenInvalidOrExpired: 'Le jeton n’est soit pas valide ou a expiré.', tokenNotProvided: 'Jeton non fourni.', unableToDeleteCount: 'Impossible de supprimer {{count}} sur {{total}} {{label}}.', + unableToReindexCollection: + 'Erreur lors de la réindexation de la collection {{collection}}. Opération annulée.', unableToUpdateCount: 'Impossible de mettre à jour {{count}} sur {{total}} {{label}}.', unauthorized: 'Non autorisé, vous devez être connecté pour effectuer cette demande.', unknown: 'Une erreur inconnue s’est produite.', @@ -184,6 +187,7 @@ export const frTranslations: DefaultTranslationsObject = { addBelow: 'Ajoutez ci-dessous', addFilter: 'Ajouter un filtre', adminTheme: 'Thème d’administration', + allCollections: 'Toutes les collections', and: 'Et', anotherUser: 'Un autre utilisateur', anotherUserTakenOver: 'Un autre utilisateur a pris en charge la modification de ce document.', @@ -204,6 +208,12 @@ export const frTranslations: DefaultTranslationsObject = { confirmCopy: 'Confirmer la copie', confirmDeletion: 'Confirmer la suppression', confirmDuplication: 'Confirmer la duplication', + confirmReindex: 'Réindexer toutes les {{collections}} ?', + confirmReindexAll: 'Réindexer toutes les collections ?', + confirmReindexDescription: + 'Cela supprimera les index existants et réindexera les documents dans les collections {{collections}}.', + confirmReindexDescriptionAll: + 'Cela supprimera les index existants et réindexera les documents dans toutes les collections.', copied: 'Copié', copy: 'Copie', copying: 'Copie', @@ -288,6 +298,8 @@ export const frTranslations: DefaultTranslationsObject = { payloadSettings: 'Paramètres de Payload', perPage: 'Par Page: {{limit}}', previous: 'Précédent', + reindex: 'Réindexer', + reindexingAll: 'Réindexation de toutes les {{collections}}.', remove: 'Retirer', reset: 'Réinitialiser', row: 'Ligne', @@ -310,6 +322,8 @@ export const frTranslations: DefaultTranslationsObject = { success: 'Succès', successfullyCreated: '{{label}} créé(e) avec succès.', successfullyDuplicated: '{{label}} dupliqué(e) avec succès.', + successfullyReindexed: + '{{count}} des {{total}} documents des collections {{collections}} ont été réindexés avec succès.', takeOver: 'Prendre en charge', thisLanguage: 'Français', titleDeleted: '{{label}} "{{title}}" supprimé(e) avec succès.', diff --git a/packages/translations/src/languages/he.ts b/packages/translations/src/languages/he.ts index 82d4c8c16d..0419ae7eca 100644 --- a/packages/translations/src/languages/he.ts +++ b/packages/translations/src/languages/he.ts @@ -89,6 +89,7 @@ export const heTranslations: DefaultTranslationsObject = { incorrectCollection: 'אוסף שגוי', invalidFileType: 'סוג קובץ לא תקין', invalidFileTypeValue: 'סוג קובץ לא תקין: {{value}}', + invalidRequestArgs: 'ארגומנטים לא חוקיים הועברו בבקשה: {{args}}', loadingDocument: 'אירעה בעיה בטעינת המסמך עם מזהה {{id}}.', localesNotSaved_one: 'לא ניתן לשמור את השפה הבאה:', localesNotSaved_other: 'לא ניתן לשמור את השפות הבאות:', @@ -108,6 +109,7 @@ export const heTranslations: DefaultTranslationsObject = { tokenInvalidOrExpired: 'הטוקן אינו תקין או שפג תוקפו.', tokenNotProvided: 'טוקן לא סופק.', unableToDeleteCount: 'לא ניתן למחוק {{count}} מתוך {{total}} {{label}}.', + unableToReindexCollection: 'שגיאה בהחזרת אינדקס של אוסף {{collection}}. הפעולה בוטלה.', unableToUpdateCount: 'לא ניתן לעדכן {{count}} מתוך {{total}} {{label}}.', unauthorized: 'אין הרשאה, עליך להתחבר כדי לבצע בקשה זו.', unknown: 'אירעה שגיאה לא ידועה.', @@ -173,6 +175,7 @@ export const heTranslations: DefaultTranslationsObject = { addBelow: 'הוסף מתחת', addFilter: 'הוסף מסנן', adminTheme: 'ערכת נושא ממשק הניהול', + allCollections: 'כל האוספים', and: 'וגם', anotherUser: 'משתמש אחר', anotherUserTakenOver: 'משתמש אחר השתלט על עריכת מסמך זה.', @@ -192,6 +195,11 @@ export const heTranslations: DefaultTranslationsObject = { confirmCopy: 'אשר עותק', confirmDeletion: 'אישור מחיקה', confirmDuplication: 'אישור שכפול', + confirmReindex: 'האם להחזיר אינדקס לכל {{collections}}?', + confirmReindexAll: 'האם להחזיר אינדקס לכל האוספים?', + confirmReindexDescription: + 'זה יסיר את האינדקסים הקיימים ויחזיר אינדקס למסמכים באוספים {{collections}}.', + confirmReindexDescriptionAll: 'זה יסיר את האינדקסים הקיימים ויחזיר אינדקס למסמכים בכל האוספים.', copied: 'הועתק', copy: 'העתק', copying: 'העתקה', @@ -275,6 +283,8 @@ export const heTranslations: DefaultTranslationsObject = { payloadSettings: 'הגדרות מערכת Payload', perPage: '{{limit}} בכל עמוד', previous: 'קודם', + reindex: 'החזרת אינדקס', + reindexingAll: 'החזרת אינדקס לכל {{collections}}.', remove: 'הסר', reset: 'איפוס', row: 'שורה', @@ -297,6 +307,8 @@ export const heTranslations: DefaultTranslationsObject = { success: 'הצלחה', successfullyCreated: '{{label}} נוצר בהצלחה.', successfullyDuplicated: '{{label}} שוכפל בהצלחה.', + successfullyReindexed: + 'הוחזרו בהצלחה אינדקס {{count}} מתוך {{total}} מסמכים מ{{collections}} אוספים.', takeOver: 'קח פיקוד', thisLanguage: 'עברית', titleDeleted: '{{label}} "{{title}}" נמחק בהצלחה.', diff --git a/packages/translations/src/languages/hr.ts b/packages/translations/src/languages/hr.ts index 08e03b5432..b1d84fbc2c 100644 --- a/packages/translations/src/languages/hr.ts +++ b/packages/translations/src/languages/hr.ts @@ -93,6 +93,7 @@ export const hrTranslations: DefaultTranslationsObject = { incorrectCollection: 'Neispravna kolekcija', invalidFileType: 'Neispravan tip datoteke', invalidFileTypeValue: 'Neispravan tip datoteke: {{value}}', + invalidRequestArgs: 'Nevažeći argumenti u zahtjevu: {{args}}', loadingDocument: 'Došlo je do problema pri učitavanju dokumenta čiji je ID {{id}}.', localesNotSaved_one: 'Sljedeću lokalnu postavku nije bilo moguće spremiti:', localesNotSaved_other: 'Sljedeće lokalne postavke nije bilo moguće spremiti:', @@ -112,6 +113,8 @@ export const hrTranslations: DefaultTranslationsObject = { tokenInvalidOrExpired: 'Token je neispravan ili je istekao.', tokenNotProvided: 'Token nije pružen.', unableToDeleteCount: 'Nije moguće izbrisati {{count}} od {{total}} {{label}}.', + unableToReindexCollection: + 'Pogreška pri ponovnom indeksiranju kolekcije {{collection}}. Operacija je prekinuta.', unableToUpdateCount: 'Nije moguće ažurirati {{count}} od {{total}} {{label}}.', unauthorized: 'Neovlašteno, morate biti prijavljeni da biste uputili ovaj zahtjev.', unknown: 'Došlo je do nepoznate pogreške.', @@ -178,6 +181,7 @@ export const hrTranslations: DefaultTranslationsObject = { addBelow: 'Dodaj ispod', addFilter: 'Dodaj filter', adminTheme: 'Administratorska tema', + allCollections: 'Sve kolekcije', and: 'i', anotherUser: 'Drugi korisnik', anotherUserTakenOver: 'Drugi korisnik je preuzeo uređivanje ovog dokumenta.', @@ -197,6 +201,12 @@ export const hrTranslations: DefaultTranslationsObject = { confirmCopy: 'Potvrdi kopiju', confirmDeletion: 'Potvrdi brisanje', confirmDuplication: 'Potvrdi duplikaciju', + confirmReindex: 'Ponovno indeksirati sve {{collections}}?', + confirmReindexAll: 'Ponovno indeksirati sve kolekcije?', + confirmReindexDescription: + 'Ovo će ukloniti postojeće indekse i ponovno indeksirati dokumente u {{collections}} kolekcijama.', + confirmReindexDescriptionAll: + 'Ovo će ukloniti postojeće indekse i ponovno indeksirati dokumente u svim kolekcijama.', copied: 'Kopirano', copy: 'Kopiraj', copying: 'Kopiranje', @@ -281,6 +291,8 @@ export const hrTranslations: DefaultTranslationsObject = { payloadSettings: 'Payload postavke', perPage: 'Po stranici: {{limit}}', previous: 'Prethodni', + reindex: 'Ponovno indeksiraj', + reindexingAll: 'Ponovno indeksiranje svih {{collections}}.', remove: 'Ukloni', reset: 'Ponovno postavi', row: 'Red', @@ -303,6 +315,8 @@ export const hrTranslations: DefaultTranslationsObject = { success: 'Uspjeh', successfullyCreated: '{{label}} uspješno izrađeno.', successfullyDuplicated: '{{label}} uspješno duplicirano.', + successfullyReindexed: + 'Uspješno ponovno indeksirano {{count}} od {{total}} dokumenata iz {{collections}} kolekcija.', takeOver: 'Preuzmi', thisLanguage: 'Hrvatski', titleDeleted: '{{label}} "{{title}}" uspješno izbrisano.', diff --git a/packages/translations/src/languages/hu.ts b/packages/translations/src/languages/hu.ts index 6772ff0458..71779095da 100644 --- a/packages/translations/src/languages/hu.ts +++ b/packages/translations/src/languages/hu.ts @@ -94,6 +94,7 @@ export const huTranslations: DefaultTranslationsObject = { incorrectCollection: 'Helytelen gyűjtemény', invalidFileType: 'Érvénytelen fájltípus', invalidFileTypeValue: 'Érvénytelen fájltípus: {{value}}', + invalidRequestArgs: 'Érvénytelen argumentumok a kérésben: {{args}}', loadingDocument: 'Hiba történt a {{id}} azonosítójú dokumentum betöltésekor.', localesNotSaved_one: 'Az alábbi helyi beállítást nem sikerült menteni:', localesNotSaved_other: 'Az alábbi helyi beállításokat nem sikerült menteni:', @@ -113,6 +114,8 @@ export const huTranslations: DefaultTranslationsObject = { tokenInvalidOrExpired: 'A token érvénytelen vagy lejárt.', tokenNotProvided: 'Token nem biztosított.', unableToDeleteCount: 'Nem sikerült törölni {{count}}/{{total}} {{label}}.', + unableToReindexCollection: + 'Hiba a(z) {{collection}} gyűjtemény újraindexelésekor. A művelet megszakítva.', unableToUpdateCount: 'Nem sikerült frissíteni {{count}}/{{total}} {{label}}.', unauthorized: 'Jogosulatlan, a kéréshez be kell jelentkeznie.', unknown: 'Ismeretlen hiba történt.', @@ -179,6 +182,7 @@ export const huTranslations: DefaultTranslationsObject = { addBelow: 'Hozzáadás lent', addFilter: 'Szűrő hozzáadása', adminTheme: 'Admin téma', + allCollections: 'Minden gyűjtemény', and: 'És', anotherUser: 'Egy másik felhasználó', anotherUserTakenOver: 'Egy másik felhasználó átvette ennek a dokumentumnak a szerkesztését.', @@ -199,6 +203,12 @@ export const huTranslations: DefaultTranslationsObject = { confirmCopy: 'Jóváhagyott másolat', confirmDeletion: 'Törlés megerősítése', confirmDuplication: 'Duplikáció megerősítése', + confirmReindex: 'Újraindexálja az összes {{collections}}-t?', + confirmReindexAll: 'Újraindexálja az összes gyűjteményt?', + confirmReindexDescription: + 'Ez eltávolítja a meglévő indexeket, és újraindexálja a dokumentumokat a {{collections}} gyűjteményekben.', + confirmReindexDescriptionAll: + 'Ez eltávolítja a meglévő indexeket, és újraindexálja a dokumentumokat az összes gyűjteményben.', copied: 'Másolva', copy: 'Másolás', copying: 'Másolás', @@ -283,6 +293,8 @@ export const huTranslations: DefaultTranslationsObject = { payloadSettings: 'Payload beállítások', perPage: 'Oldalanként: {{limit}}', previous: 'Előző', + reindex: 'Újraindexelés', + reindexingAll: 'Az összes {{collections}} újraindexálása folyamatban.', remove: 'Törlés', reset: 'Visszaállítás', row: 'Sor', @@ -305,6 +317,8 @@ export const huTranslations: DefaultTranslationsObject = { success: 'Siker', successfullyCreated: '{{label}} sikeresen létrehozva.', successfullyDuplicated: '{{label}} sikeresen duplikálódott.', + successfullyReindexed: + 'Sikeresen újraindexelve {{total}} dokumentumból {{count}} a(z) {{collections}} gyűjteményekből.', takeOver: 'Átvétel', thisLanguage: 'Magyar', titleDeleted: '{{label}} "{{title}}" sikeresen törölve.', diff --git a/packages/translations/src/languages/it.ts b/packages/translations/src/languages/it.ts index 88394f2820..0c3cd9a35e 100644 --- a/packages/translations/src/languages/it.ts +++ b/packages/translations/src/languages/it.ts @@ -93,6 +93,7 @@ export const itTranslations: DefaultTranslationsObject = { incorrectCollection: 'Collezione non corretta', invalidFileType: 'Tipo di file non valido', invalidFileTypeValue: 'Tipo di file non valido: {{value}}', + invalidRequestArgs: 'Argomenti non validi nella richiesta: {{args}}', loadingDocument: 'Si è verificato un problema durante il caricamento del documento con ID {{id}}.', localesNotSaved_one: 'Non è stato possibile salvare la seguente impostazione locale:', @@ -113,6 +114,8 @@ export const itTranslations: DefaultTranslationsObject = { tokenInvalidOrExpired: 'Il token non è valido o è scaduto.', tokenNotProvided: 'Token non fornito.', unableToDeleteCount: 'Impossibile eliminare {{count}} su {{total}} {{label}}.', + unableToReindexCollection: + 'Errore durante la reindicizzazione della collezione {{collection}}. Operazione annullata.', unableToUpdateCount: 'Impossibile aggiornare {{count}} su {{total}} {{label}}.', unauthorized: 'Non autorizzato, devi essere loggato per effettuare questa richiesta.', unknown: 'Si è verificato un errore sconosciuto.', @@ -180,6 +183,7 @@ export const itTranslations: DefaultTranslationsObject = { addBelow: 'Aggiungi sotto', addFilter: 'Aggiungi Filtro', adminTheme: 'Tema Admin', + allCollections: 'Tutte le collezioni', and: 'E', anotherUser: 'Un altro utente', anotherUserTakenOver: @@ -200,6 +204,12 @@ export const itTranslations: DefaultTranslationsObject = { confirmCopy: 'Conferma copia', confirmDeletion: "Conferma l'eliminazione", confirmDuplication: 'Conferma la duplicazione', + confirmReindex: "Rifare l'indice di tutte le {{collections}}?", + confirmReindexAll: "Rifare l'indice di tutte le collezioni?", + confirmReindexDescription: + "Questo rimuoverà gli indici esistenti e rifarà l'indice dei documenti nelle collezioni {{collections}}.", + confirmReindexDescriptionAll: + "Questo rimuoverà gli indici esistenti e rifarà l'indice dei documenti in tutte le collezioni.", copied: 'Copiato', copy: 'Copia', copying: 'Copia', @@ -283,6 +293,8 @@ export const itTranslations: DefaultTranslationsObject = { payloadSettings: 'Impostazioni di Payload', perPage: 'Per Pagina: {{limit}}', previous: 'Precedente', + reindex: 'Reindicizza', + reindexingAll: "Rifacendo l'indice di tutte le {{collections}}.", remove: 'Rimuovi', reset: 'Ripristina', row: 'Riga', @@ -305,6 +317,8 @@ export const itTranslations: DefaultTranslationsObject = { success: 'Successo', successfullyCreated: '{{label}} creato con successo.', successfullyDuplicated: '{{label}} duplicato con successo.', + successfullyReindexed: + 'Reindicizzati con successo {{count}} di {{total}} documenti da {{collections}} collezioni.', takeOver: 'Prendi il controllo', thisLanguage: 'Italiano', titleDeleted: '{{label}} {{title}} eliminato con successo.', diff --git a/packages/translations/src/languages/ja.ts b/packages/translations/src/languages/ja.ts index f5ea60f538..aabbc0daa1 100644 --- a/packages/translations/src/languages/ja.ts +++ b/packages/translations/src/languages/ja.ts @@ -93,6 +93,7 @@ export const jaTranslations: DefaultTranslationsObject = { incorrectCollection: '不正なコレクション', invalidFileType: '無効なファイル形式', invalidFileTypeValue: '無効なファイル形式: {{value}}', + invalidRequestArgs: 'リクエストに無効な引数が渡されました: {{args}}', loadingDocument: 'IDが {{id}} のデータを読み込む際に問題が発生しました。', localesNotSaved_one: '次のロケールを保存できませんでした:', localesNotSaved_other: '次のロケールを保存できませんでした:', @@ -112,6 +113,8 @@ export const jaTranslations: DefaultTranslationsObject = { tokenInvalidOrExpired: 'トークンが無効、または、有効期限が切れています。', tokenNotProvided: 'トークンが提供されていません。', unableToDeleteCount: '{{total}} {{label}} から {{count}} を削除できません。', + unableToReindexCollection: + 'コレクション {{collection}} の再インデックス中にエラーが発生しました。操作は中止されました。', unableToUpdateCount: '{{total}} {{label}} のうち {{count}} 個を更新できません。', unauthorized: '認証されていません。このリクエストを行うにはログインが必要です。', unknown: '不明なエラーが発生しました。', @@ -178,6 +181,7 @@ export const jaTranslations: DefaultTranslationsObject = { addBelow: '下に追加', addFilter: '絞り込みを追加', adminTheme: '管理画面のテーマ', + allCollections: 'すべてのコレクション', and: 'かつ', anotherUser: '別のユーザー', anotherUserTakenOver: '別のユーザーがこのドキュメントの編集を引き継ぎました。', @@ -197,6 +201,12 @@ export const jaTranslations: DefaultTranslationsObject = { confirmCopy: 'コピーを確認します', confirmDeletion: '削除の確認', confirmDuplication: '複製の確認', + confirmReindex: 'すべての{{collections}}を再インデックスしますか?', + confirmReindexAll: 'すべてのコレクションを再インデックスしますか?', + confirmReindexDescription: + 'これにより既存のインデックスが削除され、{{collections}}コレクション内のドキュメントが再インデックスされます。', + confirmReindexDescriptionAll: + 'これにより既存のインデックスが削除され、すべてのコレクション内のドキュメントが再インデックスされます。', copied: 'コピーしました', copy: 'コピー', copying: 'コピーする', @@ -281,6 +291,8 @@ export const jaTranslations: DefaultTranslationsObject = { payloadSettings: 'Payload 設定', perPage: '表示件数: {{limit}}', previous: '前の', + reindex: '再インデックス', + reindexingAll: 'すべての{{collections}}を再インデックスしています。', remove: '削除', reset: 'リセット', row: '列', @@ -303,6 +315,8 @@ export const jaTranslations: DefaultTranslationsObject = { success: '成功', successfullyCreated: '{{label}} が作成されました。', successfullyDuplicated: '{{label}} が複製されました。', + successfullyReindexed: + '{{collections}} コレクションから {{total}} 件中 {{count}} 件のドキュメントが正常に再インデックスされました。', takeOver: '引き継ぐ', thisLanguage: 'Japanese', titleDeleted: '{{label}} "{{title}}" が削除されました。', diff --git a/packages/translations/src/languages/ko.ts b/packages/translations/src/languages/ko.ts index c4d9f7e807..65ebcee7cc 100644 --- a/packages/translations/src/languages/ko.ts +++ b/packages/translations/src/languages/ko.ts @@ -92,6 +92,7 @@ export const koTranslations: DefaultTranslationsObject = { incorrectCollection: '잘못된 컬렉션', invalidFileType: '잘못된 파일 형식', invalidFileTypeValue: '잘못된 파일 형식: {{value}}', + invalidRequestArgs: '요청에 잘못된 인수가 전달되었습니다: {{args}}', loadingDocument: 'ID가 {{id}}인 문서를 불러오는 중에 문제가 발생했습니다.', localesNotSaved_one: '다음 로케일을 저장할 수 없습니다:', localesNotSaved_other: '다음 로케일들을 저장할 수 없습니다:', @@ -111,6 +112,8 @@ export const koTranslations: DefaultTranslationsObject = { tokenInvalidOrExpired: '토큰이 유효하지 않거나 만료되었습니다.', tokenNotProvided: '토큰이 제공되지 않았습니다.', unableToDeleteCount: '총 {{total}}개 중 {{count}}개의 {{label}}을(를) 삭제할 수 없습니다.', + unableToReindexCollection: + '{{collection}} 컬렉션의 재인덱싱 중 오류가 발생했습니다. 작업이 중단되었습니다.', unableToUpdateCount: '총 {{total}}개 중 {{count}}개의 {{label}}을(를) 업데이트할 수 없습니다.', unauthorized: '권한 없음, 이 요청을 수행하려면 로그인해야 합니다.', unknown: '알 수 없는 오류가 발생했습니다.', @@ -177,6 +180,7 @@ export const koTranslations: DefaultTranslationsObject = { addBelow: '아래에 추가', addFilter: '필터 추가', adminTheme: '관리자 테마', + allCollections: '모든 컬렉션', and: '및', anotherUser: '다른 사용자', anotherUserTakenOver: '다른 사용자가 이 문서의 편집을 인수했습니다.', @@ -196,6 +200,12 @@ export const koTranslations: DefaultTranslationsObject = { confirmCopy: '복사 확인', confirmDeletion: '삭제하시겠습니까?', confirmDuplication: '복제하시겠습니까?', + confirmReindex: '모든 {{collections}}를 다시 인덱싱하시겠습니까?', + confirmReindexAll: '모든 컬렉션을 다시 인덱싱하시겠습니까?', + confirmReindexDescription: + '이 작업은 기존 인덱스를 삭제하고 {{collections}} 컬렉션 내의 문서를 다시 인덱싱합니다.', + confirmReindexDescriptionAll: + '이 작업은 기존 인덱스를 삭제하고 모든 컬렉션 내의 문서를 다시 인덱싱합니다.', copied: '복사됨', copy: '복사', copying: '복사하기', @@ -279,6 +289,8 @@ export const koTranslations: DefaultTranslationsObject = { payloadSettings: 'Payload 설정', perPage: '페이지당 개수: {{limit}}', previous: '이전', + reindex: '재인덱싱', + reindexingAll: '모든 {{collections}}를 다시 인덱싱하는 중입니다.', remove: '제거', reset: '초기화', row: '행', @@ -301,6 +313,8 @@ export const koTranslations: DefaultTranslationsObject = { success: '성공', successfullyCreated: '{{label}}이(가) 생성되었습니다.', successfullyDuplicated: '{{label}}이(가) 복제되었습니다.', + successfullyReindexed: + '{{collections}} 컬렉션에서 {{total}} 문서 중 {{count}} 문서가 성공적으로 재인덱싱되었습니다.', takeOver: '인수하기', thisLanguage: '한국어', titleDeleted: '{{label}} "{{title}}"을(를) 삭제했습니다.', diff --git a/packages/translations/src/languages/my.ts b/packages/translations/src/languages/my.ts index 7fe50c43d6..b7ffcf7bb3 100644 --- a/packages/translations/src/languages/my.ts +++ b/packages/translations/src/languages/my.ts @@ -92,6 +92,7 @@ export const myTranslations: DefaultTranslationsObject = { incorrectCollection: 'မှားယွင်းသော စုစည်းမှု', invalidFileType: 'မမှန်ကန်သော ဖိုင်အမျိုးအစား', invalidFileTypeValue: 'မမှန်ကန်သော ဖိုင်အမျိုးအစား: {{value}}', + invalidRequestArgs: 'တောင်းဆိုမှုတွင် မှားယွင်းသော အကြောင်းပြချက်များ ပေးပို့ထားသည်: {{args}}', loadingDocument: '{{id}} ID ဖြင့် ဖိုင်ကို ဖွင့်ရာတွင် ပြဿနာရှိနေသည်။', localesNotSaved_one: 'အောက်ပါ ဒေသသတ်မှတ်ချက်ကို သိမ်းဆည်း၍ မရပါ။', localesNotSaved_other: 'အောက်ပါ ဒေသသတ်မှတ်ချက်များကို သိမ်းဆည်း၍ မရပါ။', @@ -111,6 +112,8 @@ export const myTranslations: DefaultTranslationsObject = { tokenInvalidOrExpired: 'တိုကင်သည် မမှန်ကန်ပါ သို့မဟုတ် သက်တမ်းကုန်သွားပါပြီ။', tokenNotProvided: 'Token မပေးထားပါ။', unableToDeleteCount: '{{total}} {{label}} မှ {{count}} ကို ဖျက်၍မရပါ။', + unableToReindexCollection: + '{{collection}} စုစည်းမှုကို ပြန်လည်အညွှန်းပြုလုပ်ခြင်း အမှားရှိနေသည်။ လုပ်ဆောင်မှုကို ဖျက်သိမ်းခဲ့သည်။', unableToUpdateCount: '{{total}} {{label}} မှ {{count}} ကို အပ်ဒိတ်လုပ်၍မရပါ။', unauthorized: 'အခွင့်မရှိပါ။ ဤတောင်းဆိုချက်ကို လုပ်ဆောင်နိုင်ရန် သင်သည် လော့ဂ်အင်ဝင်ရပါမည်။', unknown: 'ဘာမှန်းမသိသော error တက်သွားပါသည်။', @@ -179,6 +182,7 @@ export const myTranslations: DefaultTranslationsObject = { addBelow: 'အောက်တွင်ထည့်ပါ။', addFilter: 'ဇကာထည့်ပါ။', adminTheme: 'အက်ပ်ဒိုင်များစပ်စွာ', + allCollections: 'အားလုံးစုစည်းမှုများ', and: 'နှင့်', anotherUser: 'တစ်ခြားအသုံးပြုသူ', anotherUserTakenOver: 'တစ်ခြားအသုံးပြုသူသည်ဤစာရွက်စာတမ်းကိုပြင်ဆင်မှုကိုရယူလိုက်သည်။', @@ -199,6 +203,12 @@ export const myTranslations: DefaultTranslationsObject = { confirmCopy: 'အောင်မြင်စေသည့်ကူးထားပြီးအတည်ပြုပါ', confirmDeletion: 'ဖျက်တော့မယ်နော်။', confirmDuplication: 'ပုံတူပွားခြင်းကို အတည်ပြုပါ။', + confirmReindex: 'အပေါ် {{collections}} အားလုံးကို ထပ်လိပ်ပါသလား?', + confirmReindexAll: 'အပေါ် ကော်လက်ရှင်းများအားလုံးကို ထပ်လိပ်ပါသလား?', + confirmReindexDescription: + 'ဤသည်သည် ရှိပြီးသား အညွှန်းများကို ဖျက်ပစ်ပြီး {{collections}} ကော်လက်ရှင်းများတွင် စာရွက်များကို ထပ်လိပ်ပါလိမ့်မည်။', + confirmReindexDescriptionAll: + 'ဤသည်သည် ရှိပြီးသား အညွှန်းများကို ဖျက်ပစ်ပြီး အားလုံးသော ကော်လက်ရှင်းများတွင် စာရွက်များကို ထပ်လိပ်ပါလိမ့်မည်။', copied: 'ကူးယူပြီးပြီ။', copy: 'ကူးယူမည်။', copying: 'ကူးယူခြင်း', @@ -283,6 +293,8 @@ export const myTranslations: DefaultTranslationsObject = { payloadSettings: 'ရွေးချယ်စရာများ', perPage: 'စာမျက်နှာ အလိုက်: {{limit}}', previous: 'ယခင်', + reindex: 'ပြန်လည်အညွှန်းပြုလုပ်ပါ', + reindexingAll: 'အပေါ် {{collections}} အားလုံးကို ထပ်လိပ်နေပါသည်။', remove: 'ဖယ်ရှားမည်။', reset: 'Tetapkan semula', row: 'အတန်း', @@ -305,6 +317,8 @@ export const myTranslations: DefaultTranslationsObject = { success: 'အောင်မြင်မှု', successfullyCreated: '{{label}} အောင်မြင်စွာဖန်တီးခဲ့သည်။', successfullyDuplicated: '{{label}} အောင်မြင်စွာ ပုံတူပွားခဲ့သည်။', + successfullyReindexed: + '{{collections}} စုစည်းမှုများမှ စာရွက်စာတမ်း {{total}} ခုအနက် {{count}} ခုကို အောင်မြင်စွာ ပြန်လည်အညွှန်းပြုလုပ်ခဲ့ပါသည်။', takeOver: 'တာဝန်ယူပါ', thisLanguage: 'မြန်မာစာ', titleDeleted: '{{label}} {{title}} အောင်မြင်စွာ ဖျက်သိမ်းခဲ့သည်။', diff --git a/packages/translations/src/languages/nb.ts b/packages/translations/src/languages/nb.ts index 05e317e49c..38b0b813aa 100644 --- a/packages/translations/src/languages/nb.ts +++ b/packages/translations/src/languages/nb.ts @@ -92,6 +92,7 @@ export const nbTranslations: DefaultTranslationsObject = { incorrectCollection: 'Ugyldig samling', invalidFileType: 'Ugyldig filtype', invalidFileTypeValue: 'Ugyldig filtype: {{value}}', + invalidRequestArgs: 'Ugyldige argumenter i forespørselen: {{args}}', loadingDocument: 'Det oppstod et problem under lasting av dokumentet med ID {{id}}.', localesNotSaved_one: 'Følgende lokalisering kunne ikke lagres:', localesNotSaved_other: 'Følgende lokaliseringer kunne ikke lagres:', @@ -111,6 +112,8 @@ export const nbTranslations: DefaultTranslationsObject = { tokenInvalidOrExpired: 'Token er enten ugyldig eller har utløpt.', tokenNotProvided: 'Token ikke angitt.', unableToDeleteCount: 'Kan ikke slette {{count}} av {{total}} {{label}}.', + unableToReindexCollection: + 'Feil ved reindeksering av samlingen {{collection}}. Operasjonen ble avbrutt.', unableToUpdateCount: 'Kan ikke oppdatere {{count}} av {{total}} {{label}}.', unauthorized: 'Uautorisert, du må være innlogget for å gjøre denne forespørselen.', unknown: 'En ukjent feil har oppstått.', @@ -177,6 +180,7 @@ export const nbTranslations: DefaultTranslationsObject = { addBelow: 'Legg til under', addFilter: 'Legg til filter', adminTheme: 'Admin-tema', + allCollections: 'Alle samlinger', and: 'Og', anotherUser: 'En annen bruker', anotherUserTakenOver: 'En annen bruker har tatt over redigeringen av dette dokumentet.', @@ -197,6 +201,12 @@ export const nbTranslations: DefaultTranslationsObject = { confirmCopy: 'Bekreft kopi', confirmDeletion: 'Bekreft sletting', confirmDuplication: 'Bekreft duplisering', + confirmReindex: 'Reindekser alle {{collections}}?', + confirmReindexAll: 'Reindekser alle samlinger?', + confirmReindexDescription: + 'Dette vil fjerne eksisterende indekser og reindeksere dokumentene i {{collections}}-samlingene.', + confirmReindexDescriptionAll: + 'Dette vil fjerne eksisterende indekser og reindeksere dokumentene i alle samlinger.', copied: 'Kopiert', copy: 'Kopiér', copying: 'Kopiering', @@ -281,6 +291,8 @@ export const nbTranslations: DefaultTranslationsObject = { payloadSettings: 'Payload-innstillinger', perPage: 'Per side: {{limit}}', previous: 'Forrige', + reindex: 'Reindekser', + reindexingAll: 'Reindekserer alle {{collections}}.', remove: 'Fjern', reset: 'Tilbakestill', row: 'Rad', @@ -303,6 +315,8 @@ export const nbTranslations: DefaultTranslationsObject = { success: 'Suksess', successfullyCreated: '{{label}} ble opprettet.', successfullyDuplicated: '{{label}} ble duplisert.', + successfullyReindexed: + 'Vellykket reindeksering av {{count}} av {{total}} dokumenter fra {{collections}} samlinger.', takeOver: 'Ta over', thisLanguage: 'Norsk', titleDeleted: '{{label}} "{{title}}" ble slettet.', diff --git a/packages/translations/src/languages/nl.ts b/packages/translations/src/languages/nl.ts index 4954ec95bf..05ab5fc98b 100644 --- a/packages/translations/src/languages/nl.ts +++ b/packages/translations/src/languages/nl.ts @@ -93,6 +93,7 @@ export const nlTranslations: DefaultTranslationsObject = { incorrectCollection: 'Ongeldige collectie', invalidFileType: 'Ongeldig bestandstype', invalidFileTypeValue: 'Ongeldig bestandstype: {{value}}', + invalidRequestArgs: 'Ongeldige argumenten in verzoek: {{args}}', loadingDocument: 'Er was een probleem met het laden van het document met ID {{id}}.', localesNotSaved_one: 'De volgende taalinstelling kon niet worden opgeslagen:', localesNotSaved_other: 'De volgende taalinstellingen konden niet worden opgeslagen:', @@ -112,6 +113,8 @@ export const nlTranslations: DefaultTranslationsObject = { tokenInvalidOrExpired: 'Token is ongeldig of verlopen.', tokenNotProvided: 'Token niet verstrekt.', unableToDeleteCount: 'Kan {{count}} van {{total}} {{label}} niet verwijderen.', + unableToReindexCollection: + 'Fout bij het herindexeren van de collectie {{collection}}. De operatie is afgebroken.', unableToUpdateCount: 'Kan {{count}} van {{total}} {{label}} niet updaten.', unauthorized: 'Ongeautoriseerd, u moet ingelogd zijn om dit verzoek te doen.', unknown: 'Er is een onbekende fout opgetreden.', @@ -179,6 +182,7 @@ export const nlTranslations: DefaultTranslationsObject = { addBelow: 'Onderaan toevoegen', addFilter: 'Filter toevoegen', adminTheme: 'Adminthema', + allCollections: 'Alle collecties', and: 'En', anotherUser: 'Een andere gebruiker', anotherUserTakenOver: 'Een andere gebruiker heeft de bewerking van dit document overgenomen.', @@ -199,6 +203,12 @@ export const nlTranslations: DefaultTranslationsObject = { confirmCopy: 'Bevestig kopie', confirmDeletion: 'Bevestig verwijdering', confirmDuplication: 'Bevestig duplicatie', + confirmReindex: 'Alle {{collections}} opnieuw indexeren?', + confirmReindexAll: 'Alle collecties opnieuw indexeren?', + confirmReindexDescription: + 'Dit verwijdert bestaande indexen en indexeert de documenten in de {{collections}}-collecties opnieuw.', + confirmReindexDescriptionAll: + 'Dit verwijdert bestaande indexen en indexeert de documenten in alle collecties opnieuw.', copied: 'Gekopieerd', copy: 'Kopiëren', copying: 'Kopiëren', @@ -283,6 +293,8 @@ export const nlTranslations: DefaultTranslationsObject = { payloadSettings: 'Payload Instellingen', perPage: 'Per pagina: {{limit}}', previous: 'Vorige', + reindex: 'Herindexeren', + reindexingAll: 'Bezig met het opnieuw indexeren van alle {{collections}}.', remove: 'Verwijderen', reset: 'Resetten', row: 'Rij', @@ -305,6 +317,8 @@ export const nlTranslations: DefaultTranslationsObject = { success: 'Succes', successfullyCreated: '{{label}} succesvol aangemaakt.', successfullyDuplicated: '{{label}} succesvol gedupliceerd.', + successfullyReindexed: + 'Succesvol {{count}} van {{total}} documenten uit {{collections}} collecties herindexeerd.', takeOver: 'Overnemen', thisLanguage: 'Nederlands', titleDeleted: '{{label}} "{{title}}" succesvol verwijderd.', diff --git a/packages/translations/src/languages/pl.ts b/packages/translations/src/languages/pl.ts index 6bfc7677b4..5b3bc821be 100644 --- a/packages/translations/src/languages/pl.ts +++ b/packages/translations/src/languages/pl.ts @@ -92,6 +92,7 @@ export const plTranslations: DefaultTranslationsObject = { incorrectCollection: 'Nieprawidłowa kolekcja', invalidFileType: 'Nieprawidłowy typ pliku', invalidFileTypeValue: 'Nieprawidłowy typ pliku: {{value}}', + invalidRequestArgs: 'Nieprawidłowe argumenty w żądaniu: {{args}}', loadingDocument: 'Wystapił problem podczas ładowania dokumentu o ID {{id}}.', localesNotSaved_one: 'Następującej lokalizacji nie można było zapisać:', localesNotSaved_other: 'Następujących lokalizacji nie można było zapisać:', @@ -111,6 +112,8 @@ export const plTranslations: DefaultTranslationsObject = { tokenInvalidOrExpired: 'Token jest nieprawidłowy lub wygasł.', tokenNotProvided: 'Token nie został dostarczony.', unableToDeleteCount: 'Nie można usunąć {{count}} z {{total}} {{label}}.', + unableToReindexCollection: + 'Błąd podczas ponownego indeksowania kolekcji {{collection}}. Operacja została przerwana.', unableToUpdateCount: 'Nie można zaktualizować {{count}} z {{total}} {{label}}.', unauthorized: 'Brak dostępu, musisz być zalogowany.', unknown: 'Wystąpił nieznany błąd.', @@ -177,6 +180,7 @@ export const plTranslations: DefaultTranslationsObject = { addBelow: 'Dodaj poniżej', addFilter: 'Dodaj filtr', adminTheme: 'Motyw administratora', + allCollections: 'Wszystkie kolekcje', and: 'i', anotherUser: 'Inny użytkownik', anotherUserTakenOver: 'Inny użytkownik przejął edycję tego dokumentu.', @@ -197,6 +201,12 @@ export const plTranslations: DefaultTranslationsObject = { confirmCopy: 'Potwierdź kopię', confirmDeletion: 'Potwierdź usunięcie', confirmDuplication: 'Potwierdź duplikację', + confirmReindex: 'Ponownie zaindeksować wszystkie {{collections}}?', + confirmReindexAll: 'Ponownie zaindeksować wszystkie kolekcje?', + confirmReindexDescription: + 'Spowoduje to usunięcie istniejących indeksów i ponowne zaindeksowanie dokumentów w kolekcjach {{collections}}.', + confirmReindexDescriptionAll: + 'Spowoduje to usunięcie istniejących indeksów i ponowne zaindeksowanie dokumentów we wszystkich kolekcjach.', copied: 'Skopiowano', copy: 'Skopiuj', copying: 'Kopiowanie', @@ -281,6 +291,8 @@ export const plTranslations: DefaultTranslationsObject = { payloadSettings: 'Ustawienia Payload', perPage: 'Na stronę: {{limit}}', previous: 'Poprzedni', + reindex: 'Ponowne indeksowanie', + reindexingAll: 'Ponowne indeksowanie wszystkich {{collections}}.', remove: 'Usuń', reset: 'Zresetuj', row: 'Wiersz', @@ -303,6 +315,8 @@ export const plTranslations: DefaultTranslationsObject = { success: 'Sukces', successfullyCreated: 'Pomyślnie utworzono {{label}}.', successfullyDuplicated: 'Pomyślnie zduplikowano {{label}}', + successfullyReindexed: + 'Pomyślnie ponownie zindeksowano {{count}} z {{total}} dokumentów z kolekcji {{collections}}.', takeOver: 'Przejąć', thisLanguage: 'Polski', titleDeleted: 'Pomyślnie usunięto {{label}} {{title}}', diff --git a/packages/translations/src/languages/pt.ts b/packages/translations/src/languages/pt.ts index 28208a95fc..e9e5bc0f3d 100644 --- a/packages/translations/src/languages/pt.ts +++ b/packages/translations/src/languages/pt.ts @@ -93,6 +93,7 @@ export const ptTranslations: DefaultTranslationsObject = { incorrectCollection: 'Coleção Incorreta', invalidFileType: 'Tipo de arquivo inválido', invalidFileTypeValue: 'Tipo de arquivo inválido: {{value}}', + invalidRequestArgs: 'Argumentos inválidos passados na solicitação: {{args}}', loadingDocument: 'Ocorreu um problema ao carregar o documento com ID {{id}}.', localesNotSaved_one: 'A seguinte configuração regional não pôde ser salva:', localesNotSaved_other: 'As seguintes configurações regionais não puderam ser salvas:', @@ -112,6 +113,7 @@ export const ptTranslations: DefaultTranslationsObject = { tokenInvalidOrExpired: 'Token expirado ou inválido.', tokenNotProvided: 'Token não fornecido.', unableToDeleteCount: 'Não é possível excluir {{count}} de {{total}} {{label}}.', + unableToReindexCollection: 'Erro ao reindexar a coleção {{collection}}. Operação abortada.', unableToUpdateCount: 'Não foi possível atualizar {{count}} de {{total}} {{label}}.', unauthorized: 'Não autorizado. Você deve estar logado para fazer essa requisição', unknown: 'Ocorreu um erro desconhecido.', @@ -178,6 +180,7 @@ export const ptTranslations: DefaultTranslationsObject = { addBelow: 'Adicionar abaixo', addFilter: 'Adicionar Filtro', adminTheme: 'Tema do Admin', + allCollections: 'Todas as Coleções', and: 'E', anotherUser: 'Outro usuário', anotherUserTakenOver: 'Outro usuário assumiu a edição deste documento.', @@ -198,6 +201,12 @@ export const ptTranslations: DefaultTranslationsObject = { confirmCopy: 'Confirme cópia', confirmDeletion: 'Confirmar exclusão', confirmDuplication: 'Confirmar duplicação', + confirmReindex: 'Reindexar todas as {{collections}}?', + confirmReindexAll: 'Reindexar todas as coleções?', + confirmReindexDescription: + 'Isso removerá os índices existentes e reindexará os documentos nas coleções {{collections}}.', + confirmReindexDescriptionAll: + 'Isso removerá os índices existentes e reindexará os documentos em todas as coleções.', copied: 'Copiado', copy: 'Copiar', copying: 'Copiando', @@ -282,6 +291,8 @@ export const ptTranslations: DefaultTranslationsObject = { payloadSettings: 'Configurações do Payload', perPage: 'Itens por Página: {{limit}}', previous: 'Anterior', + reindex: 'Reindexar', + reindexingAll: 'Reindexando todas as {{collections}}.', remove: 'Remover', reset: 'Redefinir', row: 'Linha', @@ -304,6 +315,8 @@ export const ptTranslations: DefaultTranslationsObject = { success: 'Sucesso', successfullyCreated: '{{label}} criado com sucesso.', successfullyDuplicated: '{{label}} duplicado com sucesso.', + successfullyReindexed: + 'Reindexação concluída com sucesso de {{count}} de {{total}} documentos das coleções {{collections}}.', takeOver: 'Assumir', thisLanguage: 'Português', titleDeleted: '{{label}} {{title}} excluído com sucesso.', diff --git a/packages/translations/src/languages/ro.ts b/packages/translations/src/languages/ro.ts index 95637644fc..4ac8072ba2 100644 --- a/packages/translations/src/languages/ro.ts +++ b/packages/translations/src/languages/ro.ts @@ -94,6 +94,7 @@ export const roTranslations: DefaultTranslationsObject = { incorrectCollection: 'Colecție incorectă', invalidFileType: 'Tip de fișier invalid', invalidFileTypeValue: 'Tip de fișier invalid: {{value}}', + invalidRequestArgs: 'Argumente invalide transmise în cerere: {{args}}', loadingDocument: 'A existat o problemă la încărcarea documentului cu ID-ul de {{id}}.', localesNotSaved_one: 'Următoarea localizare nu a putut fi salvată:', localesNotSaved_other: 'Următoarele localizări nu au putut fi salvate:', @@ -113,6 +114,8 @@ export const roTranslations: DefaultTranslationsObject = { tokenInvalidOrExpired: 'Tokenul este invalid sau a expirat.', tokenNotProvided: 'Tokenul nu a fost furnizat.', unableToDeleteCount: 'Nu se poate șterge {{count}} din {{total}} {{label}}.', + unableToReindexCollection: + 'Eroare la reindexarea colecției {{collection}}. Operațiune anulată.', unableToUpdateCount: 'Nu se poate șterge {{count}} din {{total}} {{label}}.', unauthorized: 'neautorizat, trebuie să vă conectați pentru a face această cerere.', unknown: 'S-a produs o eroare necunoscută.', @@ -181,6 +184,7 @@ export const roTranslations: DefaultTranslationsObject = { addBelow: 'Adaugă mai jos', addFilter: 'Adaugă filtru', adminTheme: 'Tema Admin', + allCollections: 'Toate Colecțiile', and: 'Şi', anotherUser: 'Un alt utilizator', anotherUserTakenOver: 'Un alt utilizator a preluat editarea acestui document.', @@ -201,6 +205,12 @@ export const roTranslations: DefaultTranslationsObject = { confirmCopy: 'Confirmă copierea', confirmDeletion: 'Confirmați ștergerea', confirmDuplication: 'Confirmați duplicarea', + confirmReindex: 'Reindexați toate {{collections}}?', + confirmReindexAll: 'Reindexați toate colecțiile?', + confirmReindexDescription: + 'Aceasta va elimina indexurile existente și va reindexa documentele din colecțiile {{collections}}.', + confirmReindexDescriptionAll: + 'Aceasta va elimina indexurile existente și va reindexa documentele din toate colecțiile.', copied: 'Copiat', copy: 'Copiați', copying: 'Copiere', @@ -285,6 +295,8 @@ export const roTranslations: DefaultTranslationsObject = { payloadSettings: 'Setări de Payload', perPage: 'Pe pagină: {{limit}}', previous: 'Anterior', + reindex: 'Reindexare', + reindexingAll: 'Reindexarea tuturor {{collections}}.', remove: 'Eliminați', reset: 'Resetare', row: 'Rând', @@ -307,6 +319,8 @@ export const roTranslations: DefaultTranslationsObject = { success: 'Succes', successfullyCreated: '{{label}} creat(ă) cu succes.', successfullyDuplicated: '{{label}} duplicat(ă) cu succes.', + successfullyReindexed: + 'Reindexare realizată cu succes pentru {{count}} din {{total}} documente din colecțiile {{collections}}.', takeOver: 'Preia controlul', thisLanguage: 'Română', titleDeleted: '{{label}} "{{title}}" șters cu succes.', diff --git a/packages/translations/src/languages/rs.ts b/packages/translations/src/languages/rs.ts index d807f4702e..f8f28c3a1b 100644 --- a/packages/translations/src/languages/rs.ts +++ b/packages/translations/src/languages/rs.ts @@ -92,6 +92,7 @@ export const rsTranslations: DefaultTranslationsObject = { incorrectCollection: 'Невалидна колекција', invalidFileType: 'Невалидан тип датотеке', invalidFileTypeValue: 'Невалидан тип датотеке: {{value}}', + invalidRequestArgs: 'Неважећи аргументи прослеђени у захтеву: {{args}}', loadingDocument: 'Постоји проблем при учитавању документа чији је ИД {{id}}.', localesNotSaved_one: 'Следеће локалне поставке није могло бити сачувано:', localesNotSaved_other: 'Следеће локалне поставке нису могле бити сачуване:', @@ -111,6 +112,8 @@ export const rsTranslations: DefaultTranslationsObject = { tokenInvalidOrExpired: 'Токен је невалидан или је истекао.', tokenNotProvided: 'Token nije dostavljen.', unableToDeleteCount: 'Није могуће избрисати {{count}} од {{total}} {{label}}.', + unableToReindexCollection: + 'Грешка при реиндексирању колекције {{collection}}. Операција је прекинута.', unableToUpdateCount: 'Није могуће ажурирати {{count}} од {{total}} {{label}}.', unauthorized: 'Нисте ауторизовани да бисте упутили овај захтев.', unknown: 'Дошло је до непознате грешке.', @@ -177,6 +180,7 @@ export const rsTranslations: DefaultTranslationsObject = { addBelow: 'Додај испод', addFilter: 'Додај филтер', adminTheme: 'Администраторска тема', + allCollections: 'Све Колекције', and: 'И', anotherUser: 'Други корисник', anotherUserTakenOver: 'Други корисник је преузео уређивање овог документа.', @@ -196,6 +200,12 @@ export const rsTranslations: DefaultTranslationsObject = { confirmCopy: 'Potvrda kopiranja', confirmDeletion: 'Потврди брисање', confirmDuplication: 'Потврди дупликацију', + confirmReindex: 'Ponovo indeksirati sve {{collections}}?', + confirmReindexAll: 'Ponovo indeksirati sve kolekcije?', + confirmReindexDescription: + 'Ovo će ukloniti postojeće indekse i ponovo indeksirati dokumente u kolekcijama {{collections}}.', + confirmReindexDescriptionAll: + 'Ovo će ukloniti postojeće indekse i ponovo indeksirati dokumente u svim kolekcijama.', copied: 'Копирано', copy: 'Копирај', copying: 'Kopiranje', @@ -280,6 +290,8 @@ export const rsTranslations: DefaultTranslationsObject = { payloadSettings: 'Payload поставке', perPage: 'По страници: {{limit}}', previous: 'Prethodni', + reindex: 'Реиндексирај', + reindexingAll: 'Ponovno indeksiranje svih {{collections}}.', remove: 'Уклони', reset: 'Поново постави', row: 'Ред', @@ -302,6 +314,8 @@ export const rsTranslations: DefaultTranslationsObject = { success: 'Uspeh', successfullyCreated: '{{label}} успешно креирано.', successfullyDuplicated: '{{label}} успешно дуплицирано.', + successfullyReindexed: + 'Успешно је реиндексирано {{count}} од {{total}} докумената из {{collections}} колекција.', takeOver: 'Превузети', thisLanguage: 'Српски (ћирилица)', titleDeleted: '{{label}} "{{title}}" успешно обрисано.', diff --git a/packages/translations/src/languages/rsLatin.ts b/packages/translations/src/languages/rsLatin.ts index 545ebfaab4..51d9ca72bc 100644 --- a/packages/translations/src/languages/rsLatin.ts +++ b/packages/translations/src/languages/rsLatin.ts @@ -92,6 +92,7 @@ export const rsLatinTranslations: DefaultTranslationsObject = { incorrectCollection: 'Nevalidna kolekcija', invalidFileType: 'Nevalidan tip datoteke', invalidFileTypeValue: 'Nevalidan tip datoteke: {{value}}', + invalidRequestArgs: 'Nevažeći argumenti prosleđeni u zahtevu: {{args}}', loadingDocument: 'Postoji problem pri učitavanju dokumenta čiji je ID {{id}}.', localesNotSaved_one: 'Nije moglo da se sačuva sledeće lokalno podešavanje:', localesNotSaved_other: 'Nisu mogla da se sačuvaju sledeća lokalna podešavanja:', @@ -111,6 +112,8 @@ export const rsLatinTranslations: DefaultTranslationsObject = { tokenInvalidOrExpired: 'Token je nevalidan ili je istekao.', tokenNotProvided: 'Token nije obezbeđen.', unableToDeleteCount: 'Nije moguće izbrisati {{count}} od {{total}} {{label}}.', + unableToReindexCollection: + 'Greška pri reindeksiranju kolekcije {{collection}}. Operacija je prekinuta.', unableToUpdateCount: 'Nije moguće ažurirati {{count}} od {{total}} {{label}}.', unauthorized: 'Niste autorizovani da biste uputili ovaj zahtev.', unknown: 'Došlo je do nepoznate greške.', @@ -177,6 +180,7 @@ export const rsLatinTranslations: DefaultTranslationsObject = { addBelow: 'Dodaj ispod', addFilter: 'Dodaj filter', adminTheme: 'Administratorska tema', + allCollections: 'Sve Kolekcije', and: 'I', anotherUser: 'Drugi korisnik', anotherUserTakenOver: 'Drugi korisnik je preuzeo uređivanje ovog dokumenta.', @@ -196,6 +200,12 @@ export const rsLatinTranslations: DefaultTranslationsObject = { confirmCopy: 'Potvrdi kopiju', confirmDeletion: 'Potvrdi brisanje', confirmDuplication: 'Potvrdi duplikaciju', + confirmReindex: 'Ponovo indeksirati sve {{collections}}?', + confirmReindexAll: 'Ponovo indeksirati sve kolekcije?', + confirmReindexDescription: + 'Ovo će ukloniti postojeće indekse i ponovo indeksirati dokumente u kolekcijama {{collections}}.', + confirmReindexDescriptionAll: + 'Ovo će ukloniti postojeće indekse i ponovo indeksirati dokumente u svim kolekcijama.', copied: 'Kopirano', copy: 'Kopiraj', copying: 'Kopiranje', @@ -280,6 +290,8 @@ export const rsLatinTranslations: DefaultTranslationsObject = { payloadSettings: 'Payload postavke', perPage: 'Po stranici: {{limit}}', previous: 'Prethodni', + reindex: 'Reindeksiraj', + reindexingAll: 'Ponovno indeksiranje svih {{collections}}.', remove: 'Ukloni', reset: 'Ponovo postavi', row: 'Red', @@ -302,6 +314,8 @@ export const rsLatinTranslations: DefaultTranslationsObject = { success: 'Uspeh', successfullyCreated: '{{label}} uspešno kreirano.', successfullyDuplicated: '{{label}} uspešno duplicirano.', + successfullyReindexed: + 'Uspešno je reindeksirano {{count}} od {{total}} dokumenata iz {{collections}} kolekcija.', takeOver: 'Preuzeti', thisLanguage: 'Srpski (latinica)', titleDeleted: '{{label}} "{{title}}" uspešno obrisano.', diff --git a/packages/translations/src/languages/ru.ts b/packages/translations/src/languages/ru.ts index dcf8123045..353e2c7962 100644 --- a/packages/translations/src/languages/ru.ts +++ b/packages/translations/src/languages/ru.ts @@ -93,6 +93,7 @@ export const ruTranslations: DefaultTranslationsObject = { incorrectCollection: 'Неправильная Коллекция', invalidFileType: 'Недопустимый тип файла', invalidFileTypeValue: 'Недопустимый тип файла: {{value}}', + invalidRequestArgs: 'В запрос переданы недопустимые аргументы: {{args}}', loadingDocument: 'Возникла проблема при загрузке документа с ID {{id}}.', localesNotSaved_one: 'Следующую локализацию не удалось сохранить:', localesNotSaved_other: 'Следующие локализации не удалось сохранить:', @@ -112,6 +113,8 @@ export const ruTranslations: DefaultTranslationsObject = { tokenInvalidOrExpired: 'Токен либо недействителен, либо срок его действия истек.', tokenNotProvided: 'Токен не предоставлен.', unableToDeleteCount: 'Не удалось удалить {{count}} из {{total}} {{label}}.', + unableToReindexCollection: + 'Ошибка при переиндексации коллекции {{collection}}. Операция прервана.', unableToUpdateCount: 'Не удалось обновить {{count}} из {{total}} {{label}}.', unauthorized: 'Нет доступа, вы должны войти, чтобы сделать этот запрос.', unknown: 'Произошла неизвестная ошибка.', @@ -179,6 +182,7 @@ export const ruTranslations: DefaultTranslationsObject = { addBelow: 'Добавить ниже', addFilter: 'Добавить фильтр', adminTheme: 'Тема Панели', + allCollections: 'Все Коллекции', and: 'А также', anotherUser: 'Другой пользователь', anotherUserTakenOver: 'Другой пользователь взял на себя редактирование этого документа.', @@ -199,6 +203,12 @@ export const ruTranslations: DefaultTranslationsObject = { confirmCopy: 'Подтвердить копирование', confirmDeletion: 'Подтвердить удаление', confirmDuplication: 'Подтвердить копирование', + confirmReindex: 'Переиндексировать все {{collections}}?', + confirmReindexAll: 'Переиндексировать все коллекции?', + confirmReindexDescription: + 'Это удалит существующие индексы и переиндексирует документы в коллекциях {{collections}}.', + confirmReindexDescriptionAll: + 'Это удалит существующие индексы и переиндексирует документы во всех коллекциях.', copied: 'Скопировано', copy: 'Скопировать', copying: 'Копирование', @@ -283,6 +293,8 @@ export const ruTranslations: DefaultTranslationsObject = { payloadSettings: 'Настройки Payload', perPage: 'На странице: {{limit}}', previous: 'Предыдущий', + reindex: 'Переиндексировать', + reindexingAll: 'Переиндексирование всех {{collections}}.', remove: 'Удалить', reset: 'Сброс', row: 'Строка', @@ -305,6 +317,8 @@ export const ruTranslations: DefaultTranslationsObject = { success: 'Успех', successfullyCreated: '{{label}} успешно создан.', successfullyDuplicated: '{{label}} успешно продублирован.', + successfullyReindexed: + 'Успешно переиндексировано {{count}} из {{total}} документов из {{collections}} коллекций.', takeOver: 'Взять на себя', thisLanguage: 'Русский', titleDeleted: '{{label}} {{title}} успешно удалено.', diff --git a/packages/translations/src/languages/sk.ts b/packages/translations/src/languages/sk.ts index 2501da497a..e35a88b7d6 100644 --- a/packages/translations/src/languages/sk.ts +++ b/packages/translations/src/languages/sk.ts @@ -93,6 +93,7 @@ export const skTranslations: DefaultTranslationsObject = { incorrectCollection: 'Nesprávna kolekcia', invalidFileType: 'Neplatný typ súboru', invalidFileTypeValue: 'Neplatný typ súboru: {{value}}', + invalidRequestArgs: 'Neplatné argumenty odoslané v požiadavke: {{args}}', loadingDocument: 'Pri načítaní dokumentu s ID {{id}} došlo k chybe.', localesNotSaved_one: 'Nasledujúci jazyk sa nepodarilo uložiť:', localesNotSaved_other: 'Nasledujúce jazyky sa nepodarilo uložiť:', @@ -112,6 +113,8 @@ export const skTranslations: DefaultTranslationsObject = { tokenInvalidOrExpired: 'Token je neplatný alebo vypršal.', tokenNotProvided: 'Token nie je poskytnutý.', unableToDeleteCount: 'Nie je možné zmazať {{count}} z {{total}} {{label}}.', + unableToReindexCollection: + 'Chyba pri reindexácii kolekcie {{collection}}. Operácia bola prerušená.', unableToUpdateCount: 'Nie je možné aktualizovať {{count}} z {{total}} {{label}}.', unauthorized: 'Neautorizováno, pro zadání tohoto požadavku musíte být přihlášeni.', unknown: 'Došlo k neznámej chybe.', @@ -179,6 +182,7 @@ export const skTranslations: DefaultTranslationsObject = { addBelow: 'Pridať pod', addFilter: 'Pridať filter', adminTheme: 'Motív administračného rozhrania', + allCollections: 'Všetky Kolekcie', and: 'a', anotherUser: 'Iný používateľ', anotherUserTakenOver: 'Iný používateľ prevzal úpravy tohto dokumentu.', @@ -198,6 +202,12 @@ export const skTranslations: DefaultTranslationsObject = { confirmCopy: 'Potvrdiť kópiu', confirmDeletion: 'Potvrdiť odstránenie', confirmDuplication: 'Potvrdiť duplikáciu', + confirmReindex: 'Znova zaindexovať všetky {{collections}}?', + confirmReindexAll: 'Znova zaindexovať všetky kolekcie?', + confirmReindexDescription: + 'Týmto sa odstránia existujúce indexy a znova sa zaindexujú dokumenty v kolekciách {{collections}}.', + confirmReindexDescriptionAll: + 'Týmto sa odstránia existujúce indexy a znova sa zaindexujú dokumenty vo všetkých kolekciách.', copied: 'Skopírované', copy: 'Kopírovať', copying: 'Kopírovanie', @@ -281,6 +291,8 @@ export const skTranslations: DefaultTranslationsObject = { payloadSettings: 'Nastavenia dátového záznamu', perPage: 'Na stránku: {{limit}}', previous: 'Predchádzajúci', + reindex: 'Reindexovať', + reindexingAll: 'Znova sa indexujú všetky {{collections}}.', remove: 'Odstrániť', reset: 'Resetovať', row: 'Riadok', @@ -303,6 +315,8 @@ export const skTranslations: DefaultTranslationsObject = { success: 'Úspech', successfullyCreated: '{{label}} úspešne vytvorené.', successfullyDuplicated: '{{label}} úspešne duplikované.', + successfullyReindexed: + 'Úspešne bolo reindexovaných {{count}} z {{total}} dokumentov z kolekcií {{collections}}.', takeOver: 'Prevziať', thisLanguage: 'Slovenčina', titleDeleted: '{{label}} "{{title}}" úspešne zmazané.', diff --git a/packages/translations/src/languages/sl.ts b/packages/translations/src/languages/sl.ts index 2e9dfbccca..213cb20e1d 100644 --- a/packages/translations/src/languages/sl.ts +++ b/packages/translations/src/languages/sl.ts @@ -92,6 +92,7 @@ export const slTranslations: DefaultTranslationsObject = { incorrectCollection: 'Napačna zbirka', invalidFileType: 'Neveljaven tip datoteke', invalidFileTypeValue: 'Neveljaven tip datoteke: {{value}}', + invalidRequestArgs: 'V zahtevi so bili poslani neveljavni argumenti: {{args}}', loadingDocument: 'Pri nalaganju dokumenta z ID-jem {{id}} je prišlo do težave.', localesNotSaved_one: 'Naslednjega jezika ni bilo mogoče shraniti:', localesNotSaved_other: 'Naslednjih jezikov ni bilo mogoče shraniti:', @@ -111,6 +112,8 @@ export const slTranslations: DefaultTranslationsObject = { tokenInvalidOrExpired: 'Žeton je neveljaven ali je potekel.', tokenNotProvided: 'Žeton ni bil posredovan.', unableToDeleteCount: 'Ni bilo mogoče izbrisati {{count}} od {{total}} {{label}}.', + unableToReindexCollection: + 'Napaka pri reindeksiranju zbirke {{collection}}. Operacija je bila prekinjena.', unableToUpdateCount: 'Ni bilo mogoče posodobiti {{count}} od {{total}} {{label}}.', unauthorized: 'Neavtorizirano, za to zahtevo morate biti prijavljeni.', unknown: 'Prišlo je do neznane napake.', @@ -177,6 +180,7 @@ export const slTranslations: DefaultTranslationsObject = { addBelow: 'Dodaj spodaj', addFilter: 'Dodaj filter', adminTheme: 'Tema skrbnika', + allCollections: 'Vse Zbirke', and: 'In', anotherUser: 'Drug uporabnik', anotherUserTakenOver: 'Drug uporabnik je prevzel urejanje tega dokumenta.', @@ -197,6 +201,12 @@ export const slTranslations: DefaultTranslationsObject = { confirmCopy: 'Potrdi kopiranje', confirmDeletion: 'Potrdi brisanje', confirmDuplication: 'Potrdi podvajanje', + confirmReindex: 'Ponovno indeksirati vse {{collections}}?', + confirmReindexAll: 'Ponovno indeksirati vse zbirke?', + confirmReindexDescription: + 'To bo odstranilo obstoječe indekse in ponovno indeksiralo dokumente v zbirkah {{collections}}.', + confirmReindexDescriptionAll: + 'To bo odstranilo obstoječe indekse in ponovno indeksiralo dokumente v vseh zbirkah.', copied: 'Kopirano', copy: 'Kopiraj', copying: 'Kopiranje', @@ -280,6 +290,8 @@ export const slTranslations: DefaultTranslationsObject = { payloadSettings: 'Nastavitve Payloada', perPage: 'Na stran: {{limit}}', previous: 'Prejšnji', + reindex: 'Reindeksiraj', + reindexingAll: 'Ponovno indeksiranje vseh {{collections}}.', remove: 'Odstrani', reset: 'Ponastavi', row: 'Vrstica', @@ -302,6 +314,8 @@ export const slTranslations: DefaultTranslationsObject = { success: 'Uspeh', successfullyCreated: '{{label}} uspešno ustvarjen.', successfullyDuplicated: '{{label}} uspešno podvojen.', + successfullyReindexed: + 'Uspešno reindeksiranih {{count}} od {{total}} dokumentov iz zbirk {{collections}}.', takeOver: 'Prevzemi', thisLanguage: 'Slovenščina', titleDeleted: '{{label}} "{{title}}" uspešno izbrisan.', diff --git a/packages/translations/src/languages/sv.ts b/packages/translations/src/languages/sv.ts index 097f925051..b0b68bf12a 100644 --- a/packages/translations/src/languages/sv.ts +++ b/packages/translations/src/languages/sv.ts @@ -92,6 +92,7 @@ export const svTranslations: DefaultTranslationsObject = { incorrectCollection: 'Felaktig Samling', invalidFileType: 'Ogiltig filtyp', invalidFileTypeValue: 'Ogiltig filtyp: {{value}}', + invalidRequestArgs: 'Ogiltiga argument har skickats i begäran: {{args}}', loadingDocument: 'Det gick inte att läsa in dokumentet med ID {{id}}.', localesNotSaved_one: 'Följande lokal kunde inte sparas:', localesNotSaved_other: 'Följande lokaler kunde inte sparas:', @@ -111,6 +112,8 @@ export const svTranslations: DefaultTranslationsObject = { tokenInvalidOrExpired: 'Token är antingen ogiltig eller har löpt ut.', tokenNotProvided: 'Token inte tillhandahållet.', unableToDeleteCount: 'Det gick inte att ta bort {{count}} av {{total}} {{label}}.', + unableToReindexCollection: + 'Fel vid omindexering av samlingen {{collection}}. Operationen avbröts.', unableToUpdateCount: 'Det gick inte att uppdatera {{count}} av {{total}} {{label}}.', unauthorized: 'Obehörig, du måste vara inloggad för att göra denna begäran.', unknown: 'Ett okänt fel har uppstått.', @@ -177,6 +180,7 @@ export const svTranslations: DefaultTranslationsObject = { addBelow: 'Lägg Till Nedanför', addFilter: 'Lägg Till Filter', adminTheme: 'Admin Tema', + allCollections: 'Alla Samlingar', and: 'Och', anotherUser: 'En annan användare', anotherUserTakenOver: 'En annan användare har tagit över redigeringen av detta dokument.', @@ -197,6 +201,12 @@ export const svTranslations: DefaultTranslationsObject = { confirmCopy: 'Bekräfta kopia', confirmDeletion: 'Bekräfta radering', confirmDuplication: 'Bekräfta dubblering', + confirmReindex: 'Omindexera alla {{collections}}?', + confirmReindexAll: 'Omindexera alla samlingar?', + confirmReindexDescription: + 'Detta kommer att ta bort befintliga index och omindexera dokumenten i {{collections}}-samlingarna.', + confirmReindexDescriptionAll: + 'Detta kommer att ta bort befintliga index och omindexera dokumenten i alla samlingar.', copied: 'Kopierad', copy: 'Kopiera', copying: 'Kopiering', @@ -281,6 +291,8 @@ export const svTranslations: DefaultTranslationsObject = { payloadSettings: 'Payload Inställningar', perPage: 'Per Sida: {{limit}}', previous: 'Föregående', + reindex: 'Omindexera', + reindexingAll: 'Omindexerar alla {{collections}}.', remove: 'Ta bort', reset: 'Återställ', row: 'Rad', @@ -303,6 +315,8 @@ export const svTranslations: DefaultTranslationsObject = { success: 'Framgång', successfullyCreated: '{{label}} skapades framgångsrikt.', successfullyDuplicated: '{{label}} duplicerades framgångsrikt.', + successfullyReindexed: + 'Lyckades omindexera {{count}} av {{total}} dokument från {{collections}} samlingar.', takeOver: 'Ta över', thisLanguage: 'Svenska', titleDeleted: '{{label}} "{{title}}" togs bort framgångsrikt.', diff --git a/packages/translations/src/languages/th.ts b/packages/translations/src/languages/th.ts index efecbb2ee3..e515f59828 100644 --- a/packages/translations/src/languages/th.ts +++ b/packages/translations/src/languages/th.ts @@ -90,6 +90,7 @@ export const thTranslations: DefaultTranslationsObject = { incorrectCollection: 'Collection ไม่ถูกต้อง', invalidFileType: 'ประเภทของไฟล์ไม่ถูกต้อง', invalidFileTypeValue: 'ประเภทของไฟล์ไม่ถูกต้อง: {{value}}', + invalidRequestArgs: 'มีการส่งอาร์กิวเมนต์ที่ไม่ถูกต้องในคำขอ: {{args}}', loadingDocument: 'เกิดปัญหาระหว่างการโหลดเอกสารที่มี ID {{id}}', localesNotSaved_one: 'ไม่สามารถบันทึกกำหนดสถานที่ต่อไปนี้ได้:', localesNotSaved_other: 'ไม่สามารถบันทึกกำหนดสถานที่ต่อไปนี้ได้:', @@ -109,6 +110,8 @@ export const thTranslations: DefaultTranslationsObject = { tokenInvalidOrExpired: 'Token ไม่ถูกต้องหรือหมดอายุ', tokenNotProvided: 'ไม่ได้รับโทเค็น', unableToDeleteCount: 'ไม่สามารถลบ {{count}} จาก {{total}} {{label}}', + unableToReindexCollection: + 'เกิดข้อผิดพลาดในการจัดทำดัชนีใหม่ของคอลเลกชัน {{collection}}. การดำเนินการถูกยกเลิก', unableToUpdateCount: 'ไม่สามารถอัปเดต {{count}} จาก {{total}} {{label}}', unauthorized: 'คุณไม่ได้รับอนุญาต กรุณาเข้าสู่ระบบเพื่อทำคำขอนี้', unknown: 'เกิดปัญหาบางอย่างที่ไม่ทราบสาเหตุ', @@ -174,6 +177,7 @@ export const thTranslations: DefaultTranslationsObject = { addBelow: 'เพิ่มด้านล่าง', addFilter: 'เพิ่มการกรอง', adminTheme: 'ธีมผู้ดูแลระบบ', + allCollections: 'คอลเลกชันทั้งหมด', and: 'และ', anotherUser: 'ผู้ใช้อื่น', anotherUserTakenOver: 'ผู้ใช้อื่นเข้าครอบครองการแก้ไขเอกสารนี้แล้ว', @@ -193,6 +197,12 @@ export const thTranslations: DefaultTranslationsObject = { confirmCopy: 'ยืนยันสำเนา', confirmDeletion: 'ยืนยันการลบ', confirmDuplication: 'ยืนยันการสำเนา', + confirmReindex: 'ทำการจัดทำดัชนีใหม่ทั้งหมดใน {{collections}}?', + confirmReindexAll: 'ทำการจัดทำดัชนีใหม่ทั้งหมดในทุกคอลเลกชัน?', + confirmReindexDescription: + 'การดำเนินการนี้จะลบดัชนีที่มีอยู่และทำการจัดทำดัชนีใหม่ในเอกสารของคอลเลกชัน {{collections}}.', + confirmReindexDescriptionAll: + 'การดำเนินการนี้จะลบดัชนีที่มีอยู่และทำการจัดทำดัชนีใหม่ในเอกสารของทุกคอลเลกชัน.', copied: 'คัดลอกแล้ว', copy: 'คัดลอก', copying: 'การคัดลอก', @@ -277,6 +287,8 @@ export const thTranslations: DefaultTranslationsObject = { payloadSettings: 'การตั้งค่า Payload', perPage: 'จำนวนต่อหน้า: {{limit}}', previous: 'ก่อนหน้านี้', + reindex: 'จัดทำดัชนีใหม่', + reindexingAll: 'กำลังทำการจัดทำดัชนีใหม่ทั้งหมดใน {{collections}}.', remove: 'ลบ', reset: 'รีเซ็ต', row: 'แถว', @@ -299,6 +311,8 @@ export const thTranslations: DefaultTranslationsObject = { success: 'ความสำเร็จ', successfullyCreated: 'สร้าง {{label}} สำเร็จ', successfullyDuplicated: 'สำเนา {{label}} สำเร็จ', + successfullyReindexed: + 'จัดทำดัชนีใหม่สำเร็จ {{count}} จาก {{total}} เอกสารจากคอลเลกชัน {{collections}}', takeOver: 'เข้ายึด', thisLanguage: 'ไทย', titleDeleted: 'ลบ {{label}} "{{title}}" สำเร็จ', diff --git a/packages/translations/src/languages/tr.ts b/packages/translations/src/languages/tr.ts index 5b9312a86b..b9703bdb1e 100644 --- a/packages/translations/src/languages/tr.ts +++ b/packages/translations/src/languages/tr.ts @@ -93,6 +93,7 @@ export const trTranslations: DefaultTranslationsObject = { incorrectCollection: 'Hatalı koleksiyon', invalidFileType: 'Geçersiz dosya türü', invalidFileTypeValue: 'Geçersiz dosya türü: {{value}}', + invalidRequestArgs: 'İstek içerisinde geçersiz argümanlar iletildi: {{args}}', loadingDocument: "{{id}} ID'ye sahip döküman yüklenirken bir sorun oluştu.", localesNotSaved_one: 'Aşağıdaki yerel ayar kaydedilemedi:', localesNotSaved_other: 'Aşağıdaki yerel ayarlar kaydedilemedi:', @@ -112,6 +113,8 @@ export const trTranslations: DefaultTranslationsObject = { tokenInvalidOrExpired: 'Geçersiz veya süresi dolmuş token.', tokenNotProvided: 'Jeton sağlanmadı.', unableToDeleteCount: '{{total}} {{label}} içinden {{count}} silinemiyor.', + unableToReindexCollection: + '{{collection}} koleksiyonunun yeniden indekslenmesinde hata oluştu. İşlem durduruldu.', unableToUpdateCount: '{{total}} {{label}} içinden {{count}} güncellenemiyor.', unauthorized: 'Bu işlemi gerçekleştirmek için lütfen giriş yapın.', unknown: 'Bilinmeyen bir hata oluştu.', @@ -180,6 +183,7 @@ export const trTranslations: DefaultTranslationsObject = { addBelow: 'Altına ekle', addFilter: 'Filtre ekle', adminTheme: 'Admin arayüzü', + allCollections: 'Tüm Koleksiyonlar', and: 've', anotherUser: 'Başka bir kullanıcı', anotherUserTakenOver: 'Başka bir kullanıcı bu belgenin düzenlemesini devraldı.', @@ -200,6 +204,12 @@ export const trTranslations: DefaultTranslationsObject = { confirmCopy: 'Kopyayı onayla', confirmDeletion: 'Silmeyi onayla', confirmDuplication: 'Çoğaltmayı onayla', + confirmReindex: 'Tüm {{collections}} yeniden dizine alınsın mı?', + confirmReindexAll: 'Tüm koleksiyonlar yeniden dizine alinsın mı?', + confirmReindexDescription: + 'Bu işlem mevcut dizinleri kaldıracak ve {{collections}} koleksiyonlarındaki belgeleri yeniden dizine alacaktır.', + confirmReindexDescriptionAll: + 'Bu işlem mevcut dizinleri kaldıracak ve tüm koleksiyonlardaki belgeleri yeniden dizine alacaktır.', copied: 'Kopyalandı', copy: 'Kopyala', copying: 'Kopyalama', @@ -284,6 +294,8 @@ export const trTranslations: DefaultTranslationsObject = { payloadSettings: 'Ayarlar', perPage: 'Sayfa başına: {{limit}}', previous: 'Önceki', + reindex: 'Yeniden İndeksle', + reindexingAll: 'Tüm {{collections}} yeniden dizine alınıyor.', remove: 'Kaldır', reset: 'Sıfırla', row: 'Satır', @@ -306,6 +318,8 @@ export const trTranslations: DefaultTranslationsObject = { success: 'Başarı', successfullyCreated: '{{label}} başarıyla oluşturuldu.', successfullyDuplicated: '{{label}} başarıyla kopyalandı.', + successfullyReindexed: + '{{collections}} koleksiyonlarından {{total}} belgenin {{count}} tanesi başarıyla yeniden indekslendi.', takeOver: 'Devralmak', thisLanguage: 'Türkçe', titleDeleted: '{{label}} {{title}} başarıyla silindi.', diff --git a/packages/translations/src/languages/uk.ts b/packages/translations/src/languages/uk.ts index 7aa1b25c07..f994cd2bfe 100644 --- a/packages/translations/src/languages/uk.ts +++ b/packages/translations/src/languages/uk.ts @@ -93,6 +93,7 @@ export const ukTranslations: DefaultTranslationsObject = { incorrectCollection: 'Неправильна колекція', invalidFileType: 'Невірний тип файлу', invalidFileTypeValue: 'Невірний тип файлу: {{value}}', + invalidRequestArgs: 'Неправильні аргументи передано в запиті: {{args}}', loadingDocument: 'Виникла помилка під час завантаження документа з ID {{id}}.', localesNotSaved_one: 'Не вдалося зберегти наступну мову:', localesNotSaved_other: 'Не вдалося зберегти такі мови:', @@ -112,6 +113,8 @@ export const ukTranslations: DefaultTranslationsObject = { tokenInvalidOrExpired: 'Токен недійсний, або його строк дії закінчився.', tokenNotProvided: 'Токен не надано.', unableToDeleteCount: 'Не вдалося видалити {{count}} із {{total}} {{label}}.', + unableToReindexCollection: + 'Помилка при повторному індексуванні колекції {{collection}}. Операцію скасовано.', unableToUpdateCount: 'Не вдалося оновити {{count}} із {{total}} {{label}}.', unauthorized: 'Немає доступу, ви повинні увійти, щоб виконати цей запит.', unknown: 'Виникла невідома помилка.', @@ -178,6 +181,7 @@ export const ukTranslations: DefaultTranslationsObject = { addBelow: 'Додати нижче', addFilter: 'Додати фільтр', adminTheme: 'Тема адмін панелі', + allCollections: 'Усі Колекції', and: 'і', anotherUser: 'Інший користувач', anotherUserTakenOver: 'Інший користувач взяв на себе редагування цього документа.', @@ -197,6 +201,12 @@ export const ukTranslations: DefaultTranslationsObject = { confirmCopy: 'Підтвердіть копію', confirmDeletion: 'Підтвердити видалення', confirmDuplication: 'Підтвердити копіювання', + confirmReindex: 'Перебудувати індекс для всіх {{collections}}?', + confirmReindexAll: 'Перебудувати індекс для всіх колекцій?', + confirmReindexDescription: + 'Це видалить наявні індекси та перебудує індекси документів у колекціях {{collections}}.', + confirmReindexDescriptionAll: + 'Це видалить наявні індекси та перебудує індекси документів у всіх колекціях.', copied: 'Скопійовано', copy: 'Скопіювати', copying: 'Копіювання', @@ -280,6 +290,8 @@ export const ukTranslations: DefaultTranslationsObject = { payloadSettings: 'Налаштування Payload', perPage: 'На сторінці: {{limit}}', previous: 'Попередній', + reindex: 'Повторне індексування', + reindexingAll: 'Перебудова індексів для всіх {{collections}}.', remove: 'Видалити', reset: 'Скидання', row: 'Рядок', @@ -302,6 +314,8 @@ export const ukTranslations: DefaultTranslationsObject = { success: 'Успіх', successfullyCreated: '{{label}} успішно створено.', successfullyDuplicated: '{{label}} успішно продубльовано.', + successfullyReindexed: + 'Успішно повторно індексовано {{count}} з {{total}} документів з колекцій {{collections}}.', takeOver: 'Перейняти', thisLanguage: 'Українська', titleDeleted: '{{label}} "{{title}}" успішно видалено.', diff --git a/packages/translations/src/languages/vi.ts b/packages/translations/src/languages/vi.ts index 1d389bb484..cb0857c4bd 100644 --- a/packages/translations/src/languages/vi.ts +++ b/packages/translations/src/languages/vi.ts @@ -91,6 +91,7 @@ export const viTranslations: DefaultTranslationsObject = { incorrectCollection: 'Lỗi - Collection không hợp lệ.', invalidFileType: 'Lỗi - Định dạng tệp không hợp lệ.', invalidFileTypeValue: 'Lỗi - Định dạng tệp không hợp lệ: {{value}}.', + invalidRequestArgs: 'Các đối số không hợp lệ đã được truyền trong yêu cầu: {{args}}', loadingDocument: 'Lỗi - Đã xảy ra vấn để khi tải bản tài liệu với ID {{id}}.', localesNotSaved_one: 'Không thể lưu trữ cài đặt vùng sau đây:', localesNotSaved_other: 'Không thể lưu trữ các cài đặt vùng sau đây:', @@ -110,6 +111,8 @@ export const viTranslations: DefaultTranslationsObject = { tokenInvalidOrExpired: 'Lỗi - Token không hợp lệ hoặc đã hết hạn.', tokenNotProvided: 'Không cung cấp mã thông báo.', unableToDeleteCount: 'Không thể xóa {{count}} trong số {{total}} {{label}}.', + unableToReindexCollection: + 'Lỗi khi tái lập chỉ mục bộ sưu tập {{collection}}. Quá trình bị hủy.', unableToUpdateCount: 'Không thể cập nhật {{count}} trên {{total}} {{label}}.', unauthorized: 'Lỗi - Bạn cần phải đăng nhập trước khi gửi request sau.', unknown: 'Lỗi - Không xác định (unknown error).', @@ -176,6 +179,7 @@ export const viTranslations: DefaultTranslationsObject = { addBelow: 'Thêm bên dưới', addFilter: 'Thêm bộ lọc', adminTheme: 'Giao diện bảng điều khiển', + allCollections: 'Tất cả Bộ sưu tập', and: 'Và', anotherUser: 'Người dùng khác', anotherUserTakenOver: 'Người dùng khác đã tiếp quản việc chỉnh sửa tài liệu này.', @@ -195,6 +199,12 @@ export const viTranslations: DefaultTranslationsObject = { confirmCopy: 'Xác nhận bản sao', confirmDeletion: 'Xác nhận xóa', confirmDuplication: 'Xác nhận tạo bản sao', + confirmReindex: 'Tái lập chỉ mục tất cả {{collections}}?', + confirmReindexAll: 'Tái lập chỉ mục tất cả các bộ sưu tập?', + confirmReindexDescription: + 'Điều này sẽ xóa các chỉ mục hiện tại và tái lập chỉ mục các tài liệu trong các bộ sưu tập {{collections}}.', + confirmReindexDescriptionAll: + 'Điều này sẽ xóa các chỉ mục hiện tại và tái lập chỉ mục các tài liệu trong tất cả các bộ sưu tập.', copied: 'Đâ sao chép', copy: 'Sao chép', copying: 'Sao chép', @@ -279,6 +289,8 @@ export const viTranslations: DefaultTranslationsObject = { payloadSettings: 'Cài đặt', perPage: 'Hiển thị mỗi trang: {{limit}}', previous: 'Trước đó', + reindex: 'Tái lập chỉ mục', + reindexingAll: 'Đang tái lập chỉ mục tất cả {{collections}}.', remove: 'Loại bỏ', reset: 'Đặt lại', row: 'Hàng', @@ -301,6 +313,8 @@ export const viTranslations: DefaultTranslationsObject = { success: 'Thành công', successfullyCreated: '{{label}} đã được tạo thành công.', successfullyDuplicated: '{{label}} đã được sao chép thành công.', + successfullyReindexed: + 'Tái lập chỉ mục thành công {{count}} trong tổng số {{total}} tài liệu từ {{collections}} bộ sưu tập.', takeOver: 'Tiếp quản', thisLanguage: 'Vietnamese (Tiếng Việt)', titleDeleted: '{{label}} {{title}} đã được xóa thành công.', diff --git a/packages/translations/src/languages/zh.ts b/packages/translations/src/languages/zh.ts index 42c209549e..0e0c7ae672 100644 --- a/packages/translations/src/languages/zh.ts +++ b/packages/translations/src/languages/zh.ts @@ -87,6 +87,7 @@ export const zhTranslations: DefaultTranslationsObject = { incorrectCollection: '不正确的集合', invalidFileType: '无效的文件类型', invalidFileTypeValue: '无效的文件类型: {{value}}', + invalidRequestArgs: '请求中传递了无效的参数:{{args}}', loadingDocument: '加载ID为{{id}}的文件时出现了问题。', localesNotSaved_one: '无法保存以下区域设置:', localesNotSaved_other: '无法保存以下区域设置:', @@ -106,6 +107,7 @@ export const zhTranslations: DefaultTranslationsObject = { tokenInvalidOrExpired: '令牌无效或已过期。', tokenNotProvided: '未提供令牌。', unableToDeleteCount: '无法从 {{total}} {{label}} 中删除 {{count}}。', + unableToReindexCollection: '重新索引集合 {{collection}} 时出错。操作已中止。', unableToUpdateCount: '无法更新 {{count}} 个,共 {{total}} 个 {{label}}。', unauthorized: '未经授权,您必须登录才能提出这个请求。', unknown: '发生了一个未知的错误。', @@ -171,6 +173,7 @@ export const zhTranslations: DefaultTranslationsObject = { addBelow: '添加到下面', addFilter: '添加过滤器', adminTheme: '管理页面主题', + allCollections: '所有集合', and: '和', anotherUser: '另一位用户', anotherUserTakenOver: '另一位用户接管了此文档的编辑。', @@ -190,6 +193,10 @@ export const zhTranslations: DefaultTranslationsObject = { confirmCopy: '确认复制', confirmDeletion: '确认删除', confirmDuplication: '确认重复', + confirmReindex: '重新索引所有{{collections}}?', + confirmReindexAll: '重新索引所有集合?', + confirmReindexDescription: '此操作将删除现有索引,并重新索引{{collections}}集合中的文档。', + confirmReindexDescriptionAll: '此操作将删除现有索引,并重新索引所有集合中的文档。', copied: '已复制', copy: '复制', copying: '复制', @@ -272,6 +279,8 @@ export const zhTranslations: DefaultTranslationsObject = { payloadSettings: 'Payload设置', perPage: '每一页: {{limit}}', previous: '前一个', + reindex: '重新索引', + reindexingAll: '正在重新索引所有{{collections}}。', remove: '移除', reset: '重置', row: '行', @@ -294,6 +303,8 @@ export const zhTranslations: DefaultTranslationsObject = { success: '成功', successfullyCreated: '成功创建{{label}}', successfullyDuplicated: '成功复制{{label}}', + successfullyReindexed: + '成功重新索引了 {{collections}} 集合中 {{total}} 个文档中的 {{count}} 个。', takeOver: '接管', thisLanguage: '中文 (简体)', titleDeleted: '{{label}} "{{title}}"已被成功删除。', diff --git a/packages/translations/src/languages/zhTw.ts b/packages/translations/src/languages/zhTw.ts index 023af49709..a3939a3e24 100644 --- a/packages/translations/src/languages/zhTw.ts +++ b/packages/translations/src/languages/zhTw.ts @@ -87,6 +87,7 @@ export const zhTwTranslations: DefaultTranslationsObject = { incorrectCollection: '不正確的集合', invalidFileType: '無效的文件類型', invalidFileTypeValue: '無效的文件類型: {{value}}', + invalidRequestArgs: '請求中傳遞了無效的參數:{{args}}', loadingDocument: '加載ID為{{id}}的文件時出現了問題。', localesNotSaved_one: '以下的地區設定無法保存:', localesNotSaved_other: '以下地區無法保存:', @@ -106,6 +107,7 @@ export const zhTwTranslations: DefaultTranslationsObject = { tokenInvalidOrExpired: '令牌無效或已過期。', tokenNotProvided: '未提供令牌。', unableToDeleteCount: '無法從 {{total}} 個中刪除 {{count}} 個 {{label}}。', + unableToReindexCollection: '重新索引集合 {{collection}} 時出現錯誤。操作已中止。', unableToUpdateCount: '無法從 {{total}} 個中更新 {{count}} 個 {{label}}。', unauthorized: '未經授權,您必須登錄才能提出這個請求。', unknown: '發生了一個未知的錯誤。', @@ -171,6 +173,7 @@ export const zhTwTranslations: DefaultTranslationsObject = { addBelow: '新增到下方', addFilter: '新增過濾器', adminTheme: '管理頁面主題', + allCollections: '所有集合', and: '和', anotherUser: '另一位使用者', anotherUserTakenOver: '另一位使用者接管了此文件的編輯。', @@ -190,6 +193,10 @@ export const zhTwTranslations: DefaultTranslationsObject = { confirmCopy: '確認副本', confirmDeletion: '確認刪除', confirmDuplication: '確認複製', + confirmReindex: '重新索引所有{{collections}}?', + confirmReindexAll: '重新索引所有集合?', + confirmReindexDescription: '此操作將刪除現有索引並重新索引{{collections}}集合中的文件。', + confirmReindexDescriptionAll: '此操作將刪除現有索引並重新索引所有集合中的文件。', copied: '已複製', copy: '複製', copying: '複製', @@ -272,6 +279,8 @@ export const zhTwTranslations: DefaultTranslationsObject = { payloadSettings: 'Payload設定', perPage: '每一頁: {{limit}} 個', previous: '先前的', + reindex: '重新索引', + reindexingAll: '正在重新索引所有{{collections}}。', remove: '移除', reset: '重設', row: '行', @@ -294,6 +303,8 @@ export const zhTwTranslations: DefaultTranslationsObject = { success: '成功', successfullyCreated: '成功建立{{label}}', successfullyDuplicated: '成功複製{{label}}', + successfullyReindexed: + '成功重新索引了 {{collections}} 集合中 {{total}} 個文檔中的 {{count}} 個。', takeOver: '接管', thisLanguage: '中文 (繁體)', titleDeleted: '{{label}} "{{title}}"已被成功刪除。', diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index de4ee1c67c..b7768c7945 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1056,6 +1056,9 @@ importers: packages/plugin-search: dependencies: + '@payloadcms/next': + specifier: workspace:* + version: link:../next '@payloadcms/ui': specifier: workspace:* version: link:../ui diff --git a/test/plugin-search/config.ts b/test/plugin-search/config.ts index 7242869518..c20755cc2c 100644 --- a/test/plugin-search/config.ts +++ b/test/plugin-search/config.ts @@ -3,6 +3,7 @@ import path from 'path' const filename = fileURLToPath(import.meta.url) const dirname = path.dirname(filename) import { searchPlugin } from '@payloadcms/plugin-search' +import { randomUUID } from 'node:crypto' import { buildConfigWithDefaults } from '../buildConfigWithDefaults.js' import { devUser } from '../credentials.js' @@ -49,8 +50,28 @@ export default buildConfigWithDefaults({ posts: ({ title }) => (title === 'Hello, world!' ? 30 : 20), }, searchOverrides: { + access: { + // Used for int test + delete: ({ req: { user } }) => user.email === devUser.email, + }, fields: ({ defaultFields }) => [ ...defaultFields, + // This is necessary to test whether search docs were deleted or not with SQLite + // Because IDs in SQLite, apparently, aren't unique if we count deleted rows without AUTOINCREMENT option + // Thus we have a custom UUID field. + { + name: 'id', + type: 'text', + hooks: { + beforeChange: [ + ({ operation }) => { + if (operation === 'create') { + return randomUUID() + } + }, + ], + }, + }, { name: 'excerpt', type: 'textarea', diff --git a/test/plugin-search/int.spec.ts b/test/plugin-search/int.spec.ts index aa63b80f30..b3663f1466 100644 --- a/test/plugin-search/int.spec.ts +++ b/test/plugin-search/int.spec.ts @@ -1,19 +1,67 @@ -import type { Payload } from 'payload' - import path from 'path' +import { NotFound, type Payload } from 'payload' import { wait } from 'payload/shared' import { fileURLToPath } from 'url' +import type { NextRESTClient } from '../helpers/NextRESTClient.js' + +import { devUser } from '../credentials.js' import { initPayloadInt } from '../helpers/initPayloadInt.js' +import { pagesSlug, postsSlug } from './shared.js' let payload: Payload +let restClient: NextRESTClient +let token: string const filename = fileURLToPath(import.meta.url) const dirname = path.dirname(filename) describe('@payloadcms/plugin-search', () => { beforeAll(async () => { - ;({ payload } = await initPayloadInt(dirname)) + ;({ payload, restClient } = await initPayloadInt(dirname)) + + const data = await restClient + .POST('/users/login', { + body: JSON.stringify({ + email: devUser.email, + password: devUser.password, + }), + }) + .then((res) => res.json()) + + token = data.token + }) + + beforeEach(async () => { + await payload.delete({ + collection: 'search', + depth: 0, + where: { + id: { + exists: true, + }, + }, + }) + await Promise.all([ + payload.delete({ + collection: postsSlug, + depth: 0, + where: { + id: { + exists: true, + }, + }, + }), + payload.delete({ + collection: pagesSlug, + depth: 0, + where: { + id: { + exists: true, + }, + }, + }), + ]) }) afterAll(async () => { @@ -227,4 +275,150 @@ describe('@payloadcms/plugin-search', () => { expect(syncedSearchData.docs[0].slug).toEqual('es') }) + + it('should respond with 401 when invalid permissions on user before reindex', async () => { + const testCreds = { + email: 'test@payloadcms.com', + password: 'test', + } + + await payload.create({ + collection: 'users', + data: testCreds, + }) + + const testUserRes = await restClient.POST(`/users/login`, { + body: JSON.stringify(testCreds), + }) + + const testUser = await testUserRes.json() + + const endpointRes = await restClient.POST(`/search/reindex`, { + body: JSON.stringify({ + collections: [postsSlug], + }), + headers: { + Authorization: `JWT ${testUser.token}`, + }, + }) + + expect(endpointRes.status).toEqual(401) + }) + + it('should respond with 400 when invalid collection args passed to reindex', async () => { + const endpointNoArgsRes = await restClient.POST(`/search/reindex`, { + body: JSON.stringify({}), + headers: { + Authorization: `JWT ${token}`, + }, + }) + + const endpointEmptyArrRes = await restClient.POST(`/search/reindex`, { + body: JSON.stringify({ + collections: [], + }), + headers: { + Authorization: `JWT ${token}`, + }, + }) + + const endpointInvalidArrRes = await restClient.POST(`/search/reindex`, { + body: JSON.stringify({ + collections: ['users'], + }), + headers: { + Authorization: `JWT ${token}`, + }, + }) + + expect(endpointNoArgsRes.status).toBe(400) + expect(endpointEmptyArrRes.status).toBe(400) + expect(endpointInvalidArrRes.status).toBe(400) + }) + + it('should delete existing search indexes before reindexing', async () => { + await payload.create({ + collection: postsSlug, + data: { + title: 'post_1', + _status: 'published', + }, + }) + + await wait(200) + + await payload.create({ + collection: postsSlug, + data: { + title: 'post_2', + _status: 'published', + }, + }) + + const { docs } = await payload.find({ collection: 'search' }) + + await wait(200) + + const endpointRes = await restClient.POST('/search/reindex', { + body: JSON.stringify({ + collections: [postsSlug, pagesSlug], + }), + }) + + expect(endpointRes.status).toBe(200) + + const { docs: results } = await payload.find({ + collection: 'search', + depth: 0, + where: { + id: { + in: docs.map((doc) => doc.id), + }, + }, + }) + + // Should have no docs with these ID + // after reindex since it deletes indexes and recreates them + expect(results).toHaveLength(0) + }) + + it('should reindex whole collections', async () => { + await payload.create({ + collection: pagesSlug, + data: { + title: 'Test page title', + _status: 'published', + }, + }) + await payload.create({ + collection: postsSlug, + data: { + title: 'Test page title', + _status: 'published', + }, + }) + + await wait(200) + + const { totalDocs: totalBeforeReindex } = await payload.count({ + collection: 'search', + }) + + const endpointRes = await restClient.POST(`/search/reindex`, { + body: JSON.stringify({ + collections: [postsSlug, pagesSlug], + }), + headers: { + Authorization: `JWT ${token}`, + }, + }) + + expect(endpointRes.status).toBe(200) + + const { totalDocs: totalAfterReindex } = await payload.count({ + collection: 'search', + }) + + expect(totalAfterReindex).toBe(totalBeforeReindex) + }) })