Skip to content
Draft
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
2 changes: 2 additions & 0 deletions lang/en/fieldtypes.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

return [
'address' => [
'title' => 'Address',
'description' => 'Collects a postal address.',
'config' => [
'default_country' => 'Default Country',
],
Expand Down
77 changes: 76 additions & 1 deletion lang/en/messages.php

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions resources/js/components/connections/GoogleSheetsConnector.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ const tabName = (sheet: { id: string; tab?: number }): string => props.meta[shee
</Alert>

<div v-if="serviceAccount" class="mb-6">
<Label :text="__('Service Account')" />
<Description :text="__('forms-pro::messages.google_sheets_service_account')" class="mt-1" />
<Label :text="__('forms-pro::messages.google_sheets_service_account')" />
<Description :text="__('forms-pro::messages.google_sheets_service_account_instructions')" class="mt-1" />
<Input :model-value="serviceAccount" read-only copyable class="mt-2 font-mono text-xs" />
</div>

<Label :text="__('Spreadsheets')" class="mb-2" />
<Label :text="__('forms-pro::messages.google_sheets_spreadsheets')" class="mb-2" />

<ConnectionList
:model-value="modelValue"
Expand All @@ -51,18 +51,18 @@ const tabName = (sheet: { id: string; tab?: number }): string => props.meta[shee
:blueprint
:meta
name="google-sheets-connection"
:add-label="__('Add Spreadsheet')"
:add-label="__('forms-pro::messages.google_sheets_add_spreadsheet')"
:description="__('forms-pro::messages.google_sheets_instructions')"
:delete-heading="__('Delete Spreadsheet')"
:delete-heading="__('forms-pro::messages.google_sheets_delete_spreadsheet')"
:delete-description="__('forms-pro::messages.google_sheets_delete_confirmation')"
:always-label="__('Always add a row')"
:if-label="__('Add a row if...')"
:always-label="__('forms-pro::messages.google_sheets_always_add_row')"
:if-label="__('forms-pro::messages.google_sheets_add_row_if')"
@update:model-value="$emit('update:modelValue', $event)"
>
<template #header="{ item: sheet, collapsed }">
<Badge size="lg" pill color="white" class="px-3 text-gray-950 gap-1">
<Icon name="forms-pro::google-sheets" class="size-3.5 me-1" />
{{ tabName(sheet) ?? __('New Spreadsheet') }}
{{ tabName(sheet) ?? __('forms-pro::messages.google_sheets_new_spreadsheet') }}
</Badge>
<ConnectionSummary v-show="collapsed" :conditions="sheet.conditions" />
</template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const envVariable = 'FORMS_PRO_GOOGLE_SHEETS_CREDENTIALS=your-encoded-key';
icon="external-link"
:href="projectUrl"
target="_blank"
:text="__('Create a project')"
:text="__('forms-pro::messages.google_sheets_setup_project_button')"
/>
</div>
</li>
Expand All @@ -39,7 +39,7 @@ const envVariable = 'FORMS_PRO_GOOGLE_SHEETS_CREDENTIALS=your-encoded-key';
icon="external-link"
:href="apiUrl"
target="_blank"
:text="__('Enable the Sheets API')"
:text="__('forms-pro::messages.google_sheets_setup_api_button')"
/>
</div>
</li>
Expand All @@ -52,7 +52,7 @@ const envVariable = 'FORMS_PRO_GOOGLE_SHEETS_CREDENTIALS=your-encoded-key';
icon="external-link"
:href="serviceAccountsUrl"
target="_blank"
:text="__('Create a service account')"
:text="__('forms-pro::messages.google_sheets_setup_service_account_button')"
/>
</div>
</li>
Expand Down
6 changes: 3 additions & 3 deletions resources/js/components/connections/HubSpotConnector.vue
Original file line number Diff line number Diff line change
Expand Up @@ -85,16 +85,16 @@ const warnings = (submission: Submission): string[] => {
:blueprint
:meta
name="hubspot-connection"
:add-label="__('Add HubSpot Form')"
:add-label="__('forms-pro::messages.hubspot_add_form')"
:description="__('forms-pro::messages.hubspot_instructions')"
:delete-heading="__('Delete HubSpot Form')"
:delete-heading="__('forms-pro::messages.hubspot_delete_form')"
:delete-description="__('forms-pro::messages.hubspot_delete_confirmation')"
@update:model-value="$emit('update:modelValue', $event)"
>
<template #header="{ item: submission, collapsed }">
<Badge size="lg" pill color="white" class="px-3 text-gray-950 gap-1">
<Icon name="forms-pro::hubspot" class="size-3.5 me-1" />
{{ hubspotForm(submission)?.name ?? __('New HubSpot Form') }}
{{ hubspotForm(submission)?.name ?? __('forms-pro::messages.hubspot_new_form') }}
</Badge>
<ConnectionSummary v-show="collapsed" :conditions="submission.conditions" />
</template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const envVariables = `FORMS_PRO_HUBSPOT_ACCESS_TOKEN=pat-eu1-your-token`;
icon="external-link"
:href="serviceKeysUrl"
target="_blank"
:text="__('Create a Service Key')"
:text="__('forms-pro::messages.hubspot_setup_key_button')"
/>
</div>
</li>
Expand Down
12 changes: 6 additions & 6 deletions resources/js/components/connections/KitConnector.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const kitFormName = (subscription: { form?: number }): string => {
<Description :text="__(apiError)" class="mt-1" />
</Alert>

<Label :text="__('Subscriptions')" class="mb-2" />
<Label :text="__('forms-pro::messages.subscriptions')" class="mb-2" />

<ConnectionList
:model-value="modelValue"
Expand All @@ -37,18 +37,18 @@ const kitFormName = (subscription: { form?: number }): string => {
:blueprint
:meta
name="kit-connection"
:add-label="__('Add Subscription')"
:add-label="__('forms-pro::messages.add_subscription')"
:description="__('forms-pro::messages.kit_instructions')"
:delete-heading="__('Delete Kit Subscription')"
:delete-heading="__('forms-pro::messages.kit_delete_subscription')"
:delete-description="__('forms-pro::messages.kit_delete_confirmation')"
:always-label="__('Always subscribe')"
:if-label="__('Subscribe if...')"
:always-label="__('forms-pro::messages.always_subscribe')"
:if-label="__('forms-pro::messages.subscribe_if')"
@update:model-value="$emit('update:modelValue', $event)"
>
<template #header="{ item: subscription, collapsed }">
<Badge size="lg" pill color="white" class="px-3 text-gray-950 gap-1">
<Icon name="forms-pro::kit" class="size-3.5 me-1" />
{{ kitFormName(subscription) ?? __('Subscription') }}
{{ kitFormName(subscription) ?? __('forms-pro::messages.subscription') }}
</Badge>
<ConnectionSummary v-show="collapsed" :conditions="subscription.conditions" />
</template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const envVariables = `FORMS_PRO_KIT_API_KEY=kit_your-key`;
icon="external-link"
:href="developerSettingsUrl"
target="_blank"
:text="__('Add an API Key')"
:text="__('forms-pro::messages.kit_setup_key_button')"
/>
</div>
</li>
Expand Down
12 changes: 6 additions & 6 deletions resources/js/components/connections/MailchimpConnector.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const audienceName = (subscription: { list?: string }): string => {
<Description :text="__(apiError)" class="mt-1" />
</Alert>

<Label :text="__('Subscriptions')" class="mb-2" />
<Label :text="__('forms-pro::messages.subscriptions')" class="mb-2" />

<ConnectionList
:model-value="modelValue"
Expand All @@ -37,18 +37,18 @@ const audienceName = (subscription: { list?: string }): string => {
:blueprint
:meta
name="mailchimp-connection"
:add-label="__('Add Subscription')"
:add-label="__('forms-pro::messages.add_subscription')"
:description="__('forms-pro::messages.mailchimp_instructions')"
:delete-heading="__('Delete Mailchimp Subscription')"
:delete-heading="__('forms-pro::messages.mailchimp_delete_subscription')"
:delete-description="__('forms-pro::messages.mailchimp_delete_confirmation')"
:always-label="__('Always subscribe')"
:if-label="__('Subscribe if...')"
:always-label="__('forms-pro::messages.always_subscribe')"
:if-label="__('forms-pro::messages.subscribe_if')"
@update:model-value="$emit('update:modelValue', $event)"
>
<template #header="{ item: subscription, collapsed }">
<Badge size="lg" pill color="white" class="px-3 text-gray-950 gap-1">
<Icon name="forms-pro::mailchimp" class="size-3.5 me-1" />
{{ audienceName(subscription) ?? __('New Subscription') }}
{{ audienceName(subscription) ?? __('forms-pro::messages.new_subscription') }}
</Badge>
<ConnectionSummary v-show="collapsed" :conditions="subscription.conditions" />
</template>
Expand Down
12 changes: 6 additions & 6 deletions resources/js/components/connections/MailcoachConnector.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const listName = (subscription: { list?: string }): string => {
<Description :text="__(apiError)" class="mt-1" />
</Alert>

<Label :text="__('Subscriptions')" class="mb-2" />
<Label :text="__('forms-pro::messages.subscriptions')" class="mb-2" />

<ConnectionList
:model-value="modelValue"
Expand All @@ -37,18 +37,18 @@ const listName = (subscription: { list?: string }): string => {
:blueprint
:meta
name="mailcoach-connection"
:add-label="__('Add Subscription')"
:add-label="__('forms-pro::messages.add_subscription')"
:description="__('forms-pro::messages.mailcoach_instructions')"
:delete-heading="__('Delete Mailcoach Subscription')"
:delete-heading="__('forms-pro::messages.mailcoach_delete_subscription')"
:delete-description="__('forms-pro::messages.mailcoach_delete_confirmation')"
:always-label="__('Always subscribe')"
:if-label="__('Subscribe if...')"
:always-label="__('forms-pro::messages.always_subscribe')"
:if-label="__('forms-pro::messages.subscribe_if')"
@update:model-value="$emit('update:modelValue', $event)"
>
<template #header="{ item: subscription, collapsed }">
<Badge size="lg" pill color="white" class="px-3 text-gray-950 gap-1">
<Icon name="forms-pro::mailcoach" class="size-3.5 me-1" />
{{ listName(subscription) ?? __('New Subscription') }}
{{ listName(subscription) ?? __('forms-pro::messages.new_subscription') }}
</Badge>
<ConnectionSummary v-show="collapsed" :conditions="subscription.conditions" />
</template>
Expand Down
8 changes: 4 additions & 4 deletions resources/js/components/connections/SlackConnector.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const channelName = (notification: { channel?: string }): string => {
<Description :text="__(apiError)" class="mt-1" />
</Alert>

<Label :text="__('Notifications')" class="mb-2" />
<Label :text="__('forms-pro::messages.notifications')" class="mb-2" />

<ConnectionList
:model-value="modelValue"
Expand All @@ -37,9 +37,9 @@ const channelName = (notification: { channel?: string }): string => {
:blueprint
:meta
name="slack-connection"
:add-label="__('Add Notification')"
:add-label="__('forms-pro::messages.add_notification')"
:description="__('forms-pro::messages.slack_instructions')"
:delete-heading="__('Delete Slack Notification')"
:delete-heading="__('forms-pro::messages.slack_delete_notification')"
:delete-description="__('forms-pro::messages.slack_delete_confirmation')"
:always-label="__('Always send')"
:if-label="__('Send if...')"
Expand All @@ -48,7 +48,7 @@ const channelName = (notification: { channel?: string }): string => {
<template #header="{ item: notification, collapsed }">
<Badge size="lg" pill color="white" class="px-3 text-gray-950 gap-1">
<Icon name="forms-pro::slack" class="size-3.5 me-1" />
{{ channelName(notification) ?? __('New Notification') }}
{{ channelName(notification) ?? __('forms-pro::messages.new_notification') }}
</Badge>
<ConnectionSummary
v-show="collapsed"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const createAppUrl = `https://api.slack.com/apps?new_app=1&manifest_json=${encod
icon="external-link"
:href="createAppUrl"
target="_blank"
:text="__('Create Slack app')"
:text="__('forms-pro::messages.slack_setup_create_app_button')"
/>

<details class="group">
Expand Down
8 changes: 4 additions & 4 deletions resources/js/components/connections/TwilioConnector.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const recipientLabel = (notification: { to?: string }): string => {
<Description :text="__('forms-pro::messages.twilio_no_senders')" />
</Alert>

<Label :text="__('Notifications')" class="mb-2" />
<Label :text="__('forms-pro::messages.notifications')" class="mb-2" />

<ConnectionList
:model-value="modelValue"
Expand All @@ -44,16 +44,16 @@ const recipientLabel = (notification: { to?: string }): string => {
:blueprint
:meta
name="twilio-connection"
:add-label="__('Add Notification')"
:add-label="__('forms-pro::messages.add_notification')"
:description="__('forms-pro::messages.twilio_instructions')"
:delete-heading="__('Delete Twilio Notification')"
:delete-heading="__('forms-pro::messages.twilio_delete_notification')"
:delete-description="__('forms-pro::messages.twilio_delete_confirmation')"
@update:model-value="$emit('update:modelValue', $event)"
>
<template #header="{ item: notification, collapsed }">
<Badge size="lg" pill color="white" class="px-3 text-gray-950 gap-1">
<Icon name="forms-pro::twilio" class="size-3.5 me-1" />
{{ recipientLabel(notification) ?? __('New Notification') }}
{{ recipientLabel(notification) ?? __('forms-pro::messages.new_notification') }}
</Badge>
<ConnectionSummary
v-show="collapsed"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ FORMS_PRO_TWILIO_API_SECRET=your-key-secret`;
icon="external-link"
:href="phoneNumbersUrl"
target="_blank"
:text="__('Buy a number')"
:text="__('forms-pro::messages.twilio_setup_number_button')"
/>
</div>
</li>
Expand All @@ -51,7 +51,7 @@ FORMS_PRO_TWILIO_API_SECRET=your-key-secret`;
icon="external-link"
:href="apiKeysUrl"
target="_blank"
:text="__('Create an API key')"
:text="__('forms-pro::messages.twilio_setup_key_button')"
/>
</div>
</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ watch(hubspotForm, () => save(mapping.value));
<table v-else class="grid-table">
<thead>
<tr>
<th scope="col" width="50%" class="text-start">{{ __('Subscription') }}</th>
<th scope="col" width="50%" class="text-start">{{ __('Form Field') }}</th>
<th scope="col" width="50%" class="text-start">{{ __('forms-pro::messages.subscription') }}</th>
<th scope="col" width="50%" class="text-start">{{ __('forms-pro::messages.form_field') }}</th>
</tr>
</thead>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ watch(hubspotForm, () => save(mapping.value));
<table v-else class="grid-table">
<thead>
<tr>
<th scope="col" width="50%" class="text-start">{{ __('HubSpot Field') }}</th>
<th scope="col" width="50%" class="text-start">{{ __('Form Field') }}</th>
<th scope="col" width="50%" class="text-start">{{ __('forms-pro::messages.hubspot_property') }}</th>
<th scope="col" width="50%" class="text-start">{{ __('forms-pro::messages.form_field') }}</th>
</tr>
</thead>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,10 @@ watch(list, fetchPermissions, { immediate: true });
<table v-else-if="state === 'ok'" class="grid-table">
<thead>
<tr>
<th scope="col" width="50%" class="text-start">{{ __('Permission') }}</th>
<th scope="col" width="50%" class="text-start">{{ __('Form Field') }}</th>
<th scope="col" width="50%" class="text-start">
{{ __('forms-pro::messages.mailchimp_marketing_permission') }}
</th>
<th scope="col" width="50%" class="text-start">{{ __('forms-pro::messages.form_field') }}</th>
</tr>
</thead>

Expand Down
2 changes: 1 addition & 1 deletion resources/js/pages/automagic-forms/Index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ const submit = () => {
}

if (status === 429) {
Statamic.$toast.error(__('Too many attempts. Please wait a moment and try again.'));
Statamic.$toast.error(__('forms-pro::messages.automagic_form_too_many_attempts'));
return;
}

Expand Down
8 changes: 4 additions & 4 deletions src/FormConnectors/GoogleSheets.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ public function blueprint(): \Statamic\Fields\Blueprint
'handle' => 'spreadsheet',
'field' => [
'type' => 'text',
'display' => __('Spreadsheet'),
'display' => __('forms-pro::messages.google_sheets_spreadsheet'),
'instructions' => __('forms-pro::messages.google_sheets_spreadsheet_instructions'),
'placeholder' => 'https://docs.google.com/spreadsheets/d/…',
'validate' => ['required'],
Expand All @@ -170,7 +170,7 @@ public function blueprint(): \Statamic\Fields\Blueprint
'handle' => 'tab',
'field' => [
'type' => 'google_sheets_tabs',
'display' => __('Tab'),
'display' => __('forms-pro::messages.google_sheets_tab'),
'instructions' => __('forms-pro::messages.google_sheets_tab_instructions'),
'url' => cp_route('forms.connect.google_sheets.tabs', $this->form()->handle()),
'validate' => ['required'],
Expand Down Expand Up @@ -205,8 +205,8 @@ public static function columns(Form $form): array
public static function metaColumns(): array
{
return [
'submitted_at' => __('Submitted At'),
'submission_id' => __('Submission ID'),
'submitted_at' => __('forms-pro::messages.google_sheets_submitted_at'),
'submission_id' => __('forms-pro::messages.google_sheets_submission_id'),
];
}

Expand Down
Loading
Loading