dify/web/i18n-config/resources.ts
Wu Tianwei 33edf97f81
feat: RBAC (#37107)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: fatelei <fatelei@gmail.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: 盐粒 Yanli <yanli@dify.ai>
Co-authored-by: Charles Yao <chongbinyao33@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: yunlu.wen <yunlu.wen@dify.ai>
Co-authored-by: yyh <92089059+lyzno1@users.noreply.github.com>
Co-authored-by: Jingyi <jingyi.qi@dify.ai>
Co-authored-by: yyh <yuanyouhuilyz@gmail.com>
Co-authored-by: Joel <iamjoel007@gmail.com>
Co-authored-by: hjlarry <hjlarry@163.com>
Co-authored-by: Asuka Minato <i@asukaminato.eu.org>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Xiyuan Chen <52963600+GareArc@users.noreply.github.com>
Co-authored-by: gigglewang <gigglewang@dify.ai>
Co-authored-by: chariri <w@chariri.moe>
Co-authored-by: Evan <2869018789@qq.com>
Co-authored-by: zyssyz123 <916125788@qq.com>
2026-06-18 16:35:29 +00:00

117 lines
3.8 KiB
TypeScript

import type agentV2 from '../i18n/en-US/agent-v-2.json'
import type appAnnotation from '../i18n/en-US/app-annotation.json'
import type appApi from '../i18n/en-US/app-api.json'
import type appDebug from '../i18n/en-US/app-debug.json'
import type appLog from '../i18n/en-US/app-log.json'
import type appOverview from '../i18n/en-US/app-overview.json'
import type app from '../i18n/en-US/app.json'
import type billing from '../i18n/en-US/billing.json'
import type common from '../i18n/en-US/common.json'
import type custom from '../i18n/en-US/custom.json'
import type datasetCreation from '../i18n/en-US/dataset-creation.json'
import type datasetDocuments from '../i18n/en-US/dataset-documents.json'
import type datasetHitTesting from '../i18n/en-US/dataset-hit-testing.json'
import type datasetPipeline from '../i18n/en-US/dataset-pipeline.json'
import type datasetSettings from '../i18n/en-US/dataset-settings.json'
import type dataset from '../i18n/en-US/dataset.json'
import type deployments from '../i18n/en-US/deployments.json'
import type education from '../i18n/en-US/education.json'
import type explore from '../i18n/en-US/explore.json'
import type layout from '../i18n/en-US/layout.json'
import type login from '../i18n/en-US/login.json'
import type oauth from '../i18n/en-US/oauth.json'
import type permissionKeys from '../i18n/en-US/permission-keys.json'
import type permission from '../i18n/en-US/permission.json'
import type pipeline from '../i18n/en-US/pipeline.json'
import type pluginTags from '../i18n/en-US/plugin-tags.json'
import type pluginTrigger from '../i18n/en-US/plugin-trigger.json'
import type plugin from '../i18n/en-US/plugin.json'
import type register from '../i18n/en-US/register.json'
import type runLog from '../i18n/en-US/run-log.json'
import type share from '../i18n/en-US/share.json'
import type snippet from '../i18n/en-US/snippet.json'
import type time from '../i18n/en-US/time.json'
import type tools from '../i18n/en-US/tools.json'
import type workflow from '../i18n/en-US/workflow.json'
import { kebabCase } from 'string-ts'
export type Resources = {
app: typeof app
appAnnotation: typeof appAnnotation
appApi: typeof appApi
appDebug: typeof appDebug
appLog: typeof appLog
appOverview: typeof appOverview
agentV2: typeof agentV2
billing: typeof billing
common: typeof common
custom: typeof custom
dataset: typeof dataset
datasetCreation: typeof datasetCreation
datasetDocuments: typeof datasetDocuments
datasetHitTesting: typeof datasetHitTesting
datasetPipeline: typeof datasetPipeline
datasetSettings: typeof datasetSettings
deployments: typeof deployments
education: typeof education
explore: typeof explore
layout: typeof layout
login: typeof login
oauth: typeof oauth
permission: typeof permission
permissionKeys: typeof permissionKeys
pipeline: typeof pipeline
plugin: typeof plugin
pluginTags: typeof pluginTags
pluginTrigger: typeof pluginTrigger
register: typeof register
runLog: typeof runLog
share: typeof share
snippet: typeof snippet
time: typeof time
tools: typeof tools
workflow: typeof workflow
}
export const namespaces = [
'app',
'appAnnotation',
'appApi',
'appDebug',
'appLog',
'appOverview',
'agentV2',
'billing',
'common',
'custom',
'dataset',
'datasetCreation',
'datasetDocuments',
'datasetHitTesting',
'datasetPipeline',
'datasetSettings',
'deployments',
'education',
'explore',
'layout',
'login',
'oauth',
'permission',
'permissionKeys',
'pipeline',
'plugin',
'pluginTags',
'pluginTrigger',
'register',
'runLog',
'share',
'snippet',
'time',
'tools',
'workflow',
] as const satisfies ReadonlyArray<keyof Resources>
export type Namespace = typeof namespaces[number]
export const namespacesInFileName = namespaces.map(ns => kebabCase(ns))
export type NamespaceInFileName = typeof namespacesInFileName[number]