diff --git a/packages/amis-editor-core/eidtor-core-i18n-en-US-1660304908871.xlsx b/packages/amis-editor-core/eidtor-core-i18n-en-US-1660304908871.xlsx new file mode 100644 index 000000000..669c61239 Binary files /dev/null and b/packages/amis-editor-core/eidtor-core-i18n-en-US-1660304908871.xlsx differ diff --git a/packages/amis-editor-core/i18nConfig.js b/packages/amis-editor-core/i18nConfig.js new file mode 100644 index 000000000..d874d8a96 --- /dev/null +++ b/packages/amis-editor-core/i18nConfig.js @@ -0,0 +1,37 @@ +module.exports = { + entry: { + dir: './src' + }, + file: { + test: /.*(ts|tsx|js|jsx)$/ + }, + ignore: { + list: ['src/local'] + }, + importInfo: { + source: 'i18n-runtime', + imported: 'i18n', + local: '_i18n' + }, + i18nModule: 'amis-core', + languages: [ + { + name: 'en-US', + path: './src/local' + }, + { + name: 'zh-CN', + path: './src/local' + } + ], + init: { + fileName: 'eidtor-core-i18n', + fileExtension: 'xlsx', + path: './' + }, + translate: { + appId: '20220810001301703', + key: 'WW7jKaJJBrtCawTOkCpk', + host: 'http://api.fanyi.baidu.com' + } +}; diff --git a/packages/amis-editor-core/package.json b/packages/amis-editor-core/package.json index a1b1ba79f..fdc257786 100644 --- a/packages/amis-editor-core/package.json +++ b/packages/amis-editor-core/package.json @@ -7,7 +7,9 @@ "scripts": { "test": "echo \"Error: no test specified\" && exit 1", "build": "npm run clean-dist && webpack", - "clean-dist": "rimraf lib/* esm/*" + "clean-dist": "rimraf lib/* esm/*", + "i18n:update": "npx i18n update --config=./i18nConfig.js", + "i18n:translate": "npx i18n translate --config=./i18nConfig.js --l=en-US" }, "keywords": [ "amis", @@ -27,6 +29,7 @@ }, "dependencies": { "deep-diff": "1.0.2", + "i18n-runtime": "0.0.0-alpha.11", "json-ast-comments": "^1.1.0", "lodash": "^4.17.15", "mobx": "^4.5.0", @@ -90,7 +93,8 @@ "webpack": "^5.52.1", "webpack-bundle-analyzer": "^4.5.0", "webpack-cli": "^4.8.0", - "webpack-node-externals": "^3.0.0" + "webpack-node-externals": "^3.0.0", + "webpack-react-i18n": "^0.0.0-alpha.11" }, "peerDependencies": { "amis": "*", diff --git a/packages/amis-editor-core/src/index.ts b/packages/amis-editor-core/src/index.ts index db88b0721..375a4cc5c 100644 --- a/packages/amis-editor-core/src/index.ts +++ b/packages/amis-editor-core/src/index.ts @@ -1,6 +1,8 @@ /** * @file 总入口 */ +import 'amis'; +import './local/index'; import Editor from './component/Editor'; import './component/ClassNameControl'; diff --git a/packages/amis-editor-core/src/local/en-US.ts b/packages/amis-editor-core/src/local/en-US.ts new file mode 100644 index 000000000..476af76bf --- /dev/null +++ b/packages/amis-editor-core/src/local/en-US.ts @@ -0,0 +1,195 @@ +import {extendLocale} from 'amis-core'; + +extendLocale('en-US', { + '4e7f76261f8c4c6d78998f85fc1f4c6e': 'Margin ', + '16a20243f9b741c08216dc9548de2968': 'whole', + '23ecf42cada8bf2715792d718544d107': 'minimum', + '391b8fa9c747a1799353ab856e666ad5': 'Small', + 'fd6e80f1e0199d6ecc3ee81ae04aa9ef': 'normal', + 'aed1dfbc31703955e64806b799b67645': 'in', + 'ab18e30c0dc4093ceeda8961fac3d1f4': 'large', + '461d364c67ec6a45e011ed13f2f7154f': 'top margin', + '31e3752986d64c8b36897c8641c8628d': 'Right margin', + 'eabe91d9426b6446f707cea3e7ab2418': 'margin-bottom ', + '2e46d251ee6188bb1b3ff20656276572': 'left ', + '3dc4038d0f0a2d2b3c2b2e29a5ec6dde': 'None', + 'a8b0c20416853bda54120bf19477ad11': 'whole', + 'af767b7e4ae069d54f9ea839858d4c6d': 'upper', + '4d9c32c23df5d234e629c922c58d8e12': 'right', + '3850a186c3235bc646d4c2f79cebac36': 'lower', + 'd2aff1417831aa621c16cd5b95306b4b': 'Left', + '841d77223f0ec8cd0b530ed8e0775b20': 'padding ', + '961534b4ea37e4e88aada736b299d063': 'frame', + 'd4d2a66820d30e07b44c850eb3f116c0': 'position', + '58f966670529f4753fb3c5a0647606be': 'size', + '6b36c6f7ec834692ec6c8e3816349fdd': 'colour', + 'fbae87bcc352f6933541fb77a07418ed': 'Main color', + 'd8c7e04c8e2be23dd3b81a31db6e04f1': 'information', + '900c70fa5f7dbc014e6f762d5e0e885c': 'warning', + '540f84ddc0883866b229f71c2844199a': 'danger', + '330363dfc524cff2488f2ebde0500896': 'success', + '2fc96b2704b05d6a9f299c442573ee77': 'white', + 'adb7e5312abdb9a44297e48d63815fa3': 'dark colors', + '48d0a09bdd5fe7e89f0a445b0ffdf14f': 'light colour', + '0d98c74797e49d00bcc4c17c9d557a2b': 'other', + '0103eb2d3dca70270d1a74e9ec987ac9': 'fillet', + '8456bc40d48da5af833f1c63385e9879': 'typeface', + 'b3b2682579133673d3fe08c156d565dc': 'fine', + '56dce5d1cbb97439d291c458e50107e0': 'crude', + '49a79f4047b81186c069ed1c9c151c66': 'Pale', + '8e1b944f4389bdaab6f11d5bc83190c8': 'background', + 'c28479019e24e0e4745f4948e9e97ee7': 'width', + 'f72ce9ad683cc82e0eab557ffc9c67a0': 'Extremely small', + 'b95c462d7697958c25861193fc89ae07': 'enlarge', + '3386da5f56fac758ed0f18e024ecb943': 'Extra large', + 'ffaa96ef7232cb6d8ee4d7e673dbf4ac': 'completely fill', + '47eac1ac32a8aa9081dffbdc4d374318': 'Please enter the CSS class name', + '939d5345ad4345dbaabe14798f6ac0f1': 'Submit', + '55c56d01a7747ffe0346d42145b62d97': + '[Amis editor] respond to the event of dynamically adding plug-ins:', + 'd6f73c6f3b92be5a64f7ea0163501284': 'Region nodes are not allowed to be cut.', + '4fda4f585214d469c04466e2fc98b796': 'The root node does not allow cutting.', + '657bbe06d3922b23552817df7fa8268e': + 'The current element does not allow cutting.', + '416445a316595bdeb44b661c7de875a8': 'The current element cannot be moved up', + '6ac88d87b2fd118ba7beab8c17880470': + 'The current element cannot be moved down', + 'fdb3cba60407b2f1aea0230cca644573': 'Area nodes cannot be deleted directly.', + '8a4b4e2e3b0382007e0c69ed1fe6fe71': + 'The root node is not allowed to be deleted.', + '22f031f3de2e55c430a818d8c588f7a1': 'The current element cannot be deleted.', + '3b6d5995e9f2ecd3df059b3f1bea201e': 'Call error or cross domain exists.', + '09f33be5ec04eb48b3102e4e31af5b38': 'Call error', + '283c2a52955ad87574fd6c0cc932c443': 'Can only be called in iframe', + 'a71002967924a83e32b38a80705290fb': 'System error', + '058ebdf2884474ebff2977ba2f0e275e': 'System message', + '88f000a0fdc38ce3808cef072b00893c': 'Rendering', + '279321f97f11da7bc90facca156b3444': 'Code error, the error is: \\ n {{@1}}', + '7e4b38ba0ab9cbfcabd9dd859e36b601': + 'Some of the changed data has not been saved due to incorrect format. Are you sure you want to discard these changes?', + 'af86ad9dd8a221f931dcdc5a63382b6f': 'View changes', + '43d586cd6cf1a512c0bcb85ed9efde51': 'Please confirm', + 'bb79667f37035e9562ec6bcffd6cf8ef': 'assembly', + '5cb297585d4c81bb8fdbd31210a30d6f': 'System components', + '6fce1c9aa3654ae2f0eedcc068a7e189': 'Custom components', + '06e004ef21414c06d3e4ff2cefaf6a04': 'code', + '7f7c624a843b0d539a4ea59a696702f9': 'Batch operation', + 'b80ed82d124c6fd9242dcacdda2a2f8b': 'Change component type', + '35b5a48a773a81f0b67b3058e7231569': + 'The selected component is inserted into & nbsp;', + 'd87481b371771b4f150da76e311bbbef': 'Enter keywords to filter components', + 'becdc848350872592201e31bab03892a': 'Cannot Preview', + 'f3430f4fdd8b9643daa74f4a5716dd15': '  Details & nbsp;', + '751dfe6f476903c21381c9acf88332e2': + 'There are no components available. Maybe you should try switching containers.', + 'e22c9a05b424b761efce11f17726fdd7': 'replace', + '9bdb07e72d3a9a6084201a7398523f5a': 'insert', + '625fb26b4b3340f7872b411f401e754c': 'cancel', + '95509c09bdef4bb7842a9b957ab1f971': 'Turn off levitation mode', + '426480bb614633c8c3ba8faa0338b72f': 'Turn on levitation mode', + 'fbf7967f9baf6a22bd6ca7f4e6390bf9': '{{@1}} - [public configuration]', + '93383ef1ab4a433df97a56a73e571b9f': 'outline', + '962d43ff8d39c381d8e2c73838412111': 'Query page elements', + '0c95d1856ffdeeade7cebe0ef928f361': + 'You can switch containers by dragging a target into a node in the navigation', + 'c482df2a3ac8e014febd8a5fc9cadaea': 'Loading, please wait', + 'c44c6c179c44e794b103053886847dc4': 'No preview', + 'e4cefe7df36e92da1d7e875b92655507': 'Click expand', + '7ae451de83aa6f5f140e941904377391': 'Click collapse', + '84c8f0087acfc9b9862371d0bd59b830': 'Click to add "{{@1}}"', + 'b797a8992ef41320919e45a069f2b459': + 'There are no available components found. You can continue searching with another keyword.', + '0bd36c8db19e3a93506f39ebc8ff0ab9': + 'When components such as forms and lists have names, they will appear here for easy selection', + 'bb28ec819520ced0ffb4c3da01f112e2': 'Click to clear the current area', + 'e83a256e4f5bb4ff8b3d804b5473217a': 'confirm', + '22c799040acdb2601b437ed5449de076': 'container', + 'bd9fcf46b4e5993f97fe04ee9ebcd7ed': 'revoke', + 'c3c873d33f1c6482c79b0ffd862786cd': 'redo', + 'e9509c688a0df6b088503d21569b6e8f': 'Wrong type, unable to render', + '2168c5735883bd040eaf09909d0911b8': 'Input keyword query component', + 'e9c38f88375807704270aa3572454976': 'Search history', + '288f0c404c4e546aa3683ff5054e85e2': 'empty', + '4b9bc9abf2a2beb3772d903a3d01d1de': 'Click delete this search record', + '9d3128a1675de32cdd290b31140a7290': + 'The search result is empty. You can continue to search with another keyword.', + 'accb901a02b1415b40d95cdd31b8da1d': 'Component classification', + '79d3abe929f67f0644a78bf32adb3a89': 'copy', + 'b7d817611230d382f6ef92b41848a342': 'Copy the currently selected element', + 'eafbece1016a6af76cce466e55ad9f00': 'paste', + 'e0b9bb8e41eccd3ce6b282664643d7f8': + 'Inserts the copied element into the currently selected node', + '43fc77886b7fbcd658f0ccdba36bd5a0': 'shear', + 'a6be4ad12e9612811963c44466af3218': 'Cut the currently selected element', + '58887132871b71b015c3a391e7755815': 'Redo the last undone operation', + 'be5fbbe34ce9979bfb6576d9eddc5612': 'preservation', + '1f81fd4598e9151538f29c41b8aa0020': 'Save all current operations', + '645dbc5504e722a30896486085a06b32': 'preview', + '5bc425ac8b75c571093a63eb6073c354': 'Turn on preview mode', + '2f4aaddde33c9b93c36fd2503f3d122b': 'delete', + '426cd14ebd62a4922186527d07ba37f3': 'Delete current node', + '499e58e764420aeed2d1476a56d8fa34': 'Move up', + 'd040485f0e3887f0b297f8f772db03e4': 'Move the current node up', + '08ad565f066d30572d1f8e2ee17cbe12': 'Move down', + '6348dc0e83d6ab391a8816f67d0e5ceb': 'Move the current node down', + 'fbec96e028142496df88ed2c63b44512': + 'Click to view the currently available shortcut keys', + '9c3f1278ffa822835bb3a677f02bca27': 'Currently available shortcut keys', + '4e98a5dcd3defffb23629fce3add04f6': 'No shortcut key', + '186733ed7ec817040b8f9cbc610ba49a': 'Program error', + 'e777eb796f8a02e97a891fde43d10ce4': '{{@1}} variable', + '5d665bc55779aafdefcc4050e3a8429e': '{{@1}} ({{@2}}) rendering error:', + 'a30dd4945df5b44b264fa3be6ee9682e': 'Current renderer information:', + '63f94190d2d4ea22263e6e9f07c96558': 'Error object:', + 'f66335b5bff0e26fdff2a3303e0f9bb0': 'Error message:', + '966e23b5c1efe8e18fc4f0c326d47314': + ')An error occurred in rendering. Please check the console output for detailed error information.', + '44e049d9ecbe2c474100a3424021570e': + '< div class = wrapper SM B-A B-light m-b-sm > drag in space < / div >', + '245897371cda2055f5c17c6cf298ed48': + 'Warm prompt: skipping is prohibited in preview mode', + 'e1b7255934e3189b1f5d440fc1aa0230': + 'Registered plug-in exception, plug-in with the same name already exists:', + '979a50681e278dcc0be18f68459e8217': 'System variable', + '75c142934800d6ee31fcf3fdff9e5d53': + '[Amis editor] currently has {{@1}} plug-in', + '0e24e1bbc19612a350f81296d9fb7802': + 'Please select an element as the insertion position first.', + 'bd690facb536d759814ee64f2760fecb': + 'The current node is not allowed to append new components.', + '02f180cd26ff0951ddfda490080ee5ea': 'Configuration item copied', + '1ff035555ac8a68dc5b0ea2d0af55f00': 'Clipboard content is empty', + '6cb01692eea2fa7066d20fe2b6ccaea3': 'False data', + '7f2f0461a58c43667d7245ce92bb2e77': + 'Press and hold drag to adjust the position', + '78c1c38b91c672da1113fa2564c14ea6': 'Insert components forward', + '87f48bbadfbef5ef4554e06b7e141d37': 'Insert component backward', + '95b351c86267f3aedf89520959bce689': 'edit', + '0ec9eaf9c3525eb110db58aae5912210': 'more', + '417db09508befe7dbe9f84a517a6edec': 'Repeat', + '99b81127ef28368151621cdfccce69f8': 'Cancel multiple selection', + '205f45ee17394bd5668412780eaa55e2': 'Insert component', + '4c725f0159023c485ead728680e277ba': 'Select {{@1}}', + '7ad78e0991f34ff3a345c59a2fc31572': 'Select hierarchy', + 'aafda9e8f6b7b613680677c513edb7a6': 'Uncheck', + 'b58d101f52531c845f15db63d7212115': 'Copy configuration', + '74e2bc6615b7dbbb11fd5e1e212263ae': 'Cut configuration', + 'e2f401af580d1354ae00ec4ca19e2e24': 'Paste configuration', + '21462ae22216eec41dc688cc4a8ae64b': 'Move forward', + 'ed2bc13d8bbd99e16e017dd5f5393393': 'Move backward', + '9e54f3e4ee3330299c5fdc910c2e8d3c': 'Undo', + 'ae8e86e426c2ba00da274b66dc372a8b': 'Redo', + '2b6bc0f293f5ca01b006206c2535ccbc': 'operation', + 'aa920263020f14211a44ea172efc7253': 'Context data', + '48ac479789304b37afa2f1b06642f4da': 'current', + '9bc16c658ab8a8c4eddc5e24d85bef20': 'upper strata', + '004d4be2ba8e6b8eed9333d15bc80a88': 'Upper {{@1}} level', + 'e366ccf1556c0672dcecba135ed5472e': 'set up', + '0cbec43d00e491a663ff0525ffe31868': 'Quickly build "{{@1}}"', + '1dd554cdfc1ddf7dce13453805523c16': 'change', + 'a82240ce09faf0b972a8aa5c9e93d209': 'Insert component panel', + 'eadc8c8d4a8776893672330598babca0': + 'Location error, target location not found', + 'f3c057f37fb9a4e7dd44b04919c12578': + 'Please click add new element from the left component panel.' +}); diff --git a/packages/amis-editor-core/src/local/index.ts b/packages/amis-editor-core/src/local/index.ts new file mode 100644 index 000000000..85a1241c2 --- /dev/null +++ b/packages/amis-editor-core/src/local/index.ts @@ -0,0 +1,2 @@ +import './en-US'; +import './zh-CN'; \ No newline at end of file diff --git a/packages/amis-editor-core/src/local/zh-CN.ts b/packages/amis-editor-core/src/local/zh-CN.ts new file mode 100644 index 000000000..c1480207a --- /dev/null +++ b/packages/amis-editor-core/src/local/zh-CN.ts @@ -0,0 +1,178 @@ +import {extendLocale} from 'amis-core'; + +extendLocale('zh-CN', { + '4e7f76261f8c4c6d78998f85fc1f4c6e': '外边距', + '16a20243f9b741c08216dc9548de2968': '整体', + '23ecf42cada8bf2715792d718544d107': '极小', + '391b8fa9c747a1799353ab856e666ad5': '小', + 'fd6e80f1e0199d6ecc3ee81ae04aa9ef': '正常', + 'aed1dfbc31703955e64806b799b67645': '中', + 'ab18e30c0dc4093ceeda8961fac3d1f4': '大', + '461d364c67ec6a45e011ed13f2f7154f': '上边距', + '31e3752986d64c8b36897c8641c8628d': '右边距', + 'eabe91d9426b6446f707cea3e7ab2418': '下边距', + '2e46d251ee6188bb1b3ff20656276572': '左边距', + '3dc4038d0f0a2d2b3c2b2e29a5ec6dde': '置无', + 'a8b0c20416853bda54120bf19477ad11': '全部', + 'af767b7e4ae069d54f9ea839858d4c6d': '上', + '4d9c32c23df5d234e629c922c58d8e12': '右', + '3850a186c3235bc646d4c2f79cebac36': '下', + 'd2aff1417831aa621c16cd5b95306b4b': '左', + '841d77223f0ec8cd0b530ed8e0775b20': '内边距', + '961534b4ea37e4e88aada736b299d063': '边框', + 'd4d2a66820d30e07b44c850eb3f116c0': '位置', + '58f966670529f4753fb3c5a0647606be': '大小', + '6b36c6f7ec834692ec6c8e3816349fdd': '颜色', + 'fbae87bcc352f6933541fb77a07418ed': '主色', + 'd8c7e04c8e2be23dd3b81a31db6e04f1': '信息', + '900c70fa5f7dbc014e6f762d5e0e885c': '警告', + '540f84ddc0883866b229f71c2844199a': '危险', + '330363dfc524cff2488f2ebde0500896': '成功', + '2fc96b2704b05d6a9f299c442573ee77': '白色', + 'adb7e5312abdb9a44297e48d63815fa3': '暗色', + '48d0a09bdd5fe7e89f0a445b0ffdf14f': '浅色', + '0d98c74797e49d00bcc4c17c9d557a2b': '其他', + '0103eb2d3dca70270d1a74e9ec987ac9': '圆角', + '8456bc40d48da5af833f1c63385e9879': '字体', + 'b3b2682579133673d3fe08c156d565dc': '细', + '56dce5d1cbb97439d291c458e50107e0': '粗', + '49a79f4047b81186c069ed1c9c151c66': '淡色', + '8e1b944f4389bdaab6f11d5bc83190c8': '背景', + 'c28479019e24e0e4745f4948e9e97ee7': '宽度', + 'f72ce9ad683cc82e0eab557ffc9c67a0': '特小', + 'b95c462d7697958c25861193fc89ae07': '加大', + '3386da5f56fac758ed0f18e024ecb943': '特大', + 'ffaa96ef7232cb6d8ee4d7e673dbf4ac': '占满', + '47eac1ac32a8aa9081dffbdc4d374318': '请输入 css 类名', + '939d5345ad4345dbaabe14798f6ac0f1': '提交', + '55c56d01a7747ffe0346d42145b62d97': '[amis-editor]响应动态添加插件事件:', + 'd6f73c6f3b92be5a64f7ea0163501284': '区域节点不允许剪切。', + '4fda4f585214d469c04466e2fc98b796': '根节点不允许剪切。', + '657bbe06d3922b23552817df7fa8268e': '当前元素不允许剪切。', + '416445a316595bdeb44b661c7de875a8': '当前元素不能向上移动', + '6ac88d87b2fd118ba7beab8c17880470': '当前元素不能向下移动', + 'fdb3cba60407b2f1aea0230cca644573': '区域节点不可以直接删除。', + '8a4b4e2e3b0382007e0c69ed1fe6fe71': '根节点不允许删除。', + '22f031f3de2e55c430a818d8c588f7a1': '当前元素不允许删除。', + '3b6d5995e9f2ecd3df059b3f1bea201e': '调用错误,或者存在跨域。', + '09f33be5ec04eb48b3102e4e31af5b38': '调用错误', + '283c2a52955ad87574fd6c0cc932c443': '只能在 Iframe 里面调用', + 'a71002967924a83e32b38a80705290fb': '系统错误', + '058ebdf2884474ebff2977ba2f0e275e': '系统消息', + '88f000a0fdc38ce3808cef072b00893c': '渲染中...', + '279321f97f11da7bc90facca156b3444': '代码有误,错误的地方是\\n {{@1}}', + '7e4b38ba0ab9cbfcabd9dd859e36b601': + '当前有部分已更改数据因为格式不正确尚未保存,您确认要丢弃这部分更改吗?', + 'af86ad9dd8a221f931dcdc5a63382b6f': '查看更改', + '43d586cd6cf1a512c0bcb85ed9efde51': '请确认', + 'bb79667f37035e9562ec6bcffd6cf8ef': '组件', + '5cb297585d4c81bb8fdbd31210a30d6f': '系统组件', + '6fce1c9aa3654ae2f0eedcc068a7e189': '自定义组件', + '06e004ef21414c06d3e4ff2cefaf6a04': '代码', + '7f7c624a843b0d539a4ea59a696702f9': '批量操作', + 'b80ed82d124c6fd9242dcacdda2a2f8b': '更改组件类型', + '35b5a48a773a81f0b67b3058e7231569': '选中组件插入到 ', + 'd87481b371771b4f150da76e311bbbef': '输入关键字可过滤组件', + 'becdc848350872592201e31bab03892a': '无法预览', + 'f3430f4fdd8b9643daa74f4a5716dd15': ' 详情 ', + '751dfe6f476903c21381c9acf88332e2': '没有可用组件,也许你该切换容器试试。', + 'e22c9a05b424b761efce11f17726fdd7': '替换', + '9bdb07e72d3a9a6084201a7398523f5a': '插入', + '625fb26b4b3340f7872b411f401e754c': '取消', + '95509c09bdef4bb7842a9b957ab1f971': '关闭悬浮模式', + '426480bb614633c8c3ba8faa0338b72f': '开启悬浮模式', + 'fbf7967f9baf6a22bd6ca7f4e6390bf9': '{{@1}}-[公共配置]', + '93383ef1ab4a433df97a56a73e571b9f': '大纲', + '962d43ff8d39c381d8e2c73838412111': '查询页面元素', + '0c95d1856ffdeeade7cebe0ef928f361': '将目标拖入导航中的节点可以切换容器', + 'c482df2a3ac8e014febd8a5fc9cadaea': '加载中,请稍等...', + 'c44c6c179c44e794b103053886847dc4': '没有预览图', + 'e4cefe7df36e92da1d7e875b92655507': '点击展开', + '7ae451de83aa6f5f140e941904377391': '点击折叠', + '84c8f0087acfc9b9862371d0bd59b830': '点击添加「{{@1}}」', + 'b797a8992ef41320919e45a069f2b459': + '没有找到可用组件,您可以换个关键字继续查找。', + '0bd36c8db19e3a93506f39ebc8ff0ab9': + '当表单、列表等组件有名字时会出现在这里方便选择', + 'bb28ec819520ced0ffb4c3da01f112e2': '点击清空当前区域', + 'e83a256e4f5bb4ff8b3d804b5473217a': '确认', + '22c799040acdb2601b437ed5449de076': '容器', + 'bd9fcf46b4e5993f97fe04ee9ebcd7ed': '撤销', + 'c3c873d33f1c6482c79b0ffd862786cd': '重做', + 'e9509c688a0df6b088503d21569b6e8f': '类型错误,无法渲染', + '2168c5735883bd040eaf09909d0911b8': '输入关键字查询组件', + 'e9c38f88375807704270aa3572454976': '搜索历史', + '288f0c404c4e546aa3683ff5054e85e2': '清空', + '4b9bc9abf2a2beb3772d903a3d01d1de': '点击删除这条搜索记录', + '9d3128a1675de32cdd290b31140a7290': + '搜索结果为空,您可以换个关键字继续查找。', + 'accb901a02b1415b40d95cdd31b8da1d': '组件分类', + '79d3abe929f67f0644a78bf32adb3a89': '复制', + 'b7d817611230d382f6ef92b41848a342': '复制当前选中元素', + 'eafbece1016a6af76cce466e55ad9f00': '粘贴', + 'e0b9bb8e41eccd3ce6b282664643d7f8': '将复制的元素插入到当前选中节点', + '43fc77886b7fbcd658f0ccdba36bd5a0': '剪切', + 'a6be4ad12e9612811963c44466af3218': '剪切当前选中元素', + '58887132871b71b015c3a391e7755815': '恢复上一次撤销的操作', + 'be5fbbe34ce9979bfb6576d9eddc5612': '保存', + '1f81fd4598e9151538f29c41b8aa0020': '保存当前所有操作', + '645dbc5504e722a30896486085a06b32': '预览', + '5bc425ac8b75c571093a63eb6073c354': '开启预览模式', + '2f4aaddde33c9b93c36fd2503f3d122b': '删除', + '426cd14ebd62a4922186527d07ba37f3': '删除当前节点', + '499e58e764420aeed2d1476a56d8fa34': '向上移动', + 'd040485f0e3887f0b297f8f772db03e4': '向上移动当前节点', + '08ad565f066d30572d1f8e2ee17cbe12': '向下移动', + '6348dc0e83d6ab391a8816f67d0e5ceb': '向下移动当前节点', + 'fbec96e028142496df88ed2c63b44512': '点击查看当前可用快捷键', + '9c3f1278ffa822835bb3a677f02bca27': '当前可用快捷键', + '4e98a5dcd3defffb23629fce3add04f6': '暂无快捷键', + '186733ed7ec817040b8f9cbc610ba49a': '程序错误', + 'e777eb796f8a02e97a891fde43d10ce4': '{{@1}}变量', + '5d665bc55779aafdefcc4050e3a8429e': '{{@1}}({{@2}})渲染发生错误:', + 'a30dd4945df5b44b264fa3be6ee9682e': '当前渲染器信息:', + '63f94190d2d4ea22263e6e9f07c96558': '错误对象:', + 'f66335b5bff0e26fdff2a3303e0f9bb0': '错误信息:', + '966e23b5c1efe8e18fc4f0c326d47314': + ')渲染发生错误,详细错误信息请查看控制台输出。', + '44e049d9ecbe2c474100a3424021570e': + '
拖入占位
', + '245897371cda2055f5c17c6cf298ed48': '温馨提示:预览模式下禁止跳转', + 'e1b7255934e3189b1f5d440fc1aa0230': '注册插件异常,已存在同名插件:', + '979a50681e278dcc0be18f68459e8217': '系统变量', + '75c142934800d6ee31fcf3fdff9e5d53': '[amis-editor]当前已有{{@1}}插件', + '0e24e1bbc19612a350f81296d9fb7802': '请先选择一个元素作为插入的位置。', + 'bd690facb536d759814ee64f2760fecb': '当前节点不允许追加新组件。', + '02f180cd26ff0951ddfda490080ee5ea': '配置项已复制', + '1ff035555ac8a68dc5b0ea2d0af55f00': '剪切板内容为空', + '6cb01692eea2fa7066d20fe2b6ccaea3': '假数据', + '7f2f0461a58c43667d7245ce92bb2e77': '按住拖动调整位置', + '78c1c38b91c672da1113fa2564c14ea6': '向前插入组件', + '87f48bbadfbef5ef4554e06b7e141d37': '向后插入组件', + '95b351c86267f3aedf89520959bce689': '编辑', + '0ec9eaf9c3525eb110db58aae5912210': '更多', + '417db09508befe7dbe9f84a517a6edec': '重复一份', + '99b81127ef28368151621cdfccce69f8': '取消多选', + '205f45ee17394bd5668412780eaa55e2': '插入组件', + '4c725f0159023c485ead728680e277ba': '选中{{@1}}', + '7ad78e0991f34ff3a345c59a2fc31572': '选中层级', + 'aafda9e8f6b7b613680677c513edb7a6': '取消选中', + 'b58d101f52531c845f15db63d7212115': '复制配置', + '74e2bc6615b7dbbb11fd5e1e212263ae': '剪切配置', + 'e2f401af580d1354ae00ec4ca19e2e24': '粘贴配置', + '21462ae22216eec41dc688cc4a8ae64b': '向前移动', + 'ed2bc13d8bbd99e16e017dd5f5393393': '向后移动', + '9e54f3e4ee3330299c5fdc910c2e8d3c': '撤销(Undo)', + 'ae8e86e426c2ba00da274b66dc372a8b': '重做(Redo)', + '2b6bc0f293f5ca01b006206c2535ccbc': '操作', + 'aa920263020f14211a44ea172efc7253': '上下文数据', + '48ac479789304b37afa2f1b06642f4da': '当前', + '9bc16c658ab8a8c4eddc5e24d85bef20': '上层', + '004d4be2ba8e6b8eed9333d15bc80a88': '上{{@1}}层', + 'e366ccf1556c0672dcecba135ed5472e': '设置', + '0cbec43d00e491a663ff0525ffe31868': '快速构建「{{@1}}」', + '1dd554cdfc1ddf7dce13453805523c16': '变更', + 'a82240ce09faf0b972a8aa5c9e93d209': '插入组件面板', + 'eadc8c8d4a8776893672330598babca0': '位置错误,目标位置没有找到', + 'f3c057f37fb9a4e7dd44b04919c12578': '请从左侧组件面板中点击添加新的元素。' +}); diff --git a/packages/amis-editor-core/webpack.config.js b/packages/amis-editor-core/webpack.config.js index 5fb7557b3..6a54adfca 100644 --- a/packages/amis-editor-core/webpack.config.js +++ b/packages/amis-editor-core/webpack.config.js @@ -5,6 +5,7 @@ const MiniCssExtractPlugin = require('mini-css-extract-plugin'); const nodeExternals = require('webpack-node-externals'); const path = require('path'); // const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin; +const i18nConfig = require('./i18nConfig'); module.exports = { mode: 'production', // development production @@ -24,13 +25,22 @@ module.exports = { rules: [ { test: /\.tsx?$/, - loader: 'ts-loader', - options: { - compilerOptions: { - declaration: true, - outDir: './lib' + use: [ + { + loader: 'ts-loader', + options: { + compilerOptions: { + declaration: true, + outDir: './lib' + } + } + }, + { + loader: 'webpack-react-i18n', + options: i18nConfig } - } + ] + }, { test: /\.scss$/i,