Compare commits
6 Commits
feat/uploa
...
feat/local
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ae0dcfd921 | ||
|
|
526e1f5dc5 | ||
|
|
575f0e5c5e | ||
|
|
deac5e19f9 | ||
|
|
c576c47200 | ||
|
|
90d6d6101c |
54
AGENTS.md
54
AGENTS.md
@@ -1,54 +0,0 @@
|
||||
# Payload Monorepo Agent Instructions
|
||||
|
||||
## Project Structure
|
||||
|
||||
- Packages are located in the `packages/` directory.
|
||||
- The main Payload package is `packages/payload`. This contains the core functionality.
|
||||
- Database adapters are in `packages/db-*`.
|
||||
- The UI package is `packages/ui`.
|
||||
- The Next.js integration is in `packages/next`.
|
||||
- Rich text editor packages are in `packages/richtext-*`.
|
||||
- Storage adapters are in `packages/storage-*`.
|
||||
- Email adapters are in `packages/email-*`.
|
||||
- Plugins which add additional functionality are in `packages/plugin-*`.
|
||||
- Documentation is in the `docs/` directory.
|
||||
- Monorepo tooling is in the `tools/` directory.
|
||||
- Test suites and configs are in the `test/` directory.
|
||||
- LLMS.txt is at URL: https://payloadcms.com/llms.txt
|
||||
- LLMS-FULL.txt is at URL: https://payloadcms.com/llms-full.txt
|
||||
|
||||
## Dev environment tips
|
||||
|
||||
- Any package can be built using a `pnpm build:*` script defined in the root `package.json`. These typically follow the format `pnpm build:<directory_name>`. The options are all of the top-level directories inside the `packages/` directory. Ex `pnpm build:db-mongodb` which builds the `packages/db-mongodb` package.
|
||||
- ALL packages can be built with `pnpm build:all`.
|
||||
- Use `pnpm dev` to start the monorepo dev server. This loads the default config located at `test/_community/config.ts`.
|
||||
- Specific dev configs for each package can be run with `pnpm dev <directory_name>`. The options are all of the top-level directories inside the `test/` directory. Ex `pnpm dev fields` which loads the `test/fields/config.ts` config. The directory name can either encompass a single area of functionality or be the name of a specific package.
|
||||
|
||||
## Testing instructions
|
||||
|
||||
- There are unit, integration, and e2e tests in the monorepo.
|
||||
- Unit tests can be run with `pnpm test:unit`.
|
||||
- Integration tests can be run with `pnpm test:int`. Individual test suites can be run with `pnpm test:int <directory_name>`, which will point at `test/<directory_name>/int.spec.ts`.
|
||||
- E2E tests can be run with `pnpm test:e2e`.
|
||||
- All tests can be run with `pnpm test`.
|
||||
- Prefer running `pnpm test:int` for verifying local code changes.
|
||||
|
||||
## PR Guidelines
|
||||
|
||||
- This repository follows conventional commits for PR titles
|
||||
- PR Title format: <type>(<scope>): <title>. Title must start with a lowercase letter.
|
||||
- Valid types are build, chore, ci, docs, examples, feat, fix, perf, refactor, revert, style, templates, test
|
||||
- Prefer `feat` for new features and `fix` for bug fixes.
|
||||
- Valid scopes are the following regex patterns: cpa, db-\*, db-mongodb, db-postgres, db-vercel-postgres, db-sqlite, drizzle, email-\*, email-nodemailer, email-resend, eslint, graphql, live-preview, live-preview-react, next, payload-cloud, plugin-cloud, plugin-cloud-storage, plugin-form-builder, plugin-import-export, plugin-multi-tenant, plugin-nested-docs, plugin-redirects, plugin-search, plugin-sentry, plugin-seo, plugin-stripe, richtext-\*, richtext-lexical, richtext-slate, storage-\*, storage-azure, storage-gcs, storage-uploadthing, storage-vercel-blob, storage-s3, translations, ui, templates, examples(\/(\w|-)+)?, deps
|
||||
- Scopes should be chosen based upon the package(s) being modified. If multiple packages are being modified, choose the most relevant one or no scope at all.
|
||||
- Example PR titles:
|
||||
- `feat(db-mongodb): add support for transactions`
|
||||
- `feat(richtext-lexical): add options to hide block handles`
|
||||
- `fix(ui): json field type ignoring editorOptions`
|
||||
|
||||
## Commit Guidelines
|
||||
|
||||
- This repository follows conventional commits for commit messages
|
||||
- The first commit of a branch should follow the PR title format: <type>(<scope>): <title>. Follow the same rules as PR titles.
|
||||
- Subsequent commits should prefer `chore` commits without a scope unless a specific package is being modified.
|
||||
- These will eventually be squashed into the first commit when merging the PR.
|
||||
@@ -150,9 +150,10 @@ export default buildConfig({
|
||||
|
||||
The following experimental options are available related to localization:
|
||||
|
||||
| Option | Description |
|
||||
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| **`localizeStatus`** | **Boolean.** When `true`, shows document status per locale in the admin panel instead of always showing the latest overall status. Opt-in for backwards compatibility. Defaults to `false`. |
|
||||
| Option | Description |
|
||||
| ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| **`localizeStatus`** | **Boolean.** When `true`, shows document status per locale in the admin panel instead of always showing the latest overall status. Opt-in for backwards compatibility. Defaults to `false`. |
|
||||
| **`unpublishSpecificLocale`** | **Boolean.** When `true`, allows unpublishing a document in a specific locale. Defaults to `false`. |
|
||||
|
||||
## Field Localization
|
||||
|
||||
|
||||
@@ -27,9 +27,10 @@ const config = buildConfig({
|
||||
|
||||
The following options are available:
|
||||
|
||||
| Option | Description |
|
||||
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| **`localizeStatus`** | **Boolean.** When `true`, shows document status per locale in the admin panel instead of always showing the latest overall status. Opt-in for backwards compatibility. Defaults to `false`. |
|
||||
| Option | Description |
|
||||
| ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| **`localizeStatus`** | **Boolean.** When `true`, shows document status per locale in the admin panel instead of always showing the latest overall status. Opt-in for backwards compatibility. Defaults to `false`. |
|
||||
| **`unpublishSpecificLocale`** | **Boolean.** When `true`, allows unpublishing a document in a specific locale. Defaults to `false`. |
|
||||
|
||||
This list may change without notice.
|
||||
|
||||
|
||||
@@ -81,22 +81,20 @@ export async function VersionsView(props: DocumentViewServerProps) {
|
||||
}
|
||||
|
||||
const [currentlyPublishedVersion, latestDraftVersion] = await Promise.all([
|
||||
hasPublishedDoc
|
||||
? fetchLatestVersion({
|
||||
collectionSlug,
|
||||
depth: 0,
|
||||
globalSlug,
|
||||
overrideAccess: false,
|
||||
parentID: id,
|
||||
req,
|
||||
select: {
|
||||
id: true,
|
||||
updatedAt: true,
|
||||
},
|
||||
status: 'published',
|
||||
user,
|
||||
})
|
||||
: Promise.resolve(null),
|
||||
fetchLatestVersion({
|
||||
collectionSlug,
|
||||
depth: 0,
|
||||
globalSlug,
|
||||
overrideAccess: false,
|
||||
parentID: id,
|
||||
req,
|
||||
select: {
|
||||
id: true,
|
||||
updatedAt: true,
|
||||
},
|
||||
status: 'published',
|
||||
user,
|
||||
}),
|
||||
draftsEnabled
|
||||
? fetchLatestVersion({
|
||||
collectionSlug,
|
||||
|
||||
@@ -14,6 +14,7 @@ import { findVersionByIDHandler } from './findVersionByID.js'
|
||||
import { findVersionsHandler } from './findVersions.js'
|
||||
import { previewHandler } from './preview.js'
|
||||
import { restoreVersionHandler } from './restoreVersion.js'
|
||||
import { unpublishHandler } from './unpublish.js'
|
||||
import { updateHandler } from './update.js'
|
||||
import { updateByIDHandler } from './updateByID.js'
|
||||
|
||||
@@ -85,6 +86,11 @@ export const defaultCollectionEndpoints: Endpoint[] = [
|
||||
method: 'post',
|
||||
path: '/versions/:id',
|
||||
},
|
||||
{
|
||||
handler: unpublishHandler,
|
||||
method: 'post',
|
||||
path: '/:id/unpublish',
|
||||
},
|
||||
{
|
||||
handler: updateHandler,
|
||||
method: 'patch',
|
||||
|
||||
31
packages/payload/src/collections/endpoints/unpublish.ts
Normal file
31
packages/payload/src/collections/endpoints/unpublish.ts
Normal file
@@ -0,0 +1,31 @@
|
||||
import { status as httpStatus } from 'http-status'
|
||||
|
||||
import type { PayloadHandler } from '../../config/types.js'
|
||||
|
||||
import { getRequestCollectionWithID } from '../../utilities/getRequestEntity.js'
|
||||
import { headersWithCors } from '../../utilities/headersWithCors.js'
|
||||
import { unpublishOperation } from '../operations/unpublish.js'
|
||||
|
||||
export const unpublishHandler: PayloadHandler = async (req) => {
|
||||
const { id, collection } = getRequestCollectionWithID(req)
|
||||
|
||||
const result = await unpublishOperation({
|
||||
id,
|
||||
collection,
|
||||
req,
|
||||
})
|
||||
|
||||
return Response.json(
|
||||
{
|
||||
message: req.t('version:unpublishedSuccessfully'),
|
||||
result,
|
||||
},
|
||||
{
|
||||
headers: headersWithCors({
|
||||
headers: new Headers(),
|
||||
req,
|
||||
}),
|
||||
status: httpStatus.OK,
|
||||
},
|
||||
)
|
||||
}
|
||||
36
packages/payload/src/collections/operations/unpublish.ts
Normal file
36
packages/payload/src/collections/operations/unpublish.ts
Normal file
@@ -0,0 +1,36 @@
|
||||
import type { PayloadRequest } from '../../types/index.js'
|
||||
import type { TypeWithVersion } from '../../versions/types.js'
|
||||
import type { Collection } from '../config/types.js'
|
||||
|
||||
import { killTransaction } from '../../utilities/killTransaction.js'
|
||||
import { unpublish } from '../../versions/unpublish.js'
|
||||
|
||||
export type Arguments = {
|
||||
collection: Collection
|
||||
id: number | string
|
||||
req?: PayloadRequest
|
||||
}
|
||||
|
||||
export const unpublishOperation = async <TData extends TypeWithVersion<TData>>(args: Arguments) => {
|
||||
const {
|
||||
id,
|
||||
collection: { config: collectionConfig },
|
||||
} = args
|
||||
|
||||
const req = args.req!
|
||||
const { payload } = req
|
||||
|
||||
try {
|
||||
const result = await unpublish({
|
||||
id,
|
||||
collection: collectionConfig,
|
||||
payload,
|
||||
req,
|
||||
})
|
||||
|
||||
return result
|
||||
} catch (error: unknown) {
|
||||
await killTransaction(req)
|
||||
throw error
|
||||
}
|
||||
}
|
||||
@@ -165,6 +165,11 @@ export const createClientConfig = ({
|
||||
if (config.experimental?.localizeStatus) {
|
||||
clientConfig.experimental.localizeStatus = config.experimental.localizeStatus
|
||||
}
|
||||
|
||||
if (config.experimental?.unpublishSpecificLocale) {
|
||||
clientConfig.experimental.unpublishSpecificLocale =
|
||||
config.experimental.unpublishSpecificLocale
|
||||
}
|
||||
}
|
||||
|
||||
break
|
||||
|
||||
@@ -727,6 +727,10 @@ export type ImportMapGenerators = Array<
|
||||
*/
|
||||
export type ExperimentalConfig = {
|
||||
localizeStatus?: boolean
|
||||
/**
|
||||
* Enables the ability to unpublish the current locale only.
|
||||
*/
|
||||
unpublishSpecificLocale?: boolean
|
||||
}
|
||||
|
||||
export type AfterErrorHook = (
|
||||
|
||||
@@ -7,6 +7,7 @@ import { findVersionByIDHandler } from './findVersionByID.js'
|
||||
import { findVersionsHandler } from './findVersions.js'
|
||||
import { previewHandler } from './preview.js'
|
||||
import { restoreVersionHandler } from './restoreVersion.js'
|
||||
import { unpublishHandler } from './unpublish.js'
|
||||
import { updateHandler } from './update.js'
|
||||
|
||||
export const defaultGlobalEndpoints: Endpoint[] = wrapInternalEndpoints([
|
||||
@@ -40,6 +41,11 @@ export const defaultGlobalEndpoints: Endpoint[] = wrapInternalEndpoints([
|
||||
method: 'post',
|
||||
path: '/versions/:id',
|
||||
},
|
||||
{
|
||||
handler: unpublishHandler,
|
||||
method: 'post',
|
||||
path: '/unpublish',
|
||||
},
|
||||
{
|
||||
handler: updateHandler,
|
||||
method: 'post',
|
||||
|
||||
30
packages/payload/src/globals/endpoints/unpublish.ts
Normal file
30
packages/payload/src/globals/endpoints/unpublish.ts
Normal file
@@ -0,0 +1,30 @@
|
||||
import { status as httpStatus } from 'http-status'
|
||||
|
||||
import type { PayloadHandler } from '../../config/types.js'
|
||||
|
||||
import { getRequestGlobal } from '../../utilities/getRequestEntity.js'
|
||||
import { headersWithCors } from '../../utilities/headersWithCors.js'
|
||||
import { unpublishOperation } from '../operations/unpublish.js'
|
||||
|
||||
export const unpublishHandler: PayloadHandler = async (req) => {
|
||||
const globalConfig = getRequestGlobal(req)
|
||||
|
||||
const result = await unpublishOperation({
|
||||
globalConfig,
|
||||
req,
|
||||
})
|
||||
|
||||
return Response.json(
|
||||
{
|
||||
message: req.t('version:unpublishedSuccessfully'),
|
||||
result,
|
||||
},
|
||||
{
|
||||
headers: headersWithCors({
|
||||
headers: new Headers(),
|
||||
req,
|
||||
}),
|
||||
status: httpStatus.OK,
|
||||
},
|
||||
)
|
||||
}
|
||||
31
packages/payload/src/globals/operations/unpublish.ts
Normal file
31
packages/payload/src/globals/operations/unpublish.ts
Normal file
@@ -0,0 +1,31 @@
|
||||
import type { PayloadRequest } from '../../types/index.js'
|
||||
import type { TypeWithVersion } from '../../versions/types.js'
|
||||
import type { SanitizedGlobalConfig } from '../config/types.js'
|
||||
|
||||
import { killTransaction } from '../../utilities/killTransaction.js'
|
||||
import { unpublish } from '../../versions/unpublish.js'
|
||||
|
||||
export type Arguments = {
|
||||
globalConfig: SanitizedGlobalConfig
|
||||
req?: PayloadRequest
|
||||
}
|
||||
|
||||
export const unpublishOperation = async <TData extends TypeWithVersion<TData>>(args: Arguments) => {
|
||||
const { globalConfig } = args
|
||||
|
||||
const req = args.req!
|
||||
const { payload } = req
|
||||
|
||||
try {
|
||||
const result = await unpublish({
|
||||
global: globalConfig,
|
||||
payload,
|
||||
req,
|
||||
})
|
||||
|
||||
return result
|
||||
} catch (error: unknown) {
|
||||
await killTransaction(req)
|
||||
throw error
|
||||
}
|
||||
}
|
||||
@@ -196,17 +196,10 @@ export const getBaseUploadFields = ({ collection, config }: Options): Field[] =>
|
||||
type: 'group',
|
||||
admin: {
|
||||
hidden: true,
|
||||
...(size.admin?.disableListColumn && { disableListColumn: true }),
|
||||
...(size.admin?.disableListFilter && { disableListFilter: true }),
|
||||
},
|
||||
fields: [
|
||||
{
|
||||
...url,
|
||||
admin: {
|
||||
...url.admin,
|
||||
...(size.admin?.disableListColumn && { disableListColumn: true }),
|
||||
...(size.admin?.disableListFilter && { disableListFilter: true }),
|
||||
},
|
||||
hooks: {
|
||||
afterRead: [
|
||||
({ data, value }) => {
|
||||
@@ -225,45 +218,12 @@ export const getBaseUploadFields = ({ collection, config }: Options): Field[] =>
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
...width,
|
||||
admin: {
|
||||
...width.admin,
|
||||
...(size.admin?.disableListColumn && { disableListColumn: true }),
|
||||
...(size.admin?.disableListFilter && { disableListFilter: true }),
|
||||
},
|
||||
},
|
||||
{
|
||||
...height,
|
||||
admin: {
|
||||
...height.admin,
|
||||
...(size.admin?.disableListColumn && { disableListColumn: true }),
|
||||
...(size.admin?.disableListFilter && { disableListFilter: true }),
|
||||
},
|
||||
},
|
||||
{
|
||||
...mimeType,
|
||||
admin: {
|
||||
...mimeType.admin,
|
||||
...(size.admin?.disableListColumn && { disableListColumn: true }),
|
||||
...(size.admin?.disableListFilter && { disableListFilter: true }),
|
||||
},
|
||||
},
|
||||
{
|
||||
...filesize,
|
||||
admin: {
|
||||
...filesize.admin,
|
||||
...(size.admin?.disableListColumn && { disableListColumn: true }),
|
||||
...(size.admin?.disableListFilter && { disableListFilter: true }),
|
||||
},
|
||||
},
|
||||
width,
|
||||
height,
|
||||
mimeType,
|
||||
filesize,
|
||||
{
|
||||
...filename,
|
||||
admin: {
|
||||
...filename.admin,
|
||||
...(size.admin?.disableListColumn && { disableListColumn: true }),
|
||||
...(size.admin?.disableListFilter && { disableListFilter: true }),
|
||||
},
|
||||
unique: false,
|
||||
},
|
||||
],
|
||||
|
||||
@@ -69,10 +69,6 @@ export type GenerateImageName = (args: {
|
||||
}) => string
|
||||
|
||||
export type ImageSize = {
|
||||
admin?: {
|
||||
disableListColumn?: boolean
|
||||
disableListFilter?: boolean
|
||||
}
|
||||
/**
|
||||
* @deprecated prefer position
|
||||
*/
|
||||
|
||||
@@ -63,7 +63,7 @@ export const buildVersionCollectionFields = <T extends boolean = false>(
|
||||
}),
|
||||
})
|
||||
|
||||
if (config.experimental?.localizeStatus) {
|
||||
if (config.experimental?.localizeStatus || config.experimental?.unpublishSpecificLocale) {
|
||||
const localeStatusFields = buildLocaleStatusField(config)
|
||||
|
||||
fields.push({
|
||||
|
||||
@@ -57,7 +57,7 @@ export const buildVersionGlobalFields = <T extends boolean = false>(
|
||||
}),
|
||||
})
|
||||
|
||||
if (config.experimental.localizeStatus) {
|
||||
if (config.experimental.localizeStatus || config.experimental?.unpublishSpecificLocale) {
|
||||
const localeStatusFields = buildLocaleStatusField(config)
|
||||
|
||||
fields.push({
|
||||
|
||||
@@ -137,7 +137,8 @@ export const saveVersion = async ({
|
||||
if (
|
||||
localizationEnabled &&
|
||||
payload.config.localization !== false &&
|
||||
payload.config.experimental?.localizeStatus
|
||||
(payload.config.experimental?.localizeStatus ||
|
||||
payload.config.experimental?.unpublishSpecificLocale)
|
||||
) {
|
||||
const allLocales = (
|
||||
(payload.config.localization && payload.config.localization?.locales) ||
|
||||
|
||||
173
packages/payload/src/versions/unpublish.ts
Normal file
173
packages/payload/src/versions/unpublish.ts
Normal file
@@ -0,0 +1,173 @@
|
||||
// @ts-strict-ignore
|
||||
import type { SanitizedCollectionConfig, TypeWithID } from '../collections/config/types.js'
|
||||
import type { SanitizedGlobalConfig } from '../globals/config/types.js'
|
||||
import type { Payload } from '../index.js'
|
||||
import type { PayloadRequest } from '../types/index.js'
|
||||
|
||||
import { sanitizeInternalFields } from '../utilities/sanitizeInternalFields.js'
|
||||
|
||||
type Args = {
|
||||
collection?: SanitizedCollectionConfig
|
||||
global?: SanitizedGlobalConfig
|
||||
id?: number | string
|
||||
payload: Payload
|
||||
req?: PayloadRequest
|
||||
}
|
||||
|
||||
export const unpublish = async ({
|
||||
id,
|
||||
collection,
|
||||
global,
|
||||
payload,
|
||||
req,
|
||||
}: Args): Promise<null | TypeWithID> => {
|
||||
const now = new Date().toISOString()
|
||||
const findVersionArgs = {
|
||||
limit: 2,
|
||||
pagination: false,
|
||||
req,
|
||||
sort: '-updatedAt',
|
||||
}
|
||||
const locale = req?.query.locale as string
|
||||
const unpublishSpecificLocale = req?.query.unpublishSpecificLocale ? locale : undefined
|
||||
|
||||
try {
|
||||
let docs: any[] = []
|
||||
const whereQuery =
|
||||
unpublishSpecificLocale && typeof unpublishSpecificLocale === 'string'
|
||||
? {
|
||||
[`localeStatus.${unpublishSpecificLocale}`]: { equals: 'published' },
|
||||
}
|
||||
: { 'version._status': { equals: 'published' } }
|
||||
|
||||
if (collection) {
|
||||
;({ docs } = await payload.db.findVersions({
|
||||
...findVersionArgs,
|
||||
collection: collection.slug,
|
||||
where: {
|
||||
and: [{ parent: { equals: id } }, whereQuery],
|
||||
},
|
||||
}))
|
||||
}
|
||||
|
||||
if (global) {
|
||||
;({ docs } = await payload.db.findGlobalVersions({
|
||||
...findVersionArgs,
|
||||
global: global.slug,
|
||||
where: whereQuery,
|
||||
}))
|
||||
}
|
||||
|
||||
const latestVersion = docs[0]
|
||||
const previousPublish = docs[1]
|
||||
if (!latestVersion) {
|
||||
return null
|
||||
}
|
||||
|
||||
const data: Record<string, unknown> = {
|
||||
...latestVersion,
|
||||
createdAt: now,
|
||||
parent: id,
|
||||
updatedAt: now,
|
||||
version: {
|
||||
...latestVersion.version,
|
||||
_status: 'draft',
|
||||
updatedAt: now,
|
||||
},
|
||||
}
|
||||
|
||||
if (unpublishSpecificLocale) {
|
||||
data.localeStatus = {
|
||||
...latestVersion.localeStatus,
|
||||
[unpublishSpecificLocale]: 'draft',
|
||||
}
|
||||
} else {
|
||||
data.localeStatus = Object.fromEntries(
|
||||
Object.keys(data.localeStatus as Record<string, unknown>).map((locale) => [
|
||||
locale,
|
||||
'draft',
|
||||
]),
|
||||
)
|
||||
}
|
||||
|
||||
const updateVersionArgs = {
|
||||
id: latestVersion.id,
|
||||
req,
|
||||
versionData: data as TypeWithID,
|
||||
}
|
||||
|
||||
let result
|
||||
const updateData = previousPublish ? previousPublish.version : { _status: 'draft' }
|
||||
if (collection && id !== undefined) {
|
||||
// update main doc to previous published if available
|
||||
// otherwise set to draft
|
||||
await payload.db.updateOne({
|
||||
collection: collection.slug,
|
||||
data: updateData,
|
||||
locale: locale || undefined,
|
||||
req,
|
||||
where: { id: { equals: id } },
|
||||
})
|
||||
|
||||
// update version to draft
|
||||
await payload.db.updateVersion({
|
||||
...updateVersionArgs,
|
||||
collection: collection.slug,
|
||||
})
|
||||
|
||||
// fetch updated main doc in requested locale
|
||||
result = await payload.findByID({
|
||||
id,
|
||||
collection: collection.slug,
|
||||
draft: true,
|
||||
locale,
|
||||
req,
|
||||
})
|
||||
}
|
||||
|
||||
if (global) {
|
||||
// update main doc to previous published if available
|
||||
// otherwise set to draft
|
||||
await payload.db.updateGlobal({
|
||||
slug: global.slug,
|
||||
data: updateData,
|
||||
req,
|
||||
})
|
||||
|
||||
// update version to draft
|
||||
await payload.db.updateGlobalVersion({
|
||||
...updateVersionArgs,
|
||||
global: global.slug,
|
||||
})
|
||||
|
||||
// fetch updated main doc in requested locale
|
||||
result = await payload.findGlobal({
|
||||
slug: global.slug,
|
||||
draft: true,
|
||||
locale,
|
||||
req,
|
||||
})
|
||||
}
|
||||
|
||||
return result as TypeWithID
|
||||
} catch (err) {
|
||||
let errorMessage: string
|
||||
|
||||
if (collection) {
|
||||
errorMessage = `There was an error while unpublishing the ${
|
||||
typeof collection.labels.singular === 'string'
|
||||
? collection.labels.singular
|
||||
: collection.slug
|
||||
} with ID ${id}.`
|
||||
} else if (global) {
|
||||
errorMessage = `There was an error while unpublishing the global ${
|
||||
typeof global.label === 'string' ? global.label : global.slug
|
||||
}.`
|
||||
} else {
|
||||
errorMessage = `There was an error while unpublishing.`
|
||||
}
|
||||
|
||||
payload.logger.error({ err, msg: errorMessage })
|
||||
return null
|
||||
}
|
||||
}
|
||||
@@ -448,6 +448,7 @@ export const clientTranslationKeys = createClientTranslationKeys([
|
||||
'version:aboutToRestoreGlobal',
|
||||
'version:aboutToRevertToPublished',
|
||||
'version:aboutToUnpublish',
|
||||
'version:aboutToUnpublishIn',
|
||||
'version:aboutToUnpublishSelection',
|
||||
'version:autosave',
|
||||
'version:autosavedSuccessfully',
|
||||
@@ -489,6 +490,7 @@ export const clientTranslationKeys = createClientTranslationKeys([
|
||||
'version:restoreThisVersion',
|
||||
'version:restoring',
|
||||
'version:reverting',
|
||||
'version:revertUnsuccessful',
|
||||
'version:revertToPublished',
|
||||
'version:saveDraft',
|
||||
'version:scheduledSuccessfully',
|
||||
@@ -501,6 +503,7 @@ export const clientTranslationKeys = createClientTranslationKeys([
|
||||
'version:type',
|
||||
'version:unpublish',
|
||||
'version:unpublishing',
|
||||
'version:unpublishedSuccessfully',
|
||||
'version:versionID',
|
||||
'version:version',
|
||||
'version:versions',
|
||||
|
||||
@@ -526,6 +526,7 @@ export const arTranslations: DefaultTranslationsObject = {
|
||||
'أنت على وشك استرجاع الاعداد العامّ {{label}} إلى الحالة التي كان عليها في {{versionDate}}.',
|
||||
aboutToRevertToPublished: 'أنت على وشك إعادة هذا المستند إلى حالته المنشورة. هل أنت متأكّد؟',
|
||||
aboutToUnpublish: 'أنت على وشك إلغاء نشر هذا المستند. هل أنت متأكّد؟',
|
||||
aboutToUnpublishIn: 'أنت على وشك إلغاء نشر هذا المستند في {{locale}}. هل أنت متأكد؟',
|
||||
aboutToUnpublishSelection: 'أنت على وشك إلغاء نشر كلّ {{label}} في التّحديد. هل أنت متأكّد؟',
|
||||
autosave: 'حفظ تلقائي',
|
||||
autosavedSuccessfully: 'تمّ الحفظ التّلقائي بنجاح.',
|
||||
@@ -570,6 +571,7 @@ export const arTranslations: DefaultTranslationsObject = {
|
||||
restoring: 'تتمّ الاستعادة...',
|
||||
reverting: 'يتمّ الاسترجاع...',
|
||||
revertToPublished: 'الرّجوع للنسخة المنشورة',
|
||||
revertUnsuccessful: 'فشل في الرجوع. لم يتم العثور على نسخة نشرت سابقا.',
|
||||
saveDraft: 'حفظ المسودّة',
|
||||
scheduledSuccessfully: 'تم الجدولة بنجاح.',
|
||||
schedulePublish: 'جدول النشر',
|
||||
@@ -580,6 +582,7 @@ export const arTranslations: DefaultTranslationsObject = {
|
||||
specificVersion: 'الإصدار المحدد',
|
||||
status: 'الحالة',
|
||||
unpublish: 'الغاء النّشر',
|
||||
unpublishedSuccessfully: 'تم الإلغاء بنجاح.',
|
||||
unpublishing: 'يتمّ الغاء النّشر...',
|
||||
version: 'النّسخة',
|
||||
versionAgo: 'منذ {{distance}}',
|
||||
|
||||
@@ -543,6 +543,7 @@ export const azTranslations: DefaultTranslationsObject = {
|
||||
aboutToRevertToPublished:
|
||||
'Bu sənədin dəyişikliklərini dərc edilmiş vəziyyətinə qaytarmağa hazırsınız. Əminsiniz?',
|
||||
aboutToUnpublish: 'Bu sənədi dərcdən çıxartmağa hazırsınız. Əminsiniz?',
|
||||
aboutToUnpublishIn: 'Siz bu sənədi {{locale}} dildə nəşr etməyi dayandırmaqdasınız. Əminsiniz?',
|
||||
aboutToUnpublishSelection:
|
||||
'Seçimdə olan bütün {{label}}-i dərcdən çıxartmağa hazırsınız. Əminsiniz?',
|
||||
autosave: 'Avtomatik yadda saxlama',
|
||||
@@ -588,6 +589,8 @@ export const azTranslations: DefaultTranslationsObject = {
|
||||
restoring: 'Bərpa olunur...',
|
||||
reverting: 'Qayıdılır...',
|
||||
revertToPublished: 'Dərc edilmişə qayıt',
|
||||
revertUnsuccessful:
|
||||
'Əvvəlki versiyanı geri qaytarma uğursuz oldu. Daha öncədən nəşr edilmiş versiya tapılmadı.',
|
||||
saveDraft: 'Qaralamayı yadda saxla',
|
||||
scheduledSuccessfully: 'Uğurla cədvələ qoyuldu.',
|
||||
schedulePublish: 'Nəşr Cədvəli',
|
||||
@@ -598,6 +601,7 @@ export const azTranslations: DefaultTranslationsObject = {
|
||||
specificVersion: 'Xüsusi Versiya',
|
||||
status: 'Status',
|
||||
unpublish: 'Dərcdən çıxart',
|
||||
unpublishedSuccessfully: 'Uğurla dərc olunmadı.',
|
||||
unpublishing: 'Dərcdən çıxarılır...',
|
||||
version: 'Versiya',
|
||||
versionAgo: '{{distance}} əvvəl',
|
||||
|
||||
@@ -540,6 +540,8 @@ export const bgTranslations: DefaultTranslationsObject = {
|
||||
aboutToRevertToPublished:
|
||||
'На път си да възстановиш промените на този документ до публикуваното му състояние. Сигурен ли си?',
|
||||
aboutToUnpublish: 'На път си да скриеш този документ. Сигурен ли си?',
|
||||
aboutToUnpublishIn:
|
||||
'Предстои да оттеглите публикацията на този документ в {{locale}}. Сигурни ли сте?',
|
||||
aboutToUnpublishSelection: 'На път си да скриеш всички избрани {{label}}. Сигурен ли си?',
|
||||
autosave: 'Автоматично запазване',
|
||||
autosavedSuccessfully: 'Успешно автоматично запазване.',
|
||||
@@ -584,6 +586,7 @@ export const bgTranslations: DefaultTranslationsObject = {
|
||||
restoring: 'Възстановяване...',
|
||||
reverting: 'Връщане..',
|
||||
revertToPublished: 'Върни се до публикуваното',
|
||||
revertUnsuccessful: 'Връщането е неуспешно. Не е открита предишно публикувана версия.',
|
||||
saveDraft: 'Запази чернова',
|
||||
scheduledSuccessfully: 'Успешно насрочено.',
|
||||
schedulePublish: 'Планирано публикуване',
|
||||
@@ -594,6 +597,7 @@ export const bgTranslations: DefaultTranslationsObject = {
|
||||
specificVersion: 'Специфична версия',
|
||||
status: 'Статус',
|
||||
unpublish: 'Скрий',
|
||||
unpublishedSuccessfully: 'Успешно оттеглено.',
|
||||
unpublishing: 'Скриване...',
|
||||
version: 'Версия',
|
||||
versionAgo: 'преди {{distance}}',
|
||||
|
||||
@@ -545,6 +545,8 @@ export const bnBdTranslations: DefaultTranslationsObject = {
|
||||
aboutToRevertToPublished:
|
||||
'আপনি এই ডকুমেন্টের পরিবর্তনগুলি তার প্রকাশিত অবস্থায় ফিরিয়ে আনতে চলেছেন। আপনি কি নিশ্চিত?',
|
||||
aboutToUnpublish: 'আপনি এই ডকুমেন্টটি আনপাবলিশ করতে চলেছেন। আপনি কি নিশ্চিত?',
|
||||
aboutToUnpublishIn:
|
||||
'আপনি সাবধানে এই দস্তাবেজ টি {{locale}} -এ অপ্রকাশিত করতে যাচ্ছেন। আপনি কি নিশ্চিত?',
|
||||
aboutToUnpublishSelection:
|
||||
'আপনি নির্বাচনে সমস্ত {{label}} আনপাবলিশ করতে চলেছেন। আপনি কি নিশ্চিত?',
|
||||
autosave: 'স্বয়ংক্রিয় সংরক্ষণ',
|
||||
@@ -590,6 +592,7 @@ export const bnBdTranslations: DefaultTranslationsObject = {
|
||||
restoring: 'পুনরুদ্ধার করা হচ্ছে...',
|
||||
reverting: 'পূর্বাবস্থায় ফেরানো হচ্ছে...',
|
||||
revertToPublished: 'প্রকাশিত সংস্করণে ফিরে যান',
|
||||
revertUnsuccessful: 'পুনরায় ব্যর্থ হয়েছে। কোনও পূর্বে প্রকাশিত সংস্করণ পাওয়া যায় নি।',
|
||||
saveDraft: 'খসড়া সংরক্ষণ করুন',
|
||||
scheduledSuccessfully: 'সফলভাবে নির্ধারিত হয়েছে।',
|
||||
schedulePublish: 'প্রকাশের সময়সূচী নির্ধারণ করুন',
|
||||
@@ -600,6 +603,7 @@ export const bnBdTranslations: DefaultTranslationsObject = {
|
||||
specificVersion: 'নির্দিষ্ট সংস্করণ',
|
||||
status: 'স্থিতি',
|
||||
unpublish: 'প্রকাশ বাতিল করুন',
|
||||
unpublishedSuccessfully: 'সফলভাবে অপ্রকাশিত হয়েছে।',
|
||||
unpublishing: 'প্রকাশ বাতিল করা হচ্ছে...',
|
||||
version: 'সংস্করণ',
|
||||
versionAgo: '{{distance}} পূর্বে',
|
||||
|
||||
@@ -544,6 +544,7 @@ export const bnInTranslations: DefaultTranslationsObject = {
|
||||
aboutToRevertToPublished:
|
||||
'আপনি এই ডকুমেন্টের পরিবর্তনগুলি তার প্রকাশিত অবস্থায় ফিরিয়ে আনতে চলেছেন। আপনি কি নিশ্চিত?',
|
||||
aboutToUnpublish: 'আপনি এই ডকুমেন্টটি আনপাবলিশ করতে চলেছেন। আপনি কি নিশ্চিত?',
|
||||
aboutToUnpublishIn: 'আপনি এই নথিটি {{locale}} এ আন-পাবলিশ করতে চলেছেন। আপনি কি নিশ্চিত?',
|
||||
aboutToUnpublishSelection:
|
||||
'আপনি নির্বাচনে সমস্ত {{label}} আনপাবলিশ করতে চলেছেন। আপনি কি নিশ্চিত?',
|
||||
autosave: 'স্বয়ংক্রিয় সংরক্ষণ',
|
||||
@@ -589,6 +590,7 @@ export const bnInTranslations: DefaultTranslationsObject = {
|
||||
restoring: 'পুনরুদ্ধার করা হচ্ছে...',
|
||||
reverting: 'পূর্বাবস্থায় ফেরানো হচ্ছে...',
|
||||
revertToPublished: 'প্রকাশিত সংস্করণে ফিরে যান',
|
||||
revertUnsuccessful: 'প্রত্যাহার অসফল। কোন পূর্বে প্রকাশিত সংস্করণ পাওয়া যায়নি।',
|
||||
saveDraft: 'খসড়া সংরক্ষণ করুন',
|
||||
scheduledSuccessfully: 'সফলভাবে নির্ধারিত হয়েছে।',
|
||||
schedulePublish: 'প্রকাশের সময়সূচী নির্ধারণ করুন',
|
||||
@@ -599,6 +601,7 @@ export const bnInTranslations: DefaultTranslationsObject = {
|
||||
specificVersion: 'নির্দিষ্ট সংস্করণ',
|
||||
status: 'স্থিতি',
|
||||
unpublish: 'প্রকাশ বাতিল করুন',
|
||||
unpublishedSuccessfully: 'সফলভাবে অপ্রকাশিত হয়েছে।',
|
||||
unpublishing: 'প্রকাশ বাতিল করা হচ্ছে...',
|
||||
version: 'সংস্করণ',
|
||||
versionAgo: '{{distance}} পূর্বে',
|
||||
|
||||
@@ -544,6 +544,7 @@ export const caTranslations: DefaultTranslationsObject = {
|
||||
aboutToRevertToPublished:
|
||||
"Estàs a punt de revertir els canvis d'aquest document a l'estat publicat. Estàs segur?",
|
||||
aboutToUnpublish: 'Estàs a punt de despublicar aquest document. Estàs segur?',
|
||||
aboutToUnpublishIn: "Estàs a punt de despublicar aquest document en {{locale}}. N'estàs segur?",
|
||||
aboutToUnpublishSelection:
|
||||
'Estàs a punt de despublicar tots els {{label}} de la selecció. Estàs segur?',
|
||||
autosave: 'Desa automàticament',
|
||||
@@ -589,6 +590,7 @@ export const caTranslations: DefaultTranslationsObject = {
|
||||
restoring: 'Restaurant...',
|
||||
reverting: 'Revertint...',
|
||||
revertToPublished: 'Revertir a publicat',
|
||||
revertUnsuccessful: "Reversió sense èxit. No s'ha trobat cap versió publicada anteriorment.",
|
||||
saveDraft: 'Desar borrador',
|
||||
scheduledSuccessfully: 'Programat amb èxit.',
|
||||
schedulePublish: 'Programar publicació',
|
||||
@@ -599,6 +601,7 @@ export const caTranslations: DefaultTranslationsObject = {
|
||||
specificVersion: 'Versió Específica',
|
||||
status: 'Estat',
|
||||
unpublish: 'Despublicar',
|
||||
unpublishedSuccessfully: 'Publicació desfeta correctament.',
|
||||
unpublishing: 'Despublicant...',
|
||||
version: 'Versió',
|
||||
versionAgo: 'fa {{distance}}',
|
||||
|
||||
@@ -537,6 +537,8 @@ export const csTranslations: DefaultTranslationsObject = {
|
||||
aboutToRevertToPublished:
|
||||
'Chystáte se vrátit změny tohoto dokumentu do jeho publikovaného stavu. Jste si jisti?',
|
||||
aboutToUnpublish: 'Chystáte se zrušit publikování tohoto dokumentu. Jste si jisti?',
|
||||
aboutToUnpublishIn:
|
||||
'Chystáte se zrušit publikaci tohoto dokumentu v {{locale}}. Jste si jistý?',
|
||||
aboutToUnpublishSelection:
|
||||
'Chystáte se zrušit publikování všech {{label}} ve výběru. Jsi si jistá?',
|
||||
autosave: 'Automatické uložení',
|
||||
@@ -582,6 +584,7 @@ export const csTranslations: DefaultTranslationsObject = {
|
||||
restoring: 'Obnovování...',
|
||||
reverting: 'Vracení...',
|
||||
revertToPublished: 'Vrátit se k publikovanému',
|
||||
revertUnsuccessful: 'Vrácení neúspěšné. Nebyla nalezena žádná předchozí publikovaná verze.',
|
||||
saveDraft: 'Uložit koncept',
|
||||
scheduledSuccessfully: 'Úspěšně naplánováno.',
|
||||
schedulePublish: 'Naplánovat publikaci',
|
||||
@@ -592,6 +595,7 @@ export const csTranslations: DefaultTranslationsObject = {
|
||||
specificVersion: 'Specifická verze',
|
||||
status: 'Stav',
|
||||
unpublish: 'Zrušit publikování',
|
||||
unpublishedSuccessfully: 'Úspěšně nezveřejněno.',
|
||||
unpublishing: 'Zrušuji publikování...',
|
||||
version: 'Verze',
|
||||
versionAgo: 'před {{distance}}',
|
||||
|
||||
@@ -539,6 +539,7 @@ export const daTranslations: DefaultTranslationsObject = {
|
||||
aboutToRevertToPublished:
|
||||
'Du er ved at tilbagerulle dette dokuments ændringer til dets offentliggjorte tilstand. Er du sikker?',
|
||||
aboutToUnpublish: 'Du er ved at afpublicere dette dokument. Er du sikker?',
|
||||
aboutToUnpublishIn: 'Du er ved at afpublicere dette dokument i {{locale}}. Er du sikker?',
|
||||
aboutToUnpublishSelection:
|
||||
'Du er ved at afpublicere alt {{label}} i denne sektion. Er du sikker?',
|
||||
autosave: 'Autosave',
|
||||
@@ -584,6 +585,8 @@ export const daTranslations: DefaultTranslationsObject = {
|
||||
restoring: 'Gendanner...',
|
||||
reverting: 'Tilbageruller...',
|
||||
revertToPublished: 'Tilbagerul til offentliggjort',
|
||||
revertUnsuccessful:
|
||||
'Tilbageføring mislykkedes. Ingen tidligere offentliggjorte version fundet.',
|
||||
saveDraft: 'Gem kladde',
|
||||
scheduledSuccessfully: 'Planlagt med succes.',
|
||||
schedulePublish: 'Planlæg offentliggørelse',
|
||||
@@ -594,6 +597,7 @@ export const daTranslations: DefaultTranslationsObject = {
|
||||
specificVersion: 'Specifik Version',
|
||||
status: 'Status',
|
||||
unpublish: 'Afpublicer',
|
||||
unpublishedSuccessfully: 'Offentliggørelse annulleret med succes.',
|
||||
unpublishing: 'Afpublicerer...',
|
||||
version: 'Version',
|
||||
versionAgo: '{{distance}} siden',
|
||||
|
||||
@@ -551,6 +551,8 @@ export const deTranslations: DefaultTranslationsObject = {
|
||||
aboutToRevertToPublished:
|
||||
'Du bist dabei, dieses Dokument auf den Stand des ersten Veröffentlichungsdatums zurückzusetzen. Bist du sicher?',
|
||||
aboutToUnpublish: 'Du bist dabei dieses Dokument auf Entwurf zu setzen. Bist du dir sicher?',
|
||||
aboutToUnpublishIn:
|
||||
'Sie sind dabei, dieses Dokument in {{locale}} zu entöffentlichen. Sind Sie sicher?',
|
||||
aboutToUnpublishSelection:
|
||||
'Du bist dabei, die Veröffentlichung aller {{label}} in der Auswahl aufzuheben. Bist du dir sicher?',
|
||||
autosave: 'Automatische Speicherung',
|
||||
@@ -596,6 +598,8 @@ export const deTranslations: DefaultTranslationsObject = {
|
||||
restoring: 'Wiederherstellen...',
|
||||
reverting: 'Zurücksetzen...',
|
||||
revertToPublished: 'Auf veröffentlichte Version zurücksetzen',
|
||||
revertUnsuccessful:
|
||||
'Rückgängigmachung fehlgeschlagen. Keine zuvor veröffentlichte Version gefunden.',
|
||||
saveDraft: 'Entwurf speichern',
|
||||
scheduledSuccessfully: 'Erfolgreich geplant.',
|
||||
schedulePublish: 'Veröffentlichungsplan',
|
||||
@@ -606,6 +610,7 @@ export const deTranslations: DefaultTranslationsObject = {
|
||||
specificVersion: 'Spezifische Version',
|
||||
status: 'Status',
|
||||
unpublish: 'Veröffentlichung aufheben',
|
||||
unpublishedSuccessfully: 'Erfolgreich unveröffentlicht.',
|
||||
unpublishing: 'Veröffentlichung aufheben...',
|
||||
version: 'Version',
|
||||
versionAgo: 'vor {{distance}}',
|
||||
|
||||
@@ -543,6 +543,7 @@ export const enTranslations = {
|
||||
aboutToRevertToPublished:
|
||||
"You are about to revert this document's changes to its published state. Are you sure?",
|
||||
aboutToUnpublish: 'You are about to unpublish this document. Are you sure?',
|
||||
aboutToUnpublishIn: 'You are about to unpublish this document in {{locale}}. Are you sure?',
|
||||
aboutToUnpublishSelection:
|
||||
'You are about to unpublish all {{label}} in the selection. Are you sure?',
|
||||
autosave: 'Autosave',
|
||||
@@ -588,6 +589,7 @@ export const enTranslations = {
|
||||
restoring: 'Restoring...',
|
||||
reverting: 'Reverting...',
|
||||
revertToPublished: 'Revert to published',
|
||||
revertUnsuccessful: 'Revert unsuccessful. No previously published version found.',
|
||||
saveDraft: 'Save Draft',
|
||||
scheduledSuccessfully: 'Scheduled successfully.',
|
||||
schedulePublish: 'Schedule Publish',
|
||||
@@ -598,6 +600,7 @@ export const enTranslations = {
|
||||
specificVersion: 'Specific Version',
|
||||
status: 'Status',
|
||||
unpublish: 'Unpublish',
|
||||
unpublishedSuccessfully: 'Unpublished successfully.',
|
||||
unpublishing: 'Unpublishing...',
|
||||
version: 'Version',
|
||||
versionAgo: '{{distance}} ago',
|
||||
|
||||
@@ -546,6 +546,7 @@ export const esTranslations: DefaultTranslationsObject = {
|
||||
aboutToRevertToPublished:
|
||||
'Estás a punto de revertir los cambios de este documento a su estado publicado. ¿Estás seguro?',
|
||||
aboutToUnpublish: 'Estás a punto de despublicar este documento. ¿Estás seguro?',
|
||||
aboutToUnpublishIn: 'Estás a punto de despublicar este documento en {{locale}}. ¿Estás seguro?',
|
||||
aboutToUnpublishSelection:
|
||||
'Estás a punto de despublicar todos los {{label}} seleccionados. ¿Estás seguro?',
|
||||
autosave: 'Autoguardado',
|
||||
@@ -591,6 +592,7 @@ export const esTranslations: DefaultTranslationsObject = {
|
||||
restoring: 'Restaurando...',
|
||||
reverting: 'Revirtiendo...',
|
||||
revertToPublished: 'Revertir a la versión publicada',
|
||||
revertUnsuccessful: 'Reversión fallida. No se encontró una versión previamente publicada.',
|
||||
saveDraft: 'Guardar borrador',
|
||||
scheduledSuccessfully: 'Programado con éxito.',
|
||||
schedulePublish: 'Programar publicación',
|
||||
@@ -601,6 +603,7 @@ export const esTranslations: DefaultTranslationsObject = {
|
||||
specificVersion: 'Versión Específica',
|
||||
status: 'Estado',
|
||||
unpublish: 'Despublicar',
|
||||
unpublishedSuccessfully: 'Se ha despublicado con éxito.',
|
||||
unpublishing: 'Despublicando...',
|
||||
version: 'Versión',
|
||||
versionAgo: 'hace {{distance}}',
|
||||
|
||||
@@ -533,6 +533,7 @@ export const etTranslations: DefaultTranslationsObject = {
|
||||
aboutToRevertToPublished:
|
||||
'Olete taastamas selle dokumendi muudatusi avaldatud seisundisse. Olete kindel?',
|
||||
aboutToUnpublish: 'Olete tühistamas selle dokumendi avaldamist. Olete kindel?',
|
||||
aboutToUnpublishIn: 'Olete just {{locale}} dokumendi avaldamise lõpetamas. Olete kindel?',
|
||||
aboutToUnpublishSelection: 'Olete tühistamas kõigi valitud {{label}} avaldamist. Olete kindel?',
|
||||
autosave: 'Automaatne salvestamine',
|
||||
autosavedSuccessfully: 'Automaatselt salvestatud.',
|
||||
@@ -577,6 +578,7 @@ export const etTranslations: DefaultTranslationsObject = {
|
||||
restoring: 'Taastamine...',
|
||||
reverting: 'Taastamine...',
|
||||
revertToPublished: 'Taasta avaldatud seisund',
|
||||
revertUnsuccessful: 'Tagasipöördumine ebaõnnestus. Eelnevalt avaldatud versiooni ei leitud.',
|
||||
saveDraft: 'Salvesta mustand',
|
||||
scheduledSuccessfully: 'Planeeritud edukalt.',
|
||||
schedulePublish: 'Planeeri avaldamine',
|
||||
@@ -587,6 +589,7 @@ export const etTranslations: DefaultTranslationsObject = {
|
||||
specificVersion: 'Spetsiifiline versioon',
|
||||
status: 'Olek',
|
||||
unpublish: 'Tühista avaldamine',
|
||||
unpublishedSuccessfully: 'Edastamata edukalt.',
|
||||
unpublishing: 'Avaldamise tühistamine...',
|
||||
version: 'Versioon',
|
||||
versionAgo: '{{distance}} tagasi',
|
||||
|
||||
@@ -535,6 +535,7 @@ export const faTranslations: DefaultTranslationsObject = {
|
||||
aboutToRevertToPublished:
|
||||
'شما در حال بازگردانی تغییرات این رسانه به وضعیت منتشر شده آن هستید. از این کار اطمینان دارید؟',
|
||||
aboutToUnpublish: 'شما در حال لغو انتشار این سند هستید، آیا از این کار اطمینان دارید؟',
|
||||
aboutToUnpublishIn: 'شما در حال غیرانتشار این سند در {{locale}} هستید. آیا مطمئن هستید؟',
|
||||
aboutToUnpublishSelection: 'شما در شرف لغو انتشار {{label}} برگزیده هستید. ایا اطمینان دارید؟',
|
||||
autosave: 'ذخیره خودکار',
|
||||
autosavedSuccessfully: 'با موفقیت ذخیره خودکار شد.',
|
||||
@@ -579,6 +580,7 @@ export const faTranslations: DefaultTranslationsObject = {
|
||||
restoring: 'در حال بازیابی...',
|
||||
reverting: 'در حال بازگردانی...',
|
||||
revertToPublished: 'بازگردانی به انتشار یافته',
|
||||
revertUnsuccessful: 'بازگشت ناموفق. نسخه قبلا منتشر شدهای یافت نشد.',
|
||||
saveDraft: 'ذخیره پیشنویس',
|
||||
scheduledSuccessfully: 'با موفقیت زمانبندی شد.',
|
||||
schedulePublish: 'برنامه انتشار',
|
||||
@@ -589,6 +591,7 @@ export const faTranslations: DefaultTranslationsObject = {
|
||||
specificVersion: 'نسخه مشخص',
|
||||
status: 'وضعیت',
|
||||
unpublish: 'لغو انتشار',
|
||||
unpublishedSuccessfully: 'با موفقیت منتشر نشد.',
|
||||
unpublishing: 'در حال لغو انتشار...',
|
||||
version: 'نگارش',
|
||||
versionAgo: '{{distance}} پیش',
|
||||
|
||||
@@ -555,6 +555,8 @@ export const frTranslations: DefaultTranslationsObject = {
|
||||
'Vous êtes sur le point de rétablir les modifications apportées à ce document à la version publiée. Êtes-vous sûr ?',
|
||||
aboutToUnpublish:
|
||||
'Vous êtes sur le point d’annuler la publication de ce document. Êtes-vous sûr ?',
|
||||
aboutToUnpublishIn:
|
||||
'Vous êtes sur le point de dépublier ce document en {{locale}}. Êtes-vous sûr ?',
|
||||
aboutToUnpublishSelection:
|
||||
'Vous êtes sur le point de dépublier tous les {{label}} de la sélection. Êtes-vous sûr ?',
|
||||
autosave: 'Enregistrement automatique',
|
||||
@@ -600,6 +602,7 @@ export const frTranslations: DefaultTranslationsObject = {
|
||||
restoring: 'Restauration en cours...',
|
||||
reverting: 'Republication en cours...',
|
||||
revertToPublished: 'Republier',
|
||||
revertUnsuccessful: 'Rétablissement échoué. Aucune version précédemment publiée trouvée.',
|
||||
saveDraft: 'Enregistrer le brouillon',
|
||||
scheduledSuccessfully: 'Programmé avec succès.',
|
||||
schedulePublish: 'Programmer la publication',
|
||||
@@ -610,6 +613,7 @@ export const frTranslations: DefaultTranslationsObject = {
|
||||
specificVersion: 'Version spécifique',
|
||||
status: 'Statut',
|
||||
unpublish: 'Annuler la publication',
|
||||
unpublishedSuccessfully: 'Non publié avec succès.',
|
||||
unpublishing: 'Annulation en cours...',
|
||||
version: 'Version',
|
||||
versionAgo: 'il y a {{distance}}',
|
||||
|
||||
@@ -522,6 +522,7 @@ export const heTranslations: DefaultTranslationsObject = {
|
||||
'אתה עומד לשחזר את {{label}} הגלובלי למצב שהיה בו בתאריך {{versionDate}}.',
|
||||
aboutToRevertToPublished: 'אתה עומד להחזיר את השינויים במסמך הזה לגרסה שפורסמה. האם אתה בטוח?',
|
||||
aboutToUnpublish: 'אתה עומד לבטל את הפרסום של מסמך זה. האם אתה בטוח?',
|
||||
aboutToUnpublishIn: 'אתה עומד לבטל את פרסום המסמך הזה ב-{{locale}}. האם אתה בטוח?',
|
||||
aboutToUnpublishSelection: 'אתה עומד לבטל את הפרסום של כל ה{{label}} שנבחרו. האם אתה בטוח?',
|
||||
autosave: 'שמירה אוטומטית',
|
||||
autosavedSuccessfully: 'נשמר בהצלחה.',
|
||||
@@ -566,6 +567,7 @@ export const heTranslations: DefaultTranslationsObject = {
|
||||
restoring: 'משחזר...',
|
||||
reverting: 'משחזר...',
|
||||
revertToPublished: 'שחזר לגרסה שפורסמה',
|
||||
revertUnsuccessful: 'החזרה לא הצליחה. לא נמצאה גרסה שפורסמה קודם.',
|
||||
saveDraft: 'שמור טיוטה',
|
||||
scheduledSuccessfully: 'תוזמן בהצלחה.',
|
||||
schedulePublish: 'לוח זמנים לפרסום',
|
||||
@@ -576,6 +578,7 @@ export const heTranslations: DefaultTranslationsObject = {
|
||||
specificVersion: 'גרסה מסוימת',
|
||||
status: 'סטטוס',
|
||||
unpublish: 'בטל פרסום',
|
||||
unpublishedSuccessfully: 'לא פורסם בהצלחה.',
|
||||
unpublishing: 'מבטל פרסום...',
|
||||
version: 'גרסה',
|
||||
versionAgo: 'לפני {{distance}}',
|
||||
|
||||
@@ -537,6 +537,7 @@ export const hrTranslations: DefaultTranslationsObject = {
|
||||
aboutToRevertToPublished:
|
||||
'Vratit ćete promjene u dokumentu u objavljeno stanje. Jeste li sigurni? ',
|
||||
aboutToUnpublish: 'Poništit ćete objavu ovog dokumenta. Jeste li sigurni?',
|
||||
aboutToUnpublishIn: 'Na rubu ste da povučete ovaj dokument u {{locale}}. Jeste li sigurni?',
|
||||
aboutToUnpublishSelection:
|
||||
'Upravo ćete poništiti objavu svih {{label}} u odabiru. Jeste li sigurni?',
|
||||
autosave: 'Automatsko spremanje',
|
||||
@@ -582,6 +583,7 @@ export const hrTranslations: DefaultTranslationsObject = {
|
||||
restoring: 'Vraćanje...',
|
||||
reverting: 'Vraćanje...',
|
||||
revertToPublished: 'Vrati na objavljeno',
|
||||
revertUnsuccessful: 'Povratak nije uspio. Nije pronađena prethodno objavljena verzija.',
|
||||
saveDraft: 'Sačuvaj nacrt',
|
||||
scheduledSuccessfully: 'Uspješno zakazano.',
|
||||
schedulePublish: 'Raspored objavljivanja',
|
||||
@@ -592,6 +594,7 @@ export const hrTranslations: DefaultTranslationsObject = {
|
||||
specificVersion: 'Specifična verzija',
|
||||
status: 'Status',
|
||||
unpublish: 'Poništi objavu',
|
||||
unpublishedSuccessfully: 'Uspješno nepobjavljeno.',
|
||||
unpublishing: 'Poništavanje objave...',
|
||||
version: 'Verzija',
|
||||
versionAgo: 'prije {{distance}}',
|
||||
|
||||
@@ -546,6 +546,8 @@ export const huTranslations: DefaultTranslationsObject = {
|
||||
aboutToRevertToPublished:
|
||||
'Arra készül, hogy visszaállítsa a dokumentum módosításait a közzétett állapotába. Biztos benne?',
|
||||
aboutToUnpublish: 'A dokumentum közzétételének visszavonására készül. Biztos benne?',
|
||||
aboutToUnpublishIn:
|
||||
'Ön arra készül, hogy visszavonja ennek a dokumentumnak a közzétételét a következően: {{locale}}. Biztos benne?',
|
||||
aboutToUnpublishSelection:
|
||||
'Arra készül, hogy visszavonja a kijelölésben szereplő összes {{label}} közzétételét. biztos vagy ebben?',
|
||||
autosave: 'Automatikus mentés',
|
||||
@@ -591,6 +593,7 @@ export const huTranslations: DefaultTranslationsObject = {
|
||||
restoring: 'Visszaállítás...',
|
||||
reverting: 'Visszaállítás...',
|
||||
revertToPublished: 'Visszatérés a közzétetthez',
|
||||
revertUnsuccessful: 'Visszaállítás sikertelen. Nem található korábban publikált változat.',
|
||||
saveDraft: 'Piszkozat mentése',
|
||||
scheduledSuccessfully: 'Sikeresen ütemezve.',
|
||||
schedulePublish: 'Közzététel ütemezése',
|
||||
@@ -601,6 +604,7 @@ export const huTranslations: DefaultTranslationsObject = {
|
||||
specificVersion: 'Specifikus verzió',
|
||||
status: 'Állapot',
|
||||
unpublish: 'Közzététel visszavonása',
|
||||
unpublishedSuccessfully: 'Sikeresen törölve a közzétételről.',
|
||||
unpublishing: 'Közzététel visszavonása...',
|
||||
version: 'Verzió',
|
||||
versionAgo: '{{distance}} ezelőtt',
|
||||
|
||||
@@ -548,6 +548,8 @@ export const hyTranslations: DefaultTranslationsObject = {
|
||||
'Դուք պատրաստվում եք հետ բերել այս փաստաթղթի փոփոխությունները դեպի իր հրապարակված վիճակին։ Համոզվա՞ծ եք։',
|
||||
aboutToUnpublish:
|
||||
'Դուք պատրաստվում եք այս փաստաթուղթը բերել չհրապարակված վիճակի։ Համոզվա՞ծ եք։',
|
||||
aboutToUnpublishIn:
|
||||
'Դուք պատրաստվում եք անհրատարակել այս փաստաթուղթը {{locale}} լեզվով։ Արդյոք համոզվել եք։',
|
||||
aboutToUnpublishSelection:
|
||||
'Դուք պատրաստվում եք ընտրության մեջ գտնվող բոլոր {{label}}-ները բերել չհրապարակված վիճակի։ Համոզվա՞ծ եք։',
|
||||
autosave: 'Ինքնապահպանում',
|
||||
@@ -593,6 +595,7 @@ export const hyTranslations: DefaultTranslationsObject = {
|
||||
restoring: 'Վերականգնվում է...',
|
||||
reverting: 'Հետ է բերվում...',
|
||||
revertToPublished: 'Հետ բերել հրապարակված վիճակին',
|
||||
revertUnsuccessful: 'Վերադարձը չեղարկվեց։ Առաջին առաջ հրատարակվող տարբերակը չգտնվել։',
|
||||
saveDraft: 'Պահպանել սևագիրը',
|
||||
scheduledSuccessfully: 'Հաջողությամբ պլանավորված։',
|
||||
schedulePublish: 'Պլանավորել հրապարակումը',
|
||||
@@ -603,6 +606,7 @@ export const hyTranslations: DefaultTranslationsObject = {
|
||||
specificVersion: 'Մասնավոր Տարբերակ',
|
||||
status: 'Կարգավիճակ',
|
||||
unpublish: 'Բերել չհրապարակված վիճակի։',
|
||||
unpublishedSuccessfully: 'Հրապարակումը հաջողակ չեղարկվել է:',
|
||||
unpublishing: 'Բերվում է չհրապարակված վիճակի...',
|
||||
version: 'Տարբերակ',
|
||||
versionAgo: '{{distance}} առաջ',
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
import { title } from 'process'
|
||||
import type { DefaultTranslationsObject, Language } from '../types.js'
|
||||
|
||||
import type { Language } from '../types.js'
|
||||
|
||||
export const idTranslations = {
|
||||
export const idTranslations: DefaultTranslationsObject = {
|
||||
authentication: {
|
||||
account: 'Akun',
|
||||
accountOfCurrentUser: 'Akun pengguna saat ini',
|
||||
@@ -29,11 +27,9 @@ export const idTranslations = {
|
||||
forgotPassword: 'Lupa Kata Sandi',
|
||||
forgotPasswordEmailInstructions:
|
||||
'Silakan masukkan email Anda di bawah ini. Anda akan menerima pesan email dengan instruksi tentang cara mengatur ulang kata sandi Anda.',
|
||||
forgotPasswordQuestion: 'Lupa kata sandi?',
|
||||
forgotPasswordUsernameInstructions:
|
||||
'Silakan masukkan nama pengguna Anda di bawah ini. Instruksi tentang cara mengatur ulang kata sandi Anda akan dikirim ke alamat email yang terkait dengan nama pengguna Anda.',
|
||||
usernameNotValid: 'Nama pengguna yang diberikan tidak valid',
|
||||
|
||||
forgotPasswordQuestion: 'Lupa kata sandi?',
|
||||
generate: 'Buat',
|
||||
generateNewAPIKey: 'Buat kunci API baru',
|
||||
generatingNewAPIKeyWillInvalidate:
|
||||
@@ -71,6 +67,7 @@ export const idTranslations = {
|
||||
tokenRefreshSuccessful: 'Penyegaran token berhasil.',
|
||||
unableToVerify: 'Tidak Dapat Memverifikasi',
|
||||
username: 'Nama Pengguna',
|
||||
usernameNotValid: 'Nama pengguna yang diberikan tidak valid',
|
||||
verified: 'Terverifikasi',
|
||||
verifiedSuccessfully: 'Berhasil Diverifikasi',
|
||||
verify: 'Verifikasi',
|
||||
@@ -544,6 +541,8 @@ export const idTranslations = {
|
||||
aboutToRevertToPublished:
|
||||
'Anda akan mengembalikan perubahan dokumen ini ke keadaan yang dipublikasikan. Apakah Anda yakin?',
|
||||
aboutToUnpublish: 'Anda akan membatalkan publikasi dokumen ini. Apakah Anda yakin?',
|
||||
aboutToUnpublishIn:
|
||||
'Anda akan membatalkan penerbitan dokumen ini dalam {{locale}}. Apakah Anda yakin?',
|
||||
aboutToUnpublishSelection:
|
||||
'Anda akan membatalkan publikasi semua {{label}} dalam pilihan. Apakah Anda yakin?',
|
||||
autosave: 'Simpan Otomatis',
|
||||
@@ -589,6 +588,8 @@ export const idTranslations = {
|
||||
restoring: 'Memulihkan...',
|
||||
reverting: 'Mengembalikan...',
|
||||
revertToPublished: 'Kembali ke yang dipublikasikan',
|
||||
revertUnsuccessful:
|
||||
'Pembatalan tidak berhasil. Tidak ditemukan versi yang sebelumnya dipublikasikan.',
|
||||
saveDraft: 'Simpan Draf',
|
||||
scheduledSuccessfully: 'Berhasil dijadwalkan.',
|
||||
schedulePublish: 'Jadwalkan Publikasi',
|
||||
@@ -599,6 +600,7 @@ export const idTranslations = {
|
||||
specificVersion: 'Versi Spesifik',
|
||||
status: 'Status',
|
||||
unpublish: 'Batalkan Publikasi',
|
||||
unpublishedSuccessfully: 'Berhasil tidak dipublikasikan.',
|
||||
unpublishing: 'Membatalkan publikasi...',
|
||||
version: 'Versi',
|
||||
versionAgo: '{{distance}} yang lalu',
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { Language } from '../types.js'
|
||||
import type { DefaultTranslationsObject, Language } from '../types.js'
|
||||
|
||||
export const isTranslations = {
|
||||
export const isTranslations: DefaultTranslationsObject = {
|
||||
authentication: {
|
||||
account: 'Aðgangur',
|
||||
accountOfCurrentUser: 'Aðgangur núverandi notanda',
|
||||
@@ -27,11 +27,9 @@ export const isTranslations = {
|
||||
forgotPassword: 'Gleymdist lykilorð',
|
||||
forgotPasswordEmailInstructions:
|
||||
'Vinsamlegast sláðu inn netfangið þitt hér að neðan. Þú munt fá tölvupóst með leiðbeiningum um hvernig á að endurstilla lykilorðið þitt.',
|
||||
forgotPasswordQuestion: 'Gleymdist lykilorðið?',
|
||||
forgotPasswordUsernameInstructions:
|
||||
'Vinsamlegast sláðu inn notandanafnið þitt hér að neðan. Leiðbeiningar um hvernig á að endurstilla lykilorðið þitt verða sendar á netfangið sem tengt er notandanafninu þínu.',
|
||||
usernameNotValid: 'Notandanafnið sem gefið var upp er ekki gilt',
|
||||
|
||||
forgotPasswordQuestion: 'Gleymdist lykilorðið?',
|
||||
generate: 'Búa til',
|
||||
generateNewAPIKey: 'Búa til nýjan API lykil',
|
||||
generatingNewAPIKeyWillInvalidate:
|
||||
@@ -69,6 +67,7 @@ export const isTranslations = {
|
||||
tokenRefreshSuccessful: 'Endurnýjun tokens tókst.',
|
||||
unableToVerify: 'Ekki hægt að staðfesta',
|
||||
username: 'Notandanafn',
|
||||
usernameNotValid: 'Notandanafnið sem gefið var upp er ekki gilt',
|
||||
verified: 'Staðfest',
|
||||
verifiedSuccessfully: 'Staðfest',
|
||||
verify: 'Staðfesta',
|
||||
@@ -540,6 +539,8 @@ export const isTranslations = {
|
||||
aboutToRevertToPublished:
|
||||
'Þú ert að fara að snúa breytingum þessa skjals til baka í útgefna ástandið. Ertu viss?',
|
||||
aboutToUnpublish: 'Þú ert að fara að fela þetta skjal. Ertu viss?',
|
||||
aboutToUnpublishIn:
|
||||
'Þú ert um það bil að afturkalla útgáfuna af þessum skjali í {{locale}}. Ertu viss?',
|
||||
aboutToUnpublishSelection: 'Þú ert að fara að fela öll {{label}} í valinu. Ertu viss?',
|
||||
autosave: 'Sjálfvirk vistun',
|
||||
autosavedSuccessfully: 'Sjálfvirk vistun tókst.',
|
||||
@@ -584,6 +585,7 @@ export const isTranslations = {
|
||||
restoring: 'Endurheimti...',
|
||||
reverting: 'Sný til baka...',
|
||||
revertToPublished: 'Snúa til baka í útgefið',
|
||||
revertUnsuccessful: 'Afturköllun mistókst. Engin fyrri útgáfu fundin.',
|
||||
saveDraft: 'Vista drög',
|
||||
scheduledSuccessfully: 'Áætlað.',
|
||||
schedulePublish: 'Áætla útgáfu',
|
||||
@@ -594,6 +596,7 @@ export const isTranslations = {
|
||||
specificVersion: 'Tiltekin útgáfa',
|
||||
status: 'Staða',
|
||||
unpublish: 'Fela',
|
||||
unpublishedSuccessfully: 'Óbirtist heppilega.',
|
||||
unpublishing: 'Fel...',
|
||||
version: 'Útgáfa',
|
||||
versionAgo: '{{distance}} síðan',
|
||||
@@ -601,7 +604,6 @@ export const isTranslations = {
|
||||
versionCount_none: 'Engar útgáfur fundust',
|
||||
versionCount_one: '{{count}} útgáfa fannst',
|
||||
versionCount_other: '{{count}} útgáfur fundust',
|
||||
versionCreatedOn: '{{version}} búin til þann:',
|
||||
versionID: 'Útgáfuauðkenni',
|
||||
versions: 'Útgáfur',
|
||||
viewingVersion: 'Skoða útgáfu fyrir {{entityLabel}} {{documentTitle}}',
|
||||
|
||||
@@ -545,6 +545,8 @@ export const itTranslations: DefaultTranslationsObject = {
|
||||
aboutToRevertToPublished:
|
||||
'Stai per ripristinare le modifiche di questo documento al suo stato pubblicato. Sei sicuro?',
|
||||
aboutToUnpublish: 'Stai per annullare la pubblicazione di questo documento. Sei sicuro?',
|
||||
aboutToUnpublishIn:
|
||||
'Stai per annullare la pubblicazione di questo documento in {{locale}}. Sei sicuro?',
|
||||
aboutToUnpublishSelection:
|
||||
'Stai per annullare la pubblicazione di tutte le {{label}} nella selezione. Sei sicuro?',
|
||||
autosave: 'Salvataggio automatico',
|
||||
@@ -590,6 +592,8 @@ export const itTranslations: DefaultTranslationsObject = {
|
||||
restoring: 'Ripristino...',
|
||||
reverting: 'Ritorno...',
|
||||
revertToPublished: 'Ritorna alla versione pubblicata',
|
||||
revertUnsuccessful:
|
||||
'Annullamento non riuscito. Nessuna versione precedentemente pubblicata trovata.',
|
||||
saveDraft: 'Salva Bozza',
|
||||
scheduledSuccessfully: 'Programmato con successo.',
|
||||
schedulePublish: 'Pubblicazione Programmata',
|
||||
@@ -600,6 +604,7 @@ export const itTranslations: DefaultTranslationsObject = {
|
||||
specificVersion: 'Versione Specifica',
|
||||
status: 'Stato',
|
||||
unpublish: 'Annulla pubblicazione',
|
||||
unpublishedSuccessfully: 'Pubblicazione disattivata con successo.',
|
||||
unpublishing: 'Annullamento pubblicazione...',
|
||||
version: 'Versione',
|
||||
versionAgo: '{{distance}} fa',
|
||||
|
||||
@@ -540,6 +540,8 @@ export const jaTranslations: DefaultTranslationsObject = {
|
||||
aboutToRevertToPublished:
|
||||
'このデータの変更を公開時の状態に戻そうとしています。よろしいですか?',
|
||||
aboutToUnpublish: 'このデータを非公開にしようとしています。よろしいですか?',
|
||||
aboutToUnpublishIn:
|
||||
'あなたはこのドキュメントを{{locale}}で非公開にしようとしています。よろしいですか?',
|
||||
aboutToUnpublishSelection:
|
||||
'選択したすべての{{label}}の公開を取り消そうとしています。よろしいですか?',
|
||||
autosave: '自動保存',
|
||||
@@ -585,6 +587,8 @@ export const jaTranslations: DefaultTranslationsObject = {
|
||||
restoring: '復元しています...',
|
||||
reverting: '内容を戻しています...',
|
||||
revertToPublished: '公開時の内容に戻す',
|
||||
revertUnsuccessful:
|
||||
'元に戻すことができませんでした。以前に公開されたバージョンが見つかりませんでした。',
|
||||
saveDraft: 'ドラフトを保存',
|
||||
scheduledSuccessfully: '正常にスケジュールされました。',
|
||||
schedulePublish: 'スケジュール公開',
|
||||
@@ -595,6 +599,7 @@ export const jaTranslations: DefaultTranslationsObject = {
|
||||
specificVersion: '特定のバージョン',
|
||||
status: 'ステータス',
|
||||
unpublish: '非公開',
|
||||
unpublishedSuccessfully: '正常に未公開になりました。',
|
||||
unpublishing: '非公開中...',
|
||||
version: 'バージョン',
|
||||
versionAgo: '{{distance}}前',
|
||||
|
||||
@@ -534,6 +534,7 @@ export const koTranslations: DefaultTranslationsObject = {
|
||||
aboutToRevertToPublished:
|
||||
'이 문서의 변경 사항을 게시된 상태로 되돌리려고 합니다. 계속하시겠습니까?',
|
||||
aboutToUnpublish: '이 문서를 게시 해제하려고 합니다. 계속하시겠습니까?',
|
||||
aboutToUnpublishIn: '당신은 이 문서를 {{locale}}에서 공개를 취소하려고 합니다. 확실합니까?',
|
||||
aboutToUnpublishSelection: '선택한 {{label}}을(를) 게시 해제하려고 합니다. 계속하시겠습니까?',
|
||||
autosave: '자동 저장',
|
||||
autosavedSuccessfully: '자동 저장이 완료되었습니다.',
|
||||
@@ -578,6 +579,7 @@ export const koTranslations: DefaultTranslationsObject = {
|
||||
restoring: '복원 중...',
|
||||
reverting: '되돌리는 중...',
|
||||
revertToPublished: '게시된 상태로 되돌리기',
|
||||
revertUnsuccessful: '실패한 되돌리기. 이전에 게시된 버전을 찾을 수 없습니다.',
|
||||
saveDraft: '초안 저장',
|
||||
scheduledSuccessfully: '성공적으로 예약되었습니다.',
|
||||
schedulePublish: '발행 일정',
|
||||
@@ -588,6 +590,7 @@ export const koTranslations: DefaultTranslationsObject = {
|
||||
specificVersion: '특정 버전',
|
||||
status: '상태',
|
||||
unpublish: '게시 해제',
|
||||
unpublishedSuccessfully: '성공적으로 발행 취소되었습니다.',
|
||||
unpublishing: '게시 해제 중...',
|
||||
version: '버전',
|
||||
versionAgo: '{{distance}} 전',
|
||||
|
||||
@@ -544,6 +544,8 @@ export const ltTranslations: DefaultTranslationsObject = {
|
||||
aboutToRevertToPublished:
|
||||
'Jūs ketinate atšaukti šio dokumento pakeitimus ir grįžti prie publikuotos versijos. Ar esate įsitikinęs?',
|
||||
aboutToUnpublish: 'Jūs ketinate panaikinti šio dokumento publikavimą. Ar esate tikri?',
|
||||
aboutToUnpublishIn:
|
||||
'Jūs ketinate panaikinti šio dokumento publikaciją {{locale}}. Ar esate tikri?',
|
||||
aboutToUnpublishSelection:
|
||||
'Jūs ketinate atšaukti visų {{label}} pasirinkime. Ar esate įsitikinęs?',
|
||||
autosave: 'Automatinis išsaugojimas',
|
||||
@@ -589,6 +591,7 @@ export const ltTranslations: DefaultTranslationsObject = {
|
||||
restoring: 'Atkuriamas...',
|
||||
reverting: 'Grįžtama...',
|
||||
revertToPublished: 'Grįžti prie publikuotojo',
|
||||
revertUnsuccessful: 'Atkūrimas nepavyko. Ankstesnės publikuotos versijos nerasta.',
|
||||
saveDraft: 'Išsaugoti juodraštį',
|
||||
scheduledSuccessfully: 'Sėkmingai suplanuota.',
|
||||
schedulePublish: 'Suplanuokite publikaciją',
|
||||
@@ -599,6 +602,7 @@ export const ltTranslations: DefaultTranslationsObject = {
|
||||
specificVersion: 'Specifinė versija',
|
||||
status: 'Būsena',
|
||||
unpublish: 'Nebepublikuoti',
|
||||
unpublishedSuccessfully: 'Sėkmingai nepublikuota.',
|
||||
unpublishing: 'Nebepublikuojama...',
|
||||
version: 'Versija',
|
||||
versionAgo: 'prieš {{distance}}',
|
||||
|
||||
@@ -540,6 +540,8 @@ export const lvTranslations: DefaultTranslationsObject = {
|
||||
aboutToRevertToPublished:
|
||||
'Jūs grasāties atsaukt šī dokumenta izmaiņas uz publicēto versiju. Vai esat pārliecināts?',
|
||||
aboutToUnpublish: 'Jūs grasāties atcelt šī dokumenta publicēšanu. Vai esat pārliecināts?',
|
||||
aboutToUnpublishIn:
|
||||
'Jūs gatavojaties atsaukt šī dokumenta publicēšanu {{locale}}. Vai esat pārliecināts?',
|
||||
aboutToUnpublishSelection:
|
||||
'Jūs grasāties atcelt publicēšanu visiem {{label}} izvēlētajā sarakstā. Vai esat pārliecināts?',
|
||||
autosave: 'Automātiskā saglabāšana',
|
||||
@@ -585,6 +587,7 @@ export const lvTranslations: DefaultTranslationsObject = {
|
||||
restoring: 'Atjauno...',
|
||||
reverting: 'Atgriež...',
|
||||
revertToPublished: 'Atgriezt uz publicēto',
|
||||
revertUnsuccessful: 'Atcelšana neizdevās. Iepriekš publicētā versija netika atrasta.',
|
||||
saveDraft: 'Saglabāt melnrakstu',
|
||||
scheduledSuccessfully: 'Veiksmīgi ieplānots.',
|
||||
schedulePublish: 'Ieplānot publicēšanu',
|
||||
@@ -595,6 +598,7 @@ export const lvTranslations: DefaultTranslationsObject = {
|
||||
specificVersion: 'Konkrētā versija',
|
||||
status: 'Statuss',
|
||||
unpublish: 'Atcelt publicēšanu',
|
||||
unpublishedSuccessfully: 'Veiksmīgi nepublicēts.',
|
||||
unpublishing: 'Atceļ publicēšanu...',
|
||||
version: 'Versija',
|
||||
versionAgo: '{{distance}} pirms',
|
||||
|
||||
@@ -549,6 +549,8 @@ export const myTranslations: DefaultTranslationsObject = {
|
||||
aboutToRevertToPublished:
|
||||
'သင်သည် အပြောင်းအလဲများကို အများဆိုင် အခြေအနေသို့ ပြန်ပြောင်းပါတော့မည်။ သေချာလား?',
|
||||
aboutToUnpublish: 'အများဆိုင်မှ ပြန်ဖြုတ်တော့မည်။ သေချာလား',
|
||||
aboutToUnpublishIn:
|
||||
'Anda akan membatalkan penerbitan dokumen ini dalam {{locale}}. Adakah anda pasti?',
|
||||
aboutToUnpublishSelection:
|
||||
'သင်သည် ရွေးချယ်မှုတွင် {{label}} အားလုံးကို ထုတ်ဝေတော့မည် ဖြစ်သည်။ သေချာလား?',
|
||||
autosave: 'အလိုအလျောက်သိမ်းဆည်းပါ။',
|
||||
@@ -594,6 +596,7 @@ export const myTranslations: DefaultTranslationsObject = {
|
||||
restoring: 'ပြန်ယူနေဆဲ...',
|
||||
reverting: 'ပြန်ပြောင်းနေဆဲ...',
|
||||
revertToPublished: 'အများဆိုင်သို့ ပြန်ပြောင်းပါ။',
|
||||
revertUnsuccessful: 'Pulangan tidak berjaya. Tiada versi yang diterbitkan sebelumnya ditemui.',
|
||||
saveDraft: 'မှုကြမ်းကို သိမ်းဆည်းမည်။',
|
||||
scheduledSuccessfully: 'အောင်မြင်စွာ နေ့စွဲထားသည်။',
|
||||
schedulePublish: 'ပြဌာန်းထုတ်ဝေချိန်း',
|
||||
@@ -604,6 +607,7 @@ export const myTranslations: DefaultTranslationsObject = {
|
||||
specificVersion: 'အထူးဗားရှင်း',
|
||||
status: 'အခြေအနေ',
|
||||
unpublish: 'ပြန်ဖြုတ်မည်။',
|
||||
unpublishedSuccessfully: 'Berjaya tidak diterbitkan.',
|
||||
unpublishing: 'ပြန်ဖြုတ်နေဆဲ ...',
|
||||
version: 'ဗားရှင်း',
|
||||
versionAgo: '{{distance}} ကြာပြီ',
|
||||
|
||||
@@ -540,6 +540,8 @@ export const nbTranslations: DefaultTranslationsObject = {
|
||||
aboutToRevertToPublished:
|
||||
'Du er i ferd med å tilbakestille endringene i dette dokumentet til den publiserte tilstanden. Er du sikker?',
|
||||
aboutToUnpublish: 'Du er i ferd med å avpublisere dette dokumentet. Er du sikker?',
|
||||
aboutToUnpublishIn:
|
||||
'Du er i ferd med å avpublisere dette dokumentet i {{locale}}. Er du sikker?',
|
||||
aboutToUnpublishSelection:
|
||||
'Du er i ferd med å oppheve publiseringen av alle {{label}} i utvalget. Er du sikker?',
|
||||
autosave: 'Lagre automatisk',
|
||||
@@ -585,6 +587,7 @@ export const nbTranslations: DefaultTranslationsObject = {
|
||||
restoring: 'Gjenoppretter...',
|
||||
reverting: 'Tilbakestiller...',
|
||||
revertToPublished: 'Tilbakestill til publisert',
|
||||
revertUnsuccessful: 'Tilbakestilling mislyktes. Ingen tidligere publisert versjon funnet.',
|
||||
saveDraft: 'Lagre utkast',
|
||||
scheduledSuccessfully: 'Planlagt vellykket.',
|
||||
schedulePublish: 'Planlegg Publisering',
|
||||
@@ -595,6 +598,7 @@ export const nbTranslations: DefaultTranslationsObject = {
|
||||
specificVersion: 'Spesifikk versjon',
|
||||
status: 'Status',
|
||||
unpublish: 'Avpubliser',
|
||||
unpublishedSuccessfully: 'Avpublisert med suksess.',
|
||||
unpublishing: 'Avpubliserer...',
|
||||
version: 'Versjon',
|
||||
versionAgo: '{{distance}} siden',
|
||||
|
||||
@@ -549,6 +549,8 @@ export const nlTranslations: DefaultTranslationsObject = {
|
||||
'U staat op het punt om de wijzigingen van dit document terug te draaien naar de gepubliceerde staat. Weet u het zeker?',
|
||||
aboutToUnpublish:
|
||||
'U staat op het punt om de publicatie van dit document ongedaan te maken. Weet u het zeker?',
|
||||
aboutToUnpublishIn:
|
||||
'U staat op het punt om dit document niet te publiceren in {{locale}}. Weet u het zeker?',
|
||||
aboutToUnpublishSelection:
|
||||
'You are about to unpublish all {{label}} in the selection. Are you sure?',
|
||||
autosave: 'Automatisch bewaren',
|
||||
@@ -594,6 +596,7 @@ export const nlTranslations: DefaultTranslationsObject = {
|
||||
restoring: 'Herstellen...',
|
||||
reverting: 'Terugdraaien...',
|
||||
revertToPublished: 'Terugdraaien naar gepubliceerde versie',
|
||||
revertUnsuccessful: 'Terugdraaien mislukt. Geen eerder gepubliceerde versie gevonden.',
|
||||
saveDraft: 'Bewaar concept',
|
||||
scheduledSuccessfully: 'Succesvol gepland.',
|
||||
schedulePublish: 'Publicatie plannen',
|
||||
@@ -604,6 +607,7 @@ export const nlTranslations: DefaultTranslationsObject = {
|
||||
specificVersion: 'Specifieke versie',
|
||||
status: 'Status',
|
||||
unpublish: 'Publicatie ongedaan maken',
|
||||
unpublishedSuccessfully: 'Succesvol niet gepubliceerd.',
|
||||
unpublishing: 'Publicatie ongedaan maken...',
|
||||
version: 'Versie',
|
||||
versionAgo: '{{distance}} geleden',
|
||||
|
||||
@@ -538,6 +538,7 @@ export const plTranslations: DefaultTranslationsObject = {
|
||||
aboutToRevertToPublished:
|
||||
'Zamierzasz przywrócić zmiany w tym dokumencie do stanu opublikowanego. Jesteś pewien?',
|
||||
aboutToUnpublish: 'Zamierzasz cofnąć publikację tego dokumentu. Jesteś pewien?',
|
||||
aboutToUnpublishIn: 'Zamierzasz opublikować ten dokument w {{locale}}. Czy jesteś pewny?',
|
||||
aboutToUnpublishSelection:
|
||||
'Zamierzasz cofnąć publikację wszystkich {{label}} w zaznaczeniu. Jesteś pewny?',
|
||||
autosave: 'Autozapis',
|
||||
@@ -583,6 +584,8 @@ export const plTranslations: DefaultTranslationsObject = {
|
||||
restoring: 'Przywracanie...',
|
||||
reverting: 'Cofanie...',
|
||||
revertToPublished: 'Przywróć do opublikowanego',
|
||||
revertUnsuccessful:
|
||||
'Cofnięcie nie powiodło się. Nie znaleziono poprzednio opublikowanej wersji.',
|
||||
saveDraft: 'Zapisz szkic',
|
||||
scheduledSuccessfully: 'Zaplanowano pomyślnie.',
|
||||
schedulePublish: 'Zaplanuj publikację',
|
||||
@@ -593,6 +596,7 @@ export const plTranslations: DefaultTranslationsObject = {
|
||||
specificVersion: 'Konkretna Wersja',
|
||||
status: 'Status',
|
||||
unpublish: 'Cofnij publikację',
|
||||
unpublishedSuccessfully: 'Nieopublikowano pomyślnie.',
|
||||
unpublishing: 'Cofanie publikacji...',
|
||||
version: 'Wersja',
|
||||
versionAgo: '{{distance}} temu',
|
||||
|
||||
@@ -542,6 +542,7 @@ export const ptTranslations: DefaultTranslationsObject = {
|
||||
aboutToRevertToPublished:
|
||||
'Você está prestes a reverter as alterações desse documento para seu estado de publicação. Tem certeza?',
|
||||
aboutToUnpublish: 'Você está prestes a despublicar esse documento. Tem certeza?',
|
||||
aboutToUnpublishIn: 'Está prestes a despublicar este documento em {{locale}}. Tem certeza?',
|
||||
aboutToUnpublishSelection:
|
||||
'Você está prestes a cancelar a publicação de todos os {{label}} na seleção. Tem certeza?',
|
||||
autosave: 'Salvamento automático',
|
||||
@@ -587,6 +588,7 @@ export const ptTranslations: DefaultTranslationsObject = {
|
||||
restoring: 'Restaurando...',
|
||||
reverting: 'Revertendo...',
|
||||
revertToPublished: 'Reverter para publicado',
|
||||
revertUnsuccessful: 'Reversão malsucedida. Nenhuma versão publicada anteriormente encontrada.',
|
||||
saveDraft: 'Salvar rascunho',
|
||||
scheduledSuccessfully: 'Agendado com sucesso.',
|
||||
schedulePublish: 'Agendar Publicação',
|
||||
@@ -597,6 +599,7 @@ export const ptTranslations: DefaultTranslationsObject = {
|
||||
specificVersion: 'Versão Específica',
|
||||
status: 'Status',
|
||||
unpublish: 'Despublicar',
|
||||
unpublishedSuccessfully: 'Não publicado com sucesso.',
|
||||
unpublishing: 'Despublicando...',
|
||||
version: 'Versão',
|
||||
versionAgo: 'há {{distance}}',
|
||||
|
||||
@@ -549,6 +549,8 @@ export const roTranslations: DefaultTranslationsObject = {
|
||||
aboutToRevertToPublished:
|
||||
'Sunteți pe cale să readuceți modificările aduse acestui document la starea sa publicată. Sunteți sigur?',
|
||||
aboutToUnpublish: 'Sunteți pe cale să nepublicați acest document. Sunteți sigur?',
|
||||
aboutToUnpublishIn:
|
||||
'Sunteți pe cale să anulați publicarea acestui document în {{locale}}. Sunteți sigur?',
|
||||
aboutToUnpublishSelection:
|
||||
'Sunteți pe punctul de a nepublica toate {{label}} din selecție. Sunteți sigur?',
|
||||
autosave: 'Autosalvare',
|
||||
@@ -594,6 +596,7 @@ export const roTranslations: DefaultTranslationsObject = {
|
||||
restoring: 'Restaurare...',
|
||||
reverting: 'Revenire...',
|
||||
revertToPublished: 'Reveniți la publicat',
|
||||
revertUnsuccessful: 'Revenire nereușită. Nicio versiune publicată anterior nu a fost găsită.',
|
||||
saveDraft: 'Salvați proiectul',
|
||||
scheduledSuccessfully: 'Programat cu succes.',
|
||||
schedulePublish: 'Programare Publicare',
|
||||
@@ -604,6 +607,7 @@ export const roTranslations: DefaultTranslationsObject = {
|
||||
specificVersion: 'Versiunea specifică',
|
||||
status: 'Status',
|
||||
unpublish: 'Dezpublicare',
|
||||
unpublishedSuccessfully: 'Nepublicat cu succes.',
|
||||
unpublishing: 'Dezpublicare...',
|
||||
version: 'Versiune',
|
||||
versionAgo: '{{distance}} în urmă',
|
||||
|
||||
@@ -536,6 +536,7 @@ export const rsTranslations: DefaultTranslationsObject = {
|
||||
aboutToRestoreGlobal: 'Вратићете глобални {{label}} у стање у којем је био {{versionDate}}.',
|
||||
aboutToRevertToPublished: 'Вратићете промене у документу у објављено стање. Да ли сте сигурни?',
|
||||
aboutToUnpublish: 'Поништићете објаву овог документа. Да ли сте сигурни?',
|
||||
aboutToUnpublishIn: 'Predstoje vam da povučete ovaj dokument na {{locale}}. Da li ste sigurni?',
|
||||
aboutToUnpublishSelection:
|
||||
'Управо ћете поништити објаву свих {{label}} у одабиру. Да ли сте сигурни?',
|
||||
autosave: 'Аутоматско чување',
|
||||
@@ -581,6 +582,7 @@ export const rsTranslations: DefaultTranslationsObject = {
|
||||
restoring: 'Враћање...',
|
||||
reverting: 'Враћање...',
|
||||
revertToPublished: 'Врати на објављено',
|
||||
revertUnsuccessful: 'Povratak neuspešan. Nije pronađena prethodno objavljena verzija.',
|
||||
saveDraft: 'Сачувај нацрт',
|
||||
scheduledSuccessfully: 'Успешно заказано.',
|
||||
schedulePublish: 'Planiranje publikovanja',
|
||||
@@ -591,6 +593,7 @@ export const rsTranslations: DefaultTranslationsObject = {
|
||||
specificVersion: 'Specifična verzija',
|
||||
status: 'Статус',
|
||||
unpublish: 'Поништи објаву',
|
||||
unpublishedSuccessfully: 'Uspešno povučeno sa objave.',
|
||||
unpublishing: 'Поништавање објаве...',
|
||||
version: 'Верзија',
|
||||
versionAgo: 'pre {{distance}}',
|
||||
|
||||
@@ -538,6 +538,8 @@ export const rsLatinTranslations: DefaultTranslationsObject = {
|
||||
aboutToRevertToPublished:
|
||||
'Vratićete promene u dokumentu u objavljeno stanje. Da li ste sigurni?',
|
||||
aboutToUnpublish: 'Poništićete objavu ovog dokumenta. Da li ste sigurni?',
|
||||
aboutToUnpublishIn:
|
||||
'Uskoro ćete povući objavljivanje ovog dokumenta na {{locale}}. Da li ste sigurni?',
|
||||
aboutToUnpublishSelection:
|
||||
'Upravo ćete poništiti objavu svih {{label}} u odabiru. Da li ste sigurni?',
|
||||
autosave: 'Automatsko čuvanje',
|
||||
@@ -583,6 +585,7 @@ export const rsLatinTranslations: DefaultTranslationsObject = {
|
||||
restoring: 'Vraćanje...',
|
||||
reverting: 'Vraćanje...',
|
||||
revertToPublished: 'Vrati na objavljeno',
|
||||
revertUnsuccessful: 'Povratak nije uspeo. Nije pronađena prethodno objavljena verzija.',
|
||||
saveDraft: 'Sačuvaj nacrt',
|
||||
scheduledSuccessfully: 'Uspešno zakazano.',
|
||||
schedulePublish: 'Zakaži objavljivanje',
|
||||
@@ -593,6 +596,7 @@ export const rsLatinTranslations: DefaultTranslationsObject = {
|
||||
specificVersion: 'Specifična verzija',
|
||||
status: 'Status',
|
||||
unpublish: 'Poništi objavu',
|
||||
unpublishedSuccessfully: 'Uspješno nije objavljeno.',
|
||||
unpublishing: 'Poništavanje objave...',
|
||||
version: 'Verzija',
|
||||
versionAgo: 'pre {{distance}}',
|
||||
|
||||
@@ -542,6 +542,8 @@ export const ruTranslations: DefaultTranslationsObject = {
|
||||
aboutToRevertToPublished:
|
||||
'Вы собираетесь вернуть изменения этого документа к его опубликованному состоянию. Вы уверены?',
|
||||
aboutToUnpublish: 'Вы собираетесь отменить публикацию этого документа. Вы уверены?',
|
||||
aboutToUnpublishIn:
|
||||
'Вы собираетесь снять с публикации этот документ на {{locale}}. Вы уверены?',
|
||||
aboutToUnpublishSelection:
|
||||
'Вы собираетесь отменить публикацию всех выбранных {{label}}. Вы уверены?',
|
||||
autosave: 'Автосохранение',
|
||||
@@ -587,6 +589,7 @@ export const ruTranslations: DefaultTranslationsObject = {
|
||||
restoring: 'Восстановление...',
|
||||
reverting: 'Возврат...',
|
||||
revertToPublished: 'Вернуться к опубликованному',
|
||||
revertUnsuccessful: 'Откат не удался. Ранее опубликованная версия не найдена.',
|
||||
saveDraft: 'Сохранить черновик',
|
||||
scheduledSuccessfully: 'Успешно запланировано.',
|
||||
schedulePublish: 'Планирование публикации',
|
||||
@@ -597,6 +600,7 @@ export const ruTranslations: DefaultTranslationsObject = {
|
||||
specificVersion: 'Конкретная версия',
|
||||
status: 'Статус',
|
||||
unpublish: 'Отменить публикацию',
|
||||
unpublishedSuccessfully: 'Успешно снято с публикации.',
|
||||
unpublishing: 'Отмена публикации...',
|
||||
version: 'Версия',
|
||||
versionAgo: '{{distance}} назад',
|
||||
|
||||
@@ -538,6 +538,7 @@ export const skTranslations: DefaultTranslationsObject = {
|
||||
aboutToRevertToPublished:
|
||||
'Chystáte sa vrátiť zmeny tohto dokumentu do jeho publikovaného stavu. Ste si istý?',
|
||||
aboutToUnpublish: 'Chystáte sa zrušiť publikovanie tohto dokumentu. Ste si istý?',
|
||||
aboutToUnpublishIn: 'Chystáte sa odpublikovať tento dokument v {{locale}}. Ste si istý?',
|
||||
aboutToUnpublishSelection:
|
||||
'Chystáte sa zrušiť publikovanie všetkých {{label}} vo výbere. Ste si istý?',
|
||||
autosave: 'Automatické uloženie',
|
||||
@@ -583,6 +584,7 @@ export const skTranslations: DefaultTranslationsObject = {
|
||||
restoring: 'Obnovovanie...',
|
||||
reverting: 'Vracanie...',
|
||||
revertToPublished: 'Vrátiť sa k publikovanému',
|
||||
revertUnsuccessful: 'Vrátenie neúspešné. Nebola nájdená žiadna predtým publikovaná verzia.',
|
||||
saveDraft: 'Uložiť návrh',
|
||||
scheduledSuccessfully: 'Úspešne naplánované.',
|
||||
schedulePublish: 'Naplánovať publikovanie',
|
||||
@@ -593,6 +595,7 @@ export const skTranslations: DefaultTranslationsObject = {
|
||||
specificVersion: 'Špecifická verzia',
|
||||
status: 'Stav',
|
||||
unpublish: 'Zrušiť publikovanie',
|
||||
unpublishedSuccessfully: 'Úspešne nezverejnené.',
|
||||
unpublishing: 'Zrušujem publikovanie...',
|
||||
version: 'Verzia',
|
||||
versionAgo: 'pred {{distance}}',
|
||||
|
||||
@@ -538,6 +538,8 @@ export const slTranslations: DefaultTranslationsObject = {
|
||||
aboutToRevertToPublished:
|
||||
'Spremembe tega dokumenta boste povrnili v objavljeno stanje. Ste prepričani?',
|
||||
aboutToUnpublish: 'Ta dokument boste umaknili iz objave. Ste prepričani?',
|
||||
aboutToUnpublishIn:
|
||||
'Ravno boste prenehali z objavo tega dokumenta v {{locale}}. Ste prepričani?',
|
||||
aboutToUnpublishSelection: 'Umaknili boste iz objave vse {{label}} v izboru. Ste prepričani?',
|
||||
autosave: 'Samodejno shranjevanje',
|
||||
autosavedSuccessfully: 'Samodejno shranjeno uspešno.',
|
||||
@@ -582,6 +584,7 @@ export const slTranslations: DefaultTranslationsObject = {
|
||||
restoring: 'Obnavljanje...',
|
||||
reverting: 'Razveljavljanje...',
|
||||
revertToPublished: 'Vrni na objavljeno',
|
||||
revertUnsuccessful: 'Povrnitev ni uspela. Ni najdena nobena prej objavljena različica.',
|
||||
saveDraft: 'Shrani osnutek',
|
||||
scheduledSuccessfully: 'Uspešno načrtovano.',
|
||||
schedulePublish: 'Razporedi objavo',
|
||||
@@ -592,6 +595,7 @@ export const slTranslations: DefaultTranslationsObject = {
|
||||
specificVersion: 'Specifična različica',
|
||||
status: 'Status',
|
||||
unpublish: 'Razveljavi objavo',
|
||||
unpublishedSuccessfully: 'Uspešno nepobjavljeno.',
|
||||
unpublishing: 'Razveljavljanje objave...',
|
||||
version: 'Različica',
|
||||
versionAgo: 'pred {{distance}}',
|
||||
|
||||
@@ -540,6 +540,7 @@ export const svTranslations: DefaultTranslationsObject = {
|
||||
aboutToRevertToPublished:
|
||||
'Du kommer återställa det här dokumentets ändringar till dess publicerade tillstånd. Är du säker?',
|
||||
aboutToUnpublish: 'Du kommer avpublicera detta dokument. Är du säker?',
|
||||
aboutToUnpublishIn: 'Du står på väg att avpublicera detta dokument i {{locale}}. Är du säker?',
|
||||
aboutToUnpublishSelection:
|
||||
'Du är på väg att avpublicera alla {{label}} i urvalet. Är du säker?',
|
||||
autosave: 'Spara automatiskt',
|
||||
@@ -585,6 +586,7 @@ export const svTranslations: DefaultTranslationsObject = {
|
||||
restoring: 'Återställer...',
|
||||
reverting: 'Återställer...',
|
||||
revertToPublished: 'Återgå till publicerad',
|
||||
revertUnsuccessful: 'Återgången misslyckades. Ingen tidigare publicerad version hittades.',
|
||||
saveDraft: 'Spara Utkast',
|
||||
scheduledSuccessfully: 'Schemalagd',
|
||||
schedulePublish: 'Schemalägg publicering',
|
||||
@@ -595,6 +597,7 @@ export const svTranslations: DefaultTranslationsObject = {
|
||||
specificVersion: 'Specifik version',
|
||||
status: 'Status',
|
||||
unpublish: 'Avpublicera',
|
||||
unpublishedSuccessfully: 'Opublicerad framgångsrikt.',
|
||||
unpublishing: 'Avpublicerar...',
|
||||
version: 'Version',
|
||||
versionAgo: '{{distance}} sedan',
|
||||
|
||||
@@ -528,6 +528,7 @@ export const thTranslations: DefaultTranslationsObject = {
|
||||
aboutToRevertToPublished:
|
||||
'คุณกำลังจะย้อนการเปลี่ยนแปลงของเอกสารนี้ไปยังเวอร์ชันที่เผยแพร่อยู่ คุณต้องการดำเนินการต่อหรือไม่?',
|
||||
aboutToUnpublish: 'คุณกำลังจะยกเลิกเผยแพร่เอกสารนี้ คุณต้องการดำเนินการต่อหรือไม่?',
|
||||
aboutToUnpublishIn: 'คุณกำลังจะยกเลิกการเผยแพร่เอกสารนี้ใน {{locale}} คุณแน่ใจไหม?',
|
||||
aboutToUnpublishSelection: 'คุณกำลังจะเลิกเผยแพร่ {{label}} ทั้งหมดในส่วนที่เลือก คุณแน่ใจไหม?',
|
||||
autosave: 'บันทึกอัตโนมัติ',
|
||||
autosavedSuccessfully: 'บันทึกอัตโนมัติสำเร็จ',
|
||||
@@ -572,6 +573,7 @@ export const thTranslations: DefaultTranslationsObject = {
|
||||
restoring: 'กำลังกู้คืน...',
|
||||
reverting: 'กำลังย้อน...',
|
||||
revertToPublished: 'ย้อนกลับไปเวอร์ชันที่เผยแพร่อยู่',
|
||||
revertUnsuccessful: 'ย้อนกลับไม่สำเร็จ ไม่พบรุ่นที่เผยแพร่ก่อนหน้านี้',
|
||||
saveDraft: 'บันทึกร่าง',
|
||||
scheduledSuccessfully: 'ได้ทำการจัดตารางเรียบร้อยแล้ว',
|
||||
schedulePublish: 'ตั้งเวลาเผยแพร่',
|
||||
@@ -582,6 +584,7 @@ export const thTranslations: DefaultTranslationsObject = {
|
||||
specificVersion: 'เวอร์ชันเฉพาะ',
|
||||
status: 'สถานะ',
|
||||
unpublish: 'หยุดเผยแพร่',
|
||||
unpublishedSuccessfully: 'ยกเลิกการเผยแพร่เรียบร้อยแล้ว',
|
||||
unpublishing: 'กำลังหยุดการเผยแพร่...',
|
||||
version: 'เวอร์ชัน',
|
||||
versionAgo: '{{distance}} ที่แล้ว',
|
||||
|
||||
@@ -543,6 +543,7 @@ export const trTranslations: DefaultTranslationsObject = {
|
||||
aboutToRevertToPublished:
|
||||
'Bu dökümanın değişikliklerini yayınladığı haline geri getirmek üzeresiniz. Devam etmek istiyor musunuz?',
|
||||
aboutToUnpublish: 'Bu dökümanı yayından kaldırmak üzeresiniz. Devam etmek istiyor musunuz?',
|
||||
aboutToUnpublishIn: "{{locale}}'da bu belgeyi yayından kaldırmak üzeresiniz. Emin misiniz?",
|
||||
aboutToUnpublishSelection: 'Seçimdeki tüm {{label}} yayınını kaldırmak üzeresiniz. Emin misin?',
|
||||
autosave: 'Otomatik kaydet',
|
||||
autosavedSuccessfully: 'Otomatik kaydetme başarılı',
|
||||
@@ -587,6 +588,7 @@ export const trTranslations: DefaultTranslationsObject = {
|
||||
restoring: 'Geri döndürülüyor...',
|
||||
reverting: 'Değişiklikler geri alınıyor...',
|
||||
revertToPublished: 'Yayınlanana geri döndür',
|
||||
revertUnsuccessful: 'Geri alım başarısız. Daha önce yayımlanan bir versiyon bulunamadı.',
|
||||
saveDraft: 'Taslağı kaydet',
|
||||
scheduledSuccessfully: 'Başarıyla planlandı.',
|
||||
schedulePublish: 'Yayını Planla',
|
||||
@@ -597,6 +599,7 @@ export const trTranslations: DefaultTranslationsObject = {
|
||||
specificVersion: 'Belirli Sürüm',
|
||||
status: 'Durum',
|
||||
unpublish: 'Yayından Kaldır',
|
||||
unpublishedSuccessfully: 'Başarıyla yayınlanmadı.',
|
||||
unpublishing: 'Yayından kaldırılıyor...',
|
||||
version: 'Sürüm',
|
||||
versionAgo: '{{distance}} önce',
|
||||
|
||||
@@ -538,6 +538,7 @@ export const ukTranslations: DefaultTranslationsObject = {
|
||||
aboutToRevertToPublished:
|
||||
'Ви бажаєте повернути зміни цього документа до його опублікованого стану. Ви впевнені?',
|
||||
aboutToUnpublish: 'Ви бажаєте скасувати публікацю цього документа. Ви впевнені?',
|
||||
aboutToUnpublishIn: 'Ви збираєтесь зняти з публікації цей документ у {{locale}}. Ви впевнені?',
|
||||
aboutToUnpublishSelection:
|
||||
'Ви бажаєте скасувати публікацію всіх {{label}} у вибірці. Ви впевнені?',
|
||||
autosave: 'Автозбереження',
|
||||
@@ -583,6 +584,7 @@ export const ukTranslations: DefaultTranslationsObject = {
|
||||
restoring: 'Відновлення...',
|
||||
reverting: 'Повернення до опублікованого стану...',
|
||||
revertToPublished: 'Повернутися до опублікованого стану',
|
||||
revertUnsuccessful: 'Повернення невдале. Не знайдено жодної раніше опублікованої версії.',
|
||||
saveDraft: 'Зберегти чернетку',
|
||||
scheduledSuccessfully: 'Успішно заплановано.',
|
||||
schedulePublish: 'Розклад публікації',
|
||||
@@ -593,6 +595,7 @@ export const ukTranslations: DefaultTranslationsObject = {
|
||||
specificVersion: 'Специфічна версія',
|
||||
status: 'Статус',
|
||||
unpublish: 'Скасувати публікацію',
|
||||
unpublishedSuccessfully: 'Успішно відмінено публікацію.',
|
||||
unpublishing: 'Скасування публікації...',
|
||||
version: 'Версія',
|
||||
versionAgo: '{{distance}} тому',
|
||||
|
||||
@@ -536,6 +536,8 @@ export const viTranslations: DefaultTranslationsObject = {
|
||||
'Bạn chuẩn bị khôi phục lại bản toàn thể (global) của {{label}} về phiên bản {{versionDate}}.',
|
||||
aboutToRevertToPublished: 'Bạn có muốn tái xuất bản bản nháp này không?',
|
||||
aboutToUnpublish: 'Bạn có muốn ngưng xuất bản?',
|
||||
aboutToUnpublishIn:
|
||||
'Bạn đang chuẩn bị hủy xuất bản tài liệu này trong {{locale}}. Bạn có chắc không?',
|
||||
aboutToUnpublishSelection: 'Bạn có muốn ngưng xuất bản tất cả {{label}} không?',
|
||||
autosave: 'Tự động lưu dữ liệu',
|
||||
autosavedSuccessfully: 'Đã tự động lưu thành công.',
|
||||
@@ -580,6 +582,7 @@ export const viTranslations: DefaultTranslationsObject = {
|
||||
restoring: 'Đang khôi phục...',
|
||||
reverting: 'Đang về trạng thái cũ...',
|
||||
revertToPublished: 'Quay về trạng thái đã xuất bản',
|
||||
revertUnsuccessful: 'Không thể hoàn nguyên. Không tìm thấy phiên bản được xuất bản trước đó.',
|
||||
saveDraft: 'Lưu bản nháp',
|
||||
scheduledSuccessfully: 'Đã lên lịch thành công.',
|
||||
schedulePublish: 'Lịch xuất bản',
|
||||
@@ -590,6 +593,7 @@ export const viTranslations: DefaultTranslationsObject = {
|
||||
specificVersion: 'Phiên bản cụ thể',
|
||||
status: 'Trạng thái',
|
||||
unpublish: 'Ẩn tài liệu',
|
||||
unpublishedSuccessfully: 'Đã hủy công bố thành công.',
|
||||
unpublishing: 'Đang ẩn tài liệu...',
|
||||
version: 'Phiên bản',
|
||||
versionAgo: '{{distance}} trước',
|
||||
|
||||
@@ -512,6 +512,7 @@ export const zhTranslations: DefaultTranslationsObject = {
|
||||
aboutToRestoreGlobal: '您要将全局的{{label}}恢复到{{versionDate}}时的状态',
|
||||
aboutToRevertToPublished: '您将要把这个文档的内容还原到它的发布状态。您确定吗?',
|
||||
aboutToUnpublish: '您即将取消发布这个文档。您确定吗?',
|
||||
aboutToUnpublishIn: '您即将取消发布此文档在{{locale}}。您确定吗?',
|
||||
aboutToUnpublishSelection: '您即将取消发布所选内容中的所有 {{label}}。 您确定吗?',
|
||||
autosave: '自动保存',
|
||||
autosavedSuccessfully: '自动保存成功。',
|
||||
@@ -556,6 +557,7 @@ export const zhTranslations: DefaultTranslationsObject = {
|
||||
restoring: '恢复中...',
|
||||
reverting: '还原中...',
|
||||
revertToPublished: '还原到已发布的版本',
|
||||
revertUnsuccessful: '撤销失败。没有找到先前发布的版本。',
|
||||
saveDraft: '保存草稿',
|
||||
scheduledSuccessfully: '预约发布成功。',
|
||||
schedulePublish: '预约发布',
|
||||
@@ -566,6 +568,7 @@ export const zhTranslations: DefaultTranslationsObject = {
|
||||
specificVersion: '特定版本',
|
||||
status: '状态',
|
||||
unpublish: '取消发布',
|
||||
unpublishedSuccessfully: '成功取消发布。',
|
||||
unpublishing: '取消发布中...',
|
||||
version: '版本',
|
||||
versionAgo: '{{distance}}前',
|
||||
|
||||
@@ -512,6 +512,7 @@ export const zhTwTranslations: DefaultTranslationsObject = {
|
||||
aboutToRestoreGlobal: '您即將將全域 {{label}} 還原至 {{versionDate}} 的狀態。',
|
||||
aboutToRevertToPublished: '您即將還原此文件至已發佈狀態。確定要繼續?',
|
||||
aboutToUnpublish: '您即將取消發佈此文件。確定要繼續?',
|
||||
aboutToUnpublishIn: '您即將在{{locale}}中取消發布此文件。你確定嗎?',
|
||||
aboutToUnpublishSelection: '您即將取消發佈所有選取的 {{label}}。確定要繼續?',
|
||||
autosave: '自動儲存',
|
||||
autosavedSuccessfully: '已成功自動儲存。',
|
||||
@@ -556,6 +557,7 @@ export const zhTwTranslations: DefaultTranslationsObject = {
|
||||
restoring: '還原中…',
|
||||
reverting: '還原中…',
|
||||
revertToPublished: '還原至已發佈版本',
|
||||
revertUnsuccessful: '還原失敗。找不到以前發布的版本。',
|
||||
saveDraft: '儲存草稿',
|
||||
scheduledSuccessfully: '排程成功。',
|
||||
schedulePublish: '排程發佈',
|
||||
@@ -566,6 +568,7 @@ export const zhTwTranslations: DefaultTranslationsObject = {
|
||||
specificVersion: '指定版本',
|
||||
status: '狀態',
|
||||
unpublish: '取消發佈',
|
||||
unpublishedSuccessfully: '成功取消發布。',
|
||||
unpublishing: '取消發佈中…',
|
||||
version: '版本',
|
||||
versionAgo: '{{distance}} 前',
|
||||
|
||||
@@ -24,7 +24,6 @@ export const Status: React.FC = () => {
|
||||
hasPublishedDoc,
|
||||
incrementVersionCount,
|
||||
isTrashed,
|
||||
savedDocumentData: doc,
|
||||
setHasPublishedDoc,
|
||||
setMostRecentVersionIsAutosaved,
|
||||
setUnpublishedVersionCount,
|
||||
@@ -35,20 +34,25 @@ export const Status: React.FC = () => {
|
||||
|
||||
const {
|
||||
config: {
|
||||
experimental: { unpublishSpecificLocale: enableUnpublishSpecificLocale } = {},
|
||||
routes: { api },
|
||||
serverURL,
|
||||
},
|
||||
getEntityConfig,
|
||||
} = useConfig()
|
||||
|
||||
const { reset: resetForm } = useForm()
|
||||
const { getData, reset: resetForm } = useForm()
|
||||
const { code: locale } = useLocale()
|
||||
const { i18n, t } = useTranslation()
|
||||
|
||||
const formData = getData()
|
||||
const unPublishModalSlug = `confirm-un-publish-${id}`
|
||||
const localeUnPublishModalSlug = `confirm-un-publish-locale-${id}`
|
||||
const revertModalSlug = `confirm-revert-${id}`
|
||||
|
||||
let statusToRender: 'changed' | 'draft' | 'published' = 'draft'
|
||||
const [statusToRender, setStatusToRender] = React.useState<'changed' | 'draft' | 'published'>(
|
||||
'draft',
|
||||
)
|
||||
|
||||
const collectionConfig = getEntityConfig({ collectionSlug })
|
||||
const globalConfig = getEntityConfig({ globalSlug })
|
||||
@@ -57,13 +61,16 @@ export const Status: React.FC = () => {
|
||||
const autosaveEnabled =
|
||||
typeof docConfig?.versions?.drafts === 'object' ? docConfig.versions.drafts.autosave : false
|
||||
|
||||
if (autosaveEnabled) {
|
||||
if (hasPublishedDoc) {
|
||||
statusToRender = unpublishedVersionCount > 0 ? 'changed' : 'published'
|
||||
React.useEffect(() => {
|
||||
if (autosaveEnabled) {
|
||||
if (hasPublishedDoc) {
|
||||
setStatusToRender(unpublishedVersionCount > 0 ? 'changed' : 'published')
|
||||
}
|
||||
} else {
|
||||
setStatusToRender(formData._status || 'draft')
|
||||
}
|
||||
} else {
|
||||
statusToRender = doc._status || 'draft'
|
||||
}
|
||||
}, [autosaveEnabled, hasPublishedDoc, unpublishedVersionCount, formData._status])
|
||||
|
||||
const displayStatusKey = isTrashed
|
||||
? hasPublishedDoc
|
||||
? 'previouslyPublished'
|
||||
@@ -71,67 +78,64 @@ export const Status: React.FC = () => {
|
||||
: statusToRender
|
||||
|
||||
const performAction = useCallback(
|
||||
async (action: 'revert' | 'unpublish') => {
|
||||
async (action: 'revert' | 'unpublish', unpublishSpecificLocale?: boolean) => {
|
||||
let url
|
||||
let method
|
||||
let publishedDocURL
|
||||
let method: 'get' | 'patch' | 'post' = 'patch'
|
||||
let body
|
||||
|
||||
const headers = {
|
||||
'Accept-Language': i18n.language,
|
||||
'Content-Type': 'application/json',
|
||||
}
|
||||
|
||||
const baseUrl = collectionSlug
|
||||
? `${serverURL}${api}/${collectionSlug}/${id}`
|
||||
: globalSlug
|
||||
? `${serverURL}${api}/globals/${globalSlug}`
|
||||
: ''
|
||||
|
||||
if (action === 'unpublish') {
|
||||
body = {
|
||||
_status: 'draft',
|
||||
}
|
||||
}
|
||||
|
||||
if (collectionSlug) {
|
||||
url = `${serverURL}${api}/${collectionSlug}/${id}?locale=${locale}&fallback-locale=null&depth=0`
|
||||
method = 'patch'
|
||||
}
|
||||
|
||||
if (globalSlug) {
|
||||
url = `${serverURL}${api}/globals/${globalSlug}?locale=${locale}&fallback-locale=null&depth=0`
|
||||
url = `${baseUrl}/unpublish${locale ? `?locale=${locale}` : ''}${unpublishSpecificLocale ? `&unpublishSpecificLocale=true` : ''}`
|
||||
method = 'post'
|
||||
} else {
|
||||
publishedDocURL = `${baseUrl}?locale=${locale}&fallback-locale=null&depth=0`
|
||||
url = `${baseUrl}?publishSpecificLocale=${locale}`
|
||||
method = collectionSlug ? 'patch' : 'post'
|
||||
}
|
||||
|
||||
if (action === 'revert') {
|
||||
const publishedDoc = await requests
|
||||
.get(url, {
|
||||
headers: {
|
||||
'Accept-Language': i18n.language,
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
.get(publishedDocURL, {
|
||||
headers,
|
||||
})
|
||||
.then((res) => res.json())
|
||||
|
||||
body = publishedDoc
|
||||
body = publishedDoc._status === 'published' ? publishedDoc : undefined
|
||||
if (!body) {
|
||||
toast.error(t('version:revertUnsuccessful'))
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
const res = await requests[method](url, {
|
||||
body: JSON.stringify(body),
|
||||
headers: {
|
||||
'Accept-Language': i18n.language,
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
headers,
|
||||
})
|
||||
|
||||
if (res.status === 200) {
|
||||
let data
|
||||
const json = await res.json()
|
||||
|
||||
if (globalSlug) {
|
||||
data = json.result
|
||||
} else if (collectionSlug) {
|
||||
data = json.doc
|
||||
}
|
||||
const data = action === 'revert' && !globalSlug ? json.doc : json.result
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
resetForm(data)
|
||||
toast.success(json.message)
|
||||
incrementVersionCount()
|
||||
setMostRecentVersionIsAutosaved(false)
|
||||
|
||||
if (action === 'unpublish') {
|
||||
setHasPublishedDoc(false)
|
||||
setStatusToRender('draft')
|
||||
} else if (action === 'revert') {
|
||||
setHasPublishedDoc(true)
|
||||
incrementVersionCount()
|
||||
setUnpublishedVersionCount(0)
|
||||
}
|
||||
} else {
|
||||
@@ -144,8 +148,7 @@ export const Status: React.FC = () => {
|
||||
} else {
|
||||
toast.error(t('error:unPublishingDocument'))
|
||||
}
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
} catch (err) {
|
||||
} catch {
|
||||
toast.error(t('error:unPublishingDocument'))
|
||||
}
|
||||
}
|
||||
@@ -155,11 +158,11 @@ export const Status: React.FC = () => {
|
||||
collectionSlug,
|
||||
globalSlug,
|
||||
id,
|
||||
i18n.language,
|
||||
incrementVersionCount,
|
||||
locale,
|
||||
resetForm,
|
||||
serverURL,
|
||||
i18n.language,
|
||||
resetForm,
|
||||
incrementVersionCount,
|
||||
setUnpublishedVersionCount,
|
||||
setMostRecentVersionIsAutosaved,
|
||||
t,
|
||||
@@ -196,9 +199,30 @@ export const Status: React.FC = () => {
|
||||
modalSlug={unPublishModalSlug}
|
||||
onConfirm={() => performAction('unpublish')}
|
||||
/>
|
||||
{enableUnpublishSpecificLocale && (
|
||||
// TODO: update when we get UI design
|
||||
<>
|
||||
—
|
||||
<Button
|
||||
buttonStyle="none"
|
||||
className={`${baseClass}__action`}
|
||||
id={`action-unpublish-locale`}
|
||||
onClick={() => toggleModal(localeUnPublishModalSlug)}
|
||||
>
|
||||
{t('version:unpublish')} ({locale})
|
||||
</Button>
|
||||
<ConfirmationModal
|
||||
body={t('version:aboutToUnpublishIn', { locale })}
|
||||
confirmingLabel={t('version:unpublishing')}
|
||||
heading={t('version:confirmUnpublish')}
|
||||
modalSlug={localeUnPublishModalSlug}
|
||||
onConfirm={() => performAction('unpublish', true)}
|
||||
/>
|
||||
</>
|
||||
)}
|
||||
</React.Fragment>
|
||||
)}
|
||||
{!isTrashed && canUpdate && statusToRender === 'changed' || statusToRender === 'draft' && (
|
||||
{!isTrashed && canUpdate && statusToRender === 'changed' && (
|
||||
<React.Fragment>
|
||||
—
|
||||
<Button
|
||||
|
||||
@@ -30,27 +30,7 @@ export const reduceFieldsToOptions = ({
|
||||
}: ReduceFieldOptionsArgs): ReducedField[] => {
|
||||
return fields.reduce((reduced, field) => {
|
||||
// Do not filter out `field.admin.disableListFilter` fields here, as these should still render as disabled if they appear in the URL query
|
||||
// Filter out `virtual: true` fields since they are regular virtuals and not backed by a DB field
|
||||
if (
|
||||
(fieldIsHiddenOrDisabled(field) && !fieldIsID(field)) ||
|
||||
('virtual' in field && field.virtual === true)
|
||||
) {
|
||||
return reduced
|
||||
}
|
||||
|
||||
// Handle virtual:string fields (virtual relationships, e.g. "post.title")
|
||||
if ('virtual' in field && typeof field.virtual === 'string') {
|
||||
const baseLabel = ('label' in field && field.label) || ('name' in field && field.name) || ''
|
||||
const localizedLabel = getTranslation(baseLabel, i18n)
|
||||
|
||||
reduced.push({
|
||||
label: localizedLabel,
|
||||
plainTextLabel: localizedLabel,
|
||||
value: field.virtual, // e.g. "post.title"
|
||||
...fieldTypes[field.type],
|
||||
field,
|
||||
operators: fieldTypes[field.type].operators,
|
||||
})
|
||||
if (fieldIsHiddenOrDisabled(field) && !fieldIsID(field)) {
|
||||
return reduced
|
||||
}
|
||||
|
||||
|
||||
@@ -9,10 +9,6 @@ import { getClientSideURL } from '@/utilities/getURL'
|
||||
export const getMediaUrl = (url: string | null | undefined, cacheTag?: string | null): string => {
|
||||
if (!url) return ''
|
||||
|
||||
if (cacheTag && cacheTag !== '') {
|
||||
cacheTag = encodeURIComponent(cacheTag)
|
||||
}
|
||||
|
||||
// Check if URL already has http/https protocol
|
||||
if (url.startsWith('http://') || url.startsWith('https://')) {
|
||||
return cacheTag ? `${url}?${cacheTag}` : url
|
||||
|
||||
@@ -9,10 +9,6 @@ import { getClientSideURL } from '@/utilities/getURL'
|
||||
export const getMediaUrl = (url: string | null | undefined, cacheTag?: string | null): string => {
|
||||
if (!url) return ''
|
||||
|
||||
if (cacheTag && cacheTag !== '') {
|
||||
cacheTag = encodeURIComponent(cacheTag)
|
||||
}
|
||||
|
||||
// Check if URL already has http/https protocol
|
||||
if (url.startsWith('http://') || url.startsWith('https://')) {
|
||||
return cacheTag ? `${url}?${cacheTag}` : url
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
import type { CollectionConfig } from 'payload'
|
||||
|
||||
import { virtualsSlug } from '../slugs.js'
|
||||
|
||||
export const Virtuals: CollectionConfig = {
|
||||
slug: virtualsSlug,
|
||||
admin: {
|
||||
useAsTitle: 'virtualTitleFromPost',
|
||||
},
|
||||
fields: [
|
||||
{
|
||||
name: 'virtualTitleFromPost',
|
||||
type: 'text',
|
||||
virtual: 'post.title',
|
||||
},
|
||||
{
|
||||
name: 'virtualText',
|
||||
type: 'text',
|
||||
virtual: true,
|
||||
},
|
||||
{
|
||||
name: 'post',
|
||||
type: 'relationship',
|
||||
relationTo: 'posts',
|
||||
},
|
||||
],
|
||||
}
|
||||
@@ -28,7 +28,6 @@ import { UploadCollection } from './collections/Upload.js'
|
||||
import { UploadTwoCollection } from './collections/UploadTwo.js'
|
||||
import { UseAsTitleGroupField } from './collections/UseAsTitleGroupField.js'
|
||||
import { Users } from './collections/Users.js'
|
||||
import { Virtuals } from './collections/Virtuals.js'
|
||||
import { with300Documents } from './collections/With300Documents.js'
|
||||
import { CustomGlobalViews1 } from './globals/CustomViews1.js'
|
||||
import { CustomGlobalViews2 } from './globals/CustomViews2.js'
|
||||
@@ -188,7 +187,6 @@ export default buildConfigWithDefaults({
|
||||
UseAsTitleGroupField,
|
||||
DisableBulkEdit,
|
||||
CustomListDrawer,
|
||||
Virtuals,
|
||||
],
|
||||
globals: [
|
||||
GlobalHidden,
|
||||
|
||||
@@ -4,7 +4,7 @@ import { expect, test } from '@playwright/test'
|
||||
import { mapAsync } from 'payload'
|
||||
import * as qs from 'qs-esm'
|
||||
|
||||
import type { Config, Geo, Post, Virtual } from '../../payload-types.js'
|
||||
import type { Config, Geo, Post } from '../../payload-types.js'
|
||||
|
||||
import {
|
||||
ensureCompilationIsDone,
|
||||
@@ -23,7 +23,6 @@ import {
|
||||
listDrawerSlug,
|
||||
placeholderCollectionSlug,
|
||||
postsCollectionSlug,
|
||||
virtualsSlug,
|
||||
with300DocumentsSlug,
|
||||
} from '../../slugs.js'
|
||||
|
||||
@@ -71,7 +70,6 @@ describe('List View', () => {
|
||||
let placeholderUrl: AdminUrlUtil
|
||||
let disableBulkEditUrl: AdminUrlUtil
|
||||
let user: any
|
||||
let virtualsUrl: AdminUrlUtil
|
||||
|
||||
let serverURL: string
|
||||
let adminRoutes: ReturnType<typeof getRoutes>
|
||||
@@ -96,7 +94,6 @@ describe('List View', () => {
|
||||
withListViewUrl = new AdminUrlUtil(serverURL, listDrawerSlug)
|
||||
placeholderUrl = new AdminUrlUtil(serverURL, placeholderCollectionSlug)
|
||||
disableBulkEditUrl = new AdminUrlUtil(serverURL, 'disable-bulk-edit')
|
||||
virtualsUrl = new AdminUrlUtil(serverURL, virtualsSlug)
|
||||
const context = await browser.newContext()
|
||||
page = await context.newPage()
|
||||
initPageConsoleErrorCatch(page)
|
||||
@@ -419,44 +416,6 @@ describe('List View', () => {
|
||||
).toBeVisible()
|
||||
})
|
||||
|
||||
test('should not allow search by virtual: true field in field dropdown', async () => {
|
||||
await page.goto(virtualsUrl.list)
|
||||
|
||||
await openListFilters(page, {})
|
||||
|
||||
const whereBuilder = page.locator('.where-builder')
|
||||
await whereBuilder.locator('.where-builder__add-first-filter').click()
|
||||
|
||||
const conditionField = whereBuilder.locator('.condition__field')
|
||||
await conditionField.click()
|
||||
|
||||
const menuList = conditionField.locator('.rs__menu-list')
|
||||
|
||||
// ensure the virtual field is not present
|
||||
await expect(menuList.locator('div', { hasText: exactText('Virtual Text') })).toHaveCount(0)
|
||||
})
|
||||
|
||||
test('should allow to filter by virtual relationship field', async () => {
|
||||
const post1 = await createPost({ title: 'somePost' })
|
||||
const post2 = await createPost({ title: 'otherPost' })
|
||||
|
||||
await createVirtualDoc({ post: post1.id })
|
||||
await createVirtualDoc({ post: post2.id })
|
||||
|
||||
await page.goto(virtualsUrl.list)
|
||||
|
||||
await expect(page.locator(tableRowLocator)).toHaveCount(2)
|
||||
|
||||
await addListFilter({
|
||||
page,
|
||||
fieldLabel: 'Virtual Title From Post',
|
||||
operatorLabel: 'equals',
|
||||
value: 'somePost',
|
||||
})
|
||||
|
||||
await expect(page.locator(tableRowLocator)).toHaveCount(1)
|
||||
})
|
||||
|
||||
test('should allow to filter in array field', async () => {
|
||||
await createArray()
|
||||
|
||||
@@ -1827,13 +1786,3 @@ async function createArray() {
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
async function createVirtualDoc(overrides?: Partial<Virtual>): Promise<Virtual> {
|
||||
return payload.create({
|
||||
collection: virtualsSlug,
|
||||
data: {
|
||||
post: overrides?.post,
|
||||
...overrides,
|
||||
},
|
||||
}) as unknown as Promise<Virtual>
|
||||
}
|
||||
|
||||
@@ -94,7 +94,6 @@ export interface Config {
|
||||
'use-as-title-group-field': UseAsTitleGroupField;
|
||||
'disable-bulk-edit': DisableBulkEdit;
|
||||
'custom-list-drawer': CustomListDrawer;
|
||||
virtuals: Virtual;
|
||||
'payload-locked-documents': PayloadLockedDocument;
|
||||
'payload-preferences': PayloadPreference;
|
||||
'payload-migrations': PayloadMigration;
|
||||
@@ -128,7 +127,6 @@ export interface Config {
|
||||
'use-as-title-group-field': UseAsTitleGroupFieldSelect<false> | UseAsTitleGroupFieldSelect<true>;
|
||||
'disable-bulk-edit': DisableBulkEditSelect<false> | DisableBulkEditSelect<true>;
|
||||
'custom-list-drawer': CustomListDrawerSelect<false> | CustomListDrawerSelect<true>;
|
||||
virtuals: VirtualsSelect<false> | VirtualsSelect<true>;
|
||||
'payload-locked-documents': PayloadLockedDocumentsSelect<false> | PayloadLockedDocumentsSelect<true>;
|
||||
'payload-preferences': PayloadPreferencesSelect<false> | PayloadPreferencesSelect<true>;
|
||||
'payload-migrations': PayloadMigrationsSelect<false> | PayloadMigrationsSelect<true>;
|
||||
@@ -584,18 +582,6 @@ export interface CustomListDrawer {
|
||||
updatedAt: string;
|
||||
createdAt: string;
|
||||
}
|
||||
/**
|
||||
* This interface was referenced by `Config`'s JSON-Schema
|
||||
* via the `definition` "virtuals".
|
||||
*/
|
||||
export interface Virtual {
|
||||
id: string;
|
||||
virtualTitleFromPost?: string | null;
|
||||
virtualText?: string | null;
|
||||
post?: (string | null) | Post;
|
||||
updatedAt: string;
|
||||
createdAt: string;
|
||||
}
|
||||
/**
|
||||
* This interface was referenced by `Config`'s JSON-Schema
|
||||
* via the `definition` "payload-locked-documents".
|
||||
@@ -710,10 +696,6 @@ export interface PayloadLockedDocument {
|
||||
| ({
|
||||
relationTo: 'custom-list-drawer';
|
||||
value: string | CustomListDrawer;
|
||||
} | null)
|
||||
| ({
|
||||
relationTo: 'virtuals';
|
||||
value: string | Virtual;
|
||||
} | null);
|
||||
globalSlug?: string | null;
|
||||
user: {
|
||||
@@ -1129,17 +1111,6 @@ export interface CustomListDrawerSelect<T extends boolean = true> {
|
||||
updatedAt?: T;
|
||||
createdAt?: T;
|
||||
}
|
||||
/**
|
||||
* This interface was referenced by `Config`'s JSON-Schema
|
||||
* via the `definition` "virtuals_select".
|
||||
*/
|
||||
export interface VirtualsSelect<T extends boolean = true> {
|
||||
virtualTitleFromPost?: T;
|
||||
virtualText?: T;
|
||||
post?: T;
|
||||
updatedAt?: T;
|
||||
createdAt?: T;
|
||||
}
|
||||
/**
|
||||
* This interface was referenced by `Config`'s JSON-Schema
|
||||
* via the `definition` "payload-locked-documents_select".
|
||||
|
||||
@@ -23,7 +23,6 @@ export const uploadTwoCollectionSlug = 'uploads-two'
|
||||
export const customFieldsSlug = 'custom-fields'
|
||||
|
||||
export const listDrawerSlug = 'with-list-drawer'
|
||||
export const virtualsSlug = 'virtuals'
|
||||
export const collectionSlugs = [
|
||||
usersCollectionSlug,
|
||||
customViews1CollectionSlug,
|
||||
@@ -40,7 +39,6 @@ export const collectionSlugs = [
|
||||
customFieldsSlug,
|
||||
disableDuplicateSlug,
|
||||
listDrawerSlug,
|
||||
virtualsSlug,
|
||||
]
|
||||
|
||||
export const customGlobalViews1GlobalSlug = 'custom-global-views-one'
|
||||
|
||||
@@ -430,6 +430,7 @@ export default buildConfigWithDefaults({
|
||||
],
|
||||
experimental: {
|
||||
localizeStatus: true,
|
||||
unpublishSpecificLocale: true,
|
||||
},
|
||||
localization: {
|
||||
filterAvailableLocales: ({ locales }) => {
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
import type { CollectionConfig } from 'payload'
|
||||
|
||||
import { APIError } from 'payload'
|
||||
|
||||
import { errorOnUnpublishSlug } from '../slugs.js'
|
||||
|
||||
const ErrorOnUnpublish: CollectionConfig = {
|
||||
slug: errorOnUnpublishSlug,
|
||||
admin: {
|
||||
useAsTitle: 'title',
|
||||
},
|
||||
fields: [
|
||||
{
|
||||
name: 'title',
|
||||
type: 'text',
|
||||
required: true,
|
||||
},
|
||||
],
|
||||
versions: {
|
||||
drafts: true,
|
||||
},
|
||||
hooks: {
|
||||
beforeValidate: [
|
||||
({ data, originalDoc }) => {
|
||||
if (data?._status === 'draft' && originalDoc?._status === 'published') {
|
||||
throw new APIError('Custom error on unpublish', 400, {}, true)
|
||||
}
|
||||
},
|
||||
],
|
||||
},
|
||||
}
|
||||
|
||||
export default ErrorOnUnpublish
|
||||
@@ -13,7 +13,6 @@ import DisablePublish from './collections/DisablePublish.js'
|
||||
import DraftPosts from './collections/Drafts.js'
|
||||
import DraftWithMax from './collections/DraftsWithMax.js'
|
||||
import DraftsWithValidate from './collections/DraftsWithValidate.js'
|
||||
import ErrorOnUnpublish from './collections/ErrorOnUnpublish.js'
|
||||
import LocalizedPosts from './collections/Localized.js'
|
||||
import { Media } from './collections/Media.js'
|
||||
import { Media2 } from './collections/Media2.js'
|
||||
@@ -47,7 +46,6 @@ export default buildConfigWithDefaults({
|
||||
DraftPosts,
|
||||
DraftWithMax,
|
||||
DraftsWithValidate,
|
||||
ErrorOnUnpublish,
|
||||
LocalizedPosts,
|
||||
VersionPosts,
|
||||
CustomIDs,
|
||||
|
||||
@@ -63,7 +63,6 @@ import {
|
||||
draftWithMaxCollectionSlug,
|
||||
draftWithMaxGlobalSlug,
|
||||
draftWithValidateCollectionSlug,
|
||||
errorOnUnpublishSlug,
|
||||
localizedCollectionSlug,
|
||||
localizedGlobalSlug,
|
||||
postCollectionSlug,
|
||||
@@ -90,7 +89,6 @@ describe('Versions', () => {
|
||||
let disablePublishURL: AdminUrlUtil
|
||||
let customIDURL: AdminUrlUtil
|
||||
let postURL: AdminUrlUtil
|
||||
let errorOnUnpublishURL: AdminUrlUtil
|
||||
let id: string
|
||||
|
||||
beforeAll(async ({ browser }, testInfo) => {
|
||||
@@ -129,7 +127,6 @@ describe('Versions', () => {
|
||||
disablePublishURL = new AdminUrlUtil(serverURL, disablePublishSlug)
|
||||
customIDURL = new AdminUrlUtil(serverURL, customIDSlug)
|
||||
postURL = new AdminUrlUtil(serverURL, postCollectionSlug)
|
||||
errorOnUnpublishURL = new AdminUrlUtil(serverURL, errorOnUnpublishSlug)
|
||||
})
|
||||
|
||||
test('collection — has versions tab', async () => {
|
||||
@@ -306,9 +303,10 @@ describe('Versions', () => {
|
||||
collection: draftCollectionSlug,
|
||||
id: publishedDoc.id,
|
||||
data: {
|
||||
_status: 'draft',
|
||||
title: 'updated title',
|
||||
_status: 'published',
|
||||
},
|
||||
draft: false,
|
||||
draft: true,
|
||||
})
|
||||
|
||||
await page.goto(`${url.edit(publishedDoc.id)}/versions`)
|
||||
@@ -600,11 +598,10 @@ describe('Versions', () => {
|
||||
const spanishTitle = 'spanish title'
|
||||
const englishTitle = 'english title'
|
||||
|
||||
await page.goto(url.create)
|
||||
await page.goto(autosaveWithDraftButtonURL.create)
|
||||
|
||||
// fill out doc in english
|
||||
await page.locator('#field-title').fill(englishTitle)
|
||||
await page.locator('#field-description').fill('unchanged description')
|
||||
await saveDocAndAssert(page)
|
||||
|
||||
// change locale to spanish
|
||||
@@ -625,7 +622,6 @@ describe('Versions', () => {
|
||||
|
||||
// fill out draft content in spanish
|
||||
await page.locator('#field-title').fill(`${spanishTitle}--draft`)
|
||||
await saveDocAndAssert(page, '#action-save-draft')
|
||||
|
||||
// revert to last published version
|
||||
await page.locator('#action-revert-to-published').click()
|
||||
@@ -692,23 +688,6 @@ describe('Versions', () => {
|
||||
await page.goto(disablePublishURL.edit(String(publishedDoc.id)))
|
||||
await expect(page.locator('#action-save')).not.toBeAttached()
|
||||
})
|
||||
|
||||
test('collections — should show custom error message when unpublishing fails', async () => {
|
||||
const publishedDoc = await payload.create({
|
||||
collection: errorOnUnpublishSlug,
|
||||
data: {
|
||||
_status: 'published',
|
||||
title: 'title',
|
||||
},
|
||||
})
|
||||
await page.goto(errorOnUnpublishURL.edit(String(publishedDoc.id)))
|
||||
await page.locator('#action-unpublish').click()
|
||||
await page.locator('[id^="confirm-un-publish-"] #confirm-action').click()
|
||||
await expect(
|
||||
page.locator('.payload-toast-item:has-text("Custom error on unpublish")'),
|
||||
).toBeVisible()
|
||||
})
|
||||
|
||||
test('should show documents title in relationship even if draft document', async () => {
|
||||
await payload.create({
|
||||
collection: autosaveCollectionSlug,
|
||||
|
||||
Reference in New Issue
Block a user