Skip to content

Commit

Permalink
Merge branch 'bucket/plugin-consolidation' of github.com:the-events-c…
Browse files Browse the repository at this point in the history
…alendar/tribe-common into fix/EVA-163-Change-Tooltip-Text

# Conflicts:
#	src/admin-views/dashboard/components/missing-dependency.php
#	src/admin-views/zapier/dashboard/components/missing-dependency.php
  • Loading branch information
pattihis committed Jun 24, 2024
2 parents e5ee452 + d217669 commit 6902af1
Show file tree
Hide file tree
Showing 37 changed files with 148 additions and 148 deletions.
2 changes: 1 addition & 1 deletion src/admin-views/components/integration/add-connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/

$add_link = $url->to_add_connection_link();
$connect_label = _x( 'Add Connection', 'Label to add an integration connection fields.', 'event-automator' );
$connect_label = _x( 'Add Connection', 'Label to add an integration connection fields.', 'tribe-common' );

$classes = [
'button' => true,
Expand Down
6 changes: 3 additions & 3 deletions src/admin-views/components/integration/create-button.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@
*/

$add_link = $url->to_create_access_link( $consumer_id );
$add_label = _x( 'Create', 'Create a integration connection access token or consumer secret.', 'event-automator' );
$add_label = _x( 'Create', 'Create a integration connection access token or consumer secret.', 'tribe-common' );
?>
<button
class="tec-automator-settings-details-action__generate button-primary"
type="button"
data-ajax-generate-url="<?php echo $add_link; ?>"
data-generate-error="<?php echo _x( 'Description or User missing. Please add a description and select a user before create the access information.', 'An error message that the description or user is missing when creating access information for an integration connection. ', 'event-automator'); ?>"
data-generate-error="<?php echo _x( 'Description or User missing. Please add a description and select a user before create the access information.', 'An error message that the description or user is missing when creating access information for an integration connection. ', 'tribe-common'); ?>"
>
<span>
<?php echo esc_html( $add_label ); ?>
</span>
</button>
</button>
4 changes: 2 additions & 2 deletions src/admin-views/components/integration/delete-button.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*/

$revoke_link = $url->to_delete_connection_link( $consumer_id );
$revoke_label = _x( 'Delete', 'Removes a connection from the list of integration connections.', 'event-automator' )
$revoke_label = _x( 'Delete', 'Removes a connection from the list of integration connections.', 'tribe-common' )
?>
<div class="tec-automator-grid-item tec-automator-settings-details-action__delete-wrap">
<button
Expand All @@ -30,4 +30,4 @@ class="tec-automator-settings-details-action__revoke"
>
<?php echo esc_html( $revoke_label ); ?>
</button>
</div>
</div>
2 changes: 1 addition & 1 deletion src/admin-views/dashboard/components/clear-button.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
}

$clear_link = $url->to_clear_endpoint_queue( $endpoint['id'] );
$clear_label = _x( 'Clear Queue', 'Clears a integration endpoint queue.', 'event-automator' )
$clear_label = _x( 'Clear Queue', 'Clears a integration endpoint queue.', 'tribe-common' )
?>
<div class="tec-settings-connection-endpoint-dashboard-details-actions__clear-wrap ">
<button
Expand Down
10 changes: 5 additions & 5 deletions src/admin-views/dashboard/components/missing-dependency.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,26 +25,26 @@

switch ( $endpoint['dependents'][0] ) {
case 'tec':
$dependency = '<a href="https://wordpress.org/plugins/the-events-calendar/">' . _x( 'The Events Calendar', 'Name of missing dependency for Endpoint.', 'event-automator' ) . '</a>';
$dependency = '<a href="https://wordpress.org/plugins/the-events-calendar/">' . _x( 'The Events Calendar', 'Name of missing dependency for Endpoint.', 'tribe-common' ) . '</a>';
break;
case 'et':
$dependency = '<a href="https://wordpress.org/plugins/event-tickets/">' . _x( 'Event Tickets', 'Name of missing dependency for Endpoint.', 'event-automator' ) . '</a>';
$dependency = '<a href="https://wordpress.org/plugins/event-tickets/">' . _x( 'Event Tickets', 'Name of missing dependency for Endpoint.', 'tribe-common' ) . '</a>';
break;
}

