Skip to content

Commit b9b3ad5

Browse files
committedMay 30, 2017
Update textdomain to a3-lazy-load instead of a3_lazy_load
1 parent b745f0c commit b9b3ad5

14 files changed

+275
-266
lines changed
 

‎a3-lazy-load.php

+20-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
*/
1818
?>
1919
<?php
20-
define('A3_LAZY_VERSION', '1.7.1');
20+
define('A3_LAZY_VERSION', '1.8.0');
2121
define('A3_LAZY_LOAD_FILE_PATH', dirname(__FILE__));
2222
define('A3_LAZY_LOAD_DIR_NAME', basename(A3_LAZY_LOAD_FILE_PATH));
2323
define('A3_LAZY_LOAD_FOLDER', dirname(plugin_basename(__FILE__)));
@@ -28,6 +28,23 @@
2828
define('A3_LAZY_LOAD_CSS_URL', A3_LAZY_LOAD_URL . '/assets/css');
2929
define('A3_LAZY_LOAD_IMAGES_URL', A3_LAZY_LOAD_URL . '/assets/images');
3030

31+
/**
32+
* Load Localisation files.
33+
*
34+
* Note: the first-loaded translation file overrides any following ones if the same translation is present.
35+
*
36+
* Locales found in:
37+
* - WP_LANG_DIR/a3-lazy-load/a3-lazy-load-LOCALE.mo
38+
* - WP_LANG_DIR/plugins/a3-lazy-load-LOCALE.mo
39+
* - /wp-content/plugins/a3-lazy-load/languages/a3-lazy-load-LOCALE.mo (which if not found falls back to)
40+
*/
41+
function a3_lazy_load_plugin_textdomain() {
42+
$locale = apply_filters( 'plugin_locale', get_locale(), 'a3-lazy-load' );
43+
44+
load_textdomain( 'a3-lazy-load', WP_LANG_DIR . '/a3-lazy-load/a3-lazy-load-' . $locale . '.mo' );
45+
load_plugin_textdomain( 'a3-lazy-load', false, A3_LAZY_LOAD_FOLDER.'/languages' );
46+
}
47+
3148
include( 'admin/admin-ui.php' );
3249
include( 'admin/admin-interface.php' );
3350

