Merge branch 'main' into fix/localized-status-UI
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@payloadcms/admin-bar",
|
||||
"version": "3.50.0",
|
||||
"version": "3.51.0",
|
||||
"description": "An admin bar for React apps using Payload",
|
||||
"homepage": "https://payloadcms.com",
|
||||
"repository": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "create-payload-app",
|
||||
"version": "3.50.0",
|
||||
"version": "3.51.0",
|
||||
"homepage": "https://payloadcms.com",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@payloadcms/db-mongodb",
|
||||
"version": "3.50.0",
|
||||
"version": "3.51.0",
|
||||
"description": "The officially supported MongoDB database adapter for Payload",
|
||||
"homepage": "https://payloadcms.com",
|
||||
"repository": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@payloadcms/db-postgres",
|
||||
"version": "3.50.0",
|
||||
"version": "3.51.0",
|
||||
"description": "The officially supported Postgres database adapter for Payload",
|
||||
"homepage": "https://payloadcms.com",
|
||||
"repository": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@payloadcms/db-sqlite",
|
||||
"version": "3.50.0",
|
||||
"version": "3.51.0",
|
||||
"description": "The officially supported SQLite database adapter for Payload",
|
||||
"homepage": "https://payloadcms.com",
|
||||
"repository": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@payloadcms/db-vercel-postgres",
|
||||
"version": "3.50.0",
|
||||
"version": "3.51.0",
|
||||
"description": "Vercel Postgres adapter for Payload",
|
||||
"homepage": "https://payloadcms.com",
|
||||
"repository": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@payloadcms/drizzle",
|
||||
"version": "3.50.0",
|
||||
"version": "3.51.0",
|
||||
"description": "A library of shared functions used by different payload database adapters",
|
||||
"homepage": "https://payloadcms.com",
|
||||
"repository": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@payloadcms/email-nodemailer",
|
||||
"version": "3.50.0",
|
||||
"version": "3.51.0",
|
||||
"description": "Payload Nodemailer Email Adapter",
|
||||
"homepage": "https://payloadcms.com",
|
||||
"repository": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@payloadcms/email-resend",
|
||||
"version": "3.50.0",
|
||||
"version": "3.51.0",
|
||||
"description": "Payload Resend Email Adapter",
|
||||
"homepage": "https://payloadcms.com",
|
||||
"repository": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@payloadcms/graphql",
|
||||
"version": "3.50.0",
|
||||
"version": "3.51.0",
|
||||
"homepage": "https://payloadcms.com",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@payloadcms/live-preview-react",
|
||||
"version": "3.50.0",
|
||||
"version": "3.51.0",
|
||||
"description": "The official React SDK for Payload Live Preview",
|
||||
"homepage": "https://payloadcms.com",
|
||||
"repository": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@payloadcms/live-preview-vue",
|
||||
"version": "3.50.0",
|
||||
"version": "3.51.0",
|
||||
"description": "The official Vue SDK for Payload Live Preview",
|
||||
"homepage": "https://payloadcms.com",
|
||||
"repository": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@payloadcms/live-preview",
|
||||
"version": "3.50.0",
|
||||
"version": "3.51.0",
|
||||
"description": "The official live preview JavaScript SDK for Payload",
|
||||
"homepage": "https://payloadcms.com",
|
||||
"repository": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@payloadcms/next",
|
||||
"version": "3.50.0",
|
||||
"version": "3.51.0",
|
||||
"homepage": "https://payloadcms.com",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
||||
@@ -1,15 +1,17 @@
|
||||
@import '~@payloadcms/ui/scss';
|
||||
|
||||
$tab-width: 16px;
|
||||
$tab-width: 24px;
|
||||
|
||||
@layer payload-default {
|
||||
.query-inspector {
|
||||
--tab-width: 24px;
|
||||
|
||||
&__json-children {
|
||||
position: relative;
|
||||
|
||||
&--nested {
|
||||
& li {
|
||||
padding-left: $tab-width;
|
||||
padding-left: 8px;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,6 +25,14 @@ $tab-width: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
&__row-line {
|
||||
&--nested {
|
||||
.query-inspector__json-children {
|
||||
padding-left: var(--tab-width);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&__list-wrap {
|
||||
position: relative;
|
||||
}
|
||||
@@ -37,10 +47,16 @@ $tab-width: 16px;
|
||||
border-bottom-right-radius: 0;
|
||||
position: relative;
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
column-gap: 14px;
|
||||
row-gap: 10px;
|
||||
align-items: center;
|
||||
left: -3px;
|
||||
left: 0;
|
||||
width: calc(100% + 3px);
|
||||
background-color: var(--theme-elevation-50);
|
||||
|
||||
&:not(.query-inspector__list-toggle--empty) {
|
||||
margin-left: calc(var(--tab-width) * -1 - 10px);
|
||||
}
|
||||
|
||||
svg .stroke {
|
||||
stroke: var(--theme-elevation-400);
|
||||
@@ -82,14 +98,32 @@ $tab-width: 16px;
|
||||
&__bracket {
|
||||
position: relative;
|
||||
|
||||
&--nested {
|
||||
margin-left: $tab-width;
|
||||
}
|
||||
|
||||
&--position-end {
|
||||
left: 1px;
|
||||
left: 2px;
|
||||
width: calc(100% - 5px);
|
||||
}
|
||||
}
|
||||
|
||||
// Some specific rules targetting the very top of the nested JSON structure or very first items since they need slightly different styling
|
||||
&__results {
|
||||
& > .query-inspector__row-line--nested {
|
||||
& > .query-inspector__list-toggle {
|
||||
margin-left: 0;
|
||||
column-gap: 6px;
|
||||
|
||||
.query-inspector__toggle-row-icon {
|
||||
margin-left: -4px;
|
||||
}
|
||||
}
|
||||
|
||||
& > .query-inspector__json-children {
|
||||
padding-left: calc(var(--base) * 1);
|
||||
}
|
||||
|
||||
& > .query-inspector__bracket--nested > .query-inspector__bracket--position-end {
|
||||
padding-left: 16px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -329,7 +329,7 @@ const buildVersionField = ({
|
||||
versionFromSiblingData: 'name' in tab ? valueFrom?.[tab.name] : valueFrom,
|
||||
versionToSiblingData: 'name' in tab ? valueTo?.[tab.name] : valueTo,
|
||||
}).versionFields,
|
||||
label: tab.label,
|
||||
label: typeof tab.label === 'function' ? tab.label({ i18n, t: i18n.t }) : tab.label,
|
||||
}
|
||||
if (tabVersion?.fields?.length) {
|
||||
baseVersionField.tabs.push(tabVersion)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@payloadcms/payload-cloud",
|
||||
"version": "3.50.0",
|
||||
"version": "3.51.0",
|
||||
"description": "The official Payload Cloud plugin",
|
||||
"homepage": "https://payloadcms.com",
|
||||
"repository": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "payload",
|
||||
"version": "3.50.0",
|
||||
"version": "3.51.0",
|
||||
"description": "Node, React, Headless CMS and Application Framework built on Next.js",
|
||||
"keywords": [
|
||||
"admin panel",
|
||||
|
||||
@@ -14,6 +14,7 @@ export const baseIDField: TextField = {
|
||||
defaultValue: () => new ObjectId().toHexString(),
|
||||
hooks: {
|
||||
beforeChange: [({ value }) => value || new ObjectId().toHexString()],
|
||||
// ID field values for arrays and blocks need to be unique when duplicating, as on postgres they are stored on the same table as primary keys.
|
||||
beforeDuplicate: [() => new ObjectId().toHexString()],
|
||||
},
|
||||
label: 'ID',
|
||||
|
||||
@@ -63,7 +63,8 @@ export const promise = async <T>({
|
||||
let fieldData = siblingDoc?.[field.name!]
|
||||
const fieldIsLocalized = localization && fieldShouldBeLocalized({ field, parentIsLocalized })
|
||||
|
||||
// Run field beforeDuplicate hooks
|
||||
// Run field beforeDuplicate hooks.
|
||||
// These hooks are responsible for resetting the `id` field values of array and block rows. See `baseIDField`.
|
||||
if (Array.isArray(field.hooks?.beforeDuplicate)) {
|
||||
if (fieldIsLocalized) {
|
||||
const localeData: JsonObject = {}
|
||||
|
||||
@@ -873,6 +873,7 @@ export class BasePayload {
|
||||
this.config.jobs.scheduling
|
||||
) {
|
||||
await this.jobs.handleSchedules({
|
||||
allQueues: cronConfig.allQueues,
|
||||
queue: cronConfig.queue,
|
||||
})
|
||||
}
|
||||
@@ -891,6 +892,7 @@ export class BasePayload {
|
||||
}
|
||||
|
||||
await this.jobs.run({
|
||||
allQueues: cronConfig.allQueues,
|
||||
limit: cronConfig.limit ?? DEFAULT_LIMIT,
|
||||
queue: cronConfig.queue,
|
||||
silent: cronConfig.silent,
|
||||
|
||||
@@ -7,6 +7,13 @@ import type { TaskConfig } from './taskTypes.js'
|
||||
import type { WorkflowConfig } from './workflowTypes.js'
|
||||
|
||||
export type AutorunCronConfig = {
|
||||
/**
|
||||
* If you want to autoRUn jobs from all queues, set this to true.
|
||||
* If you set this to true, the `queue` property will be ignored.
|
||||
*
|
||||
* @default false
|
||||
*/
|
||||
allQueues?: boolean
|
||||
/**
|
||||
* The cron schedule for the job.
|
||||
* @default '* * * * *' (every minute).
|
||||
@@ -43,6 +50,8 @@ export type AutorunCronConfig = {
|
||||
limit?: number
|
||||
/**
|
||||
* The queue name for the job.
|
||||
*
|
||||
* @default 'default'
|
||||
*/
|
||||
queue?: string
|
||||
/**
|
||||
|
||||
@@ -45,11 +45,18 @@ export const handleSchedulesJobsEndpoint: Endpoint = {
|
||||
)
|
||||
}
|
||||
|
||||
const { queue } = req.query as {
|
||||
const { allQueues, queue } = req.query as {
|
||||
allQueues?: 'false' | 'true'
|
||||
queue?: string
|
||||
}
|
||||
|
||||
const { errored, queued, skipped } = await handleSchedules({ queue, req })
|
||||
const runAllQueues = allQueues && !(typeof allQueues === 'string' && allQueues === 'false')
|
||||
|
||||
const { errored, queued, skipped } = await handleSchedules({
|
||||
allQueues: runAllQueues,
|
||||
queue,
|
||||
req,
|
||||
})
|
||||
|
||||
return Response.json(
|
||||
{
|
||||
|
||||
@@ -56,7 +56,7 @@ export const runJobsEndpoint: Endpoint = {
|
||||
|
||||
if (shouldHandleSchedules && jobsConfig.scheduling) {
|
||||
// If should handle schedules and schedules are defined
|
||||
await req.payload.jobs.handleSchedules({ queue: runAllQueues ? undefined : queue, req })
|
||||
await req.payload.jobs.handleSchedules({ allQueues: runAllQueues, queue, req })
|
||||
}
|
||||
|
||||
const runJobsArgs: RunJobsArgs = {
|
||||
|
||||
@@ -22,13 +22,20 @@ export type RunJobsSilent =
|
||||
| boolean
|
||||
export const getJobsLocalAPI = (payload: Payload) => ({
|
||||
handleSchedules: async (args?: {
|
||||
/**
|
||||
* If you want to schedule jobs from all queues, set this to true.
|
||||
* If you set this to true, the `queue` property will be ignored.
|
||||
*
|
||||
* @default false
|
||||
*/
|
||||
allQueues?: boolean
|
||||
// By default, schedule all queues - only scheduling jobs scheduled to be added to the `default` queue would not make sense
|
||||
// here, as you'd usually specify a different queue than `default` here, especially if this is used in combination with autorun.
|
||||
// The `queue` property for setting up schedules is required, and not optional.
|
||||
/**
|
||||
* If you want to only schedule jobs that are set to schedule in a specific queue, set this to the queue name.
|
||||
*
|
||||
* @default all jobs for all queues will be scheduled.
|
||||
* @default jobs from the `default` queue will be executed.
|
||||
*/
|
||||
queue?: string
|
||||
req?: PayloadRequest
|
||||
@@ -36,6 +43,7 @@ export const getJobsLocalAPI = (payload: Payload) => ({
|
||||
const newReq: PayloadRequest = args?.req ?? (await createLocalReq({}, payload))
|
||||
|
||||
return await handleSchedules({
|
||||
allQueues: args?.allQueues,
|
||||
queue: args?.queue,
|
||||
req: newReq,
|
||||
})
|
||||
|
||||
@@ -23,17 +23,26 @@ export type HandleSchedulesResult = {
|
||||
* after they are scheduled
|
||||
*/
|
||||
export async function handleSchedules({
|
||||
queue,
|
||||
allQueues = false,
|
||||
queue: _queue,
|
||||
req,
|
||||
}: {
|
||||
/**
|
||||
* If you want to schedule jobs from all queues, set this to true.
|
||||
* If you set this to true, the `queue` property will be ignored.
|
||||
*
|
||||
* @default false
|
||||
*/
|
||||
allQueues?: boolean
|
||||
/**
|
||||
* If you want to only schedule jobs that are set to schedule in a specific queue, set this to the queue name.
|
||||
*
|
||||
* @default all jobs for all queues will be scheduled.
|
||||
* @default jobs from the `default` queue will be executed.
|
||||
*/
|
||||
queue?: string
|
||||
req: PayloadRequest
|
||||
}): Promise<HandleSchedulesResult> {
|
||||
const queue = _queue ?? 'default'
|
||||
const jobsConfig = req.payload.config.jobs
|
||||
const queuesWithSchedules = getQueuesWithSchedules({
|
||||
jobsConfig,
|
||||
@@ -53,7 +62,7 @@ export async function handleSchedules({
|
||||
// Need to know when that particular job was last scheduled in that particular queue
|
||||
|
||||
for (const [queueName, { schedules }] of Object.entries(queuesWithSchedules)) {
|
||||
if (queue && queueName !== queue) {
|
||||
if (!allQueues && queueName !== queue) {
|
||||
// If a queue is specified, only schedule jobs for that queue
|
||||
continue
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@payloadcms/plugin-cloud-storage",
|
||||
"version": "3.50.0",
|
||||
"version": "3.51.0",
|
||||
"description": "The official cloud storage plugin for Payload CMS",
|
||||
"homepage": "https://payloadcms.com",
|
||||
"repository": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@payloadcms/plugin-form-builder",
|
||||
"version": "3.50.0",
|
||||
"version": "3.51.0",
|
||||
"description": "Form builder plugin for Payload CMS",
|
||||
"keywords": [
|
||||
"payload",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@payloadcms/plugin-import-export",
|
||||
"version": "3.50.0",
|
||||
"version": "3.51.0",
|
||||
"description": "Import-Export plugin for Payload",
|
||||
"keywords": [
|
||||
"payload",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@payloadcms/plugin-multi-tenant",
|
||||
"version": "3.50.0",
|
||||
"version": "3.51.0",
|
||||
"description": "Multi Tenant plugin for Payload",
|
||||
"keywords": [
|
||||
"payload",
|
||||
|
||||
@@ -92,7 +92,9 @@ export const TenantSelector = ({ label, viewType }: { label: string; viewType?:
|
||||
<div className="tenant-selector">
|
||||
<SelectInput
|
||||
isClearable={viewType === 'list'}
|
||||
label={getTranslation(label, i18n)}
|
||||
label={
|
||||
label ? getTranslation(label, i18n) : t('plugin-multi-tenant:nav-tenantSelector-label')
|
||||
}
|
||||
name="setTenant"
|
||||
onChange={onChange}
|
||||
options={options}
|
||||
@@ -110,7 +112,7 @@ export const TenantSelector = ({ label, viewType }: { label: string; viewType?:
|
||||
}}
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-expect-error
|
||||
i18nKey="plugin-multi-tenant:confirm-tenant-switch--body"
|
||||
i18nKey="plugin-multi-tenant:confirm-modal-tenant-switch--body"
|
||||
t={t}
|
||||
variables={{
|
||||
fromTenant: selectedValue?.label,
|
||||
@@ -118,8 +120,10 @@ export const TenantSelector = ({ label, viewType }: { label: string; viewType?:
|
||||
}}
|
||||
/>
|
||||
}
|
||||
heading={t('plugin-multi-tenant:confirm-tenant-switch--heading', {
|
||||
tenantLabel: getTranslation(label, i18n),
|
||||
heading={t('plugin-multi-tenant:confirm-modal-tenant-switch--heading', {
|
||||
tenantLabel: label
|
||||
? getTranslation(label, i18n)
|
||||
: t('plugin-multi-tenant:nav-tenantSelector-label'),
|
||||
})}
|
||||
modalSlug={confirmSwitchTenantSlug}
|
||||
onConfirm={() => {
|
||||
|
||||
@@ -1,2 +1 @@
|
||||
export { tenantField } from '../fields/tenantField/index.js'
|
||||
export { tenantsArrayField } from '../fields/tenantsArrayField/index.js'
|
||||
|
||||
@@ -1,65 +1,83 @@
|
||||
import { type RelationshipField } from 'payload'
|
||||
import type { RelationshipFieldSingleValidation, SingleRelationshipField } from 'payload'
|
||||
|
||||
import { APIError } from 'payload'
|
||||
|
||||
import type { RootTenantFieldConfigOverrides } from '../../types.js'
|
||||
|
||||
import { defaults } from '../../defaults.js'
|
||||
import { getCollectionIDType } from '../../utilities/getCollectionIDType.js'
|
||||
import { getTenantFromCookie } from '../../utilities/getTenantFromCookie.js'
|
||||
|
||||
type Args = {
|
||||
access?: RelationshipField['access']
|
||||
debug?: boolean
|
||||
name: string
|
||||
overrides?: RootTenantFieldConfigOverrides
|
||||
tenantsCollectionSlug: string
|
||||
unique: boolean
|
||||
}
|
||||
export const tenantField = ({
|
||||
name = defaults.tenantFieldName,
|
||||
access = undefined,
|
||||
debug,
|
||||
overrides: _overrides = {},
|
||||
tenantsCollectionSlug = defaults.tenantCollectionSlug,
|
||||
unique,
|
||||
}: Args): RelationshipField => ({
|
||||
name,
|
||||
type: 'relationship',
|
||||
access,
|
||||
admin: {
|
||||
allowCreate: false,
|
||||
allowEdit: false,
|
||||
components: {
|
||||
Field: {
|
||||
clientProps: {
|
||||
debug,
|
||||
unique,
|
||||
}: Args): SingleRelationshipField => {
|
||||
const { validate, ...overrides } = _overrides || {}
|
||||
return {
|
||||
...(overrides || {}),
|
||||
name,
|
||||
type: 'relationship',
|
||||
access: overrides?.access || {},
|
||||
admin: {
|
||||
allowCreate: false,
|
||||
allowEdit: false,
|
||||
disableListColumn: true,
|
||||
disableListFilter: true,
|
||||
...(overrides?.admin || {}),
|
||||
components: {
|
||||
...(overrides?.admin?.components || {}),
|
||||
Field: {
|
||||
path: '@payloadcms/plugin-multi-tenant/client#TenantField',
|
||||
...(typeof overrides?.admin?.components?.Field !== 'string'
|
||||
? overrides?.admin?.components?.Field || {}
|
||||
: {}),
|
||||
clientProps: {
|
||||
...(typeof overrides?.admin?.components?.Field !== 'string'
|
||||
? (overrides?.admin?.components?.Field || {})?.clientProps
|
||||
: {}),
|
||||
debug,
|
||||
unique,
|
||||
},
|
||||
},
|
||||
path: '@payloadcms/plugin-multi-tenant/client#TenantField',
|
||||
},
|
||||
},
|
||||
disableListColumn: true,
|
||||
disableListFilter: true,
|
||||
},
|
||||
hasMany: false,
|
||||
hooks: {
|
||||
beforeChange: [
|
||||
({ req, value }) => {
|
||||
const idType = getCollectionIDType({
|
||||
collectionSlug: tenantsCollectionSlug,
|
||||
payload: req.payload,
|
||||
})
|
||||
if (!value) {
|
||||
const tenantFromCookie = getTenantFromCookie(req.headers, idType)
|
||||
if (tenantFromCookie) {
|
||||
return tenantFromCookie
|
||||
hasMany: false,
|
||||
hooks: {
|
||||
...(overrides.hooks || []),
|
||||
beforeChange: [
|
||||
({ req, value }) => {
|
||||
const idType = getCollectionIDType({
|
||||
collectionSlug: tenantsCollectionSlug,
|
||||
payload: req.payload,
|
||||
})
|
||||
if (!value) {
|
||||
const tenantFromCookie = getTenantFromCookie(req.headers, idType)
|
||||
if (tenantFromCookie) {
|
||||
return tenantFromCookie
|
||||
}
|
||||
throw new APIError('You must select a tenant', 400, null, true)
|
||||
}
|
||||
throw new APIError('You must select a tenant', 400, null, true)
|
||||
}
|
||||
|
||||
return idType === 'number' ? parseFloat(value) : value
|
||||
},
|
||||
],
|
||||
},
|
||||
index: true,
|
||||
// @ts-expect-error translations are not typed for this plugin
|
||||
label: ({ t }) => t('plugin-multi-tenant:field-assignedTentant-label'),
|
||||
relationTo: tenantsCollectionSlug,
|
||||
unique,
|
||||
})
|
||||
return idType === 'number' ? parseFloat(value) : value
|
||||
},
|
||||
...(overrides?.hooks?.beforeChange || []),
|
||||
],
|
||||
},
|
||||
index: true,
|
||||
validate: (validate as RelationshipFieldSingleValidation) || undefined,
|
||||
// @ts-expect-error translations are not typed for this plugin
|
||||
label: overrides?.label || (({ t }) => t('plugin-multi-tenant:field-assignedTenant-label')),
|
||||
relationTo: tenantsCollectionSlug,
|
||||
unique,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,7 +40,6 @@ export const multiTenantPlugin =
|
||||
pluginConfig?.tenantsArrayField?.arrayFieldName || defaults.tenantsArrayFieldName
|
||||
const tenantsArrayTenantFieldName =
|
||||
pluginConfig?.tenantsArrayField?.arrayTenantFieldName || defaults.tenantsArrayTenantFieldName
|
||||
const tenantSelectorLabel = pluginConfig.tenantSelectorLabel || defaults.tenantSelectorLabel
|
||||
const basePath = pluginConfig.basePath || defaults.basePath
|
||||
|
||||
/**
|
||||
@@ -69,37 +68,6 @@ export const multiTenantPlugin =
|
||||
incomingConfig.collections = []
|
||||
}
|
||||
|
||||
/**
|
||||
* Add tenant selector localized labels
|
||||
*/
|
||||
if (typeof tenantSelectorLabel === 'object') {
|
||||
if (!incomingConfig.i18n) {
|
||||
incomingConfig.i18n = {}
|
||||
}
|
||||
Object.entries(tenantSelectorLabel).forEach(([_locale, label]) => {
|
||||
const locale = _locale as AcceptedLanguages
|
||||
if (!incomingConfig.i18n) {
|
||||
incomingConfig.i18n = {}
|
||||
}
|
||||
if (!incomingConfig.i18n.translations) {
|
||||
incomingConfig.i18n.translations = {}
|
||||
}
|
||||
if (!(locale in incomingConfig.i18n.translations)) {
|
||||
incomingConfig.i18n.translations[locale] = {}
|
||||
}
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-expect-error
|
||||
if (!('multiTenant' in incomingConfig.i18n.translations[locale])) {
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-expect-error
|
||||
incomingConfig.i18n.translations[locale].multiTenant = {}
|
||||
}
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-expect-error
|
||||
incomingConfig.i18n.translations[locale].multiTenant.selectorLabel = label
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Add tenants array field to users collection
|
||||
*/
|
||||
@@ -284,6 +252,10 @@ export const multiTenantPlugin =
|
||||
tenantsCollectionSlug,
|
||||
})
|
||||
|
||||
const overrides = pluginConfig.collections[collection.slug]?.tenantFieldOverrides
|
||||
? pluginConfig.collections[collection.slug]?.tenantFieldOverrides
|
||||
: pluginConfig.tenantField || {}
|
||||
|
||||
/**
|
||||
* Add tenant field to enabled collections
|
||||
*/
|
||||
@@ -291,9 +263,9 @@ export const multiTenantPlugin =
|
||||
0,
|
||||
0,
|
||||
tenantField({
|
||||
...(pluginConfig?.tenantField || {}),
|
||||
name: tenantFieldName,
|
||||
debug: pluginConfig.debug,
|
||||
overrides,
|
||||
tenantsCollectionSlug,
|
||||
unique: isGlobal,
|
||||
}),
|
||||
@@ -382,7 +354,7 @@ export const multiTenantPlugin =
|
||||
*/
|
||||
incomingConfig.admin.components.beforeNavLinks.push({
|
||||
clientProps: {
|
||||
label: tenantSelectorLabel,
|
||||
label: pluginConfig.tenantSelectorLabel || undefined,
|
||||
},
|
||||
path: '@payloadcms/plugin-multi-tenant/client#TenantSelector',
|
||||
})
|
||||
@@ -390,22 +362,30 @@ export const multiTenantPlugin =
|
||||
/**
|
||||
* Merge plugin translations
|
||||
*/
|
||||
|
||||
const simplifiedTranslations = Object.entries(translations).reduce(
|
||||
(acc, [key, value]) => {
|
||||
acc[key] = value.translations
|
||||
return acc
|
||||
},
|
||||
{} as Record<string, PluginDefaultTranslationsObject>,
|
||||
)
|
||||
|
||||
incomingConfig.i18n = {
|
||||
...incomingConfig.i18n,
|
||||
translations: deepMergeSimple(
|
||||
simplifiedTranslations,
|
||||
incomingConfig.i18n?.translations ?? {},
|
||||
),
|
||||
if (!incomingConfig.i18n) {
|
||||
incomingConfig.i18n = {}
|
||||
}
|
||||
Object.entries(translations).forEach(([locale, pluginI18nObject]) => {
|
||||
const typedLocale = locale as AcceptedLanguages
|
||||
if (!incomingConfig.i18n!.translations) {
|
||||
incomingConfig.i18n!.translations = {}
|
||||
}
|
||||
if (!(typedLocale in incomingConfig.i18n!.translations)) {
|
||||
incomingConfig.i18n!.translations[typedLocale] = {}
|
||||
}
|
||||
if (!('plugin-multi-tenant' in incomingConfig.i18n!.translations[typedLocale]!)) {
|
||||
;(incomingConfig.i18n!.translations[typedLocale] as PluginDefaultTranslationsObject)[
|
||||
'plugin-multi-tenant'
|
||||
] = {} as PluginDefaultTranslationsObject['plugin-multi-tenant']
|
||||
}
|
||||
|
||||
;(incomingConfig.i18n!.translations[typedLocale] as PluginDefaultTranslationsObject)[
|
||||
'plugin-multi-tenant'
|
||||
] = {
|
||||
...pluginI18nObject.translations['plugin-multi-tenant'],
|
||||
...(pluginConfig.i18n?.translations?.[typedLocale] || {}),
|
||||
}
|
||||
})
|
||||
|
||||
return incomingConfig
|
||||
}
|
||||
|
||||
@@ -2,10 +2,11 @@ import type { PluginDefaultTranslationsObject, PluginLanguage } from '../types.j
|
||||
|
||||
export const arTranslations: PluginDefaultTranslationsObject = {
|
||||
'plugin-multi-tenant': {
|
||||
'confirm-tenant-switch--body':
|
||||
'confirm-modal-tenant-switch--body':
|
||||
'أنت على وشك تغيير الملكية من <0>{{fromTenant}}</0> إلى <0>{{toTenant}}</0>',
|
||||
'confirm-tenant-switch--heading': 'تأكيد تغيير {{tenantLabel}}',
|
||||
'field-assignedTentant-label': 'المستأجر المعين',
|
||||
'confirm-modal-tenant-switch--heading': 'تأكيد تغيير {{tenantLabel}}',
|
||||
'field-assignedTenant-label': 'المستأجر المعين',
|
||||
'nav-tenantSelector-label': 'المستأجر',
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -2,10 +2,11 @@ import type { PluginDefaultTranslationsObject, PluginLanguage } from '../types.j
|
||||
|
||||
export const azTranslations: PluginDefaultTranslationsObject = {
|
||||
'plugin-multi-tenant': {
|
||||
'confirm-tenant-switch--body':
|
||||
'Siz <0>{{fromTenant}}</0> mülkiyyətini <0>{{toTenant}}</0> mülkiyyətinə dəyişdirəcəksiniz.',
|
||||
'confirm-tenant-switch--heading': '{{tenantLabel}} dəyişikliyini təsdiqləyin',
|
||||
'field-assignedTentant-label': 'Təyin edilmiş İcarəçi',
|
||||
'confirm-modal-tenant-switch--body':
|
||||
'Siz <0>{{fromTenant}}</0>-dən <0>{{toTenant}}</0>-a mülkiyyəti dəyişməyə hazırlaşırsınız',
|
||||
'confirm-modal-tenant-switch--heading': '{{tenantLabel}} dəyişikliyini təsdiqləyin',
|
||||
'field-assignedTenant-label': 'Təyin edilmiş İcarəçi',
|
||||
'nav-tenantSelector-label': 'Kirayəçi',
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -2,10 +2,11 @@ import type { PluginDefaultTranslationsObject, PluginLanguage } from '../types.j
|
||||
|
||||
export const bgTranslations: PluginDefaultTranslationsObject = {
|
||||
'plugin-multi-tenant': {
|
||||
'confirm-tenant-switch--body':
|
||||
'confirm-modal-tenant-switch--body':
|
||||
'Предстои да промените собствеността от <0>{{fromTenant}}</0> на <0>{{toTenant}}</0>',
|
||||
'confirm-tenant-switch--heading': 'Потвърдете промяната на {{tenantLabel}}',
|
||||
'field-assignedTentant-label': 'Назначен наемател',
|
||||
'confirm-modal-tenant-switch--heading': 'Потвърждаване на промяна в {{tenantLabel}}',
|
||||
'field-assignedTenant-label': 'Назначен наемател',
|
||||
'nav-tenantSelector-label': 'Потребител',
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
import type { PluginDefaultTranslationsObject, PluginLanguage } from '../types.js'
|
||||
|
||||
export const bnBdTranslations: PluginDefaultTranslationsObject = {
|
||||
'plugin-multi-tenant': {
|
||||
'confirm-modal-tenant-switch--body':
|
||||
'আপনি <0>{{fromTenant}}</0> থেকে <0>{{toTenant}}</0> তে মালিকানা পরিবর্তন করতে চলেছেন।',
|
||||
'confirm-modal-tenant-switch--heading': '{{tenantLabel}} পরিবর্তন নিশ্চিত করুন',
|
||||
'field-assignedTenant-label': 'নির্ধারিত টেনেন্ট',
|
||||
'nav-tenantSelector-label': 'ভাড়াটিয়া',
|
||||
},
|
||||
}
|
||||
|
||||
export const bnBd: PluginLanguage = {
|
||||
dateFNSKey: 'bn-BD',
|
||||
translations: bnBdTranslations,
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
import type { PluginDefaultTranslationsObject, PluginLanguage } from '../types.js'
|
||||
|
||||
export const bnInTranslations: PluginDefaultTranslationsObject = {
|
||||
'plugin-multi-tenant': {
|
||||
'confirm-modal-tenant-switch--body':
|
||||
'আপনি স্বত্বাধিকার পরিবর্তন করতে চলেছেন <0>{{fromTenant}}</0> থেকে <0>{{toTenant}}</0> এ।',
|
||||
'confirm-modal-tenant-switch--heading': '{{tenantLabel}} পরিবর্তন নিশ্চিত করুন',
|
||||
'field-assignedTenant-label': 'নির্ধারিত টেনেন্ট',
|
||||
'nav-tenantSelector-label': 'ভাড়াটিয়া',
|
||||
},
|
||||
}
|
||||
|
||||
export const bnIn: PluginLanguage = {
|
||||
dateFNSKey: 'bn-IN',
|
||||
translations: bnInTranslations,
|
||||
}
|
||||
@@ -2,10 +2,11 @@ import type { PluginDefaultTranslationsObject, PluginLanguage } from '../types.j
|
||||
|
||||
export const caTranslations: PluginDefaultTranslationsObject = {
|
||||
'plugin-multi-tenant': {
|
||||
'confirm-tenant-switch--body':
|
||||
'Estàs a punt de canviar la propietat de <0>{{fromTenant}}</0> a <0>{{toTenant}}</0>',
|
||||
'confirm-tenant-switch--heading': 'Confirmeu el canvi de {{tenantLabel}}',
|
||||
'field-assignedTentant-label': 'Llogater Assignat',
|
||||
'confirm-modal-tenant-switch--body':
|
||||
'Està a punt de canviar la propietat de <0>{{fromTenant}}</0> a <0>{{toTenant}}</0>',
|
||||
'confirm-modal-tenant-switch--heading': 'Confirmeu el canvi de {{tenantLabel}}',
|
||||
'field-assignedTenant-label': 'Llogater Assignat',
|
||||
'nav-tenantSelector-label': 'Inquilí',
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -2,10 +2,11 @@ import type { PluginDefaultTranslationsObject, PluginLanguage } from '../types.j
|
||||
|
||||
export const csTranslations: PluginDefaultTranslationsObject = {
|
||||
'plugin-multi-tenant': {
|
||||
'confirm-tenant-switch--body':
|
||||
'confirm-modal-tenant-switch--body':
|
||||
'Chystáte se změnit vlastnictví z <0>{{fromTenant}}</0> na <0>{{toTenant}}</0>',
|
||||
'confirm-tenant-switch--heading': 'Potvrďte změnu {{tenantLabel}}',
|
||||
'field-assignedTentant-label': 'Přiřazený nájemce',
|
||||
'confirm-modal-tenant-switch--heading': 'Potvrďte změnu {{tenantLabel}}',
|
||||
'field-assignedTenant-label': 'Přiřazený nájemce',
|
||||
'nav-tenantSelector-label': 'Nájemce',
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -2,10 +2,11 @@ import type { PluginDefaultTranslationsObject, PluginLanguage } from '../types.j
|
||||
|
||||
export const daTranslations: PluginDefaultTranslationsObject = {
|
||||
'plugin-multi-tenant': {
|
||||
'confirm-tenant-switch--body':
|
||||
'Du er ved at ændre ejerskab fra <0>{{fromTenant}}</0> til <0>{{toTenant}}</0>',
|
||||
'confirm-tenant-switch--heading': 'Bekræft {{tenantLabel}} ændring',
|
||||
'field-assignedTentant-label': 'Tildelt Lejer',
|
||||
'confirm-modal-tenant-switch--body':
|
||||
'Du er ved at skifte ejerskab fra <0>{{fromTenant}}</0> til <0>{{toTenant}}</0>',
|
||||
'confirm-modal-tenant-switch--heading': 'Bekræft ændring af {{tenantLabel}}',
|
||||
'field-assignedTenant-label': 'Tildelt Lejer',
|
||||
'nav-tenantSelector-label': 'Lejer',
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -2,10 +2,11 @@ import type { PluginDefaultTranslationsObject, PluginLanguage } from '../types.j
|
||||
|
||||
export const deTranslations: PluginDefaultTranslationsObject = {
|
||||
'plugin-multi-tenant': {
|
||||
'confirm-tenant-switch--body':
|
||||
'Sie sind dabei, den Besitz von <0>{{fromTenant}}</0> auf <0>{{toTenant}}</0> zu übertragen.',
|
||||
'confirm-tenant-switch--heading': 'Bestätigen Sie die Änderung von {{tenantLabel}}.',
|
||||
'field-assignedTentant-label': 'Zugewiesener Mandant',
|
||||
'confirm-modal-tenant-switch--body':
|
||||
'Sie sind dabei, den Besitz von <0>{{fromTenant}}</0> zu <0>{{toTenant}}</0> zu ändern.',
|
||||
'confirm-modal-tenant-switch--heading': 'Bestätigung der Änderung von {{tenantLabel}}',
|
||||
'field-assignedTenant-label': 'Zugewiesener Mandant',
|
||||
'nav-tenantSelector-label': 'Mieter',
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -2,10 +2,11 @@ import type { PluginLanguage } from '../types.js'
|
||||
|
||||
export const enTranslations = {
|
||||
'plugin-multi-tenant': {
|
||||
'confirm-tenant-switch--body':
|
||||
'confirm-modal-tenant-switch--body':
|
||||
'You are about to change ownership from <0>{{fromTenant}}</0> to <0>{{toTenant}}</0>',
|
||||
'confirm-tenant-switch--heading': 'Confirm {{tenantLabel}} change',
|
||||
'field-assignedTentant-label': 'Assigned Tenant',
|
||||
'confirm-modal-tenant-switch--heading': 'Confirm {{tenantLabel}} change',
|
||||
'field-assignedTenant-label': 'Assigned Tenant',
|
||||
'nav-tenantSelector-label': 'Tenant',
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -2,10 +2,11 @@ import type { PluginDefaultTranslationsObject, PluginLanguage } from '../types.j
|
||||
|
||||
export const esTranslations: PluginDefaultTranslationsObject = {
|
||||
'plugin-multi-tenant': {
|
||||
'confirm-tenant-switch--body':
|
||||
'confirm-modal-tenant-switch--body':
|
||||
'Está a punto de cambiar la propiedad de <0>{{fromTenant}}</0> a <0>{{toTenant}}</0>',
|
||||
'confirm-tenant-switch--heading': 'Confirme el cambio de {{tenantLabel}}',
|
||||
'field-assignedTentant-label': 'Inquilino Asignado',
|
||||
'confirm-modal-tenant-switch--heading': 'Confirme el cambio de {{tenantLabel}}',
|
||||
'field-assignedTenant-label': 'Inquilino Asignado',
|
||||
'nav-tenantSelector-label': 'Inquilino',
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -2,10 +2,11 @@ import type { PluginDefaultTranslationsObject, PluginLanguage } from '../types.j
|
||||
|
||||
export const etTranslations: PluginDefaultTranslationsObject = {
|
||||
'plugin-multi-tenant': {
|
||||
'confirm-tenant-switch--body':
|
||||
'Te olete tegemas omandiõiguse muudatust <0>{{fromTenant}}</0>lt <0>{{toTenant}}</0>le.',
|
||||
'confirm-tenant-switch--heading': 'Kinnita {{tenantLabel}} muutus',
|
||||
'field-assignedTentant-label': 'Määratud üürnik',
|
||||
'confirm-modal-tenant-switch--body':
|
||||
'Te olete just muutmas omandiõigust <0>{{fromTenant}}</0> -lt <0>{{toTenant}}</0> -le.',
|
||||
'confirm-modal-tenant-switch--heading': 'Kinnita {{tenantLabel}} muutus',
|
||||
'field-assignedTenant-label': 'Määratud üürnik',
|
||||
'nav-tenantSelector-label': 'Üürnik',
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -2,10 +2,11 @@ import type { PluginDefaultTranslationsObject, PluginLanguage } from '../types.j
|
||||
|
||||
export const faTranslations: PluginDefaultTranslationsObject = {
|
||||
'plugin-multi-tenant': {
|
||||
'confirm-tenant-switch--body':
|
||||
'شما در حال تغییر مالکیت از <0>{{fromTenant}}</0> به <0>{{toTenant}}</0> هستید',
|
||||
'confirm-tenant-switch--heading': 'تایید تغییر {{tenantLabel}}',
|
||||
'field-assignedTentant-label': 'مستاجر اختصاص یافته',
|
||||
'confirm-modal-tenant-switch--body':
|
||||
'شما در حال تغییر مالکیت از <0>{{fromTenant}}</0> به <0>{{toTenant}}</0> هستید.',
|
||||
'confirm-modal-tenant-switch--heading': 'تأیید تغییر {{tenantLabel}}',
|
||||
'field-assignedTenant-label': 'مستاجر اختصاص یافته',
|
||||
'nav-tenantSelector-label': 'مستاجر',
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -2,10 +2,11 @@ import type { PluginDefaultTranslationsObject, PluginLanguage } from '../types.j
|
||||
|
||||
export const frTranslations: PluginDefaultTranslationsObject = {
|
||||
'plugin-multi-tenant': {
|
||||
'confirm-tenant-switch--body':
|
||||
'confirm-modal-tenant-switch--body':
|
||||
'Vous êtes sur le point de changer la propriété de <0>{{fromTenant}}</0> à <0>{{toTenant}}</0>',
|
||||
'confirm-tenant-switch--heading': 'Confirmer le changement de {{tenantLabel}}',
|
||||
'field-assignedTentant-label': 'Locataire Attribué',
|
||||
'confirm-modal-tenant-switch--heading': 'Confirmer le changement de {{tenantLabel}}',
|
||||
'field-assignedTenant-label': 'Locataire Attribué',
|
||||
'nav-tenantSelector-label': 'Locataire',
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -2,10 +2,11 @@ import type { PluginDefaultTranslationsObject, PluginLanguage } from '../types.j
|
||||
|
||||
export const heTranslations: PluginDefaultTranslationsObject = {
|
||||
'plugin-multi-tenant': {
|
||||
'confirm-tenant-switch--body':
|
||||
'confirm-modal-tenant-switch--body':
|
||||
'אתה עומד לשנות בעלות מ- <0>{{fromTenant}}</0> ל- <0>{{toTenant}}</0>',
|
||||
'confirm-tenant-switch--heading': 'אשר שינוי {{tenantLabel}}',
|
||||
'field-assignedTentant-label': 'דייר מוקצה',
|
||||
'confirm-modal-tenant-switch--heading': 'אשר שינוי {{tenantLabel}}',
|
||||
'field-assignedTenant-label': 'דייר מוקצה',
|
||||
'nav-tenantSelector-label': 'דייר',
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -2,10 +2,11 @@ import type { PluginDefaultTranslationsObject, PluginLanguage } from '../types.j
|
||||
|
||||
export const hrTranslations: PluginDefaultTranslationsObject = {
|
||||
'plugin-multi-tenant': {
|
||||
'confirm-tenant-switch--body':
|
||||
'Upravo ćete promijeniti vlasništvo sa <0>{{fromTenant}}</0> na <0>{{toTenant}}</0>',
|
||||
'confirm-tenant-switch--heading': 'Potvrdi promjenu {{tenantLabel}}',
|
||||
'field-assignedTentant-label': 'Dodijeljeni stanar',
|
||||
'confirm-modal-tenant-switch--body':
|
||||
'Na rubu ste promjene vlasništva iz <0>{{fromTenant}}</0> u <0>{{toTenant}}</0>',
|
||||
'confirm-modal-tenant-switch--heading': 'Potvrdite promjenu {{tenantLabel}}',
|
||||
'field-assignedTenant-label': 'Dodijeljeni stanar',
|
||||
'nav-tenantSelector-label': 'Podstanar',
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -2,10 +2,11 @@ import type { PluginDefaultTranslationsObject, PluginLanguage } from '../types.j
|
||||
|
||||
export const huTranslations: PluginDefaultTranslationsObject = {
|
||||
'plugin-multi-tenant': {
|
||||
'confirm-tenant-switch--body':
|
||||
'Ön azon van, hogy megváltoztassa a tulajdonjogot <0>{{fromTenant}}</0>-ről <0>{{toTenant}}</0>-re.',
|
||||
'confirm-tenant-switch--heading': 'Erősítse meg a(z) {{tenantLabel}} változtatást',
|
||||
'field-assignedTentant-label': 'Kijelölt Bérlő',
|
||||
'confirm-modal-tenant-switch--body':
|
||||
'Közel áll ahhoz, hogy megváltoztassa a tulajdonságot <0>{{fromTenant}}</0> -ból <0>{{toTenant}}</0> -ba.',
|
||||
'confirm-modal-tenant-switch--heading': 'Erősítse meg a {{tenantLabel}} változást',
|
||||
'field-assignedTenant-label': 'Kijelölt Bérlő',
|
||||
'nav-tenantSelector-label': 'Bérlő',
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -2,10 +2,11 @@ import type { PluginDefaultTranslationsObject, PluginLanguage } from '../types.j
|
||||
|
||||
export const hyTranslations: PluginDefaultTranslationsObject = {
|
||||
'plugin-multi-tenant': {
|
||||
'confirm-tenant-switch--body':
|
||||
'Դուք պատրաստ եք փոխել գերեցդիմատնին ընկերությունը <0>{{fromTenant}}</0>-ից <0>{{toTenant}}</0>-ին',
|
||||
'confirm-tenant-switch--heading': 'Հաստատեք {{tenantLabel}} փոփոխությունը',
|
||||
'field-assignedTentant-label': 'Հանձնարարված վարձակալ',
|
||||
'confirm-modal-tenant-switch--body':
|
||||
'Դուք պատրաստվում եք փոխել սեփականությունը <0>{{fromTenant}}</0>-ից <0>{{toTenant}}</0>-ին:',
|
||||
'confirm-modal-tenant-switch--heading': 'Հաստատեք {{tenantLabel}}֊ի փոփոխությունը',
|
||||
'field-assignedTenant-label': 'Հանձնարարված վարձակալ',
|
||||
'nav-tenantSelector-label': 'Տենանտ',
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
import type { PluginDefaultTranslationsObject, PluginLanguage } from '../types.js'
|
||||
|
||||
export const idTranslations: PluginDefaultTranslationsObject = {
|
||||
'plugin-multi-tenant': {
|
||||
'confirm-modal-tenant-switch--body':
|
||||
'Anda akan mengubah kepemilikan dari <0>{{fromTenant}}</0> ke <0>{{toTenant}}</0>',
|
||||
'confirm-modal-tenant-switch--heading': 'Konfirmasi perubahan {{tenantLabel}}',
|
||||
'field-assignedTenant-label': 'Penyewa yang Ditugaskan',
|
||||
'nav-tenantSelector-label': 'Penyewa',
|
||||
},
|
||||
}
|
||||
|
||||
export const id: PluginLanguage = {
|
||||
dateFNSKey: 'id',
|
||||
translations: idTranslations,
|
||||
}
|
||||
@@ -2,10 +2,11 @@ import type { PluginDefaultTranslationsObject, PluginLanguage } from '../types.j
|
||||
|
||||
export const itTranslations: PluginDefaultTranslationsObject = {
|
||||
'plugin-multi-tenant': {
|
||||
'confirm-tenant-switch--body':
|
||||
'Stai per cambiare proprietà da <0>{{fromTenant}}</0> a <0>{{toTenant}}</0>',
|
||||
'confirm-tenant-switch--heading': 'Conferma il cambiamento di {{tenantLabel}}',
|
||||
'field-assignedTentant-label': 'Inquilino Assegnato',
|
||||
'confirm-modal-tenant-switch--body':
|
||||
'Stai per cambiare il possesso da <0>{{fromTenant}}</0> a <0>{{toTenant}}</0>',
|
||||
'confirm-modal-tenant-switch--heading': 'Conferma il cambiamento di {{tenantLabel}}',
|
||||
'field-assignedTenant-label': 'Inquilino Assegnato',
|
||||
'nav-tenantSelector-label': 'Inquilino',
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -2,10 +2,11 @@ import type { PluginDefaultTranslationsObject, PluginLanguage } from '../types.j
|
||||
|
||||
export const jaTranslations: PluginDefaultTranslationsObject = {
|
||||
'plugin-multi-tenant': {
|
||||
'confirm-tenant-switch--body':
|
||||
'あなたは所有権を<0>{{fromTenant}}</0>から<0>{{toTenant}}</0>へ変更しようとしています',
|
||||
'confirm-tenant-switch--heading': '{{tenantLabel}}の変更を確認してください',
|
||||
'field-assignedTentant-label': '割り当てられたテナント',
|
||||
'confirm-modal-tenant-switch--body':
|
||||
'あなたは、<0>{{fromTenant}}</0>から<0>{{toTenant}}</0>への所有権を変更しようとしています。',
|
||||
'confirm-modal-tenant-switch--heading': '{{tenantLabel}}の変更を確認します',
|
||||
'field-assignedTenant-label': '割り当てられたテナント',
|
||||
'nav-tenantSelector-label': 'テナント',
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -2,10 +2,11 @@ import type { PluginDefaultTranslationsObject, PluginLanguage } from '../types.j
|
||||
|
||||
export const koTranslations: PluginDefaultTranslationsObject = {
|
||||
'plugin-multi-tenant': {
|
||||
'confirm-tenant-switch--body':
|
||||
'<0>{{fromTenant}}</0>에서 <0>{{toTenant}}</0>으로 소유권을 변경하려고 합니다.',
|
||||
'confirm-tenant-switch--heading': '{{tenantLabel}} 변경을 확인하세요',
|
||||
'field-assignedTentant-label': '지정된 세입자',
|
||||
'confirm-modal-tenant-switch--body':
|
||||
'<0>{{fromTenant}}</0>에서 <0>{{toTenant}}</0>로 소유권을 변경하려고 합니다.',
|
||||
'confirm-modal-tenant-switch--heading': '{{tenantLabel}} 변경 확인',
|
||||
'field-assignedTenant-label': '지정된 세입자',
|
||||
'nav-tenantSelector-label': '세입자',
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -2,10 +2,11 @@ import type { PluginDefaultTranslationsObject, PluginLanguage } from '../types.j
|
||||
|
||||
export const ltTranslations: PluginDefaultTranslationsObject = {
|
||||
'plugin-multi-tenant': {
|
||||
'confirm-tenant-switch--body':
|
||||
'Jūs ketinate pakeisti nuosavybės teisę iš <0>{{fromTenant}}</0> į <0>{{toTenant}}</0>',
|
||||
'confirm-tenant-switch--heading': 'Patvirtinkite {{tenantLabel}} pakeitimą',
|
||||
'field-assignedTentant-label': 'Paskirtas nuomininkas',
|
||||
'confirm-modal-tenant-switch--body':
|
||||
'Jūs ketinate pakeisti nuosavybę iš <0>{{fromTenant}}</0> į <0>{{toTenant}}</0>',
|
||||
'confirm-modal-tenant-switch--heading': 'Patvirtinkite {{tenantLabel}} pakeitimą',
|
||||
'field-assignedTenant-label': 'Paskirtas nuomininkas',
|
||||
'nav-tenantSelector-label': 'Nuomininkas',
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -2,10 +2,11 @@ import type { PluginDefaultTranslationsObject, PluginLanguage } from '../types.j
|
||||
|
||||
export const lvTranslations: PluginDefaultTranslationsObject = {
|
||||
'plugin-multi-tenant': {
|
||||
'confirm-tenant-switch--body':
|
||||
'confirm-modal-tenant-switch--body':
|
||||
'Jūs gatavojaties mainīt īpašumtiesības no <0>{{fromTenant}}</0> uz <0>{{toTenant}}</0>',
|
||||
'confirm-tenant-switch--heading': 'Apstipriniet {{tenantLabel}} izmaiņu',
|
||||
'field-assignedTentant-label': 'Piešķirts īrnieks',
|
||||
'confirm-modal-tenant-switch--heading': 'Apstipriniet {{tenantLabel}} izmaiņu',
|
||||
'field-assignedTenant-label': 'Piešķirts nomnieks',
|
||||
'nav-tenantSelector-label': 'Nomnieks',
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -2,10 +2,11 @@ import type { PluginDefaultTranslationsObject, PluginLanguage } from '../types.j
|
||||
|
||||
export const myTranslations: PluginDefaultTranslationsObject = {
|
||||
'plugin-multi-tenant': {
|
||||
'confirm-tenant-switch--body':
|
||||
'Anda akan mengubah pemilikan dari <0>{{fromTenant}}</0> ke <0>{{toTenant}}</0>',
|
||||
'confirm-tenant-switch--heading': 'Sahkan perubahan {{tenantLabel}}',
|
||||
'field-assignedTentant-label': 'ခွဲစိုက်ထားသော အငှားယူသူ',
|
||||
'confirm-modal-tenant-switch--body':
|
||||
'Anda akan menukar pemilikan dari <0>{{fromTenant}}</0> kepada <0>{{toTenant}}</0>',
|
||||
'confirm-modal-tenant-switch--heading': 'Sahkan perubahan {{tenantLabel}}',
|
||||
'field-assignedTenant-label': 'ခွဲစိုက်ထားသော အငှားယူသူ',
|
||||
'nav-tenantSelector-label': 'Penyewa',
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -2,10 +2,11 @@ import type { PluginDefaultTranslationsObject, PluginLanguage } from '../types.j
|
||||
|
||||
export const nbTranslations: PluginDefaultTranslationsObject = {
|
||||
'plugin-multi-tenant': {
|
||||
'confirm-tenant-switch--body':
|
||||
'confirm-modal-tenant-switch--body':
|
||||
'Du er i ferd med å endre eierskap fra <0>{{fromTenant}}</0> til <0>{{toTenant}}</0>',
|
||||
'confirm-tenant-switch--heading': 'Bekreft {{tenantLabel}} endring',
|
||||
'field-assignedTentant-label': 'Tildelt leietaker',
|
||||
'confirm-modal-tenant-switch--heading': 'Bekreft endring av {{tenantLabel}}',
|
||||
'field-assignedTenant-label': 'Tildelt leietaker',
|
||||
'nav-tenantSelector-label': 'Leietaker',
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -2,10 +2,11 @@ import type { PluginDefaultTranslationsObject, PluginLanguage } from '../types.j
|
||||
|
||||
export const nlTranslations: PluginDefaultTranslationsObject = {
|
||||
'plugin-multi-tenant': {
|
||||
'confirm-tenant-switch--body':
|
||||
'U staat op het punt het eigendom te wijzigen van <0>{{fromTenant}}</0> naar <0>{{toTenant}}</0>',
|
||||
'confirm-tenant-switch--heading': 'Bevestig wijziging van {{tenantLabel}}',
|
||||
'field-assignedTentant-label': 'Toegewezen Huurder',
|
||||
'confirm-modal-tenant-switch--body':
|
||||
'U staat op het punt om eigenaarschap te wijzigen van <0>{{fromTenant}}</0> naar <0>{{toTenant}}</0>',
|
||||
'confirm-modal-tenant-switch--heading': 'Bevestig wijziging van {{tenantLabel}}',
|
||||
'field-assignedTenant-label': 'Toegewezen Huurder',
|
||||
'nav-tenantSelector-label': 'Huurder',
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -2,10 +2,11 @@ import type { PluginDefaultTranslationsObject, PluginLanguage } from '../types.j
|
||||
|
||||
export const plTranslations: PluginDefaultTranslationsObject = {
|
||||
'plugin-multi-tenant': {
|
||||
'confirm-tenant-switch--body':
|
||||
'confirm-modal-tenant-switch--body':
|
||||
'Za chwilę nastąpi zmiana właściciela z <0>{{fromTenant}}</0> na <0>{{toTenant}}</0>',
|
||||
'confirm-tenant-switch--heading': 'Potwierdź zmianę {{tenantLabel}}',
|
||||
'field-assignedTentant-label': 'Przypisany Najemca',
|
||||
'confirm-modal-tenant-switch--heading': 'Potwierdź zmianę {{tenantLabel}}',
|
||||
'field-assignedTenant-label': 'Przypisany Najemca',
|
||||
'nav-tenantSelector-label': 'Najemca',
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -2,10 +2,11 @@ import type { PluginDefaultTranslationsObject, PluginLanguage } from '../types.j
|
||||
|
||||
export const ptTranslations: PluginDefaultTranslationsObject = {
|
||||
'plugin-multi-tenant': {
|
||||
'confirm-tenant-switch--body':
|
||||
'Você está prestes a alterar a propriedade de <0>{{fromTenant}}</0> para <0>{{toTenant}}</0>',
|
||||
'confirm-tenant-switch--heading': 'Confirme a alteração de {{tenantLabel}}',
|
||||
'field-assignedTentant-label': 'Inquilino Atribuído',
|
||||
'confirm-modal-tenant-switch--body':
|
||||
'Está prestes a mudar a propriedade de <0>{{fromTenant}}</0> para <0>{{toTenant}}</0>',
|
||||
'confirm-modal-tenant-switch--heading': 'Confirme a alteração do {{tenantLabel}}',
|
||||
'field-assignedTenant-label': 'Inquilino Atribuído',
|
||||
'nav-tenantSelector-label': 'Inquilino',
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -2,10 +2,11 @@ import type { PluginDefaultTranslationsObject, PluginLanguage } from '../types.j
|
||||
|
||||
export const roTranslations: PluginDefaultTranslationsObject = {
|
||||
'plugin-multi-tenant': {
|
||||
'confirm-tenant-switch--body':
|
||||
'Sunteți pe punctul de a schimba proprietatea de la <0>{{fromTenant}}</0> la <0>{{toTenant}}</0>',
|
||||
'confirm-tenant-switch--heading': 'Confirmați schimbarea {{tenantLabel}}',
|
||||
'field-assignedTentant-label': 'Locatar Atribuit',
|
||||
'confirm-modal-tenant-switch--body':
|
||||
'Sunteți pe cale să schimbați proprietatea de la <0>{{fromTenant}}</0> la <0>{{toTenant}}</0>',
|
||||
'confirm-modal-tenant-switch--heading': 'Confirmați modificarea {{tenantLabel}}',
|
||||
'field-assignedTenant-label': 'Locatar Atribuit',
|
||||
'nav-tenantSelector-label': 'Locatar',
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -2,10 +2,11 @@ import type { PluginDefaultTranslationsObject, PluginLanguage } from '../types.j
|
||||
|
||||
export const rsTranslations: PluginDefaultTranslationsObject = {
|
||||
'plugin-multi-tenant': {
|
||||
'confirm-tenant-switch--body':
|
||||
'Upravo ćete promeniti vlasništvo sa <0>{{fromTenant}}</0> na <0>{{toTenant}}</0>',
|
||||
'confirm-tenant-switch--heading': 'Potvrdi promena {{tenantLabel}}',
|
||||
'field-assignedTentant-label': 'Dodeljen stanar',
|
||||
'confirm-modal-tenant-switch--body':
|
||||
'Na putu ste da promenite vlasništvo od <0>{{fromTenant}}</0> do <0>{{toTenant}}</0>',
|
||||
'confirm-modal-tenant-switch--heading': 'Potvrdite promenu {{tenantLabel}}',
|
||||
'field-assignedTenant-label': 'Dodeljen stanar',
|
||||
'nav-tenantSelector-label': 'Podstanar',
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -2,10 +2,11 @@ import type { PluginDefaultTranslationsObject, PluginLanguage } from '../types.j
|
||||
|
||||
export const rsLatinTranslations: PluginDefaultTranslationsObject = {
|
||||
'plugin-multi-tenant': {
|
||||
'confirm-tenant-switch--body':
|
||||
'confirm-modal-tenant-switch--body':
|
||||
'Uskoro ćete promeniti vlasništvo sa <0>{{fromTenant}}</0> na <0>{{toTenant}}</0>',
|
||||
'confirm-tenant-switch--heading': 'Potvrdite promenu {{tenantLabel}}',
|
||||
'field-assignedTentant-label': 'Dodeljen stanar',
|
||||
'confirm-modal-tenant-switch--heading': 'Potvrdite promenu {{tenantLabel}}',
|
||||
'field-assignedTenant-label': 'Dodeljen stanar',
|
||||
'nav-tenantSelector-label': 'Podstanar',
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -2,10 +2,11 @@ import type { PluginDefaultTranslationsObject, PluginLanguage } from '../types.j
|
||||
|
||||
export const ruTranslations: PluginDefaultTranslationsObject = {
|
||||
'plugin-multi-tenant': {
|
||||
'confirm-tenant-switch--body':
|
||||
'confirm-modal-tenant-switch--body':
|
||||
'Вы собираетесь изменить владельца с <0>{{fromTenant}}</0> на <0>{{toTenant}}</0>',
|
||||
'confirm-tenant-switch--heading': 'Подтвердите изменение {{tenantLabel}}',
|
||||
'field-assignedTentant-label': 'Назначенный Арендатор',
|
||||
'confirm-modal-tenant-switch--heading': 'Подтвердите изменение {{tenantLabel}}',
|
||||
'field-assignedTenant-label': 'Назначенный Арендатор',
|
||||
'nav-tenantSelector-label': 'Арендатор',
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -2,10 +2,11 @@ import type { PluginDefaultTranslationsObject, PluginLanguage } from '../types.j
|
||||
|
||||
export const skTranslations: PluginDefaultTranslationsObject = {
|
||||
'plugin-multi-tenant': {
|
||||
'confirm-tenant-switch--body':
|
||||
'confirm-modal-tenant-switch--body':
|
||||
'Chystáte sa zmeniť vlastníctvo z <0>{{fromTenant}}</0> na <0>{{toTenant}}</0>',
|
||||
'confirm-tenant-switch--heading': 'Potvrďte zmenu {{tenantLabel}}',
|
||||
'field-assignedTentant-label': 'Pridelený nájomca',
|
||||
'confirm-modal-tenant-switch--heading': 'Potvrďte zmenu {{tenantLabel}}',
|
||||
'field-assignedTenant-label': 'Pridelený nájomca',
|
||||
'nav-tenantSelector-label': 'Nájomca',
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -2,10 +2,11 @@ import type { PluginDefaultTranslationsObject, PluginLanguage } from '../types.j
|
||||
|
||||
export const slTranslations: PluginDefaultTranslationsObject = {
|
||||
'plugin-multi-tenant': {
|
||||
'confirm-tenant-switch--body':
|
||||
'Ravno ste pred spremembo lastništva iz <0>{{fromTenant}}</0> na <0>{{toTenant}}</0>',
|
||||
'confirm-tenant-switch--heading': 'Potrdi spremembo {{tenantLabel}}',
|
||||
'field-assignedTentant-label': 'Dodeljen najemnik',
|
||||
'confirm-modal-tenant-switch--body':
|
||||
'Pravkar ste na točki, da spremenite lastništvo iz <0>{{fromTenant}}</0> v <0>{{toTenant}}</0>',
|
||||
'confirm-modal-tenant-switch--heading': 'Potrdite spremembo {{tenantLabel}}',
|
||||
'field-assignedTenant-label': 'Dodeljen najemnik',
|
||||
'nav-tenantSelector-label': 'Najemnik',
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -2,10 +2,11 @@ import type { PluginDefaultTranslationsObject, PluginLanguage } from '../types.j
|
||||
|
||||
export const svTranslations: PluginDefaultTranslationsObject = {
|
||||
'plugin-multi-tenant': {
|
||||
'confirm-tenant-switch--body':
|
||||
'Du är på väg att ändra ägare från <0>{{fromTenant}}</0> till <0>{{toTenant}}</0>',
|
||||
'confirm-tenant-switch--heading': 'Bekräfta ändring av {{tenantLabel}}',
|
||||
'field-assignedTentant-label': 'Tilldelad hyresgäst',
|
||||
'confirm-modal-tenant-switch--body':
|
||||
'Du är på väg att ändra ägande från <0>{{fromTenant}}</0> till <0>{{toTenant}}</0>',
|
||||
'confirm-modal-tenant-switch--heading': 'Bekräfta ändring av {{tenantLabel}}',
|
||||
'field-assignedTenant-label': 'Tilldelad hyresgäst',
|
||||
'nav-tenantSelector-label': 'Hyresgäst',
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -2,10 +2,11 @@ import type { PluginDefaultTranslationsObject, PluginLanguage } from '../types.j
|
||||
|
||||
export const thTranslations: PluginDefaultTranslationsObject = {
|
||||
'plugin-multi-tenant': {
|
||||
'confirm-tenant-switch--body':
|
||||
'คุณกำลังจะเปลี่ยนความเป็นเจ้าของจาก <0>{{fromTenant}}</0> เป็น <0>{{toTenant}}</0>',
|
||||
'confirm-tenant-switch--heading': 'ยืนยันการเปลี่ยนแปลง {{tenantLabel}}',
|
||||
'field-assignedTentant-label': 'ผู้เช่าที่ได้รับการกำหนด',
|
||||
'confirm-modal-tenant-switch--body':
|
||||
'คุณกำลังจะเปลี่ยนสิทธิ์การเป็นเจ้าของจาก <0>{{fromTenant}}</0> ไปยัง <0>{{toTenant}}</0>',
|
||||
'confirm-modal-tenant-switch--heading': 'ยืนยันการเปลี่ยนแปลง {{tenantLabel}}',
|
||||
'field-assignedTenant-label': 'ผู้เช่าที่ได้รับการกำหนด',
|
||||
'nav-tenantSelector-label': 'ผู้เช่า',
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -2,10 +2,11 @@ import type { PluginDefaultTranslationsObject, PluginLanguage } from '../types.j
|
||||
|
||||
export const trTranslations: PluginDefaultTranslationsObject = {
|
||||
'plugin-multi-tenant': {
|
||||
'confirm-tenant-switch--body':
|
||||
"Sahipliği <0>{{fromTenant}}</0>'den <0>{{toTenant}}</0>'e değiştirmek üzeresiniz.",
|
||||
'confirm-tenant-switch--heading': '{{tenantLabel}} değişikliğini onayla',
|
||||
'field-assignedTentant-label': 'Atanan Kiracı',
|
||||
'confirm-modal-tenant-switch--body':
|
||||
"<0>{{fromTenant}}</0>'den <0>{{toTenant}}</0>'ye sahipliği değiştirmek üzeresiniz.",
|
||||
'confirm-modal-tenant-switch--heading': '{{tenantLabel}} değişikliğini onayla',
|
||||
'field-assignedTenant-label': 'Atanan Kiracı',
|
||||
'nav-tenantSelector-label': 'Kiracı',
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -2,10 +2,11 @@ import type { PluginDefaultTranslationsObject, PluginLanguage } from '../types.j
|
||||
|
||||
export const ukTranslations: PluginDefaultTranslationsObject = {
|
||||
'plugin-multi-tenant': {
|
||||
'confirm-tenant-switch--body':
|
||||
'Ви збираєтесь змінити власність з <0>{{fromTenant}}</0> на <0>{{toTenant}}</0>',
|
||||
'confirm-tenant-switch--heading': 'Підтвердіть зміну {{tenantLabel}}',
|
||||
'field-assignedTentant-label': 'Призначений орендар',
|
||||
'confirm-modal-tenant-switch--body':
|
||||
'Ви збираєтеся змінити власність з <0>{{fromTenant}}</0> на <0>{{toTenant}}</0>',
|
||||
'confirm-modal-tenant-switch--heading': 'Підтвердіть зміну {{tenantLabel}}',
|
||||
'field-assignedTenant-label': 'Призначений орендар',
|
||||
'nav-tenantSelector-label': 'Орендар',
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -2,10 +2,11 @@ import type { PluginDefaultTranslationsObject, PluginLanguage } from '../types.j
|
||||
|
||||
export const viTranslations: PluginDefaultTranslationsObject = {
|
||||
'plugin-multi-tenant': {
|
||||
'confirm-tenant-switch--body':
|
||||
'Bạn đang chuẩn bị chuyển quyền sở hữu từ <0>{{fromTenant}}</0> sang <0>{{toTenant}}</0>',
|
||||
'confirm-tenant-switch--heading': 'Xác nhận thay đổi {{tenantLabel}}',
|
||||
'field-assignedTentant-label': 'Người thuê đã được chỉ định',
|
||||
'confirm-modal-tenant-switch--body':
|
||||
'Bạn sắp chuyển quyền sở hữu từ <0>{{fromTenant}}</0> đến <0>{{toTenant}}</0>',
|
||||
'confirm-modal-tenant-switch--heading': 'Xác nhận thay đổi {{tenantLabel}}',
|
||||
'field-assignedTenant-label': 'Người thuê đã được chỉ định',
|
||||
'nav-tenantSelector-label': 'Người thuê',
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -2,9 +2,11 @@ import type { PluginDefaultTranslationsObject, PluginLanguage } from '../types.j
|
||||
|
||||
export const zhTranslations: PluginDefaultTranslationsObject = {
|
||||
'plugin-multi-tenant': {
|
||||
'confirm-tenant-switch--body': '您即将将所有权从<0>{{fromTenant}}</0>更改为<0>{{toTenant}}</0>',
|
||||
'confirm-tenant-switch--heading': '确认更改{{tenantLabel}}',
|
||||
'field-assignedTentant-label': '指定租户',
|
||||
'confirm-modal-tenant-switch--body':
|
||||
'您即将从<0>{{fromTenant}}</0>更改为<0>{{toTenant}}</0>的所有权',
|
||||
'confirm-modal-tenant-switch--heading': '确认更改{{tenantLabel}}',
|
||||
'field-assignedTenant-label': '指定租户',
|
||||
'nav-tenantSelector-label': '租户',
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -2,10 +2,11 @@ import type { PluginDefaultTranslationsObject, PluginLanguage } from '../types.j
|
||||
|
||||
export const zhTwTranslations: PluginDefaultTranslationsObject = {
|
||||
'plugin-multi-tenant': {
|
||||
'confirm-tenant-switch--body':
|
||||
'您即將變更擁有者,從 <0>{{fromTenant}}</0> 切換為 <0>{{toTenant}}</0>',
|
||||
'confirm-tenant-switch--heading': '確認變更 {{tenantLabel}}',
|
||||
'field-assignedTentant-label': '指派的租用戶',
|
||||
'confirm-modal-tenant-switch--body':
|
||||
'您即將從<0>{{fromTenant}}</0>變更所有權至<0>{{toTenant}}</0>',
|
||||
'confirm-modal-tenant-switch--heading': '確認變更 {{tenantLabel}}',
|
||||
'field-assignedTenant-label': '指派的租用戶',
|
||||
'nav-tenantSelector-label': '租戶',
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -4,9 +4,10 @@ import type { enTranslations } from './languages/en.js'
|
||||
|
||||
export type PluginLanguage = Language<{
|
||||
'plugin-multi-tenant': {
|
||||
'confirm-tenant-switch--body': string
|
||||
'confirm-tenant-switch--heading': string
|
||||
'field-assignedTentant-label': string
|
||||
'confirm-modal-tenant-switch--body': string
|
||||
'confirm-modal-tenant-switch--heading': string
|
||||
'field-assignedTenant-label': string
|
||||
'nav-tenantSelector-label': string
|
||||
}
|
||||
}>
|
||||
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
import type { AcceptedLanguages } from '@payloadcms/translations'
|
||||
import type { ArrayField, CollectionSlug, Field, RelationshipField, TypedUser } from 'payload'
|
||||
import type {
|
||||
ArrayField,
|
||||
CollectionSlug,
|
||||
Field,
|
||||
RelationshipField,
|
||||
SingleRelationshipField,
|
||||
TypedUser,
|
||||
} from 'payload'
|
||||
|
||||
export type MultiTenantPluginConfig<ConfigTypes = unknown> = {
|
||||
/**
|
||||
@@ -30,6 +37,11 @@ export type MultiTenantPluginConfig<ConfigTypes = unknown> = {
|
||||
*/
|
||||
isGlobal?: boolean
|
||||
/**
|
||||
* Overrides for the tenant field, will override the entire tenantField configuration
|
||||
*/
|
||||
tenantFieldOverrides?: CollectionTenantFieldConfigOverrides
|
||||
/**
|
||||
* Set to `false` if you want to manually apply the baseListFilter
|
||||
* Set to `false` if you want to manually apply the baseFilter
|
||||
*
|
||||
* @default true
|
||||
@@ -68,18 +80,37 @@ export type MultiTenantPluginConfig<ConfigTypes = unknown> = {
|
||||
* @default true
|
||||
*/
|
||||
enabled?: boolean
|
||||
/**
|
||||
* Localization for the plugin
|
||||
*/
|
||||
i18n?: {
|
||||
translations: {
|
||||
[key in AcceptedLanguages]?: {
|
||||
/**
|
||||
* @default 'You are about to change ownership from <0>{{fromTenant}}</0> to <0>{{toTenant}}</0>'
|
||||
*/
|
||||
'confirm-modal-tenant-switch--body'?: string
|
||||
/**
|
||||
* `tenantLabel` defaults to the value of the `nav-tenantSelector-label` translation
|
||||
*
|
||||
* @default 'Confirm {{tenantLabel}} change'
|
||||
*/
|
||||
'confirm-modal-tenant-switch--heading'?: string
|
||||
/**
|
||||
* @default 'Assigned Tenant'
|
||||
*/
|
||||
'field-assignedTenant-label'?: string
|
||||
/**
|
||||
* @default 'Tenant'
|
||||
*/
|
||||
'nav-tenantSelector-label'?: string
|
||||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Field configuration for the field added to all tenant enabled collections
|
||||
*/
|
||||
tenantField?: {
|
||||
access?: RelationshipField['access']
|
||||
/**
|
||||
* The name of the field added to all tenant enabled collections
|
||||
*
|
||||
* @default 'tenant'
|
||||
*/
|
||||
name?: string
|
||||
}
|
||||
tenantField?: RootTenantFieldConfigOverrides
|
||||
/**
|
||||
* Field configuration for the field added to the users collection
|
||||
*
|
||||
@@ -132,6 +163,8 @@ export type MultiTenantPluginConfig<ConfigTypes = unknown> = {
|
||||
* Customize tenant selector label
|
||||
*
|
||||
* Either a string or an object where the keys are i18n codes and the values are the string labels
|
||||
*
|
||||
* @deprecated Use `i18n.translations` instead.
|
||||
*/
|
||||
tenantSelectorLabel?:
|
||||
| Partial<{
|
||||
@@ -166,6 +199,30 @@ export type MultiTenantPluginConfig<ConfigTypes = unknown> = {
|
||||
useUsersTenantFilter?: boolean
|
||||
}
|
||||
|
||||
export type RootTenantFieldConfigOverrides = Partial<
|
||||
Omit<
|
||||
SingleRelationshipField,
|
||||
| '_sanitized'
|
||||
| 'hasMany'
|
||||
| 'hidden'
|
||||
| 'index'
|
||||
| 'localized'
|
||||
| 'max'
|
||||
| 'maxRows'
|
||||
| 'min'
|
||||
| 'minRows'
|
||||
| 'relationTo'
|
||||
| 'required'
|
||||
| 'type'
|
||||
| 'unique'
|
||||
| 'virtual'
|
||||
>
|
||||
>
|
||||
|
||||
export type CollectionTenantFieldConfigOverrides = Partial<
|
||||
Omit<RootTenantFieldConfigOverrides, 'name'>
|
||||
>
|
||||
|
||||
export type Tenant<IDType = number | string> = {
|
||||
id: IDType
|
||||
name: string
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@payloadcms/plugin-nested-docs",
|
||||
"version": "3.50.0",
|
||||
"version": "3.51.0",
|
||||
"description": "The official Nested Docs plugin for Payload",
|
||||
"homepage": "https://payloadcms.com",
|
||||
"repository": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@payloadcms/plugin-redirects",
|
||||
"version": "3.50.0",
|
||||
"version": "3.51.0",
|
||||
"description": "Redirects plugin for Payload",
|
||||
"keywords": [
|
||||
"payload",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@payloadcms/plugin-search",
|
||||
"version": "3.50.0",
|
||||
"version": "3.51.0",
|
||||
"description": "Search plugin for Payload",
|
||||
"keywords": [
|
||||
"payload",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@payloadcms/plugin-sentry",
|
||||
"version": "3.50.0",
|
||||
"version": "3.51.0",
|
||||
"description": "Sentry plugin for Payload",
|
||||
"keywords": [
|
||||
"payload",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@payloadcms/plugin-seo",
|
||||
"version": "3.50.0",
|
||||
"version": "3.51.0",
|
||||
"description": "SEO plugin for Payload",
|
||||
"keywords": [
|
||||
"payload",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@payloadcms/plugin-stripe",
|
||||
"version": "3.50.0",
|
||||
"version": "3.51.0",
|
||||
"description": "Stripe plugin for Payload",
|
||||
"keywords": [
|
||||
"payload",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@payloadcms/richtext-lexical",
|
||||
"version": "3.50.0",
|
||||
"version": "3.51.0",
|
||||
"description": "The officially supported Lexical richtext adapter for Payload",
|
||||
"homepage": "https://payloadcms.com",
|
||||
"repository": {
|
||||
|
||||
@@ -124,7 +124,7 @@ export function convertTextNode(node: SlateNode): SerializedTextNode {
|
||||
format: convertNodeToFormat(node),
|
||||
mode: 'normal',
|
||||
style: '',
|
||||
text: node.text ?? "",
|
||||
text: node.text ?? '',
|
||||
version: 1,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@payloadcms/richtext-slate",
|
||||
"version": "3.50.0",
|
||||
"version": "3.51.0",
|
||||
"description": "The officially supported Slate richtext adapter for Payload",
|
||||
"homepage": "https://payloadcms.com",
|
||||
"repository": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@payloadcms/storage-azure",
|
||||
"version": "3.50.0",
|
||||
"version": "3.51.0",
|
||||
"description": "Payload storage adapter for Azure Blob Storage",
|
||||
"homepage": "https://payloadcms.com",
|
||||
"repository": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@payloadcms/storage-gcs",
|
||||
"version": "3.50.0",
|
||||
"version": "3.51.0",
|
||||
"description": "Payload storage adapter for Google Cloud Storage",
|
||||
"homepage": "https://payloadcms.com",
|
||||
"repository": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@payloadcms/storage-s3",
|
||||
"version": "3.50.0",
|
||||
"version": "3.51.0",
|
||||
"description": "Payload storage adapter for Amazon S3",
|
||||
"homepage": "https://payloadcms.com",
|
||||
"repository": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@payloadcms/storage-uploadthing",
|
||||
"version": "3.50.0",
|
||||
"version": "3.51.0",
|
||||
"description": "Payload storage adapter for uploadthing",
|
||||
"homepage": "https://payloadcms.com",
|
||||
"repository": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@payloadcms/storage-vercel-blob",
|
||||
"version": "3.50.0",
|
||||
"version": "3.51.0",
|
||||
"description": "Payload storage adapter for Vercel Blob Storage",
|
||||
"homepage": "https://payloadcms.com",
|
||||
"repository": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@payloadcms/translations",
|
||||
"version": "3.50.0",
|
||||
"version": "3.51.0",
|
||||
"homepage": "https://payloadcms.com",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
||||
@@ -217,6 +217,7 @@ export const clientTranslationKeys = createClientTranslationKeys([
|
||||
'general:deleted',
|
||||
'general:deletedAt',
|
||||
'general:deletePermanently',
|
||||
'general:deleteLabel',
|
||||
'general:deletedSuccessfully',
|
||||
'general:deletedCountSuccessfully',
|
||||
'general:deleting',
|
||||
@@ -274,6 +275,7 @@ export const clientTranslationKeys = createClientTranslationKeys([
|
||||
'general:movingCount',
|
||||
'general:name',
|
||||
'general:next',
|
||||
'general:newLabel',
|
||||
'general:noDateSelected',
|
||||
'general:noFiltersSet',
|
||||
'general:noLabel',
|
||||
|
||||
@@ -276,6 +276,7 @@ export const arTranslations: DefaultTranslationsObject = {
|
||||
deletedAt: 'تم الحذف في',
|
||||
deletedCountSuccessfully: 'تمّ حذف {{count}} {{label}} بنجاح.',
|
||||
deletedSuccessfully: 'تمّ الحذف بنجاح.',
|
||||
deleteLabel: 'احذف {{label}}',
|
||||
deletePermanently: 'تجاوز السلة واحذف بشكل دائم',
|
||||
deleting: 'يتمّ الحذف...',
|
||||
depth: 'عمق',
|
||||
@@ -335,6 +336,7 @@ export const arTranslations: DefaultTranslationsObject = {
|
||||
moveUp: 'التّحريك إلى الأعلى',
|
||||
moving: 'التحرك',
|
||||
movingCount: 'نقل {{count}} {{label}}',
|
||||
newLabel: 'جديد {{label}}',
|
||||
newPassword: 'كلمة مرور جديدة',
|
||||
next: 'التالي',
|
||||
no: 'لا',
|
||||
|
||||
@@ -288,6 +288,7 @@ export const azTranslations: DefaultTranslationsObject = {
|
||||
deletedAt: 'Silinib Tarixi',
|
||||
deletedCountSuccessfully: '{{count}} {{label}} uğurla silindi.',
|
||||
deletedSuccessfully: 'Uğurla silindi.',
|
||||
deleteLabel: '{{label}} silin',
|
||||
deletePermanently: 'Çöplüyü atlayın və daimi olaraq silin',
|
||||
deleting: 'Silinir...',
|
||||
depth: 'Dərinlik',
|
||||
@@ -348,6 +349,7 @@ export const azTranslations: DefaultTranslationsObject = {
|
||||
moveUp: 'Yuxarı hərəkət et',
|
||||
moving: 'Hərəkət edir',
|
||||
movingCount: '{{count}} {{label}} köçürülür',
|
||||
newLabel: 'Yeni {{label}}',
|
||||
newPassword: 'Yeni şifrə',
|
||||
next: 'Növbəti',
|
||||
no: 'Xeyr',
|
||||
|
||||
@@ -285,6 +285,7 @@ export const bgTranslations: DefaultTranslationsObject = {
|
||||
deletedAt: 'Изтрито на',
|
||||
deletedCountSuccessfully: 'Изтрити {{count}} {{label}} успешно.',
|
||||
deletedSuccessfully: 'Изтрито успешно.',
|
||||
deleteLabel: 'Изтрий {{label}}',
|
||||
deletePermanently: 'Пропуснете кошчето и изтрийте перманентно',
|
||||
deleting: 'Изтриване...',
|
||||
depth: 'Дълбочина',
|
||||
@@ -345,6 +346,7 @@ export const bgTranslations: DefaultTranslationsObject = {
|
||||
moveUp: 'Нагоре',
|
||||
moving: 'Преместване',
|
||||
movingCount: 'Преместване на {{count}} {{label}}',
|
||||
newLabel: 'Нов {{label}}',
|
||||
newPassword: 'Нова парола',
|
||||
next: 'Следващ',
|
||||
no: 'Не',
|
||||
|
||||
@@ -290,6 +290,7 @@ export const bnBdTranslations: DefaultTranslationsObject = {
|
||||
deletedAt: 'মুছে ফেলার সময়',
|
||||
deletedCountSuccessfully: '{{count}} {{label}} সফলভাবে মুছে ফেলা হয়েছে।',
|
||||
deletedSuccessfully: 'সফলভাবে মুছে ফেলা হয়েছে।',
|
||||
deleteLabel: '{{label}} মুছে ফেলুন',
|
||||
deletePermanently: 'ট্র্যাশ এড়িয়ে স্থায়ীভাবে মুছুন',
|
||||
deleting: 'মুছে ফেলা হচ্ছে...',
|
||||
depth: 'গভীরতা',
|
||||
@@ -350,6 +351,7 @@ export const bnBdTranslations: DefaultTranslationsObject = {
|
||||
moveUp: 'উপরে সরান',
|
||||
moving: 'স্থানান্তর করা হচ্ছে',
|
||||
movingCount: '{{count}} {{label}} স্থানান্তর করা হচ্ছে',
|
||||
newLabel: 'নতুন {{label}}',
|
||||
newPassword: 'নতুন পাসওয়ার্ড',
|
||||
next: 'পরবর্তী',
|
||||
no: 'না',
|
||||
|
||||
@@ -289,6 +289,7 @@ export const bnInTranslations: DefaultTranslationsObject = {
|
||||
deletedAt: 'মুছে ফেলার সময়',
|
||||
deletedCountSuccessfully: '{{count}} {{label}} সফলভাবে মুছে ফেলা হয়েছে।',
|
||||
deletedSuccessfully: 'সফলভাবে মুছে ফেলা হয়েছে।',
|
||||
deleteLabel: '{{label}} মুছে ফেলুন',
|
||||
deletePermanently: 'ট্র্যাশ এড়িয়ে চিরতরে মুছে ফেলুন',
|
||||
deleting: 'মুছে ফেলা হচ্ছে...',
|
||||
depth: 'গভীরতা',
|
||||
@@ -349,6 +350,7 @@ export const bnInTranslations: DefaultTranslationsObject = {
|
||||
moveUp: 'উপরে সরান',
|
||||
moving: 'স্থানান্তর করা হচ্ছে',
|
||||
movingCount: '{{count}} {{label}} স্থানান্তর করা হচ্ছে',
|
||||
newLabel: 'নতুন {{label}}',
|
||||
newPassword: 'নতুন পাসওয়ার্ড',
|
||||
next: 'পরবর্তী',
|
||||
no: 'না',
|
||||
|
||||
@@ -287,6 +287,7 @@ export const caTranslations: DefaultTranslationsObject = {
|
||||
deletedAt: 'Eliminat en',
|
||||
deletedCountSuccessfully: 'Eliminat {{count}} {{label}} correctament.',
|
||||
deletedSuccessfully: 'Eliminat correntament.',
|
||||
deleteLabel: 'Esborra {{label}}',
|
||||
deletePermanently: 'Omet la paperera i elimina permanentment',
|
||||
deleting: 'Eliminant...',
|
||||
depth: 'Profunditat',
|
||||
@@ -347,6 +348,7 @@ export const caTranslations: DefaultTranslationsObject = {
|
||||
moveUp: 'Move amunt',
|
||||
moving: 'En moviment',
|
||||
movingCount: 'Moure {{count}} {{label}}',
|
||||
newLabel: 'Nou {{label}}',
|
||||
newPassword: 'Nova contrasenya',
|
||||
next: 'Seguent',
|
||||
no: 'No',
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user