$tooltip = [
'classes_wrap' => [ 'tec-settings-connection-endpoint-dashboard-details__tooltip' ],
'message' => sprintf(
'%1s %2s %3s',
_x( 'Missing ', 'Missing dependency message in the settings.', 'event-automator' ),
_x( 'Missing ', 'Missing dependency message in the settings.', 'tribe-common' ),
$dependency,
_x( ' plugin.', 'Missing dependency message in the settings.', 'event-automator' )
_x( ' plugin.', 'Missing dependency message in the settings.', 'tribe-common' )
),
];
?>
<div class="tec-settings-connection-endpoint-dashboard-details-actions__missing-dependency-wrap">
<?php
echo esc_html_x( 'Endpoint Disabled', 'Missing dependency label in the settings.', 'event-automator' );
echo esc_html_x( 'Endpoint Disabled', 'Missing dependency label in the settings.', 'tribe-common' );
$this->template( 'components/tooltip', $tooltip );
?>
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/admin-views/dashboard/components/status-button.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@
}

$link = $url->to_enable_endpoint_queue( $endpoint['id'] );
$label = _x( 'Enable', 'Enables a integration endpoint.', 'event-automator' );
$label = _x( 'Enable', 'Enables a integration endpoint.', 'tribe-common' );
$confirmation = $manager->get_confirmation_to_enable_endpoint();
$type = 'enable';
if ( $endpoint['enabled'] ) {
$link = $url->to_disable_endpoint_queue( $endpoint['id'] );
$label = _x( 'Disable', 'Disables a integration endpoint queue.', 'event-automator' );
$label = _x( 'Disable', 'Disables a integration endpoint queue.', 'tribe-common' );
$confirmation = $manager->get_confirmation_to_disable_endpoint( $endpoint['type'] );
$type = 'disable';
}
Expand Down
20 changes: 10 additions & 10 deletions src/admin-views/dashboard/endpoints/endpoint.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
'components/read-only',
[
'classes_wrap' => [ 'tec-automator-grid-item', 'tec-settings-connection-endpoint-dashboard-details__name-wrap', ! $endpoint['enabled'] || $endpoint['missing_dependency'] ? 'disabled' : '' ],
'label' => _x( 'Name', 'Label for the integration endpoint dashboard endpoint name.', 'event-automator' ),
'screen_reader' => _x( 'The name for the integration endpoint.', 'The screen reader text of the label for the integration endpoint Dashboard endpoint name.', 'event-automator' ),
'label' => _x( 'Name', 'Label for the integration endpoint dashboard endpoint name.', 'tribe-common' ),
'screen_reader' => _x( 'The name for the integration endpoint.', 'The screen reader text of the label for the integration endpoint Dashboard endpoint name.', 'tribe-common' ),
'id' => 'tec_automator_integration_endpoint_name_' . $endpoint['id'],
'name' => "tec_automator_integration[]['endpoint_name']",
'value' => $endpoint['display_name'],
Expand All @@ -35,14 +35,14 @@
?>
<?php
$last_access_classes = [ 'tec-automator-grid-item', 'tec-settings-connection-endpoint-dashboard-details__last-access-wrap' ];
$last_access_label = _x( 'Last Access', 'Label for the integration endpoint Dashboards endpoint last access.', 'event-automator' );
$last_access_label = _x( 'Last Access', 'Label for the integration endpoint Dashboards endpoint last access.', 'tribe-common' );
if ( $endpoint['enabled'] && ! $endpoint['missing_dependency'] ) {
$this->template(
'components/read-only',
[
'classes_wrap' => $last_access_classes,
'label' => $last_access_label,
'screen_reader' => _x( 'The last access for the integration endpoint.', 'The screen reader text of the label for the integration endpoint Dashboard endpoint last access.', 'event-automator' ),
'screen_reader' => _x( 'The last access for the integration endpoint.', 'The screen reader text of the label for the integration endpoint Dashboard endpoint last access.', 'tribe-common' ),
'id' => 'tec_automator_integration_endpoint_last_access_' . $endpoint['id'],
'name' => "tec_automator_integration[]['endpoint_last_access']",
'value' => str_replace( '|', ' - ', $endpoint['last_access'] ),
Expand All @@ -54,17 +54,17 @@
[
'classes_wrap' => $last_access_classes,
'label' => $last_access_label,
'screen_reader' => _x( 'The last access is disabled as this endpoint is disabled.', 'The screen reader text of the label for the integration endpoint Dashboard endpoint last access when disabled.', 'event-automator' ),
'screen_reader' => _x( 'The last access is disabled as this endpoint is disabled.', 'The screen reader text of the label for the integration endpoint Dashboard endpoint last access when disabled.', 'tribe-common' ),
]
);
}
?>
<?php
$queue_classes = [ 'tec-automator-grid-item', 'tec-settings-connection-endpoint-dashboard-details__queue-wrap' ];
$queue_label = _x( 'Queue', 'Label for the integration endpoint Dashboards endpoint queue.', 'event-automator' );
$queue_status = _x( 'none', 'Label for the integration endpoint Dashboards endpoint queue status.', 'event-automator' );
$queue_label = _x( 'Queue', 'Label for the integration endpoint Dashboards endpoint queue.', 'tribe-common' );
$queue_status = _x( 'none', 'Label for the integration endpoint Dashboards endpoint queue status.', 'tribe-common' );
if ( $endpoint['count'] > 0 ) {
$queue_status = _x( 'ready', 'Label for the integration endpoint Dashboards endpoint queue status.', 'event-automator' );
$queue_status = _x( 'ready', 'Label for the integration endpoint Dashboards endpoint queue status.', 'tribe-common' );
}
if ( $manager::$api_id === 'power-automate' ) {
$queue_status = $endpoint['count'];
Expand All @@ -76,7 +76,7 @@
[
'classes_wrap' => $queue_classes,
'label' => $queue_label,
'screen_reader' => _x( 'The Queue for the integration endpoint.', 'The screen reader text of the label for the integration endpoint Dashboard endpoint queue.', 'event-automator' ),
'screen_reader' => _x( 'The Queue for the integration endpoint.', 'The screen reader text of the label for the integration endpoint Dashboard endpoint queue.', 'tribe-common' ),
'id' => 'tec_automator_integration_endpoint_queue_' . $endpoint['id'],
'name' => "tec_automator_integration[]['endpoint_queue']",
'value' => $queue_status,
Expand All @@ -88,7 +88,7 @@
[
'classes_wrap' => $queue_classes,
'label' => $queue_label,
'screen_reader' => _x( 'The Queue is disabled for this endpoint.', 'The screen reader text of the label for the integration endpoint Dashboard endpoint queue when disabled.', 'event-automator' ),
'screen_reader' => _x( 'The Queue is disabled for this endpoint.', 'The screen reader text of the label for the integration endpoint Dashboard endpoint queue when disabled.', 'tribe-common' ),
]
);
}
Expand Down
10 changes: 5 additions & 5 deletions src/admin-views/dashboard/endpoints/list-header.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@
?>
<div class="tec-automator-settings-details__container tec-settings-connection-endpoint-dashboard-details__container tec-settings-connection-endpoint-dashboard-details__container-header tec-automator-grid tec-automator-endpoint-dashboard-grid tec-automator-grid-header">
<div class="tec-automator-grid-item tec-automator-settings-details__row tec-settings-connection-endpoint-dashboard-details__name-wrap">
<?php echo esc_html_x( 'Name', 'Name header label for the settings listing of the integration endpoints.', 'event-automator' ) ?>
<?php echo esc_html_x( 'Name', 'Name header label for the settings listing of the integration endpoints.', 'tribe-common' ) ?>
</div>
<div class="tec-automator-grid-item tec-settings-connection-endpoint-dashboard-details__last-access-wrap">
<?php echo esc_html_x( 'Last Access', 'Last Access header label for the settings listing of the integration endpoints.', 'event-automator' ) ?>
<?php echo esc_html_x( 'Last Access', 'Last Access header label for the settings listing of the integration endpoints.', 'tribe-common' ) ?>
</div>
<div class="tec-automator-grid-item tec-settings-connection-endpoint-dashboard-details__queue-wrap">
<?php echo esc_html_x( 'Queue', 'Last Access header label for the settings listing of the integration endpoints.', 'event-automator' ) ?>
<?php echo esc_html_x( 'Queue', 'Last Access header label for the settings listing of the integration endpoints.', 'tribe-common' ) ?>
</div>
<div class="tec-automator-grid-item tec-settings-connection-endpoint-dashboard-details__actions-wrap tec-common-integration-endpoint-details__actions-wrap">
<?php echo esc_html_x( 'Actions', 'Actions header label for the settings listing of the integration endpoints.', 'event-automator' ) ?>
<?php echo esc_html_x( 'Actions', 'Actions header label for the settings listing of the integration endpoints.', 'tribe-common' ) ?>
</div>
</div>
</div>
4 changes: 2 additions & 2 deletions src/admin-views/dashboard/table.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*/
?>
<fieldset id="tec-field-integration_token" class="tec-automator-endpoint-dashboard tribe-field tribe-field-text tribe-size-medium">
<legend class="tribe-field-label"><?php echo esc_html_x( 'Endpoint Dashboard', 'The legend for the integration endpoint dashboard.','event-automator' ); ?></legend>
<legend class="tribe-field-label"><?php echo esc_html_x( 'Endpoint Dashboard', 'The legend for the integration endpoint dashboard.','tribe-common' ); ?></legend>
<?php if ( $manager::$api_id === 'zapier' ) { ?>
<p class="tec-settings-zapier-application__description">
<?php
Expand All @@ -28,7 +28,7 @@
esc_html_x(
'The Zapier queue is currently limited to 15 items for each endpoint on your site. To increase that limit, check out the %1$sIncreasing the Zapier Queue Limit knowledgebase article%2$s.',
'The Zapier endpoint dashboard description.',
'event-automator'
'tribe-common'
),
'<a href="https://evnt.is/1bda" target="_blank">',
'</a>',
Expand Down
8 changes: 4 additions & 4 deletions src/admin-views/power-automate/api/components/access.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
* @var Url $url An instance of the URL handler.
*/
$message_classes = [ 'tec-settings-power-automate-details-api-key__message-wrap' ];
$message_title = _x( 'API Authentication Details', 'Label for the consumer id and secret section.', 'event-automator' );
$message = esc_html_x( 'Please copy the consumer id and secret below. Once you leave the page they will no longer be available.', 'Consumer id and secret only show once help text for Power Automate API.', 'event-automator' );
$message_title = _x( 'API Authentication Details', 'Label for the consumer id and secret section.', 'tribe-common' );
$message = esc_html_x( 'Please copy the consumer id and secret below. Once you leave the page they will no longer be available.', 'Consumer id and secret only show once help text for Power Automate API.', 'tribe-common' );
?>
<div class="tec-automator-grid-full-width">
<div class="tec-automator-api-key__wrap">
Expand All @@ -35,12 +35,12 @@
<?php
$this->template( 'power-automate/api/components/token', [
'classes_wrap' => [ 'tec-settings-power-automate-connection-details__access-token-wrap' ],
'label' => _x( 'Access Token', 'Label for the access token connection for Power Automate.', 'event-automator' ),
'label' => _x( 'Access Token', 'Label for the access token connection for Power Automate.', 'tribe-common' ),
'screen_reader' => '',
'id' => "tec_automator_power_automate_access_token_" . $consumer_id,
'name' => "tec_automator_power_automate[]['access_token']",
'value' => $api_key['access_token'],
] );
?>
</div>
</div>
</div>
4 changes: 2 additions & 2 deletions src/admin-views/power-automate/api/components/token.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
</div>
<div class="ec-automator-settings__copy-btn-wrap">
<button class="tec-automator-settings__copy-btn" data-clipboard-text="<?php echo trim( esc_html( $value ) ); ?>" >
<span class="dashicons dashicons-admin-page"></span> <span class="tec-automator-settings__copy-btn-text"><?php echo esc_attr_x( 'Copy', 'Button text for copying the acess_token.', 'event-automator' ); ?></span>
<span class="dashicons dashicons-admin-page"></span> <span class="tec-automator-settings__copy-btn-text"><?php echo esc_attr_x( 'Copy', 'Button text for copying the acess_token.', 'tribe-common' ); ?></span>
</button>
</div>
</fieldset>
</div>
</div>
2 changes: 1 addition & 1 deletion src/admin-views/power-automate/api/connections.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
$keys = $api->get_list_of_api_keys( true );
?>
<fieldset id="tec-field-power_automate_token" class="tec-automator-api-fields tribe-field tribe-field-text tribe-size-medium">
<legend class="tribe-field-label"><?php esc_html_e( 'API Keys', 'event-automator' ); ?></legend>
<legend class="tribe-field-label"><?php esc_html_e( 'API Keys', 'tribe-common' ); ?></legend>
<div class="tec-automator-settings-message__wrap tec-power-automate-api-keys-messages">
<?php
$this->template( 'components/message', [
Expand Down
8 changes: 4 additions & 4 deletions src/admin-views/power-automate/api/intro-text.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<?php $this->template( '/components/loader' ); ?>

<h3 id="tec-power-automate-application-credentials" class="tec-settings-power-automate-application__title">
<?php echo esc_html_x( 'Power Automate', 'API connection header', 'event-automator' ); ?>
<?php echo esc_html_x( 'Power Automate', 'API connection header', 'tribe-common' ); ?>
</h3>
<p class="tec-settings-power-automate-application__description">
<?php
Expand All @@ -30,7 +30,7 @@
esc_html_x(
'Please generate a connection for each of our applications you are using with Power Automate to enable its integrations. i.e.: one connection for The Events Calendar and one connection for Event Tickets.',
'Settings help text for Power Automate API.',
'event-automator'
'tribe-common'
),
);
?>
Expand All @@ -44,8 +44,8 @@
esc_html_x(
'Read more about adding and managing access.',
'Settings link text for Power Automate API.',
'event-automator'
'tribe-common'
)
);
?>
</p>
</p>
12 changes: 6 additions & 6 deletions src/admin-views/power-automate/api/list/connection-new.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ class="tec-automator-grid tec-automator-grid-row tec-automator-settings-details_
'classes_wrap' => [ 'tec-automator-grid-item', 'tec-settings-power-automate-details-api-key__name-wrap' ],
'classes_label' => [ 'screen-reader-text', 'tec-settings-power-automate-details-api-key__name-label' ],
'classes_input' => [ 'tec-automator-settings-details__input', 'tec-automator-settings-details__name-input', 'tec-settings-power-automate-details-api-key__name-input' ],
'label' => _x( 'Description', 'Label for the name of the API Key for Power Automate.', 'event-automator' ),
'label' => _x( 'Description', 'Label for the name of the API Key for Power Automate.', 'tribe-common' ),
'id' => "tec_automator_power_automate_name_" . $consumer_id,
'name' => "tec_automator_power_automate[]['name']",
'placeholder' => _x( 'Enter an API Key description', 'The placeholder for the Power Automate API Key name.', 'event-automator' ),
'screen_reader' => _x( 'Enter an API Key description.', 'The screen reader text of the label for the Power Automate API Key name.', 'event-automator' ),
'placeholder' => _x( 'Enter an API Key description', 'The placeholder for the Power Automate API Key name.', 'tribe-common' ),
'screen_reader' => _x( 'Enter an API Key description.', 'The screen reader text of the label for the Power Automate API Key name.', 'tribe-common' ),
'value' => $connection_data['name'],
'attrs' => [],
] );
Expand All @@ -46,8 +46,8 @@ class="tec-automator-grid tec-automator-grid-row tec-automator-settings-details_
<?php
$this->template( 'components/read-only', [
'classes_wrap' => [ 'tec-automator-grid-item', 'tec-settings-power-automate-details-api-key__permissions-wrap' ],
'label' => _x( 'Permissions', 'Label for the permissions of the API Key for Power Automate.', 'event-automator' ),
'screen_reader' => _x( 'The permissions for the Power Automate API Key.', 'The screen reader text of the label for the Power Automate API Key permissions.', 'event-automator' ),
'label' => _x( 'Permissions', 'Label for the permissions of the API Key for Power Automate.', 'tribe-common' ),
'screen_reader' => _x( 'The permissions for the Power Automate API Key.', 'The screen reader text of the label for the Power Automate API Key permissions.', 'tribe-common' ),
'id' => "tec_automator_power_automate_permissions_" . $consumer_id,
'name' => "tec_automator_power_automate[]['permissions']",
'value' => 'Read',
Expand All @@ -64,4 +64,4 @@ class="tec-automator-grid tec-automator-grid-row tec-automator-settings-details_
] );
} ?>
</div>
</div>
</div>
Loading

0 comments on commit 6902af1

Please sign in to comment.