@@ -63,4 +80,5 @@ function a3_lazy_load_video_enable() {
6380
* Call when the plugin is activated
6481
*/
6582
register_activation_hook(__FILE__, 'a3_lazy_load_activated');
66-
?>
83+
84+
?>

‎admin/a3-lazy-load-admin.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?php
2-
update_option('a3rev_lazy_load_plugin', 'a3_lazy_load');
2+
update_option('a3rev_lazy_load_plugin', 'a3_lazy_load' );
33

44
function a3_lazy_load_activated(){
55
update_option('a3_lazy_load_version', '1.8.0');
@@ -25,7 +25,7 @@ function a3_lazy_load_init() {
2525
exit;
2626
}
2727

28-
load_plugin_textdomain( 'a3_lazy_load', false, A3_LAZY_LOAD_FOLDER.'/languages' );
28+
a3_lazy_load_plugin_textdomain();
2929

3030
a3_lazy_load_upgrade_plugin();
3131
}

‎admin/admin-interface.php

+76-80
Large diffs are not rendered by default.

‎admin/admin-pages/admin-settings-page.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ public function page_data() {
5959
$page_data = array(
6060
'type' => 'submenu',
6161
'parent_slug' => 'options-general.php',
62-
'page_title' => __('a3 Lazy Load','a3_lazy_load'),
63-
'menu_title' => __('a3 Lazy Load','a3_lazy_load'),
62+
'page_title' => __('a3 Lazy Load','a3-lazy-load' ),
63+
'menu_title' => __('a3 Lazy Load','a3-lazy-load' ),
6464
'capability' => 'manage_options',
6565
'menu_slug' => $this->menu_slug,
6666
'function' => 'a3_lazy_load_settings_page_show',

‎admin/admin-ui.php

+12-12
Original file line numberDiff line numberDiff line change
@@ -106,14 +106,14 @@ public function admin_pages() {
106106
*/
107107
public function get_premium_video_data() {
108108
$premium_video_data = array(
109-
'box_title' => __( 'Premium Version Enhanced Features', 'a3_lazy_load' ),
109+
'box_title' => __( 'Premium Version Enhanced Features', 'a3-lazy-load' ),
110110
'image_url' => A3_LAZY_LOAD_IMAGES_URL. '/video.jpg',
111111
'video_url' => 'https://www.youtube.com/embed/9dGw-ORfMIk?version=3&autoplay=1',
112-
'left_title' => __( 'Premium Version Enhanced Features', 'a3_lazy_load' ),
113-
'left_text' => __( 'WooCommerce Dynamic Gallery Premium', 'a3_lazy_load' )
114-
. "\n\n" . __( 'Quick Video showing the main (not all) enhanced features that are built into the WooCommerce Dynamic Gallery Premium version', 'a3_lazy_load' ),
115-
'right_title' => __( 'Developer Support and Premium Features', 'a3_lazy_load' ),
116-
'right_text' => __( 'Limited Time Offer. Purchase the Premium Version Lifetime License. That is a Lifetime of maintenance updates, feature upgrades and developer support for a once only fee. Offer ending soon.', 'a3_lazy_load' )
112+
'left_title' => __( 'Premium Version Enhanced Features', 'a3-lazy-load' ),
113+
'left_text' => __( 'WooCommerce Dynamic Gallery Premium', 'a3-lazy-load' )
114+
. "\n\n" . __( 'Quick Video showing the main (not all) enhanced features that are built into the WooCommerce Dynamic Gallery Premium version', 'a3-lazy-load' ),
115+
'right_title' => __( 'Developer Support and Premium Features', 'a3-lazy-load' ),
116+
'right_text' => __( 'Limited Time Offer. Purchase the Premium Version Lifetime License. That is a Lifetime of maintenance updates, feature upgrades and developer support for a once only fee. Offer ending soon.', 'a3-lazy-load' )
117117
. "\n\n" . '<a target="_blank" href="'.$this->pro_plugin_page_url.'" class="button-primary">' . __( 'Get Premium Features and Support', '' ) . '</a>',
118118
);
119119

@@ -262,10 +262,10 @@ public function plugin_extension_end( $echo = true ) {
262262
/*-----------------------------------------------------------------------------------*/
263263
public function upgrade_top_message( $echo = false, $setting_id = '' ) {
264264
$upgrade_top_message = sprintf( '<div class="pro_feature_top_message">'
265-
. __( 'Advanced Settings - Upgrade to the <a href="%s" target="_blank">%s License</a> to activate these settings.', 'a3_lazy_load' )
265+
. __( 'Advanced Settings - Upgrade to the <a href="%s" target="_blank">%s License</a> to activate these settings.', 'a3-lazy-load' )
266266
. '</div>'
267267
, apply_filters( $this->plugin_name . '_' . $setting_id . '_pro_plugin_page_url', apply_filters( $this->plugin_name . '_pro_plugin_page_url', $this->pro_plugin_page_url ) )
268-
, apply_filters( $this->plugin_name . '_' . $setting_id . '_pro_version_name', apply_filters( $this->plugin_name . '_pro_version_name', __( 'Pro Version', 'a3_lazy_load' ) ) )
268+
, apply_filters( $this->plugin_name . '_' . $setting_id . '_pro_version_name', apply_filters( $this->plugin_name . '_pro_version_name', __( 'Pro Version', 'a3-lazy-load' ) ) )
269269
);
270270

271271
$upgrade_top_message = apply_filters( $this->plugin_name . '_upgrade_top_message', $upgrade_top_message, $setting_id );
@@ -315,17 +315,17 @@ public function get_version_message() {
315315
$transient_timeout = '_transient_timeout_' . $this->version_transient;
316316
$timeout = get_option( $transient_timeout, false );
317317
if ( false === $timeout ) {
318-
$version_message = __( 'You should check now to see if have any new version is available', 'a3_lazy_load' );
318+
$version_message = __( 'You should check now to see if have any new version is available', 'a3-lazy-load' );
319319
} elseif ( 'cannot_connect_api' == $version_transient ) {
320-
$version_message = sprintf( __( 'Connection Failure! Please try again. If this issue persists please create a support request on the plugin <a href="%s" target="_blank">a3rev support forum</a>.', 'a3_lazy_load' ), $this->support_url );
320+
$version_message = sprintf( __( 'Connection Failure! Please try again. If this issue persists please create a support request on the plugin <a href="%s" target="_blank">a3rev support forum</a>.', 'a3-lazy-load' ), $this->support_url );
321321
} else {
322322
$version_info = explode( '||', $version_transient );
323323
if ( FALSE !== stristr( $version_transient, '||' )
324324
&& is_array( $version_info )
325325
&& isset( $version_info[1] ) && $version_info[1] == 'valid'
326326
&& version_compare( get_option('a3_lazy_load_version') , $version_info[0], '<' ) ) {
327327

328-
$version_message = sprintf( __( 'There is a new version <span class="a3rev-ui-new-plugin-version">%s</span> available, <a href="%s" target="_blank">update now</a> or download direct from <a href="%s" target="_blank">My Account</a> on a3rev.com', 'a3_lazy_load' ),
328+
$version_message = sprintf( __( 'There is a new version <span class="a3rev-ui-new-plugin-version">%s</span> available, <a href="%s" target="_blank">update now</a> or download direct from <a href="%s" target="_blank">My Account</a> on a3rev.com', 'a3-lazy-load' ),
329329
$version_info[0],
330330
wp_nonce_url( self_admin_url( 'update.php?action=upgrade-plugin&plugin=' . A3_LAZY_LOAD_NAME ), 'upgrade-plugin_' . A3_LAZY_LOAD_NAME ),
331331
'https://a3rev.com/my-account/downloads/'
@@ -334,7 +334,7 @@ public function get_version_message() {
334334
}
335335

336336
} else {
337-
$version_message = __( 'You should check now to see if have any new version is available', 'a3_lazy_load' );
337+
$version_message = __( 'You should check now to see if have any new version is available', 'a3-lazy-load' );
338338
}
339339

340340
return $version_message;

‎admin/includes/uploader/class-uploader.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public function upload_input ( $name_attribute, $id_attribute = '', $value = '',
9898

9999
$output .= '<input type="hidden" name="'.$attachment_id_name_attribute.'" id="'.$id_attribute.'_attachment_id" value="'.$attachment_id.'" class=" a3_upload_attachment_id" />';
100100
$output .= '<input data-strip-methods="'.$strip_methods.'" type="text" name="'.$name_attribute.'" id="'.$id_attribute.'" value="'.esc_attr( $value ).'" class="'.$id_attribute. ' ' .$class.' a3_upload" style="'.$css.'" rel="'.$field_name.'" /> ';
101-
$output .= '<input id="upload_'.$id_attribute.'" class="a3rev-ui-upload-button a3_upload_button button" type="button" value="'.__( 'Upload', 'a3_lazy_load' ).'" /> '.$description;
101+
$output .= '<input id="upload_'.$id_attribute.'" class="a3rev-ui-upload-button a3_upload_button button" type="button" value="'.__( 'Upload', 'a3-lazy-load' ).'" /> '.$description;
102102

103103
$output .= '<div style="clear:both;"></div><div class="a3_screenshot" id="'.$id_attribute.'_image" style="'.( ( $value == '' ) ? 'display:none;' : 'display:block;' ).'">';
104104

@@ -118,7 +118,7 @@ public function upload_input ( $name_attribute, $id_attribute = '', $value = '',
118118

119119
$output .= '';
120120

121-
$title = __( 'View File', 'a3_lazy_load' );
121+
$title = __( 'View File', 'a3-lazy-load' );
122122

123123
$output .= '<div class="a3_no_image"><span class="a3_file_link"><a href="'.esc_url( $value ).'" target="_blank" rel="a3_external">'.$title.'</a></span>'.$remove.'</div>';
124124

0 commit comments

Comments
 (0)