* feat: init localization-management * feat: resource api * Merge branch 'main' into T-62 * chore: change name * feat: basic feature * feat: support filter & sync * feat: support auto get texts afterSave * Merge branch 'main' into T-62 * chore: upgrade * fix: dependency * fix: field type * fix: type error * chore: remove some translations * feat: support extract text from menu * chore: cache text keys * chore: remove test key * fix: issue of extracting menu titles * feat: translate collections & fields name * fix: remove unique of text * refactor: improve cache * chore: remove listeners after disable * chore: translation * fix: lang switch bug * refactor: actions & filter * fix: translation * refactor: merge lang bundles at backend * fix: style & field name * fix: translate issues * fix: cache bug * fix: translation merge bug * fix: translate issues * fix: map translation * fix: translation issues * fix: card title bug * feat: cover mobile client tabbar * fix: menu title * refactor: add locale plugin * chore: merge locale plugin * fix: map translation * chore: remove no data * style: change button style * fix: sync bug * docs: add README * chore: change name --------- Co-authored-by: chenos <chenlinxh@gmail.com>
47 lines
873 B
TypeScript
47 lines
873 B
TypeScript
import { defineCollection } from '@nocobase/database';
|
|
|
|
export default defineCollection({
|
|
namespace: 'ui-schema-storage.uiSchemas',
|
|
duplicator: 'required',
|
|
name: 'uiSchemaTemplates',
|
|
autoGenId: false,
|
|
fields: [
|
|
{
|
|
type: 'uid',
|
|
name: 'key',
|
|
primaryKey: true,
|
|
},
|
|
{
|
|
type: 'string',
|
|
name: 'name',
|
|
translation: true,
|
|
},
|
|
{
|
|
type: 'string',
|
|
name: 'componentName',
|
|
},
|
|
{
|
|
type: 'string',
|
|
name: 'associationName',
|
|
},
|
|
{
|
|
type: 'string',
|
|
name: 'resourceName',
|
|
},
|
|
{
|
|
type: 'belongsTo',
|
|
name: 'uiSchema',
|
|
target: 'uiSchemas',
|
|
foreignKey: 'uid',
|
|
},
|
|
{
|
|
type: 'belongsTo',
|
|
name: 'collection',
|
|
target: 'collections',
|
|
foreignKey: 'collectionName',
|
|
targetKey: 'name',
|
|
onDelete: 'CASCADE',
|
|
},
|
|
],
|
|
});
|