From 903d41f723eeea9052ee9e0d91eb97e36da4a8c5 Mon Sep 17 00:00:00 2001 From: pedro-mendonca Date: Tue, 29 Nov 2016 08:45:30 +0000 Subject: [PATCH 1/4] Change string for coherence with other existent string --- inc/admin/enqueue.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/admin/enqueue.php b/inc/admin/enqueue.php index 978a55c..65d1e9d 100755 --- a/inc/admin/enqueue.php +++ b/inc/admin/enqueue.php @@ -21,7 +21,7 @@ function wptxu_load_admin_assets() { $translation_array = array( 'ajax_loading' => __( 'Check for update...', 'wpt-tx-updater' ), - 'license_deactivate' => 'WPT tx updater : '.__( 'License deactivate', 'wpt-tx-updater' ), + 'license_deactivate' => 'WPT tx updater : '.__( 'Deactivate License', 'wpt-tx-updater' ), 'ajax_fail' => __( 'Please try again soon.', 'wpt-tx-updater' ), ); From 7f0b10a41054aeb5ad7905c734e546380310bb59 Mon Sep 17 00:00:00 2001 From: pedro-mendonca Date: Tue, 29 Nov 2016 08:46:36 +0000 Subject: [PATCH 2/4] Transifex with capital 'T' Capitalize the plugin name --- inc/admin/ui/meta-boxes.php | 2 +- inc/admin/ui/notices.php | 6 +++--- inc/admin/ui/options.php | 12 ++++++------ inc/classes/wptxu-translation.php | 2 +- wpt-tx-updater.php | 2 +- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/inc/admin/ui/meta-boxes.php b/inc/admin/ui/meta-boxes.php index 0523554..2e7f03c 100755 --- a/inc/admin/ui/meta-boxes.php +++ b/inc/admin/ui/meta-boxes.php @@ -20,7 +20,7 @@ add_action( 'add_meta_boxes','wptxu_metaboxes' ); function wptxu_metaboxes() { - add_meta_box( 'wptxu_tx_api_metaboxe', __( 'transifex API', 'wpt-tx-updater' ), 'wptxu_get_translation', 'wptxu-project', 'normal', 'high' ); + add_meta_box( 'wptxu_tx_api_metaboxe', __( 'Transifex API', 'wpt-tx-updater' ), 'wptxu_get_translation', 'wptxu-project', 'normal', 'high' ); add_meta_box( 'wptxu_project_meta_metaboxe', __( 'Project attributes', 'wpt-tx-updater' ), 'wptxu_project_attributs', 'wptxu-project', 'side', 'high' ); diff --git a/inc/admin/ui/notices.php b/inc/admin/ui/notices.php index 064987d..2a4d12e 100755 --- a/inc/admin/ui/notices.php +++ b/inc/admin/ui/notices.php @@ -23,7 +23,7 @@ function wptxu_empty_credentials() { ?>
-

register your transifex credentials. ', 'wpt-tx-updater' ); ?>

+

register your Transifex credentials.', 'wpt-tx-updater' ); ?>

register your transifex credentials.', 'wpt-tx-updater' ); + $message = __( 'Unauthorized: authentication is required to access the resource, please register your Transifex credentials.', 'wpt-tx-updater' ); break; case '404': - $message = __( 'Project not found: transifex and local project must have the same slug. Or this language doesn\'t exist on transifex.', 'wpt-tx-updater' ); + $message = __( 'Project not found: Transifex and local project must have the same slug. Or this language doesn\'t exist on Transifex.', 'wpt-tx-updater' ); break; } diff --git a/inc/admin/ui/options.php b/inc/admin/ui/options.php index 7cf96d7..d242b52 100755 --- a/inc/admin/ui/options.php +++ b/inc/admin/ui/options.php @@ -28,7 +28,7 @@ function wptxu_extra_profile_fields( $user ) {
- + @@ -47,23 +47,23 @@ function wptxu_extra_profile_fields( $user ) { -

+

ID ) ) : ?> - + - + diff --git a/inc/classes/wptxu-translation.php b/inc/classes/wptxu-translation.php index 7cd165c..7a6259e 100755 --- a/inc/classes/wptxu-translation.php +++ b/inc/classes/wptxu-translation.php @@ -94,7 +94,7 @@ private function _is_up_to_date() { } else { - echo '
  • ' . __( 'Translation update available!', 'wpt-tx-updater' ) . ' - ' . __( 'Locale translation', 'wpt-tx-updater' ) .' : ' . $readme['last_update'] . ' - ' . __( 'transifex translation', 'wpt-tx-updater' ) .' : ' . $this->project->last_update . '
  • '; + echo '
  • ' . __( 'Translation update available!', 'wpt-tx-updater' ) . ' - ' . __( 'Locale translation', 'wpt-tx-updater' ) .' : ' . $readme['last_update'] . ' - ' . __( 'Transifex translation', 'wpt-tx-updater' ) .' : ' . $this->project->last_update . '
  • '; return false; } diff --git a/wpt-tx-updater.php b/wpt-tx-updater.php index 2b10e80..6f9c7ec 100755 --- a/wpt-tx-updater.php +++ b/wpt-tx-updater.php @@ -10,7 +10,7 @@ * @license http://creativecommons.org/licenses/GPL/2.0/ GNU General Public License, version 2 or higher * * @wordpress-plugin - * Plugin Name: WPT transifex Updater + * Plugin Name: WPT Transifex Updater * Plugin URI: http://wp-translations.org/ * Description: Easily update translations from transifex.com * Version: 1.0.7 From 422f078d71e9290e65b6b3d738397107e31f0611 Mon Sep 17 00:00:00 2001 From: pedro-mendonca Date: Tue, 29 Nov 2016 08:46:58 +0000 Subject: [PATCH 3/4] Remove HTML code from string --- inc/api/wptxu-sl-api.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/api/wptxu-sl-api.php b/inc/api/wptxu-sl-api.php index c13db53..6055c3e 100644 --- a/inc/api/wptxu-sl-api.php +++ b/inc/api/wptxu-sl-api.php @@ -47,7 +47,7 @@ function wptxu_sl_call( $action, $key ) { // Make sure the response came back okay. if ( is_wp_error( $remote_call ) ) { - $error_message = sprintf( __( '

    There is a problem with remote site, please try again. %s

    ', 'wpt-tx-updater' ), $remote_call->get_error_message() ); + $error_message = '

    ' . __( 'There is a problem with remote site, please try again.', 'wpt-tx-updater' ) . ' ' . $remote_call->get_error_message() . '

    '; return $error_message; } else { // Decode the license data. From caa20b09b82c8f20c005e0d03aa0061d3f06863b Mon Sep 17 00:00:00 2001 From: pedro-mendonca Date: Tue, 29 Nov 2016 10:24:44 +0000 Subject: [PATCH 4/4] Revert "Transifex with capital 'T'" This reverts commit 7f0b10a41054aeb5ad7905c734e546380310bb59. --- inc/admin/ui/meta-boxes.php | 2 +- inc/admin/ui/notices.php | 6 +++--- inc/admin/ui/options.php | 12 ++++++------ inc/classes/wptxu-translation.php | 2 +- wpt-tx-updater.php | 2 +- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/inc/admin/ui/meta-boxes.php b/inc/admin/ui/meta-boxes.php index 2e7f03c..0523554 100755 --- a/inc/admin/ui/meta-boxes.php +++ b/inc/admin/ui/meta-boxes.php @@ -20,7 +20,7 @@ add_action( 'add_meta_boxes','wptxu_metaboxes' ); function wptxu_metaboxes() { - add_meta_box( 'wptxu_tx_api_metaboxe', __( 'Transifex API', 'wpt-tx-updater' ), 'wptxu_get_translation', 'wptxu-project', 'normal', 'high' ); + add_meta_box( 'wptxu_tx_api_metaboxe', __( 'transifex API', 'wpt-tx-updater' ), 'wptxu_get_translation', 'wptxu-project', 'normal', 'high' ); add_meta_box( 'wptxu_project_meta_metaboxe', __( 'Project attributes', 'wpt-tx-updater' ), 'wptxu_project_attributs', 'wptxu-project', 'side', 'high' ); diff --git a/inc/admin/ui/notices.php b/inc/admin/ui/notices.php index 2a4d12e..064987d 100755 --- a/inc/admin/ui/notices.php +++ b/inc/admin/ui/notices.php @@ -23,7 +23,7 @@ function wptxu_empty_credentials() { ?>
    -

    register your Transifex credentials.', 'wpt-tx-updater' ); ?>

    +

    register your transifex credentials. ', 'wpt-tx-updater' ); ?>

    register your Transifex credentials.', 'wpt-tx-updater' ); + $message = __( 'Unauthorized: authentication is required to access the resource, please register your transifex credentials.', 'wpt-tx-updater' ); break; case '404': - $message = __( 'Project not found: Transifex and local project must have the same slug. Or this language doesn\'t exist on Transifex.', 'wpt-tx-updater' ); + $message = __( 'Project not found: transifex and local project must have the same slug. Or this language doesn\'t exist on transifex.', 'wpt-tx-updater' ); break; } diff --git a/inc/admin/ui/options.php b/inc/admin/ui/options.php index d242b52..7cf96d7 100755 --- a/inc/admin/ui/options.php +++ b/inc/admin/ui/options.php @@ -28,7 +28,7 @@ function wptxu_extra_profile_fields( $user ) {
    @@ -47,23 +47,23 @@ function wptxu_extra_profile_fields( $user ) {

    - +

    - +

    - +
    -

    +

    ID ) ) : ?> - + - + diff --git a/inc/classes/wptxu-translation.php b/inc/classes/wptxu-translation.php index 7a6259e..7cd165c 100755 --- a/inc/classes/wptxu-translation.php +++ b/inc/classes/wptxu-translation.php @@ -94,7 +94,7 @@ private function _is_up_to_date() { } else { - echo '
  • ' . __( 'Translation update available!', 'wpt-tx-updater' ) . ' - ' . __( 'Locale translation', 'wpt-tx-updater' ) .' : ' . $readme['last_update'] . ' - ' . __( 'Transifex translation', 'wpt-tx-updater' ) .' : ' . $this->project->last_update . '
  • '; + echo '
  • ' . __( 'Translation update available!', 'wpt-tx-updater' ) . ' - ' . __( 'Locale translation', 'wpt-tx-updater' ) .' : ' . $readme['last_update'] . ' - ' . __( 'transifex translation', 'wpt-tx-updater' ) .' : ' . $this->project->last_update . '
  • '; return false; } diff --git a/wpt-tx-updater.php b/wpt-tx-updater.php index 6f9c7ec..2b10e80 100755 --- a/wpt-tx-updater.php +++ b/wpt-tx-updater.php @@ -10,7 +10,7 @@ * @license http://creativecommons.org/licenses/GPL/2.0/ GNU General Public License, version 2 or higher * * @wordpress-plugin - * Plugin Name: WPT Transifex Updater + * Plugin Name: WPT transifex Updater * Plugin URI: http://wp-translations.org/ * Description: Easily update translations from transifex.com * Version: 1.0.7

    - +

    - +