From 9cff6ac264720ce0724b5513611f632fef3dead9 Mon Sep 17 00:00:00 2001 From: Ozh Date: Fri, 8 Feb 2013 23:27:37 +0000 Subject: [PATCH] More translation readyness git-svn-id: http://yourls.googlecode.com/svn/trunk@857 12232710-3e20-11de-b438-597f59cd7555 --- admin/index.php | 2 +- admin/install.php | 20 ++++++++------------ admin/plugins.php | 34 +++++++++++++++++----------------- 3 files changed, 26 insertions(+), 30 deletions(-) diff --git a/admin/index.php b/admin/index.php index c655a38..fa2b7a5 100644 --- a/admin/index.php +++ b/admin/index.php @@ -48,7 +48,7 @@ $search_in = 'ip'; break; } - $search_sentence = sprintf( yourls__( 'Searching for %s in %s.' ), yourls_esc_html( $search ), yourls_esc_html( $search_in_text ) ); + $search_sentence = yourls_s( 'Searching for %s in %s.', yourls_esc_html( $search ), yourls_esc_html( $search_in_text ) ); $search_url = yourls_sanitize_url( "&search=$search&search_in=$search_in" ); $search_text = $search; $search = str_replace( '*', '%', '*' . yourls_escape( $search ) . '*' ); diff --git a/admin/install.php b/admin/install.php index 6c64d1e..dfb83d0 100644 --- a/admin/install.php +++ b/admin/install.php @@ -10,18 +10,14 @@ // Check pre-requisites if ( !yourls_check_database_version() ) - $error[] = 'MySQL version is too old. Ask your server admin for an upgrade.'; + $error[] = yourls_s( '%s version is too old. Ask your server admin for an upgrade.', 'MySQL' ); if ( !yourls_check_php_version() ) - $error[] = 'PHP version is too old. Ask your server admin for an upgrade.'; - -// Check additional stuff -if ( !yourls_check_curl() ) - $warning[] = 'PHP extension cURL is not installed. This server won\'t be able to use the remote API'; + $error[] = yourls_s( '%s version is too old. Ask your server admin for an upgrade.', 'PHP' ); // Is YOURLS already installed ? if ( yourls_is_installed() ) { - $error[] = 'YOURLS already installed.'; + $error[] = yourls__( 'YOURLS already installed.' ); // check if .htaccess exists, recreate otherwise. No error checking. if( !file_exists( YOURLS_ABSPATH.'/.htaccess' ) ) { yourls_create_htaccess(); @@ -32,9 +28,9 @@ if ( isset($_REQUEST['install']) && count( $error ) == 0 ) { // Create/update .htaccess file if ( yourls_create_htaccess() ) { - $success[] = 'File .htaccess successfully created/updated.'; + $success[] = yourls__( 'File .htaccess successfully created/updated.' ); } else { - $warning[] = 'Could not write file .htaccess in YOURLS root directory. You will have to do it manually. See how.'; + $warning[] = yourls__( 'Could not write file .htaccess in YOURLS root directory. You will have to do it manually. See how.' ); } // Create SQL tables @@ -47,7 +43,7 @@ // Start output -yourls_html_head( 'install', 'Install YOURLS' ); +yourls_html_head( 'install', yourls__( 'Install YOURLS' ) ); ?>
@@ -68,10 +64,10 @@ // Display install button or link to admin area if applicable if( !yourls_is_installed() && !isset($_REQUEST['install']) ) { - echo '

 

'; + echo '

'; } else { if( count($error) == 0 ) - echo '

 

» YOURLS Administration Page

'; + echo '

» ' . yourls__( 'YOURLS Administration Page') . '

'; } ?>
diff --git a/admin/plugins.php b/admin/plugins.php index 8eadce3..c1df235 100644 --- a/admin/plugins.php +++ b/admin/plugins.php @@ -35,11 +35,11 @@ break; default: - $result = 'Unsupported action'; + $result = yourls__( 'Unsupported action' ); break; } } else { - $result = 'No plugin specified, or not a valid plugin'; + $result = yourls__( 'No plugin specified, or not a valid plugin' ); } yourls_add_notice( $result ); @@ -48,16 +48,16 @@ // Handle message upon succesfull (de)activation if( isset( $_GET['success'] ) ) { if( $_GET['success'] == 'activated' OR $_GET['success'] == 'deactivated' ) { - yourls_add_notice( 'Plugin '.yourls__($_GET['success']) ); + yourls_add_notice( yourls_s( 'Plugin has been %s', $_GET['success'] ) ); } } -yourls_html_head( 'plugins', 'Manage Plugins' ); +yourls_html_head( 'plugins', yourls__( 'Manage Plugins' ) ); yourls_html_logo(); yourls_html_menu(); ?> -

+

-

%d installed, and %d activated'), $plugins_count, $count_active ); ?>

+

%d installed, and %d activated', $plugins_count, $count_active ); ?>

- - - - - + + + + + @@ -112,11 +112,11 @@ if( yourls_is_active_plugin( $file ) ) { $class = 'active'; $action_url = yourls_nonce_url( 'manage_plugins', yourls_add_query_arg( array('action' => 'deactivate', 'plugin' => $plugindir ) ) ); - $action_anchor = yourls__('Deactivate'); + $action_anchor = yourls__( 'Deactivate' ); } else { $class = 'inactive'; $action_url = yourls_nonce_url( 'manage_plugins', yourls_add_query_arg( array('action' => 'activate', 'plugin' => $plugindir ) ) ); - $action_anchor = yourls__('Activate'); + $action_anchor = yourls__( 'Activate' ); } // Other "Fields: Value" in the header? Get them too @@ -127,7 +127,7 @@ } } - $data['desc'] .= "
plugin file location: $file"; + $data['desc'] .= '
' . yourls_s( 'plugin file location: %s', $file) . ''; printf( "", $class, $data['uri'], $data['name'], $data['version'], $data['desc'], $data['author_uri'], $data['author'], $action_url, $action_anchor @@ -151,11 +151,11 @@ -

plugin.php.'); ?>

+

plugin.php.' ); ?>

-

+

-

Plugin list.'); ?>

+

Plugin list.' ); ?>

-- 2.45.0
%s%s%s%s%s