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 all translate-able text issues #648

Merged
merged 1 commit into from
Mar 29, 2019
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
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"scripts": {
"compat": "\"vendor/bin/phpcs\" --standard=phpcs-compat-ruleset.xml .",
"phpcs": "\"vendor/bin/phpcs\"",
"phpcs-i18n": "\"vendor/bin/phpcs\" --sniffs=WordPress.WP.I18n ./lib/",
"phpcs-tests": "\"vendor/bin/phpcs\" --standard=phpcs-test-ruleset.xml -s ./tests/",
"phpcbf": "\"vendor/bin/phpcbf\"",
"phpcbf-tests": "\"vendor/bin/phpcbf\" --standard=phpcs-test-ruleset.xml -s ./tests/",
Expand Down
2 changes: 1 addition & 1 deletion lib/WP_Auth0_Amplificator.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php

// phpcs:ignoreFile
/**
* Class WP_Auth0_Amplificator
*
Expand Down
1 change: 1 addition & 0 deletions lib/WP_Auth0_Api_Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,7 @@ public static function create_client_grant( $app_token, $client_id ) {
WP_Auth0_ErrorManager::insert_auth0_error(
__METHOD__,
sprintf(
// translators: placeholders are machine names stored for this WP instance and must be included.
__( 'A client grant for %1$s to %2$s already exists. Make sure this grant at least includes %3$s.', 'wp-auth0' ),
self::get_connect_info( 'client_id' ),
self::get_connect_info( 'audience' ),
Expand Down
2 changes: 1 addition & 1 deletion lib/WP_Auth0_Configure_JWTAUTH.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php

// phpcs:ignoreFile
/**
* Class WP_Auth0_Configure_JWTAUTH
*
Expand Down
3 changes: 3 additions & 0 deletions lib/WP_Auth0_CustomDBLib.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php
// phpcs:ignoreFile
/**
* Contains class WP_Auth0_CustomDBLib
*
Expand All @@ -10,6 +11,8 @@
/**
* Class WP_Auth0_CustomDBLib
*
* @deprecated - 3.9.0, moved to separate files in lib/scripts-js.
*
* @codeCoverageIgnore - Deprecated.
*/
class WP_Auth0_CustomDBLib {
Expand Down
1 change: 1 addition & 0 deletions lib/WP_Auth0_DBManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ public function notice_failed_client_grant() {
<p>
<?php
printf(
// translators: Placeholder is the plugin version.
__( 'WP-Auth0 has upgraded to %s but could not complete the upgrade in your Auth0 dashboard.', 'wp-auth0' ),
WPA0_VERSION
);
Expand Down
4 changes: 2 additions & 2 deletions lib/WP_Auth0_Embed_Widget.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ class WP_Auth0_Embed_Widget extends WP_Widget {
function __construct() {
parent::__construct(
$this->getWidgetId(),
__( $this->getWidgetName(), 'wp_auth0_widget_domain' ),
array( 'description' => __( $this->getWidgetDescription(), 'wpb_widget_domain' ) )
$this->getWidgetName(),
array( 'description' => $this->getWidgetDescription() )
);
}

Expand Down
2 changes: 1 addition & 1 deletion lib/WP_Auth0_Lock_Options.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php

// phpcs:ignoreFile
/**
* Class WP_Auth0_Lock_Options.
*
Expand Down
1 change: 1 addition & 0 deletions lib/WP_Auth0_Metrics.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php
// phpcs:ignoreFile
/**
* @deprecated - 3.8.0, not used and no replacement provided.
*
Expand Down
1 change: 1 addition & 0 deletions lib/WP_Auth0_Referer_Check.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php
// phpcs:ignoreFile
/**
* @deprecated - 3.8.0, not used and no replacement provided.
*
Expand Down
2 changes: 1 addition & 1 deletion lib/WP_Auth0_SocialAmplification_Widget.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php

// phpcs:ignoreFile
/**
* Class WP_Auth0_SocialAmplification_Widget
*
Expand Down
1 change: 1 addition & 0 deletions lib/admin/WP_Auth0_Admin_Advanced.php
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@ public function render_connections( $args = array() ) {
__( 'If this is empty, all enabled connections for this Application will be shown. ', 'wp-auth0' ) .
__( 'Separate multiple connection names with a comma. ', 'wp-auth0' ) .
sprintf(
// translators: HTML link to the Auth0 dashboard.
__( 'Connections listed here must already be active in your %s', 'wp-auth0' ),
$this->get_dashboard_link( 'connections/social' )
) .
Expand Down
4 changes: 2 additions & 2 deletions lib/admin/WP_Auth0_Admin_Basic.php
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ public function render_client_signing_algorithm( $args = array() ) {
$curr_value
);
$this->render_field_description(
__( 'This value can be found the Application settings in the ' ) .
__( 'This value can be found the Application settings in the ', 'wp-auth0' ) .
$this->get_dashboard_link( 'applications' ) .
__( ' under Show Advanced Settings > OAuth > "JsonWebToken Signature Algorithm"', 'wp-auth0' )
);
Expand Down Expand Up @@ -333,7 +333,7 @@ public function render_allow_signup() {
$this->render_field_description(
__( 'Signups are currently ', 'wp-auth0' ) . '<b>' .
( $allow_signup ? __( 'enabled', 'wp-auth0' ) : __( 'disabled', 'wp-auth0' ) ) .
'</b>' . __( ' by this setting ' ) . $settings_text
'</b>' . __( ' by this setting ', 'wp-auth0' ) . $settings_text
);
}

Expand Down
2 changes: 1 addition & 1 deletion lib/admin/WP_Auth0_Admin_Dashboard.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php

// phpcs:ignoreFile
/**
* Class WP_Auth0_Admin_Dashboard
*
Expand Down
1 change: 1 addition & 0 deletions lib/admin/WP_Auth0_Admin_Features.php
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ public function render_auto_login_method( $args = array() ) {
$this->render_field_description(
__( 'Enter a name here to automatically use a single, specific connection to login . ', 'wp-auth0' ) .
sprintf(
// translators: Placeholder is an HTML link to the Auth0 dashboard.
__( 'Find the method name to use under Connections > [Connection Type] in your %s. ', 'wp-auth0' ),
$this->get_dashboard_link()
) .
Expand Down
1 change: 1 addition & 0 deletions lib/dashboard-widgets/WP_Auth0_Dashboard_Plugins_Age.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php
// phpcs:ignoreFile
/**
* Class WP_Auth0_Dashboard_Plugins_Age
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php
// phpcs:ignoreFile
/**
* Class WP_Auth0_Dashboard_Plugins_Gender
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php
// phpcs:ignoreFile
/**
* Class WP_Auth0_Dashboard_Plugins_Generic
*
Expand Down
1 change: 1 addition & 0 deletions lib/dashboard-widgets/WP_Auth0_Dashboard_Plugins_IdP.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php
// phpcs:ignoreFile
/**
* Class WP_Auth0_Dashboard_Plugins_IdP
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php
// phpcs:ignoreFile
/**
* Class WP_Auth0_Dashboard_Plugins_Income
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php
// phpcs:ignoreFile
/**
* Class WP_Auth0_Dashboard_Plugins_Location
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php
// phpcs:ignoreFile
/**
* Class WP_Auth0_Dashboard_Plugins_Signups
*
Expand Down
1 change: 1 addition & 0 deletions lib/dashboard-widgets/WP_Auth0_Dashboard_Widgets.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php
// phpcs:ignoreFile
/**
* Class WP_Auth0_Dashboard_Widgets
*
Expand Down
13 changes: 7 additions & 6 deletions lib/initial-setup/WP_Auth0_InitialSetup.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,30 +143,31 @@ public function cant_create_client_grant_message() {
<?php echo __( 'There was an error creating the necessary client grants. ', 'wp-auth0' ); ?>
<?php
echo __(
'Go to your Auth0 dashboard > APIs > Auth0 Management API > Non-Interactive Clients'
. ' tab and authorize the client for this site. ',
'Go to your Auth0 dashboard > APIs > Auth0 Management API > Machine to Machine Applications tab and authorize this Application. ',
'wp-auth0'
);
?>
<?php echo __( 'Make sure to add the following scopes: ', 'wp-auth0' ); ?>
<code><?php echo implode( '</code>, <code>', WP_Auth0_Api_Client::get_required_scopes() ); ?></code>
<?php echo __( 'You can also check the ', 'wp-auth0' ); ?>
<a target="_blank" href="<?php echo admin_url( 'admin.php?page=wpa0-errors' ); ?>"><?php echo __( 'Error log', 'wp-auth0' ); ?></a> <?php echo __( ' for more information.' ); ?>
<a target="_blank" href="<?php echo admin_url( 'admin.php?page=wpa0-errors' ); ?>"><?php echo __( 'Error log', 'wp-auth0' ); ?></a>
<?php echo __( ' for more information.', 'wp-auth0' ); ?>
</strong>
</p>
</div>
<?php
}

public function cant_exchange_token_message() {
$domain = $this->a0_options->get( 'domain' );
?>
<div id="message" class="error">
<p>
<strong>
<?php echo __( 'There was an error retrieving your Auth0 credentials. Check the ', 'wp-auth0' ); ?>
<a target="_blank" href="<?php echo admin_url( 'admin.php?page=wpa0-errors' ); ?>"><?php echo __( 'Error log', 'wp-auth0' ); ?></a>
<?php echo __( ' for more information. Please check that your server has internet access and can reach "https://' . $domain . '/" ', 'wp-auth0' ); ?>
<a target="_blank" href="<?php echo admin_url( 'admin.php?page=wpa0-errors' ); ?>"><?php echo __( 'Error log', 'wp-auth0' ); ?></a>
<?php echo __( ' for more information.', 'wp-auth0' ); ?>
<?php echo __( 'Please check that your server has internet access and can reach ', 'wp-auth0' ); ?>
<code>https://<?php echo $this->a0_options->get( 'domain' ); ?></code>
</strong>
</p>
</div>
Expand Down
1 change: 1 addition & 0 deletions lib/initial-setup/WP_Auth0_InitialSetup_Migration.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php
// phpcs:ignoreFile
/**
* @deprecated - 3.8.0, not used and no replacement provided.
*
Expand Down
1 change: 1 addition & 0 deletions lib/initial-setup/WP_Auth0_InitialSetup_Rules.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php
// phpcs:ignoreFile
/**
* @deprecated - 3.8.0, not used and no replacement provided.
*
Expand Down
1 change: 1 addition & 0 deletions lib/initial-setup/WP_Auth0_InitialSetup_Signup.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php
// phpcs:ignoreFile
/**
* @deprecated - 3.8.0, not used and no replacement provided.
*
Expand Down
2 changes: 1 addition & 1 deletion lib/twitter-api-php/TwitterAPIExchange.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php

// phpcs:ignoreFile
/**
* Twitter-API-PHP : Simple PHP wrapper for the v1.1 API
*
Expand Down