Commit 18f9081a77b246b3a68cad0da7507281b675b844
1 parent
025bfddc
chore: i18n
Showing
7 changed files
with
28 additions
and
17 deletions
front-end/h5/package.json
| ... | ... | @@ -18,7 +18,7 @@ |
| 18 | 18 | "@luban-h5/lbc-button": "^0.0.3", |
| 19 | 19 | "@luban-h5/lbp-slide": "^0.0.7", |
| 20 | 20 | "@luban-h5/lbs-text-align": "^0.0.5", |
| 21 | - "@luban-h5/plugin-common-props": "0.2.7", | |
| 21 | + "@luban-h5/plugin-common-props": "0.2.8", | |
| 22 | 22 | "animate.css": "^3.7.2", |
| 23 | 23 | "ant-design-vue": "^1.3.14", |
| 24 | 24 | "core-js": "^2.6.5", | ... | ... |
front-end/h5/src/components/core/editor/right-panel/background.js
| ... | ... | @@ -28,7 +28,8 @@ export default { |
| 28 | 28 | return ( |
| 29 | 29 | <div> |
| 30 | 30 | <a-collapse expand-icon-position="right"> |
| 31 | - <a-collapse-panel key="1" header="H5模式"> | |
| 31 | + {/* #!zh: H5模式 */} | |
| 32 | + <a-collapse-panel key="1" header={this.$t('editor.editPanel.common.pageMode')}> | |
| 32 | 33 | <RenderWorkMode /> |
| 33 | 34 | </a-collapse-panel> |
| 34 | 35 | </a-collapse> | ... | ... |
front-end/h5/src/components/core/editor/right-panel/props.js
| 1 | 1 | import Vue from 'vue' |
| 2 | 2 | import { mapState, mapActions } from 'vuex' |
| 3 | 3 | import BoxModelEditor from './box-model' |
| 4 | +import langMixin from 'core/mixins/i18n' | |
| 4 | 5 | import { getVM, getComponentsForPropsEditor } from '@/utils/element' |
| 5 | 6 | import 'core/styles/props-config-panel.scss' |
| 6 | 7 | |
| 7 | 8 | export default { |
| 8 | 9 | name: 'RightPanelProps', |
| 10 | + mixins: [langMixin], | |
| 9 | 11 | components: { |
| 10 | 12 | BoxModelEditor |
| 11 | 13 | }, |
| ... | ... | @@ -114,7 +116,7 @@ export default { |
| 114 | 116 | const formItemData = { |
| 115 | 117 | props: { |
| 116 | 118 | ...formItemLayout, |
| 117 | - label: item.label, | |
| 119 | + label: item[`${this.currentLang}-label`] || item.label, | |
| 118 | 120 | ...item.layout |
| 119 | 121 | } |
| 120 | 122 | } |
| ... | ... | @@ -176,7 +178,8 @@ export default { |
| 176 | 178 | return ( |
| 177 | 179 | <div> |
| 178 | 180 | <a-collapse bordered={true} expand-icon-position="right"> |
| 179 | - <a-collapse-panel key="1" header="通用样式"> | |
| 181 | + {/* #!zh: 通用样式 */} | |
| 182 | + <a-collapse-panel key="1" header={this.$t('editor.editPanel.common.commonStyle')}> | |
| 180 | 183 | {/* left,top,width,height编辑 只有在选中编辑组件的时候显示 */} |
| 181 | 184 | { |
| 182 | 185 | this.stateEditingElement ? this.renderEditorPositionConfig(h) : '' |
| ... | ... | @@ -184,7 +187,8 @@ export default { |
| 184 | 187 | {/* margin、padding编辑 */} |
| 185 | 188 | <BoxModelEditor /> |
| 186 | 189 | </a-collapse-panel> |
| 187 | - <a-collapse-panel key="2" header="属性设置"> | |
| 190 | + {/* #!zh: 属性设置 */} | |
| 191 | + <a-collapse-panel key="2" header={this.$t('editor.editPanel.common.ConfigProps')}> | |
| 188 | 192 | <a-form |
| 189 | 193 | ref="form" |
| 190 | 194 | size="mini" | ... | ... |
front-end/h5/src/components/core/plugins/lbp-background.js
| ... | ... | @@ -14,12 +14,12 @@ import { renderWaterMark } from '@/utils/dom-helper' |
| 14 | 14 | export default { |
| 15 | 15 | name: 'lbp-background', |
| 16 | 16 | props: { |
| 17 | - imgSrc: PropTypes.image({ label: '背景图' }), | |
| 18 | - backgroundColor: PropTypes.color({ label: '背景色', defaultValue: 'rgba(255, 255, 255, 0.2)' }), | |
| 19 | - waterMarkText: PropTypes.string({ label: '水印文字', defaultValue: '水印文字' }), | |
| 20 | - waterMarkFontSize: PropTypes.number({ label: '水印文字大小(px)', defaultValue: 16 }), | |
| 21 | - waterMarkRotate: PropTypes.number({ label: '水印旋转角度', defaultValue: 10 }), | |
| 22 | - waterMarkColor: PropTypes.color({ label: '水印文字颜色', defaultValue: 'rgba(184, 184, 184, 0.2)' }) | |
| 17 | + imgSrc: PropTypes.image({ label: '背景图', 'en-US-label': 'BgImage' }), | |
| 18 | + backgroundColor: PropTypes.color({ label: '背景色', 'en-US-label': 'BgColor', defaultValue: 'rgba(255, 255, 255, 0.2)' }), | |
| 19 | + waterMarkText: PropTypes.string({ label: '水印文字', 'en-US-label': 'BgColor', defaultValue: '水印文字' }), | |
| 20 | + waterMarkFontSize: PropTypes.number({ label: '水印文字大小(px)', 'en-US-label': 'WaterMaskSize', defaultValue: 16 }), | |
| 21 | + waterMarkRotate: PropTypes.number({ label: '水印旋转角度', 'en-US-label': 'WaterMaskRotate', defaultValue: 10 }), | |
| 22 | + waterMarkColor: PropTypes.color({ label: '水印文字颜色', 'en-US-label': 'WaterMaskColor', defaultValue: 'rgba(184, 184, 184, 0.2)' }) | |
| 23 | 23 | }, |
| 24 | 24 | methods: { |
| 25 | 25 | renderWaterMark () { | ... | ... |
front-end/h5/src/locales/lang/en-US.js
| ... | ... | @@ -97,7 +97,10 @@ export default { |
| 97 | 97 | title: 'Animation {index}' |
| 98 | 98 | }, |
| 99 | 99 | common: { |
| 100 | - empty: 'Select an element first please!' | |
| 100 | + empty: 'Select an element first please!', | |
| 101 | + ConfigProps: 'Props', | |
| 102 | + commonStyle: 'CommonStyle', | |
| 103 | + pageMode: 'PageMode' | |
| 101 | 104 | } |
| 102 | 105 | }, |
| 103 | 106 | tip: { | ... | ... |
front-end/h5/src/locales/lang/zh-CN.js
| ... | ... | @@ -106,7 +106,10 @@ export default { |
| 106 | 106 | title: 'Animation {index}' |
| 107 | 107 | }, |
| 108 | 108 | common: { |
| 109 | - empty: 'Select an element first please!' | |
| 109 | + empty: 'Select an element first please!', | |
| 110 | + ConfigProps: '属性设置', | |
| 111 | + commonStyle: '通用样式', | |
| 112 | + pageMode: '页面模式' | |
| 110 | 113 | } |
| 111 | 114 | }, |
| 112 | 115 | tip: { | ... | ... |
front-end/h5/yarn.lock
| ... | ... | @@ -840,10 +840,10 @@ |
| 840 | 840 | core-js "^3.3.2" |
| 841 | 841 | vue "^2.6.10" |
| 842 | 842 | |
| 843 | -"@luban-h5/plugin-common-props@0.2.7": | |
| 844 | - version "0.2.7" | |
| 845 | - resolved "https://registry.npmjs.org/@luban-h5/plugin-common-props/-/plugin-common-props-0.2.7.tgz#098cb71c789a527f8b50a2b613c9b28d959f5ab2" | |
| 846 | - integrity sha512-Kf+HogjJVQy9Mp/c36X6m8VNF56rme/RkRwnLVdtTG1c0rTcPdn9iE+2gCP641DDN9ifGj5Y6T+wfVyTaOTDaw== | |
| 843 | +"@luban-h5/plugin-common-props@0.2.8": | |
| 844 | + version "0.2.8" | |
| 845 | + resolved "https://registry.npm.taobao.org/@luban-h5/plugin-common-props/download/@luban-h5/plugin-common-props-0.2.8.tgz#a8ce6d8c445ef65a1c9147a61c5d5b049217f38f" | |
| 846 | + integrity sha1-qM5tjERe9lockUemHF1bBJIX848= | |
| 847 | 847 | |
| 848 | 848 | "@luban-h5/plugin-common-props@^0.0.1": |
| 849 | 849 | version "0.0.1" | ... | ... |