Skip to content

Commit 7e6cf30

Browse files
author
FalkWolsky
committed
Column Layout & Responsive Layout - trnaslations
1 parent 7e13a33 commit 7e6cf30

File tree

3 files changed

+14
-34
lines changed

3 files changed

+14
-34
lines changed

client/packages/lowcoder/src/comps/comps/columnLayout/columnLayout.tsx

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -131,23 +131,7 @@ const ColumnLayout = (props: ColumnLayoutProps) => {
131131
const childDispatch = wrapDispatch(wrapDispatch(dispatch, "containers"), id);
132132
if(!containers[id]) return null
133133
const containerProps = containers[id].children;
134-
135-
/* const columnCustomStyle = {
136-
margin: "0",
137-
padding: !_.isEmpty(column.padding) ? column.padding : "0",
138-
radius: "0",
139-
border: "1px dashed pink", // `${!_.isEmpty(column.border) ? column.border : columnStyle.border}`,
140-
background: !_.isEmpty(column.background) ? column.background : columnStyle.background,
141-
overflow: "hidden",
142-
backgroundImage: "linear-gradient(to bottom, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 1) 100%), linear-gradient(to bottom, rgba(253, 246, 199, 1) 0%, rgba(253, 246, 199, 1) 100%)",
143-
backgroundClip: "content-box, padding-box",
144-
145-
} */
146134
const noOfColumns = columns.length;
147-
/* let backgroundStyle = columnCustomStyle.background;
148-
if(!_.isEmpty(column.backgroundImage)) {
149-
backgroundStyle = `center / cover url('${column.backgroundImage}') no-repeat, ${backgroundStyle}`;
150-
} */
151135
return (
152136
<ColWrapper
153137
key={id}
@@ -186,7 +170,7 @@ export const ResponsiveLayoutBaseComp = (function () {
186170
<Section name={sectionNames.basic}>
187171
{children.columns.propertyView({
188172
title: trans("responsiveLayout.column"),
189-
newOptionLabel: "Column",
173+
newOptionLabel: trans("responsiveLayout.addColumn"),
190174
})}
191175
</Section>
192176

@@ -208,10 +192,10 @@ export const ResponsiveLayoutBaseComp = (function () {
208192
{controlItem({}, (
209193
<div style={{ marginTop: '8px' }}>{trans("responsiveLayout.columnsSpacing")}</div>
210194
))}
211-
{children.templateColumns.propertyView({label: "Column Definition"})}
212-
{children.templateRows.propertyView({label: "Row Definition"})}
213-
{children.columnGap.propertyView({label: "Column Gap"})}
214-
{children.rowGap.propertyView({label: "Row Gap"})}
195+
{children.templateColumns.propertyView({label: trans("responsiveLayout.columnDefinition"), tooltip: trans("responsiveLayout.columnsDefinitionTooltip")})}
196+
{children.templateRows.propertyView({label: trans("responsiveLayout.rowDefinition"), tooltip: trans("responsiveLayout.rowsDefinitionTooltip")})}
197+
{children.columnGap.propertyView({label: trans("responsiveLayout.columnGap")})}
198+
{children.rowGap.propertyView({label: trans("responsiveLayout.rowGap")})}
215199
</Section>
216200
</>
217201
)}

client/packages/lowcoder/src/comps/comps/responsiveLayout/responsiveLayout.tsx

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -151,19 +151,7 @@ const ResponsiveLayout = (props: ResponsiveLayoutProps) => {
151151
const childDispatch = wrapDispatch(wrapDispatch(dispatch, "containers"), id);
152152
if(!containers[id]) return null
153153
const containerProps = containers[id].children;
154-
155-
/* const columnCustomStyle = {
156-
margin: !_.isEmpty(column.margin) ? column.margin : columnStyle.margin,
157-
padding: !_.isEmpty(column.padding) ? column.padding : columnStyle.padding,
158-
radius: !_.isEmpty(column.radius) ? column.radius : columnStyle.radius,
159-
border: `1px solid ${!_.isEmpty(column.border) ? column.border : columnStyle.border}`,
160-
background: !_.isEmpty(column.background) ? column.background : columnStyle.background,
161-
} */
162154
const noOfColumns = columns.length;
163-
/* let backgroundStyle = columnCustomStyle.background;
164-
if(!_.isEmpty(column.backgroundImage)) {
165-
backgroundStyle = `center / cover url('${column.backgroundImage}') no-repeat, ${backgroundStyle}`;
166-
} */
167155
return (
168156
<ColWrapper
169157
key={id}

client/packages/lowcoder/src/i18n/locales/en.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3436,6 +3436,11 @@ export const en = {
34363436
},
34373437
"responsiveLayout": {
34383438
"column": "Columns",
3439+
"addColumn": "Add Column",
3440+
"columnDefinition": "Column Definition",
3441+
"rowDefinition": "Row Definition",
3442+
"columnGap": "Column Gap",
3443+
"rowGap": "Row Gap",
34393444
"atLeastOneColumnError": "Responsive Layout Keeps at Least One Column",
34403445
"columnsPerRow": "Columns per Row",
34413446
"columnsSpacing": "Columns Spacing (px)",
@@ -3450,8 +3455,11 @@ export const en = {
34503455
"rowBreak": "Row Break",
34513456
"matchColumnsHeight": "Match Columns Height",
34523457
"rowLayout": "Row Layout",
3453-
"columnsLayout": "Columns Layout"
3458+
"columnsLayout": "Columns Layout",
3459+
"columnsDefinitionTooltip": "Columns can be defined freely based on the CSS columns properties. For example, 'auto auto' will create two columns with equal width. Read more here: https://css-tricks.com/almanac/properties/g/grid-template-columns",
3460+
"rowsDefinitionTooltip": "Rows can be defined freely based on the CSS rows properties. For example, 'auto auto' will create two rows with equal height. Read more here: https://css-tricks.com/almanac/properties/g/grid-template-rows",
34543461
},
3462+
34553463
"navLayout": {
34563464
"mode": "Mode",
34573465
"modeInline": "Inline",

0 commit comments

Comments
 (0)