Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Strings Translation in form edit.js #553

Merged
merged 4 commits into from
Sep 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions src/blocks/form/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -929,9 +929,9 @@ function KadenceForm(props) {
{ key: 'v2', name: __('V2', 'kadence-blocks') },
];
const btnWidths = [
{ key: 'auto', name: __('Auto') },
{ key: 'fixed', name: __('Fixed') },
{ key: 'full', name: __('Full') },
{ key: 'auto', name: __('Auto', 'kadence-blocks') },
{ key: 'fixed', name: __('Fixed', 'kadence-blocks') },
{ key: 'full', name: __('Full', 'kadence-blocks') },
];
const gradTypes = [
{ key: 'linear', name: __('Linear', 'kadence-blocks') },
Expand Down Expand Up @@ -1189,7 +1189,7 @@ function KadenceForm(props) {
icon="arrow-up"
onClick={() => (n === 0 ? undefined : onOptionMoveUp(n, index))}
className="kadence-blocks-list-item__move-up"
label={__('Move Item Up')}
label={__('Move Item Up', 'kadence-blocks')}
aria-disabled={n === 0}
disabled={n === 0}
/>
Expand All @@ -1201,15 +1201,15 @@ function KadenceForm(props) {
: onOptionMoveDown(n, index)
}
className="kadence-blocks-list-item__move-down"
label={__('Move Item Down')}
label={__('Move Item Down', 'kadence-blocks')}
aria-disabled={n + 1 === fields[index].options.length}
disabled={n + 1 === fields[index].options.length}
/>
<Button
icon="no-alt"
onClick={() => removeOptionItem(n, index)}
className="kadence-blocks-list-item__remove"
label={__('Remove Item')}
label={__('Remove Item', 'kadence-blocks')}
disabled={1 === fields[index].options.length}
/>
</div>
Expand All @@ -1235,7 +1235,7 @@ function KadenceForm(props) {
)}
{'select' === fields[index].type && (
<ToggleControl
label={__('Multi Select?')}
label={__('Multi Select?', 'kadence-blocks')}
checked={undefined !== fields[index].multiSelect ? fields[index].multiSelect : false}
onChange={(value) => saveFields({ multiSelect: value }, index)}
/>
Expand Down Expand Up @@ -2877,7 +2877,7 @@ function KadenceForm(props) {
/>

<div className="kt-btn-size-settings-container">
<h2 className="kt-beside-btn-group">{__('Input Size')}</h2>
<h2 className="kt-beside-btn-group">{__('Input Size', 'kadence-blocks')}</h2>
<ButtonGroup
className="kt-button-size-type-options"
aria-label={__('Input Size', 'kadence-blocks')}
Expand Down Expand Up @@ -3131,7 +3131,7 @@ function KadenceForm(props) {
}}
/>
<RangeControl
label={__('Location')}
label={__('Location', 'kadence-blocks')}
value={
style[0].gradientActive &&
undefined !== style[0].gradientActive[3]
Expand Down Expand Up @@ -3984,7 +3984,7 @@ function KadenceForm(props) {
}}
</TabPanel>
<div className="kt-btn-size-settings-container">
<h2 className="kt-beside-btn-group">{__('Button Size')}</h2>
<h2 className="kt-beside-btn-group">{__('Button Size', 'kadence-blocks')}</h2>
<ButtonGroup
className="kt-button-size-type-options"
aria-label={__('Button Size', 'kadence-blocks')}
Expand Down Expand Up @@ -4089,8 +4089,8 @@ function KadenceForm(props) {
</div>
)}
<div className="kt-btn-size-settings-container">
<h2 className="kt-beside-btn-group">{__('Button Width')}</h2>
<ButtonGroup className="kt-button-size-type-options" aria-label={__('Button Width')}>
<h2 className="kt-beside-btn-group">{__('Button Width', 'kadence-blocks')}</h2>
<ButtonGroup className="kt-button-size-type-options" aria-label={__('Button Width', 'kadence-blocks')}>
{map(btnWidths, ({ name, key }) => (
<Button
key={key}
Expand All @@ -4108,7 +4108,7 @@ function KadenceForm(props) {
{'fixed' === submit[0].widthType && (
<div className="kt-inner-sub-section">
<h2 className="kt-heading-size-title kt-secondary-color-size">
{__('Fixed Width')}
{__('Fixed Width', 'kadence-blocks')}
</h2>
<TabPanel
className="kt-size-tabs"
Expand Down Expand Up @@ -4381,7 +4381,7 @@ function KadenceForm(props) {
}}
/>
<RangeControl
label={__('Location')}
label={__('Location', 'kadence-blocks')}
value={
submit[0].gradientHover &&
undefined !== submit[0].gradientHover[3]
Expand Down Expand Up @@ -5299,7 +5299,7 @@ function KadenceForm(props) {
>
<RichText
tagName="div"
placeholder={__('Submit')}
placeholder={__('Submit', 'kadence-blocks')}
onFocus={() => deselectField}
value={submit[0].label}
onChange={(value) => {
Expand Down
6 changes: 3 additions & 3 deletions src/blocks/form/fluentcrm.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ class FluentCRMControls extends Component {
options={list}
isMulti={true}
maxMenuHeight={200}
placeholder={__('Select List')}
placeholder={__('Select List', 'kadence-blocks')}
/>
{!this.props.settings[0].lists && <div style={{ height: '100px' }}></div>}
{undefined !== this.props.settings &&
Expand Down Expand Up @@ -196,7 +196,7 @@ class FluentCRMControls extends Component {
options={listTags}
isMulti={true}
maxMenuHeight={200}
placeholder={__('Select Tags')}
placeholder={__('Select Tags', 'kadence-blocks')}
/>
</>
)}
Expand Down Expand Up @@ -232,7 +232,7 @@ class FluentCRMControls extends Component {
</p>
</div>
<SelectControl
label={__('Select Field:')}
label={__('Select Field:', 'kadence-blocks')}
options={listFields}
value={
undefined !== this.props.settings[0].map &&
Expand Down
2 changes: 1 addition & 1 deletion src/blocks/form/mailerlite.js
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ class MailerLiteControls extends Component {
</p>
</div>
<SelectControl
label={__('Select Field:')}
label={__('Select Field:', 'kadence-blocks')}
options={groupFields}
value={
undefined !== this.props.settings[0].map &&
Expand Down
Loading