Skip to content

Commit

Permalink
Merge pull request #1201 from nyaruka/update-language
Browse files Browse the repository at this point in the history
Tweak opt-in language
  • Loading branch information
ericnewcomer authored Sep 26, 2023
2 parents a2d54a8 + 57015a8 commit 19f27ad
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
7 changes: 3 additions & 4 deletions src/components/flow/actions/requestoptin/RequestOptInForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ export default class AddLabelsForm extends React.PureComponent<
}

public handleOptInCreated(optin: Asset): void {
console.log(optin);
this.handleOptInChanged([optin]);
}

Expand All @@ -82,21 +81,21 @@ export default class AddLabelsForm extends React.PureComponent<
<Dialog title={typeConfig.name} headerClass={typeConfig.type} buttons={this.getButtons()}>
<TypeList __className="" initialType={typeConfig} onChange={this.props.onTypeChange} />
<p data-spec={controlLabelSpecId}>
<Trans i18nKey="forms.request_optin_summary">Select the Opt-In to request</Trans>
<Trans i18nKey="forms.request_optin_summary">Select the opt-in to request</Trans>
</p>

<AssetSelector
name={i18n.t('forms.request_optin.title', 'Request Opt-In')}
placeholder={i18n.t(
'enter_to_create_optin',
'Enter the name of an existing Opt-In or create a new one'
'Enter the name of an existing opt-in or create a new one'
)}
assets={this.props.assetStore.optins}
entry={this.state.optin}
searchable={true}
expressions={true}
onChange={this.handleOptInChanged}
createPrefix={i18n.t('create_optin', 'Create Opt-In') + ': '}
createPrefix={i18n.t('create_optin', 'Create opt-in') + ': '}
createAssetFromInput={this.handleCreateAssetFromInput}
onAssetCreated={this.handleOptInCreated}
/>
Expand Down
4 changes: 2 additions & 2 deletions src/config/__snapshots__/typeConfigs.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ Array [
},
Object {
"component": [Function],
"description": "Send an Opt-In request",
"description": "Send an opt-in request",
"filter": "optins",
"form": [Function],
"name": "Request Opt-In",
Expand Down Expand Up @@ -593,7 +593,7 @@ Object {
},
"request_optin": Object {
"component": [Function],
"description": "Send an Opt-In request",
"description": "Send an opt-in request",
"filter": "optins",
"form": [Function],
"name": "Request Opt-In",
Expand Down
2 changes: 1 addition & 1 deletion src/config/typeConfigs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ export const typeConfigList: Type[] = [
{
type: Types.request_optin,
name: i18n.t('actions.request_optin.name', 'Request Opt-In'),
description: i18n.t('actions.request_optin.description', 'Send an Opt-In request'),
description: i18n.t('actions.request_optin.description', 'Send an opt-in request'),
form: RequestOptInForm,
component: RequestOptInComp,
filter: FeatureFilter.HAS_OPTINS
Expand Down

0 comments on commit 19f27ad

Please sign in to comment.