Skip to content

Commit 6771c90

Browse files
committed
change textdomain to be the plugin slug
1 parent bacbabc commit 6771c90

7 files changed

Lines changed: 41 additions & 41 deletions

File tree

admin-notices.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ function sqlite_plugin_admin_notice() {
2323
if ( ! class_exists( 'SQLite3' ) ) {
2424
printf(
2525
'<div class="notice notice-error"><p>%s</p></div>',
26-
esc_html__( 'The SQLite Integration plugin is active, but the SQLite3 class is missing from your server. Please make sure that SQLite is enabled in your PHP installation.', 'sqlite' )
26+
esc_html__( 'The SQLite Integration plugin is active, but the SQLite3 class is missing from your server. Please make sure that SQLite is enabled in your PHP installation.', 'sqlite-database-integration' )
2727
);
2828
return;
2929
}
@@ -38,7 +38,7 @@ function sqlite_plugin_admin_notice() {
3838
'<div class="notice notice-error"><p>%s</p></div>',
3939
sprintf(
4040
/* translators: 1: SQLITE_DB_DROPIN_VERSION constant, 2: db.php drop-in path */
41-
__( 'The SQLite Integration module is active, but the %1$s constant is missing. It appears you already have another %2$s file present on your site. ', 'sqlite' ),
41+
__( 'The SQLite Integration module is active, but the %1$s constant is missing. It appears you already have another %2$s file present on your site. ', 'sqlite-database-integration' ),
4242
'<code>SQLITE_DB_DROPIN_VERSION</code>',
4343
'<code>' . esc_html( basename( WP_CONTENT_DIR ) ) . '/db.php</code>'
4444
)
@@ -54,7 +54,7 @@ function sqlite_plugin_admin_notice() {
5454
if ( ! wp_is_writable( WP_CONTENT_DIR ) ) {
5555
printf(
5656
'<div class="notice notice-error"><p>%s</p></div>',
57-
esc_html__( 'The SQLite Integration plugin is active, but the wp-content/db.php file is missing and the wp-content directory is not writable. Please ensure the wp-content folder is writable, then deactivate the plugin and try again.', 'sqlite' )
57+
esc_html__( 'The SQLite Integration plugin is active, but the wp-content/db.php file is missing and the wp-content directory is not writable. Please ensure the wp-content folder is writable, then deactivate the plugin and try again.', 'sqlite-database-integration' )
5858
);
5959
return;
6060
}
@@ -63,7 +63,7 @@ function sqlite_plugin_admin_notice() {
6363
'<div class="notice notice-error"><p>%s</p></div>',
6464
sprintf(
6565
/* translators: 1: db.php drop-in path, 2: Admin URL to deactivate the module */
66-
__( 'The SQLite Integration plugin is active, but the %1$s file is missing. Please <a href="%2$s">deactivate the plugin</a> and re-activate it to try again.', 'sqlite' ),
66+
__( 'The SQLite Integration plugin is active, but the %1$s file is missing. Please <a href="%2$s">deactivate the plugin</a> and re-activate it to try again.', 'sqlite-database-integration' ),
6767
'<code>' . esc_html( basename( WP_CONTENT_DIR ) ) . '/db.php</code>',
6868
esc_url( admin_url( 'plugins.php' ) )
6969
)

admin-page.php

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
*/
1515
function sqlite_add_admin_menu() {
1616
add_options_page(
17-
__( 'SQLite integration', 'sqlite' ),
18-
__( 'SQLite integration', 'sqlite' ),
17+
__( 'SQLite integration', 'sqlite-database-integration' ),
18+
__( 'SQLite integration', 'sqlite-database-integration' ),
1919
'manage_options',
2020
'sqlite-integration',
2121
'sqlite_integration_admin_screen',
@@ -29,19 +29,19 @@ function sqlite_add_admin_menu() {
2929
function sqlite_integration_admin_screen() {
3030
?>
3131
<div class="wrap">
32-
<h1><?php esc_html_e( 'SQLite integration.', 'sqlite' ); ?></h1>
32+
<h1><?php esc_html_e( 'SQLite integration.', 'sqlite-database-integration' ); ?></h1>
3333
</div>
3434
<!-- Set the wrapper width to 50em, to improve readability. -->
3535
<div style="max-width:50em;">
3636
<?php if ( defined( 'SQLITE_DB_DROPIN_VERSION' ) ) : ?>
3737
<div class="notice notice-success">
38-
<p><?php esc_html_e( 'SQLite is enabled.', 'sqlite' ); ?></p>
38+
<p><?php esc_html_e( 'SQLite is enabled.', 'sqlite-database-integration' ); ?></p>
3939
</div>
4040
<p>
4141
<?php
4242
printf(
4343
/* translators: 1: Admin URL to deactivate the module, 2: db.php drop-in path, */
44-
__( 'The SQLite drop-in is enabled. To disable it and get back to your previous, MySQL database, you can <a href="%1$s">deactivate the plugin</a>. Alternatively, you can manually delete the %2$s file from your server.', 'sqlite' ),
44+
__( 'The SQLite drop-in is enabled. To disable it and get back to your previous, MySQL database, you can <a href="%1$s">deactivate the plugin</a>. Alternatively, you can manually delete the %2$s file from your server.', 'sqlite-database-integration' ),
4545
esc_url( admin_url( 'plugins.php' ) ),
4646
'<code>' . esc_html( basename( WP_CONTENT_DIR ) ) . '/db.php</code>'
4747
);
@@ -50,15 +50,15 @@ function sqlite_integration_admin_screen() {
5050
<?php else : ?>
5151
<?php if ( ! class_exists( 'SQLite3' ) ) : ?>
5252
<div class="notice notice-error">
53-
<p><?php esc_html_e( 'We detected that the SQLite3 class is missing from your server. Please make sure that SQLite is enabled in your PHP installation before proceeding.', 'sqlite' ); ?></p>
53+
<p><?php esc_html_e( 'We detected that the SQLite3 class is missing from your server. Please make sure that SQLite is enabled in your PHP installation before proceeding.', 'sqlite-database-integration' ); ?></p>
5454
</div>
5555
<?php elseif ( file_exists( WP_CONTENT_DIR . '/db.php' ) && ! defined( 'SQLITE_DB_DROPIN_VERSION' ) ) : ?>
5656
<div class="notice notice-error">
5757
<p>
5858
<?php
5959
printf(
6060
/* translators: %s: db.php drop-in path */
61-
esc_html__( 'The SQLite plugin cannot be activated because a different %s drop-in already exists.', 'sqlite' ),
61+
esc_html__( 'The SQLite plugin cannot be activated because a different %s drop-in already exists.', 'sqlite-database-integration' ),
6262
'<code>' . esc_html( basename( WP_CONTENT_DIR ) ) . '/db.php</code>'
6363
);
6464
?>
@@ -70,21 +70,21 @@ function sqlite_integration_admin_screen() {
7070
<?php
7171
printf(
7272
/* translators: %s: db.php drop-in path */
73-
esc_html__( 'The SQLite plugin cannot be activated because the %s directory is not writable.', 'sqlite' ),
73+
esc_html__( 'The SQLite plugin cannot be activated because the %s directory is not writable.', 'sqlite-database-integration' ),
7474
'<code>' . esc_html( basename( WP_CONTENT_DIR ) ) . '</code>'
7575
);
7676
?>
7777
</p>
7878
</div>
7979
<?php else : ?>
8080
<div class="notice notice-success">
81-
<p><?php esc_html_e( 'All checks completed successfully, your site can use an SQLite database. You can proceed with the installation.', 'sqlite' ); ?></p>
81+
<p><?php esc_html_e( 'All checks completed successfully, your site can use an SQLite database. You can proceed with the installation.', 'sqlite-database-integration' ); ?></p>
8282
</div>
83-
<h2><?php esc_html_e( 'Important note', 'sqlite' ); ?></h2>
84-
<p><?php esc_html_e( 'This plugin will switch to a separate database and install WordPress in it. You will need to reconfigure your site, and start with a fresh site. Disabling the plugin you will get back to your previous MySQL database, with all your previous data intact.', 'sqlite' ); ?></p>
85-
<p><?php esc_html_e( 'By clicking the button below, you will be redirected to the WordPress installation screen to setup your new database', 'sqlite' ); ?></p>
83+
<h2><?php esc_html_e( 'Important note', 'sqlite-database-integration' ); ?></h2>
84+
<p><?php esc_html_e( 'This plugin will switch to a separate database and install WordPress in it. You will need to reconfigure your site, and start with a fresh site. Disabling the plugin you will get back to your previous MySQL database, with all your previous data intact.', 'sqlite-database-integration' ); ?></p>
85+
<p><?php esc_html_e( 'By clicking the button below, you will be redirected to the WordPress installation screen to setup your new database', 'sqlite-database-integration' ); ?></p>
8686

87-
<a class="button button-primary" href="<?php echo esc_url( wp_nonce_url( admin_url( 'admin.php?page=sqlite-integration&confirm-install' ), 'sqlite-install' ) ); ?>"><?php esc_html_e( 'Install SQLite database', 'sqlite' ); ?></a>
87+
<a class="button button-primary" href="<?php echo esc_url( wp_nonce_url( admin_url( 'admin.php?page=sqlite-integration&confirm-install' ), 'sqlite-install' ) ); ?>"><?php esc_html_e( 'Install SQLite database', 'sqlite-database-integration' ); ?></a>
8888
<?php endif; ?>
8989
<?php endif; ?>
9090
</div>

health-check.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,29 +19,29 @@ function sqlite_plugin_filter_debug_data( $info ) {
1919

2020
$info['wp-constants']['fields']['DATABASE_TYPE'] = array(
2121
'label' => 'DATABASE_TYPE',
22-
'value' => ( defined( 'DATABASE_TYPE' ) ? DATABASE_TYPE : __( 'Undefined', 'sqlite' ) ),
22+
'value' => ( defined( 'DATABASE_TYPE' ) ? DATABASE_TYPE : __( 'Undefined', 'sqlite-database-integration' ) ),
2323
'debug' => ( defined( 'DATABASE_TYPE' ) ? DATABASE_TYPE : 'undefined' ),
2424
);
2525

2626
$info['wp-database']['fields']['database_type'] = array(
27-
'label' => __( 'Database type', 'sqlite' ),
27+
'label' => __( 'Database type', 'sqlite-database-integration' ),
2828
'value' => 'sqlite' === $database_type ? 'SQLite' : 'MySQL/MariaDB',
2929
);
3030

3131
if ( 'sqlite' === $database_type ) {
3232
$info['wp-database']['fields']['database_version'] = array(
33-
'label' => __( 'SQLite version', 'sqlite' ),
33+
'label' => __( 'SQLite version', 'sqlite-database-integration' ),
3434
'value' => class_exists( 'SQLite3' ) ? SQLite3::version()['versionString'] : null,
3535
);
3636

3737
$info['wp-database']['fields']['database_file'] = array(
38-
'label' => __( 'Database file', 'sqlite' ),
38+
'label' => __( 'Database file', 'sqlite-database-integration' ),
3939
'value' => FQDB,
4040
'private' => true,
4141
);
4242

4343
$info['wp-database']['fields']['database_size'] = array(
44-
'label' => __( 'Database size', 'sqlite' ),
44+
'label' => __( 'Database size', 'sqlite-database-integration' ),
4545
'value' => size_format( filesize( FQDB ) ),
4646
);
4747

sqlite.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* Author: WordPress Performance Team
66
* Version: 1.0.0
77
* Requires PHP: 5.6
8-
* Textdomain: sqlite
8+
* Textdomain: sqlite-database-integration
99
*
1010
* This project is based on the original work of Kojima Toshiyasu and his SQLite Integration plugin,
1111
* and the work of Evan Mattson and his WP SQLite DB plugin - See https://github.com/aaemnnosttv/wp-sqlite-db

wp-includes/sqlite/class-wp-sqlite-db.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,11 +133,11 @@ public function print_error( $str = '' ) {
133133
wp_load_translations_early();
134134

135135
$caller = $this->get_caller();
136-
$caller = $caller ? $caller : __( '(unknown)', 'sqlite' );
136+
$caller = $caller ? $caller : __( '(unknown)', 'sqlite-database-integration' );
137137

138138
$error_str = sprintf(
139139
/* translators: 1: Database error message, 2: SQL query, 3: Caller. */
140-
__( 'WordPress database error %1$s for query %2$s made by %3$s', 'sqlite' ),
140+
__( 'WordPress database error %1$s for query %2$s made by %3$s', 'sqlite-database-integration' ),
141141
$str,
142142
$this->last_query,
143143
$caller
@@ -163,7 +163,7 @@ public function print_error( $str = '' ) {
163163

164164
printf(
165165
/* translators: 1: Database error message, 2: SQL query. */
166-
'<div id="error"><p class="wpdberror">' . __( 'WordPress database error: [%1$s] %2$s', 'sqlite' ) . '</p></div>',
166+
'<div id="error"><p class="wpdberror">' . __( 'WordPress database error: [%1$s] %2$s', 'sqlite-database-integration' ) . '</p></div>',
167167
$str,
168168
'<code>' . $query . '</code>'
169169
);

wp-includes/sqlite/class-wp-sqlite-pdo-engine.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -244,11 +244,11 @@ function __construct() {
244244
if ( $status > 0 ) {
245245
$message = sprintf(
246246
'<p>%s</p><p>%s</p><p>%s</p>',
247-
__( 'Database initialization error!', 'sqlite' ),
247+
__( 'Database initialization error!', 'sqlite-database-integration' ),
248248
/* translators: %d: error code */
249-
sprintf( __( 'Code: %d', 'sqlite' ), $status ),
249+
sprintf( __( 'Code: %d', 'sqlite-database-integration' ), $status ),
250250
/* translators: %s: error message */
251-
sprintf( __( 'Error Message: %s', 'sqlite' ), $err_message )
251+
sprintf( __( 'Error Message: %s', 'sqlite-database-integration' ), $err_message )
252252
);
253253
$this->set_error( __LINE__, __FILE__, $message );
254254

@@ -328,19 +328,19 @@ private function prepare_directory() {
328328
if ( ! is_dir( FQDBDIR ) ) {
329329
if ( ! @mkdir( FQDBDIR, 0704, true ) ) {
330330
umask( $u );
331-
wp_die( esc_html__( 'Unable to create the required directory! Please check your server settings.', 'sqlite' ), 'Error!' );
331+
wp_die( esc_html__( 'Unable to create the required directory! Please check your server settings.', 'sqlite-database-integration' ), 'Error!' );
332332
}
333333
}
334334
if ( ! is_writable( FQDBDIR ) ) {
335335
umask( $u );
336-
$message = __( 'Unable to create a file in the directory! Please check your server settings.', 'sqlite' );
336+
$message = __( 'Unable to create a file in the directory! Please check your server settings.', 'sqlite-database-integration' );
337337
wp_die( $message, 'Error!' );
338338
}
339339
if ( ! is_file( FQDBDIR . '.htaccess' ) ) {
340340
$fh = fopen( FQDBDIR . '.htaccess', 'w' );
341341
if ( ! $fh ) {
342342
umask( $u );
343-
esc_html_e( 'Unable to create a file in the directory! Please check your server settings.', 'sqlite' );
343+
esc_html_e( 'Unable to create a file in the directory! Please check your server settings.', 'sqlite-database-integration' );
344344

345345
return false;
346346
}
@@ -351,7 +351,7 @@ private function prepare_directory() {
351351
$fh = fopen( FQDBDIR . 'index.php', 'w' );
352352
if ( ! $fh ) {
353353
umask( $u );
354-
esc_html_e( 'Unable to create a file in the directory! Please check your server settings.', 'sqlite' );
354+
esc_html_e( 'Unable to create a file in the directory! Please check your server settings.', 'sqlite-database-integration' );
355355

356356
return false;
357357
}
@@ -398,7 +398,7 @@ public function query( $statement, $mode = PDO::ATTR_DEFAULT_FETCH_MODE, ...$fet
398398
if ( ! $res && defined( 'PDO_DEBUG' ) && PDO_DEBUG ) {
399399
$bailout_string = sprintf(
400400
/* translators: %s: SQL statement */
401-
'<h1>' . __( 'Unknown query type', 'sqlite' ) . '</h1><p>' . __( 'Sorry, we cannot determine the type of query that is requested (%s).', 'sqlite' ) . '</p>',
401+
'<h1>' . __( 'Unknown query type', 'sqlite-database-integration' ) . '</h1><p>' . __( 'Sorry, we cannot determine the type of query that is requested (%s).', 'sqlite-database-integration' ) . '</p>',
402402
$statement
403403
);
404404
$this->set_error( __LINE__, __FUNCTION__, $bailout_string );
@@ -604,7 +604,7 @@ public function get_error_message() {
604604

605605
$output = '<div style="clear:both">&nbsp;</div>';
606606
$output .= '<div class="queries" style="clear:both;margin_bottom:2px;border:red dotted thin;">';
607-
$output .= '<p>' . __( 'Queries made or created this session were:', 'sqlite' ) . '</p>';
607+
$output .= '<p>' . __( 'Queries made or created this session were:', 'sqlite-database-integration' ) . '</p>';
608608
$output .= '<ol>';
609609
foreach ( $this->queries as $q ) {
610610
$output .= '<li>' . $q . '</li>';
@@ -615,7 +615,7 @@ public function get_error_message() {
615615
$output .= '<div style="clear:both;margin_bottom:2px;border:red dotted thin;" class="error_message" style="border-bottom:dotted blue thin;">';
616616
$output .= sprintf(
617617
/* translators: %1$d: line number, %2$s: function name, %3$s: error message */
618-
__( 'Error occurred at line %1$d in Function %2$s. Error message was: %3$s.', 'sqlite' ),
618+
__( 'Error occurred at line %1$d in Function %2$s. Error message was: %3$s.', 'sqlite-database-integration' ),
619619
(int) $this->errors[ $num ]['line'],
620620
'<code>' . esc_html( $this->errors[ $num ]['function'] ) . '</code>',
621621
$m
@@ -1460,7 +1460,7 @@ private function convert_result_check_or_analyze() {
14601460
'Table' => '',
14611461
'Op' => $is_check ? 'check' : 'analyze',
14621462
'Msg_type' => 'status',
1463-
'Msg_text' => $is_check ? __( 'OK', 'sqlite' ) : __( 'Table is already up to date', 'sqlite' ),
1463+
'Msg_text' => $is_check ? __( 'OK', 'sqlite-database-integration' ) : __( 'Table is already up to date', 'sqlite-database-integration' ),
14641464
)
14651465
);
14661466
$this->results = $_results;

wp-includes/sqlite/install-functions.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -162,18 +162,18 @@ function wp_install( $blog_title, $user_name, $user_email, $is_public, $deprecat
162162

163163
if ( ! $user_id && empty( $user_password ) ) {
164164
$user_password = wp_generate_password( 12, false );
165-
$message = __( '<strong><em>Note that password</em></strong> carefully! It is a <em>random</em> password that was generated just for you.', 'sqlite' );
165+
$message = __( '<strong><em>Note that password</em></strong> carefully! It is a <em>random</em> password that was generated just for you.', 'sqlite-database-integration' );
166166
$user_id = wp_create_user( $user_name, $user_password, $user_email );
167167
update_user_meta( $user_id, 'default_password_nag', true );
168168
$email_password = true;
169169
$user_created = true;
170170
} elseif ( ! $user_id ) {
171171
// Password has been provided.
172-
$message = '<em>' . __( 'Your chosen password.', 'sqlite' ) . '</em>';
172+
$message = '<em>' . __( 'Your chosen password.', 'sqlite-database-integration' ) . '</em>';
173173
$user_id = wp_create_user( $user_name, $user_password, $user_email );
174174
$user_created = true;
175175
} else {
176-
$message = __( 'User already exists. Password inherited.', 'sqlite' );
176+
$message = __( 'User already exists. Password inherited.', 'sqlite-database-integration' );
177177
}
178178

179179
$user = new WP_User( $user_id );
@@ -190,7 +190,7 @@ function wp_install( $blog_title, $user_name, $user_email, $is_public, $deprecat
190190

191191
flush_rewrite_rules();
192192

193-
wp_new_blog_notification( $blog_title, $guessurl, $user_id, ( $email_password ? $user_password : __( 'The password you chose during installation.', 'sqlite' ) ) );
193+
wp_new_blog_notification( $blog_title, $guessurl, $user_id, ( $email_password ? $user_password : __( 'The password you chose during installation.', 'sqlite-database-integration' ) ) );
194194

195195
wp_cache_flush();
196196

0 commit comments

Comments
 (0)