[DE PE SSE] Editing translations

This commit is contained in:
ShimaginAndrey 2021-09-19 19:24:15 +03:00
parent e839088079
commit 31dcadb289
3 changed files with 50 additions and 68 deletions

View file

@ -141,7 +141,6 @@ const PageBorderColor = props => {
const PageChartType = props => {
const { t } = useTranslation();
const _t = t('Edit', {returnObjects: true});
const storeChartSettings = props.storeChartSettings;
const types = storeChartSettings.types;
const storeFocusObjects = props.storeFocusObjects;
@ -150,7 +149,7 @@ const PageChartType = props => {
return (
<Page>
<Navbar backLink={_t.textBack} title={_t.textType} />
<Navbar backLink={t('Edit.textBack')} title={t('Edit.textType')} />
<div id={"edit-chart-type"} className="page-content no-padding-top dataview">
<div className="chart-types">
@ -179,14 +178,13 @@ const PageChartType = props => {
const PageChartStyle = props => {
const { t } = useTranslation();
const _t = t('Edit', {returnObjects: true});
const storeChartSettings = props.storeChartSettings;
const styles = storeChartSettings.styles;
const chartStyles = storeChartSettings.chartStyles;
return (
<Page>
<Navbar backLink={_t.textBack} title={_t.textStyle} />
<Navbar backLink={t('Edit.textBack')} title={t('Edit.textStyle')} />
{chartStyles ?
<div id={"edit-chart-style"} className="page-content no-padding-top dataview">
@ -203,7 +201,7 @@ const PageChartStyle = props => {
)
})
)
}) : <div className={'text-content'}>{_t.textNoStyles}</div>
}) : <div className={'text-content'}>{t('Edit.textNoStyles')}</div>
}
</ul>
</div>
@ -215,11 +213,10 @@ const PageChartStyle = props => {
const PageChartDesignFill = props => {
const { t } = useTranslation();
const _t = t('Edit', {returnObjects: true});
return (
<Page>
<Navbar backLink={_t.textBack} title={_t.textFill} />
<Navbar backLink={t('Edit.textBack')} title={t('Edit.textFill')} />
<div id={"edit-chart-fill"} className="page-content no-padding-top">
<PaletteFill onFillColor={props.onFillColor} f7router={props.f7router}/>
</div>
@ -229,7 +226,6 @@ const PageChartDesignFill = props => {
const PageChartBorder = props => {
const { t } = useTranslation();
const _t = t('Edit', {returnObjects: true});
const storeChartSettings = props.storeChartSettings;
const shapeObject = props.storeFocusObjects.shapeObject;
@ -253,12 +249,12 @@ const PageChartBorder = props => {
return (
<Page>
<Navbar backLink={_t.textBack} title={_t.textBorder} />
<Navbar backLink={t('Edit.textBack')} title={t('Edit.textBorder')} />
<div id={"edit-chart-border"} className="page-content no-padding-top">
<List>
<ListItem>
<div slot="root-start" className='inner-range-title'>{_t.textSize}</div>
<div slot="root-start" className='inner-range-title'>{t('Edit.textSize')}</div>
<div slot='inner' style={{width: '100%'}}>
<Range min="0" max="7" step="1" value={stateBorderSize}
onRangeChange={(value) => {setBorderSize(value); setTextBorderSize(borderSizeTransform.sizeByIndex(value));}}
@ -269,7 +265,7 @@ const PageChartBorder = props => {
{stateTextBorderSize + ' ' + Common.Utils.Metric.getMetricName(Common.Utils.Metric.c_MetricUnits.pt)}
</div>
</ListItem>
<ListItem title={_t.textColor} link='/edit-chart-border-color/' routeProps={{
<ListItem title={t('Edit.textColor')} link='/edit-chart-border-color/' routeProps={{
onBorderColor: props.onBorderColor
}}>
<span className="color-preview"
@ -285,7 +281,6 @@ const PageChartBorder = props => {
const PageDesign = props => {
const { t } = useTranslation();
const _t = t('Edit', {returnObjects: true});
const chartProperties = props.storeFocusObjects.chartObject ? props.storeFocusObjects.chartObject.get_ChartProperties() : null;
// console.log(chartStyles, curType);
@ -298,7 +293,7 @@ const PageDesign = props => {
return (
<Page>
<Navbar backLink={_t.textBack} title={_t.textDesign}>
<Navbar backLink={t('Edit.textBack')} title={t('Edit.textDesign')}>
{Device.phone &&
<NavRight>
<Link sheetClose='#edit-sheet'>
@ -309,10 +304,10 @@ const PageDesign = props => {
</Navbar>
<Fragment>
<List>
<ListItem title={_t.textType} link='/edit-chart-type/' routeProps = {{onType: props.onType}} />
<ListItem title={_t.textStyle} link='/edit-chart-style/' routeProps = {{onStyle: props.onStyle}} />
<ListItem title={_t.textFill} link='/edit-chart-fill/' routeProps = {{onFillColor: props.onFillColor}} />
<ListItem title={_t.textBorder} link='/edit-chart-border/' routeProps = {{
<ListItem title={t('Edit.textType')} link='/edit-chart-type/' routeProps = {{onType: props.onType}} />
<ListItem title={t('Edit.textStyle')} link='/edit-chart-style/' routeProps = {{onStyle: props.onStyle}} />
<ListItem title={t('Edit.textFill')} link='/edit-chart-fill/' routeProps = {{onFillColor: props.onFillColor}} />
<ListItem title={t('Edit.textBorder')} link='/edit-chart-border/' routeProps = {{
onBorderSize: props.onBorderSize,
onBorderColor: props.onBorderColor
}} />
@ -476,31 +471,30 @@ const PageReorder = props => {
const EditChart = props => {
const { t } = useTranslation();
const _t = t('Edit', {returnObjects: true});
return (
<Fragment>
<List>
<ListItem title={_t.textDesign} link='/edit-chart-design/' routeProps={{
<ListItem title={t('Edit.textDesign')} link='/edit-chart-design/' routeProps={{
onType: props.onType,
onStyle: props.onStyle,
onFillColor: props.onFillColor,
onBorderColor: props.onBorderColor,
onBorderSize: props.onBorderSize
}}></ListItem>
<ListItem title={_t.textWrap} link='/edit-chart-wrap/' routeProps={{
<ListItem title={t('Edit.textWrap')} link='/edit-chart-wrap/' routeProps={{
onWrapType: props.onWrapType,
onAlign: props.onAlign,
onMoveText: props.onMoveText,
onOverlap: props.onOverlap,
onWrapDistance: props.onWrapDistance
}}></ListItem>
<ListItem title={_t.textReorder} link='/edit-chart-reorder/' routeProps={{
<ListItem title={t('Edit.textReorder')} link='/edit-chart-reorder/' routeProps={{
onReorder: props.onReorder
}}></ListItem>
</List>
<List className="buttons-list">
<ListButton title={_t.textRemoveChart} onClick={() => {props.onRemoveChart()}} className='button-red button-fill button-raised'/>
<ListButton title={t('Edit.textRemoveChart')} onClick={() => {props.onRemoveChart()}} className='button-red button-fill button-raised'/>
</List>
</Fragment>
)

View file

@ -151,7 +151,6 @@ const PageBorderColor = props => {
const PageChartType = props => {
const { t } = useTranslation();
const _t = t('View.Edit', {returnObjects: true});
const storeChartSettings = props.storeChartSettings;
const types = storeChartSettings.types;
const storeFocusObjects = props.storeFocusObjects;
@ -160,7 +159,7 @@ const PageChartType = props => {
return (
<Page>
<Navbar backLink={_t.textBack} title={_t.textType} />
<Navbar backLink={t('View.Edit.textBack')} title={t('View.Edit.textType')} />
<div id={"edit-chart-type"} className="page-content no-padding-top dataview">
<div className="chart-types">
@ -189,14 +188,13 @@ const PageChartType = props => {
const PageChartStyle = props => {
const { t } = useTranslation();
const _t = t('View.Edit', {returnObjects: true});
const storeChartSettings = props.storeChartSettings;
const styles = storeChartSettings.styles;
const chartStyles = storeChartSettings.chartStyles;
return (
<Page>
<Navbar backLink={_t.textBack} title={_t.textStyle} />
<Navbar backLink={t('View.Edit.textBack')} title={t('View.Edit.textStyle')} />
{chartStyles ?
<div id={"edit-chart-style"} className="page-content no-padding-top dataview">
@ -213,7 +211,7 @@ const PageChartStyle = props => {
)
})
)
}) : <div className={'text-content'}>{_t.textNoStyles}</div>
}) : <div className={'text-content'}>{t('View.Edit.textNoStyles')}</div>
}
</ul>
</div>
@ -225,11 +223,10 @@ const PageChartStyle = props => {
const PageChartDesignFill = props => {
const { t } = useTranslation();
const _t = t('View.Edit', {returnObjects: true});
return (
<Page>
<Navbar backLink={_t.textBack} title={_t.textFill} />
<Navbar backLink={t('View.Edit.textBack')} title={t('View.Edit.textFill')} />
<div id={"edit-chart-fill"} className="page-content no-padding-top">
<PaletteFill onFillColor={props.onFillColor} f7router={props.f7router}/>
</div>
@ -239,7 +236,6 @@ const PageChartDesignFill = props => {
const PageChartBorder = props => {
const { t } = useTranslation();
const _t = t('View.Edit', {returnObjects: true});
const storeChartSettings = props.storeChartSettings;
const shapeObject = props.storeFocusObjects.shapeObject;
@ -263,12 +259,12 @@ const PageChartBorder = props => {
return (
<Page>
<Navbar backLink={_t.textBack} title={_t.textBorder} />
<Navbar backLink={t('View.Edit.textBack')} title={t('View.Edit.textBorder')} />
<div id={"edit-chart-border"} className="page-content no-padding-top">
<List>
<ListItem>
<div slot="root-start" className='inner-range-title'>{_t.textSize}</div>
<div slot="root-start" className='inner-range-title'>{t('View.Edit.textSize')}</div>
<div slot='inner' style={{width: '100%'}}>
<Range min="0" max="7" step="1" value={stateBorderSize}
onRangeChange={(value) => {setBorderSize(value); setTextBorderSize(borderSizeTransform.sizeByIndex(value));}}
@ -279,7 +275,7 @@ const PageChartBorder = props => {
{stateTextBorderSize + ' ' + Common.Utils.Metric.getMetricName(Common.Utils.Metric.c_MetricUnits.pt)}
</div>
</ListItem>
<ListItem title={_t.textColor} link='/edit-chart-border-color/' routeProps={{
<ListItem title={t('View.Edit.textColor')} link='/edit-chart-border-color/' routeProps={{
onBorderColor: props.onBorderColor
}}>
<span className="color-preview"
@ -295,7 +291,6 @@ const PageChartBorder = props => {
const PageDesign = props => {
const { t } = useTranslation();
const _t = t('View.Edit', {returnObjects: true});
const chartProperties = props.storeFocusObjects.chartObject ? props.storeFocusObjects.chartObject.get_ChartProperties() : null;
if (!chartProperties && Device.phone) {
@ -305,7 +300,7 @@ const PageDesign = props => {
return (
<Page>
<Navbar backLink={_t.textBack} title={_t.textDesign}>
<Navbar backLink={t('View.Edit.textBack')} title={t('View.Edit.textDesign')}>
{Device.phone &&
<NavRight>
<Link sheetClose='#edit-sheet'>
@ -316,10 +311,10 @@ const PageDesign = props => {
</Navbar>
<Fragment>
<List>
<ListItem title={_t.textType} link='/edit-chart-type/' routeProps = {{onType: props.onType}} />
<ListItem title={_t.textStyle} link='/edit-chart-style/' routeProps = {{onStyle: props.onStyle}} />
<ListItem title={_t.textFill} link='/edit-chart-fill/' routeProps = {{onFillColor: props.onFillColor}} />
<ListItem title={_t.textBorder} link='/edit-chart-border/' routeProps = {{
<ListItem title={t('View.Edit.textType')} link='/edit-chart-type/' routeProps = {{onType: props.onType}} />
<ListItem title={t('View.Edit.textStyle')} link='/edit-chart-style/' routeProps = {{onStyle: props.onStyle}} />
<ListItem title={t('View.Edit.textFill')} link='/edit-chart-fill/' routeProps = {{onFillColor: props.onFillColor}} />
<ListItem title={t('View.Edit.textBorder')} link='/edit-chart-border/' routeProps = {{
onBorderSize: props.onBorderSize,
onBorderColor: props.onBorderColor
}} />
@ -423,27 +418,26 @@ const PageAlign = props => {
const EditChart = props => {
const { t } = useTranslation();
const _t = t('View.Edit', {returnObjects: true});
return (
<Fragment>
<List>
<ListItem title={_t.textDesign} link='/edit-chart-design/' routeProps={{
<ListItem title={t('View.Edit.textDesign')} link='/edit-chart-design/' routeProps={{
onType: props.onType,
onStyle: props.onStyle,
onFillColor: props.onFillColor,
onBorderColor: props.onBorderColor,
onBorderSize: props.onBorderSize
}}></ListItem>
<ListItem title={_t.textReorder} link='/edit-chart-reorder/' routeProps={{
<ListItem title={t('View.Edit.textReorder')} link='/edit-chart-reorder/' routeProps={{
onReorder: props.onReorder
}}></ListItem>
<ListItem title={_t.textAlign} link="/edit-chart-align/" routeProps={{
<ListItem title={t('View.Edit.textAlign')} link="/edit-chart-align/" routeProps={{
onAlign: props.onAlign
}}></ListItem>
</List>
<List className="buttons-list">
<ListButton title={_t.textRemoveChart} onClick={() => {props.onRemoveChart()}} className='button-red button-fill button-raised'/>
<ListButton title={t('View.Edit.textRemoveChart')} onClick={() => {props.onRemoveChart()}} className='button-red button-fill button-raised'/>
</List>
</Fragment>
)

View file

@ -146,7 +146,6 @@ const PageBorderColor = props => {
const PageChartType = props => {
const { t } = useTranslation();
const _t = t('View.Edit', {returnObjects: true});
const storeChartSettings = props.storeChartSettings;
const types = storeChartSettings.types;
const storeFocusObjects = props.storeFocusObjects;
@ -155,7 +154,7 @@ const PageChartType = props => {
return (
<Page>
<Navbar backLink={_t.textBack} title={_t.textType} />
<Navbar backLink={t('View.Edit.textBack')} title={t('View.Edit.textType')} />
<div id={"edit-chart-type"} className="page-content no-padding-top dataview">
<div className="chart-types">
@ -182,14 +181,13 @@ const PageChartType = props => {
const PageChartStyle = props => {
const { t } = useTranslation();
const _t = t('View.Edit', {returnObjects: true});
const storeChartSettings = props.storeChartSettings;
const styles = storeChartSettings.styles;
const chartStyles = storeChartSettings.chartStyles;
return (
<Page>
<Navbar backLink={_t.textBack} title={_t.textStyle} />
<Navbar backLink={t('View.Edit.textBack')} title={t('View.Edit.textStyle')} />
{chartStyles ?
<div id={"edit-chart-style"} className="page-content no-padding-top dataview">
@ -206,7 +204,7 @@ const PageChartStyle = props => {
)
})
)
}) : <div className={'text-content'}>{_t.textNoStyles}</div>
}) : <div className={'text-content'}>{t('View.Edit.textNoStyles')}</div>
}
</ul>
</div>
@ -218,11 +216,10 @@ const PageChartStyle = props => {
const PageChartDesignFill = props => {
const { t } = useTranslation();
const _t = t('View.Edit', {returnObjects: true});
return (
<Page>
<Navbar backLink={_t.textBack} title={_t.textFill} />
<Navbar backLink={t('View.Edit.textBack')} title={t('View.Edit.textFill')} />
<div id={"edit-chart-fill"} className="page-content no-padding-top">
<PaletteFill onFillColor={props.onFillColor} f7router={props.f7router}/>
</div>
@ -232,7 +229,6 @@ const PageChartDesignFill = props => {
const PageChartBorder = props => {
const { t } = useTranslation();
const _t = t('View.Edit', {returnObjects: true});
const storeChartSettings = props.storeChartSettings;
const storeFocusObjects = props.storeFocusObjects;
const shapeProperties = storeFocusObjects.shapeObject && storeFocusObjects.shapeObject.get_ShapeProperties();
@ -261,12 +257,12 @@ const PageChartBorder = props => {
return (
<Page>
<Navbar backLink={_t.textBack} title={_t.textBorder} />
<Navbar backLink={t('View.Edit.textBack')} title={t('View.Edit.textBorder')} />
<div id={"edit-chart-border"} className="page-content no-padding-top">
<List>
<ListItem>
<div slot="root-start" className='inner-range-title'>{_t.textSize}</div>
<div slot="root-start" className='inner-range-title'>{t('View.Edit.textSize')}</div>
<div slot='inner' style={{width: '100%'}}>
<Range min="0" max="7" step="1" value={stateBorderSize}
onRangeChange={(value) => {setBorderSize(value); setTextBorderSize(borderSizeTransform.sizeByIndex(value));}}
@ -277,7 +273,7 @@ const PageChartBorder = props => {
{stateTextBorderSize + ' ' + Common.Utils.Metric.getMetricName(Common.Utils.Metric.c_MetricUnits.pt)}
</div>
</ListItem>
<ListItem title={_t.textColor} link='/edit-chart-border-color/' routeProps={{
<ListItem title={t('View.Edit.textColor')} link='/edit-chart-border-color/' routeProps={{
onBorderColor: props.onBorderColor
}}>
<span className="color-preview"
@ -293,7 +289,6 @@ const PageChartBorder = props => {
const PageDesign = props => {
const { t } = useTranslation();
const _t = t('View.Edit', {returnObjects: true});
const storeFocusObjects = props.storeFocusObjects;
const chartProperties = storeFocusObjects.chartObject && storeFocusObjects.chartObject.get_ChartProperties();
@ -307,7 +302,7 @@ const PageDesign = props => {
return (
<Page>
<Navbar backLink={_t.textBack} title={_t.textDesign}>
<Navbar backLink={t('View.Edit.textBack')} title={t('View.Edit.textDesign')}>
{Device.phone &&
<NavRight>
<Link icon='icon-expand-down' sheetClose></Link>
@ -316,10 +311,10 @@ const PageDesign = props => {
</Navbar>
<Fragment>
<List>
<ListItem title={_t.textType} link='/edit-chart-type/' routeProps = {{onType: props.onType}} />
<ListItem title={_t.textStyle} link='/edit-chart-style/' routeProps = {{onStyle: props.onStyle}} />
<ListItem title={_t.textFill} link='/edit-chart-fill/' routeProps = {{onFillColor: props.onFillColor}} />
<ListItem title={_t.textBorder} link='/edit-chart-border/' routeProps = {{
<ListItem title={t('View.Edit.textType')} link='/edit-chart-type/' routeProps = {{onType: props.onType}} />
<ListItem title={t('View.Edit.textStyle')} link='/edit-chart-style/' routeProps = {{onStyle: props.onStyle}} />
<ListItem title={t('View.Edit.textFill')} link='/edit-chart-fill/' routeProps = {{onFillColor: props.onFillColor}} />
<ListItem title={t('View.Edit.textBorder')} link='/edit-chart-border/' routeProps = {{
onBorderSize: props.onBorderSize,
onBorderColor: props.onBorderColor
}} />
@ -1428,7 +1423,6 @@ const PageHorLabelPosition = props => {
const EditChart = props => {
const { t } = useTranslation();
const _t = t('View.Edit', {returnObjects: true});
const storeFocusObjects = props.storeFocusObjects;
const chartProperties = storeFocusObjects.chartObject && storeFocusObjects.chartObject.get_ChartProperties();
const chartType = chartProperties && chartProperties.getType();
@ -1461,19 +1455,19 @@ const EditChart = props => {
return (
<Fragment>
<List>
<ListItem title={_t.textDesign} link='/edit-chart-design/' routeProps={{
<ListItem title={t('View.Edit.textDesign')} link='/edit-chart-design/' routeProps={{
onType: props.onType,
onStyle: props.onStyle,
onFillColor: props.onFillColor,
onBorderColor: props.onBorderColor,
onBorderSize: props.onBorderSize
}}></ListItem>
<ListItem title={_t.textLayout} link='/edit-chart-layout/' routeProps={{
<ListItem title={t('View.Edit.textLayout')} link='/edit-chart-layout/' routeProps={{
disableEditAxis,
setLayoutProperty: props.setLayoutProperty,
initChartLayout: props.initChartLayout
}}></ListItem>
<ListItem title={_t.textVerticalAxis} link={needReverse ? '/edit-chart-horizontal-axis/' : '/edit-chart-vertical-axis/'} disabled={disableEditAxis} routeProps={needReverse ? {
<ListItem title={t('View.Edit.textVerticalAxis')} link={needReverse ? '/edit-chart-horizontal-axis/' : '/edit-chart-vertical-axis/'} disabled={disableEditAxis} routeProps={needReverse ? {
onHorAxisCrossType: props.onHorAxisCrossType,
onHorAxisCrossValue: props.onHorAxisCrossValue,
onHorAxisPos: props.onHorAxisPos,
@ -1494,7 +1488,7 @@ const EditChart = props => {
onVerAxisTickMinor: props.onVerAxisTickMinor,
onVerAxisLabelPos: props.onVerAxisLabelPos
}}></ListItem>
<ListItem title={_t.textHorizontalAxis} link={needReverse || chartType == Asc.c_oAscChartTypeSettings.scatter ? '/edit-chart-vertical-axis/' : '/edit-chart-horizontal-axis/'} disabled={disableEditAxis} routeProps={needReverse || chartType == Asc.c_oAscChartTypeSettings.scatter ? {
<ListItem title={t('View.Edit.textHorizontalAxis')} link={needReverse || chartType == Asc.c_oAscChartTypeSettings.scatter ? '/edit-chart-vertical-axis/' : '/edit-chart-horizontal-axis/'} disabled={disableEditAxis} routeProps={needReverse || chartType == Asc.c_oAscChartTypeSettings.scatter ? {
onVerAxisMinValue: props.onVerAxisMinValue,
onVerAxisMaxValue: props.onVerAxisMaxValue,
onVerAxisCrossType: props.onVerAxisCrossType,
@ -1515,12 +1509,12 @@ const EditChart = props => {
disableAxisPos,
needReverse
}}></ListItem>
<ListItem title={_t.textReorder} link='/edit-chart-reorder/' routeProps={{
<ListItem title={t('View.Edit.textReorder')} link='/edit-chart-reorder/' routeProps={{
onReorder: props.onReorder
}}></ListItem>
</List>
<List className="buttons-list">
<ListButton title={_t.textRemoveChart} onClick={() => {props.onRemoveChart()}} className='button-red button-fill button-raised'/>
<ListButton title={t('View.Edit.textRemoveChart')} onClick={() => {props.onRemoveChart()}} className='button-red button-fill button-raised'/>
</List>
</Fragment>
)