Skip to content

Commit

Permalink
change text domain, to be released as 2.19.07.14
Browse files Browse the repository at this point in the history
  • Loading branch information
futtta committed Jul 14, 2019
1 parent 1a3420e commit 352dcef
Show file tree
Hide file tree
Showing 9 changed files with 256 additions and 250 deletions.
4 changes: 2 additions & 2 deletions async-javascript.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
* Plugin Name: Async JavaScript
* Plugin URI: https://autoptimize.com/
* Description: Async JavaScript gives you full control of which scripts to add a 'async' or 'defer' attribute to or to exclude to help increase the performance of your WordPress website
* Version: 2.18.12.10
* Version: 2.19.07.14
* Author: Frank Goossens (futtta)
* Author URI: https://autoptimize.com/
* Text Domain: asyncjs
* Text Domain: async-javascript
* License: GNU General Public License v2 or later
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/
Expand Down
56 changes: 28 additions & 28 deletions asyncjsBackendClass.php
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ public function aj_dashboard_widget() {
public function aj_admin_notice() {
if ( is_plugin_active( 'async-javascript-pro/async-javascript-pro.php' ) ) {
$class = 'update-nag';
$message = __('We have detected that Async JavaScript Pro is still active. Please disable from the plugin menu before using ','asyncjs') . AJ_TITLE;
$message = __('We have detected that Async JavaScript Pro is still active. Please disable from the plugin menu before using ','async-javascript') . AJ_TITLE;
echo "<div class=\"$class\">$message</div>";
}
}
Expand Down Expand Up @@ -283,14 +283,14 @@ public function async_javascript_admin() {
*/
private function about_aj() {
$return = '';
$return .= '<p>'.__('When a JavaScript file is loaded via the <strong><a href="https://codex.wordpress.org/Plugin_API/Action_Reference/wp_enqueue_scripts" target="_blank">wp_enqueue_script</a></strong> function, ' . AJ_TITLE . ' will add an <strong>async</strong> or <strong>defer</strong> attribute.','asyncjs').'</p>';
$return .= '<p>'.__('There are several ways an external JavaScript file can be executed:','asyncjs').'</p>';
$return .= '<p>'.__('When a JavaScript file is loaded via the <strong><a href="https://codex.wordpress.org/Plugin_API/Action_Reference/wp_enqueue_scripts" target="_blank">wp_enqueue_script</a></strong> function, ' . AJ_TITLE . ' will add an <strong>async</strong> or <strong>defer</strong> attribute.','async-javascript').'</p>';
$return .= '<p>'.__('There are several ways an external JavaScript file can be executed:','async-javasscript').'</p>';
$return .= '<ul>';
$return .= '<li>'.__('If <strong>async</strong> is present: The script is executed asynchronously with the rest of the page (the script will be executed while the page continues the parsing)</li>','asyncjs');
$return .= '<li>'.__('If <strong>defer</strong> is present and <strong>async</strong> is not present: The script is executed when the page has finished parsing</li>','asyncjs');
$return .= '<li>'.__('If neither <strong>async</strong> or <strong>defer</strong> is present: The script is fetched and executed immediately, before the browser continues parsing the page</li>','asyncjs');
$return .= '<li>'.__('If <strong>async</strong> is present: The script is executed asynchronously with the rest of the page (the script will be executed while the page continues the parsing)</li>','async-javascript');
$return .= '<li>'.__('If <strong>defer</strong> is present and <strong>async</strong> is not present: The script is executed when the page has finished parsing</li>','async-javascript');
$return .= '<li>'.__('If neither <strong>async</strong> or <strong>defer</strong> is present: The script is fetched and executed immediately, before the browser continues parsing the page</li>','async-javascript');
$return .= '</ul>';
$return .= '<p>'.__('Using <strong>async</strong> or <strong>defer</strong> helps to eliminate render-blocking JavaScript in above-the-fold content. This can also help to increase your pagespeed which in turn can assist in improving your page ranking.</p>','asyncjs');
$return .= '<p>'.__('Using <strong>async</strong> or <strong>defer</strong> helps to eliminate render-blocking JavaScript in above-the-fold content. This can also help to increase your pagespeed which in turn can assist in improving your page ranking.</p>','async-javascript');
return $return;
}

Expand All @@ -302,35 +302,35 @@ private function about_aj() {
*/
private function hints_tips() {
$return = '';
$return .= '<h3>'.__('Further Hints &amp; Tips','asyncjs').'</h3>';
$return .= '<h3>'.__('Further Hints &amp; Tips','async-javascript').'</h3>';
if ( is_plugin_active( 'autoptimize/autoptimize.php' ) ) {
$return .= '<p>' . AJ_TITLE . __(' has detected that you have Autoptimize installed and active. ','asyncjs') . AJ_TITLE . __(' can further enhance Autoptimize results by applying Async or Defer to the cache files used by Autoptimize.</p>','asyncjs');
$return .= '<p>' . AJ_TITLE . __(' has detected that you have Autoptimize installed and active. ','async-javascript') . AJ_TITLE . __(' can further enhance Autoptimize results by applying Async or Defer to the cache files used by Autoptimize.</p>','async-javascript');
} else {
$return .= '<p>' . AJ_TITLE . __(' has detected that you do not have Autoptimize installed and active. Autoptimize can provide further optimization of JavaScript which can benefit the results of ' . AJ_TITLE . ' (and ' . AJ_TITLE . ' can also enhance Autoptimize results!)</p>','asyncjs');
$return .= '<p>'. __('You can install Autoptimize from the plugin repository, or download it from here: ','asyncjs') .'<a href="https://wordpress.org/plugins/autoptimize/" target="_blank">https://wordpress.org/plugins/autoptimize/</a></p>';
$return .= '<p>' . AJ_TITLE . __(' has detected that you do not have Autoptimize installed and active. Autoptimize can provide further optimization of JavaScript which can benefit the results of ' . AJ_TITLE . ' (and ' . AJ_TITLE . ' can also enhance Autoptimize results!)</p>','async-javascript');
$return .= '<p>'. __('You can install Autoptimize from the plugin repository, or download it from here: ','async-javascript') .'<a href="https://wordpress.org/plugins/autoptimize/" target="_blank">https://wordpress.org/plugins/autoptimize/</a></p>';
}
$return .= '<p>'. __('Through our testing the following common Autoptimize settings work well to achieve the best results. Of course each website is different so you may need to fine tune these settings to suit.</p>','asyncjs');
$return .= '<p>'. __('Through our testing the following common Autoptimize settings work well to achieve the best results. Of course each website is different so you may need to fine tune these settings to suit.</p>','async-javascript');
$return .= '<ol>';
$return .= '<li>'. __('Navigate to <strong>Settings &gt; Autoptimize</strong></li>','asyncjs');
$return .= '<li>'. __('Click on the <strong>Show advanced settings</strong> button</li>','asyncjs');
$return .= '<li>'. __('Under <strong>JavaScript Options</strong> set the following:</li>','asyncjs');
$return .= '<li>'. __('Navigate to <strong>Settings &gt; Autoptimize</strong></li>','async-javascript');
$return .= '<li>'. __('Click on the <strong>Show advanced settings</strong> button</li>','async-javascript');
$return .= '<li>'. __('Under <strong>JavaScript Options</strong> set the following:</li>','async-javascript');
$return .= '<ul>';
$return .= '<li><strong>'. __('Optimize JavaScript Code?</strong>: Checked</li>','asyncjs');
$return .= '<li><strong>'. __('Force JavaScript in &lt;head&gt;?</strong>: Unchecked</li>','asyncjs');
$return .= '<li><strong>'. __('Also aggregate inline JS?</strong>: Checked<br />(did you need to exclude jQuery in ' . AJ_TITLE . '? Enabling this option <strong><em>MAY</em></strong> help resolve jQuery errors caused by inline JavaScript / jQuery code)</li>','asyncjs');
$return .= '<li><strong>'. __('Exclude scripts from Autoptimize:</strong>: Leave as default (or add any other scripts that you may need to exclude)</li>','asyncjs');
$return .= '<li><strong>'. __('Add try-catch wrapping?</strong>: Unchecked</li>','asyncjs');
$return .= '<li><strong>'. __('Optimize JavaScript Code?</strong>: Checked</li>','async-javascript');
$return .= '<li><strong>'. __('Force JavaScript in &lt;head&gt;?</strong>: Unchecked</li>','async-javascript');
$return .= '<li><strong>'. __('Also aggregate inline JS?</strong>: Checked<br />(did you need to exclude jQuery in ' . AJ_TITLE . '? Enabling this option <strong><em>MAY</em></strong> help resolve jQuery errors caused by inline JavaScript / jQuery code)</li>','async-javascript');
$return .= '<li><strong>'. __('Exclude scripts from Autoptimize:</strong>: Leave as default (or add any other scripts that you may need to exclude)</li>','async-javascript');
$return .= '<li><strong>'. __('Add try-catch wrapping?</strong>: Unchecked</li>','async-javascript');
$return .= '</ul>';
$return .= '<li>'. __('Click on the <strong>Save Changes and Empty Cache</strong> button</li>','asyncjs');
$return .= '<li>'. __('Navigate to <strong>Settings &gt; ' . AJ_TITLE . '</strong></li>','asyncjs');
$return .= '<li>'. __('Click on the <strong>Settings</strong> tab</li>','asyncjs');
$return .= '<li>'. __('Scroll down to <strong>' . AJ_TITLE . ' For Plugins</strong></li>','asyncjs');
$return .= '<li>'. __('Under <strong>Autoptimize</strong> set the following:</li>','asyncjs');
$return .= '<li>'. __('Click on the <strong>Save Changes and Empty Cache</strong> button</li>','async-javascript');
$return .= '<li>'. __('Navigate to <strong>Settings &gt; ' . AJ_TITLE . '</strong></li>','async-javascript');
$return .= '<li>'. __('Click on the <strong>Settings</strong> tab</li>','async-javascript');
$return .= '<li>'. __('Scroll down to <strong>' . AJ_TITLE . ' For Plugins</strong></li>','async-javascript');
$return .= '<li>'. __('Under <strong>Autoptimize</strong> set the following:</li>','async-javascript');
$return .= '<ul>';
$return .= '<li><strong>'. __('Enable Autoptimize Support</strong>: Checked</li>','asyncjs');
$return .= '<li>'. __('<strong>Method</strong>: Select either <strong>Async</strong> or <strong>Defer</strong> (testing has found that <strong>Defer</strong> usually works best here!)</li>','asyncjs');
$return .= '<li><strong>'. __('Enable Autoptimize Support</strong>: Checked</li>','async-javascript');
$return .= '<li>'. __('<strong>Method</strong>: Select either <strong>Async</strong> or <strong>Defer</strong> (testing has found that <strong>Defer</strong> usually works best here!)</li>','async-javascript');
$return .= '</ul>';
$return .= '<li>'. __('Click on <strong>Save Changes</strong></li>','asyncjs');
$return .= '<li>'. __('Click on <strong>Save Changes</strong></li>','async-javascript');
$return .= '</ol>';
return $return;
}
Expand Down
36 changes: 18 additions & 18 deletions asyncjsDashboardScreens.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,37 +19,37 @@
$aj_autoptimize_method = ( get_option( 'aj_autoptimize_method', 'async' ) == 'async' ) ? 'Async' : 'Defer';
?>
<div class="wrap aj">
<h3><?php echo AJ_TITLE.__(' Status','asyncjs'); ?></h3>
<h3><?php echo AJ_TITLE.__(' Status','async-javascript'); ?></h3>
<ul>
<li><strong><?php _e(' Status','asyncjs'); ?></strong> <?php echo $aj_enabled; ?></li>
<li><strong><?php _e(' Status','async-javascript'); ?></strong> <?php echo $aj_enabled; ?></li>
<?php
if ( $aj_enabled == 'Enabled' ) {
?>
<li><strong><?php _e('Method:','asyncjs'); ?></strong> <?php echo $aj_method; ?></li>
<li><strong><?php _e('Method:','async-javascript'); ?></strong> <?php echo $aj_method; ?></li>
<li><strong>jQuery:</strong> <?php echo $aj_jquery; ?></li>
<li><strong><?php _e('Exclusions:','asyncjs'); ?></strong> <?php echo $aj_exclusions; ?></li>
<li><strong><?php _e('Plugin Exclusions:','asyncjs'); ?></strong> <?php echo ( is_array( $aj_plugin_exclusions ) ) ? implode( ',', $aj_plugin_exclusions) : $aj_plugin_exclusions; ?></li>
<li><strong><?php _e('Theme Exclusions:','asyncjs'); ?></strong> <?php echo ( is_array( $aj_theme_exclusions ) ) ? implode( ',', $aj_theme_exclusions) : $aj_theme_exclusions; ?></li>
<li><strong><?php _e('Exclusions:','async-javascript'); ?></strong> <?php echo $aj_exclusions; ?></li>
<li><strong><?php _e('Plugin Exclusions:','async-javascript'); ?></strong> <?php echo ( is_array( $aj_plugin_exclusions ) ) ? implode( ',', $aj_plugin_exclusions) : $aj_plugin_exclusions; ?></li>
<li><strong><?php _e('Theme Exclusions:','async-javascript'); ?></strong> <?php echo ( is_array( $aj_theme_exclusions ) ) ? implode( ',', $aj_theme_exclusions) : $aj_theme_exclusions; ?></li>
<?php
if ( is_plugin_active( 'autoptimize/autoptimize.php' ) ) {
?>
<li><strong><?php _e('Autoptimize Status:','asyncjs'); ?></strong> <?php echo $aj_autoptimize_enabled; ?></li>
<li><strong><?php _e('Autoptimize Status:','async-javascript'); ?></strong> <?php echo $aj_autoptimize_enabled; ?></li>
<?php
if ( $aj_autoptimize_enabled == 'Enabled' ) {
?>
<li><strong><?php _e('Autoptimize Method:','asyncjs'); ?></strong> <?php echo $aj_autoptimize_method; ?></li>
<li><strong><?php _e('Autoptimize Method:','async-javascript'); ?></strong> <?php echo $aj_autoptimize_method; ?></li>
<?php
}
} else {
?>
<li><?php _e('Autoptimize not installed or activated.','asyncjs'); ?></li>
<li><?php _e('Autoptimize not installed or activated.','async-javascript'); ?></li>
<?php
}
}
?>
</ul>
<hr />
<h3><?php _e('Latest GTmetrix Results','asyncjs'); ?></h3>
<h3><?php _e('Latest GTmetrix Results','async-javascript'); ?></h3>
<?php
$aj_gtmetrix_results = get_option( 'aj_gtmetrix_results', array() );
if ( isset( $aj_gtmetrix_results['latest'] ) ) {
Expand All @@ -74,34 +74,34 @@
<tr>
<td scope="row" align="center"><img src="data:image/jpeg;base64,<?php echo $screenshot; ?>" class="aj_latest_screenshot aj_gtmetrix_screenshot_dashboard">
<td scope="row" align="center">
<h3><?php _e('PageSpeed Score','asyncjs'); ?></h3>
<h3><?php _e('PageSpeed Score','async-javascript'); ?></h3>
<span class="aj_latest_pagespeed aj_gtmetrix_result"<?php echo $pagespeed_style; ?>><?php echo $pagespeed; ?>%</span>
</td>
<td scope="row" align="center">
<h3><?php _e('YSlow Score','asyncjs'); ?></h3>
<h3><?php _e('YSlow Score','async-javascript'); ?></h3>
<span class="aj_latest_yslow aj_gtmetrix_result"<?php echo $yslow_style; ?>><?php echo $yslow; ?>%</span>
</td>
</tr>
<tr>
<td scope="row" align="center">
<h3><?php _e('Fully Loaded Time','asyncjs'); ?></h3>
<h3><?php _e('Fully Loaded Time','async-javascript'); ?></h3>
<span class="aj_latest_flt aj_gtmetrix_result"><?php echo $flt; ?>s</span>
</td>
<td scope="row" align="center">
<h3><?php _e('Total Page Size','asyncjs'); ?></h3>
<h3><?php _e('Total Page Size','async-javascript'); ?></h3>
<span class="aj_latest_tps aj_gtmetrix_result"><?php echo $tps; ?></span>
</td>
<td scope="row" align="center">
<h3><?php _e('Requests','asyncjs'); ?></h3>
<h3><?php _e('Requests','async-javascript'); ?></h3>
<span class="aj_latest_requests aj_gtmetrix_result"><?php echo $requests; ?></span>
</td>
</tr>
<tr><td scope="row" align="left" colspan="6"><?php _e('See full report: ','asyncjs'); ?> <span class="aj_latest_report"><?php echo $report_url; ?></span></td></tr>
<tr><td scope="row" align="left" colspan="6"><?php _e('See full report: ','async-javascript'); ?> <span class="aj_latest_report"><?php echo $report_url; ?></span></td></tr>
</table>
<?php
}
?>
<p><?php _e('Please click on the Settings button below to generate a new GTmetrix Report.','asyncjs'); ?></p>
<p><button data-id="aj_goto_settings" class="aj_steps_button button"><?php _e('Settings','asyncjs'); ?></button></p>
<p><?php _e('Please click on the Settings button below to generate a new GTmetrix Report.','async-javascript'); ?></p>
<p><button data-id="aj_goto_settings" class="aj_steps_button button"><?php _e('Settings','async-javascript'); ?></button></p>
</div>
<?php
Loading

0 comments on commit 352dcef

Please sign in to comment.