[geeklog-cvs] geeklog: Moved hard-coded text strings to the language file

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Mon Jan 5 05:06:50 EST 2009


details:   http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/22eff903b537
changeset: 6617:22eff903b537
user:      Dirk Haun <dirk at haun-online.de>
date:      Wed Dec 31 16:42:40 2008 +0100
description:
Moved hard-coded text strings to the language file

diffstat:

4 files changed, 183 insertions(+), 28 deletions(-)
public_html/admin/install/install-plugins.php  |   40 +++---
public_html/admin/install/language/english.php |   28 ++++
public_html/admin/install/language/german.php  |  141 ++++++++++++++++++++++--
public_html/admin/install/migrate.php          |    2 

diffs (truncated from 360 to 300 lines):

diff -r 5ae4a81df4b2 -r 22eff903b537 public_html/admin/install/install-plugins.php
--- a/public_html/admin/install/install-plugins.php	Wed Dec 31 15:13:02 2008 +0100
+++ b/public_html/admin/install/install-plugins.php	Wed Dec 31 16:42:40 2008 +0100
@@ -67,7 +67,7 @@
 $step               = (isset($_REQUEST['step'])) ? $_REQUEST['step'] : 1;
 
 // $display holds all the outputted HTML and content
-$display = INST_getHeader('Step' . ' 3 - Plugin Installation'); // Grab the beginning HTML for the installer theme.
+$display = INST_getHeader($LANG_PLUGINS[2] . ' 3 - ' . $LANG_PLUGINS[1]); // Grab the beginning HTML for the installer theme.
 
 // Make sure the version of PHP is supported.
 if (INST_phpOutOfDate()) {
@@ -95,9 +95,9 @@
                                 ? true
                                 : false;
 
-        $display .= '<p>Geeklog plugins are addon components that provide new functionality and leverage the internal services of Geeklog. Plugins are different then blocks which normally do not use any of the internal Geeklog services. By default, Geeklog includes a few useful plugins that you may want to install. ' 
-            . ($upload_enabled ? 'You can also choose to upload additional plugins.' : '')
-            . '</p>' . LB;
+        $display .= '<p>' . $LANG_PLUGINS[3]
+                 . ($upload_enabled ? ' ' . $LANG_PLUGINS[4] : '')
+                 . '</p>' . LB;
 
         // Check if a plugin file was uploaded
         $upload_success = false;
@@ -130,11 +130,11 @@
 
                 if (empty($dirname)) { // If $dirname is blank it's probably because the user uploaded a non Tarball file.
 
-                    $display .= '<div class="notice"><span class="error">' . $LANG_INSTALL[38] . '</span> The file you uploaded was not a GZip compressed plugin file.</div>' . LB;
+                    $display .= '<div class="notice"><span class="error">' . $LANG_INSTALL[38] . '</span> ' . $LANG_PLUGINS[5] . '</div>' . LB;
 
                 } else if (file_exists($_CONF['path'] . 'plugins/' . $dirname)) { // If plugin directory already exists
 
-                    $display .= '<div class="notice"><span class="error">' . $LANG_INSTALL[38] . '</span> The plugin you uploaded already exists!</div>' . LB;
+                    $display .= '<div class="notice"><span class="error">' . $LANG_INSTALL[38] . '</span> ' . $LANG_PLUGINS[6] . '</div>' . LB;
 
                 } else {
 
@@ -240,14 +240,14 @@
             // Show the upload form
             $display .= '<br' . XHTML . '>' . LB
                 . (($upload_success) 
-                    ? '<div class="notice"><span class="success">Success!</span> The ' . $pi_name . ' plugin was uploaded successfully.</div>' 
+                    ? '<div class="notice"><span class="success">' . $LANG_PLUGINS[7] . '</span> ' . sprintf($LANG_PLUGINS[8], $pi_name) . '</div>' 
                     : '') . LB
-                . '<h2>Upload a plugin</h2>' . LB
+                . '<h2>' . $LANG_PLUGINS[9] . '</h2>' . LB
                 . '<form name="plugins_upload" action="install-plugins.php" method="POST" enctype="multipart/form-data">' . LB
                 . '<input type="hidden" name="language" value="' . $language . '"' . XHTML . '>' . LB
-                . '<p><label class="' . $form_label_dir . '">Select plugin file ' . INST_helpLink('plugin_upload') . '</label> ' . LB
+                . '<p><label class="' . $form_label_dir . '">' . $LANG_PLUGINS[10] . ' ' . INST_helpLink('plugin_upload') . '</label> ' . LB
                 . '<input type="file" name="plugin" size="25"' . XHTML . '></p>' . LB
-                . '<p><input type="submit" name="upload" value="Upload"' . XHTML . '></p>' . LB
+                . '<p><input type="submit" name="upload" value="' . $LANG_PLUGINS[11] . '"' . XHTML . '></p>' . LB
                 . '</form>' . LB;
 
         }
@@ -277,7 +277,7 @@
 
         }
 
-        $display .= '<br' . XHTML . '><h2>Select which plugins to install</h2>' . LB;
+        $display .= '<br' . XHTML . '><h2>' . $LANG_PLUGINS[12] . '</h2>' . LB;
 
         // If there are new plugins
         if ($new_plugins > 0) {
@@ -288,9 +288,9 @@
                 . '<input type="hidden" name="step" value="2"' . XHTML . '>' . LB
                 . '<table width="650px">' . LB
                 . '<tr>' . LB
-                    . '<th width="60">Install?</th>' . LB
-                    . '<th>Plugin</th>' . LB
-                    . '<th width="75">Version</th>' . LB
+                    . '<th width="60">' . $LANG_PLUGINS[13] . '</th>' . LB
+                    . '<th>' . $LANG_PLUGINS[14] . '</th>' . LB
+                    . '<th width="75">' . $LANG_PLUGINS[15] . '</th>' . LB
                 . '</tr>' . LB;
 
             /**
@@ -313,8 +313,8 @@
 
                         $pi_name            = '';
                         $pi_display_name    = '';
-                        $pi_version         = 'Unknown';
-                        $gl_version         = 'Unknown';
+                        $pi_version         = $LANG_PLUGINS[16];
+                        $gl_version         = $LANG_PLUGINS[16];
                         $pi_url             = '';
 
                         /**
@@ -443,7 +443,7 @@
                                 . '<input type="hidden" name="plugins[' . $plugin . '][name]" value="' . $plugin . '"' . XHTML . '>' 
                                 . '<input type="hidden" name="plugins[' . $plugin . '][pi_url]" value="' . $pi_url . '"' . XHTML . '>'
                                 . $pi_display_name . LB
-                                . ($missing_autoinstall ? '<p><small><b>Note:</b> This plugin requires manual activation from the Plugins admin panel.</small></p>' : '')
+                                . ($missing_autoinstall ? '<p><small><b>' . $LANG_PLUGINS[17] . ':</b> ' . $LANG_PLUGINS[18] . '</small></p>' : '')
                             . '</td>' . LB
                             . '<td align="center"><input type="hidden" name="plugins[' . $plugin . '][version]" value="' . $pi_version . '"' . XHTML . '>' 
                                 . $pi_version 
@@ -456,15 +456,15 @@
 
             // Form footer
             $display .= '</table><br' . XHTML . '>' . LB
-                . '<input type="button" name="refresh" value="' . 'Refresh' . '" onclick="javascript:document.location.reload()"' . XHTML . '>' . LB
+                . '<input type="button" name="refresh" value="' . $LANG_PLUGINS[19] . '" onclick="javascript:document.location.reload()"' . XHTML . '>' . LB
                 . '<input type="submit" name="submit" value="' . $LANG_INSTALL[50] . ' >>"' . XHTML . '>' . LB
                 . '</form></p>' . LB;
                 
         } else {
 
-            $display .= '<p>There are no new plugins to install.</p>' . LB
+            $display .= '<p>' . $LANG_PLUGINS[20] . '</p>' . LB
                 . '<form action="install-plugins.php" method="POST">' . LB
-                . '<input type="submit" name="refresh" value="' . 'Refresh' . '"' . XHTML . '>' . LB
+                . '<input type="submit" name="refresh" value="' . $LANG_PLUGINS[19] . '"' . XHTML . '>' . LB
                 . '</form></p>' . LB;
         
         }
diff -r 5ae4a81df4b2 -r 22eff903b537 public_html/admin/install/language/english.php
--- a/public_html/admin/install/language/english.php	Wed Dec 31 15:13:02 2008 +0100
+++ b/public_html/admin/install/language/english.php	Wed Dec 31 16:42:40 2008 +0100
@@ -40,7 +40,7 @@
 
 // +---------------------------------------------------------------------------+
 // | Array Format:                                                             |
-// | $LANG_NAME[XX]: $LANG - variable name                                    |
+// | $LANG_NAME[XX]: $LANG - variable name                                     |
 // |                 NAME  - where array is used                               |
 // |                 XX    - phrase id number                                  |
 // +---------------------------------------------------------------------------+
@@ -246,6 +246,32 @@
 );
 
 // +---------------------------------------------------------------------------+
+// install-plugins.php
+
+$LANG_PLUGINS = array(
+    1 => 'Plugin Installation',
+    2 => 'Step',
+    3 => 'Geeklog plugins are addon components that provide new functionality and leverage the internal services of Geeklog. By default, Geeklog includes a few useful plugins that you may want to install.',
+    4 => 'You can also choose to upload additional plugins.',
+    5 => 'The file you uploaded was not a GZip compressed plugin file.',
+    6 => 'The plugin you uploaded already exists!',
+    7 => 'Success!',
+    8 => 'The %s plugin was uploaded successfully.',
+    9 => 'Upload a plugin',
+    10 => 'Select plugin file',
+    11 => 'Upload',
+    12 => 'Select which plugins to install',
+    13 => 'Install?',
+    14 => 'Plugin',
+    15 => 'Version',
+    16 => 'Unknown',
+    17 => 'Note',
+    18 => 'This plugin requires manual activation from the Plugins admin panel.',
+    19 => 'Refresh',
+    20 => 'There are no new plugins to install.'
+);
+
+// +---------------------------------------------------------------------------+
 // bigdump.php
 
 $LANG_BIGDUMP = array(
diff -r 5ae4a81df4b2 -r 22eff903b537 public_html/admin/install/language/german.php
--- a/public_html/admin/install/language/german.php	Wed Dec 31 15:13:02 2008 +0100
+++ b/public_html/admin/install/language/german.php	Wed Dec 31 16:42:40 2008 +0100
@@ -2,7 +2,7 @@
 
 /* Reminder: always indent with 4 spaces (no tabs). */
 // +---------------------------------------------------------------------------+
-// | Geeklog 1.5                                                               |
+// | Geeklog 1.6                                                               |
 // +---------------------------------------------------------------------------+
 // | german.php                                                                |
 // |                                                                           |
@@ -33,8 +33,6 @@
 // | Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.           |
 // |                                                                           |
 // +---------------------------------------------------------------------------+
-//
-// $Id: german.php,v 1.9 2008/05/28 18:46:52 dhaun Exp $
 
 // +---------------------------------------------------------------------------+
 
@@ -42,7 +40,7 @@
 
 // +---------------------------------------------------------------------------+
 // | Array Format:                                                             |
-// | $LANG_NAME[XX]:  $LANG - variable name                                    |
+// | $LANG_NAME[XX]: $LANG - variable name                                     |
 // |                 NAME  - where array is used                               |
 // |                 XX    - phrase id number                                  |
 // +---------------------------------------------------------------------------+
@@ -146,7 +144,11 @@
     93 => 'Success',
     94 => 'Hier sind einige Hinweise, um den richtigen Pfad zu ermitteln:',
     95 => 'Der komplette Pfad zu dieser Datei (dem Installations-Skript) ist:',
-    96 => 'Das Installations-Skript hat nach %s in diesem Verzeichnis gesucht:'
+    96 => 'Das Installations-Skript hat nach %s in diesem Verzeichnis gesucht:',
+    97 => 'Set File Permissions',
+    98 => 'Advanced Users',
+    99 => 'If you have command line (SSH) access to your web server then you can simple copy and paste the following command into your shell:',
+    100 => 'Invalid mode specified'
 );
 
 // +---------------------------------------------------------------------------+
@@ -174,7 +176,8 @@
     18 => 'zurücksetzen auf',
     19 => '<strong>Note:</strong> Because the security model has been changed, we have created a new account with the rights you need to administer your new site.  The username for this new account is <b>NewAdmin</b> and the password is <b>password</b>',
     20 => 'installiert',
-    21 => 'aktualisiert'
+    21 => 'aktualisiert',
+    22 => 'migriert'
 );
 
 // +---------------------------------------------------------------------------+
@@ -197,4 +200,130 @@
     13 => 'Indicate whether to use UTF-8 as the default character set for your site. Recommended especially for multi-lingual setups.'
 );
 
+// +---------------------------------------------------------------------------+
+// migrate.php
+
+$LANG_MIGRATE = array(
+    0 => 'The migration process will overwrite any existing database information.',
+    1 => 'Before Proceding',
+    2 => 'Be sure any previously installed plugins have been copied to your new server.',
+    3 => 'Be sure any images from <code>public_html/images/articles/</code>, <code>public_html/images/topics/</code>, and <code>public_html/images/userphotos/</code>, have been copied to your new server.',
+    4 => 'If you\'re upgrading to a new Geeklog version, then run the <a href="index.php">install script</a> in upgrade mode first.',
+    5 => 'If you\'re upgrading to a new Geeklog version, then don\'t upload your theme just yet. Use the included default theme until you can be sure your migrated site works properly.',
+    6 => 'Select an existing backup',
+    7 => 'Choose file...',
+    8 => 'From the server\'s backups directory',
+    9 => 'From your computer',
+    10 => 'Choose file...',
+    11 => 'No backup files found.',
+    12 => 'The upload limit for this server is ',
+    13 => '. If your backup file is larger than ',
+    14 => ' or if you experience a timeout, then you should upload the file to Geeklog\'s backups directory via FTP.',
+    15 => 'Your backups directory is not writable by the web server. Permissions need to be 777.',
+    16 => 'Migrate',
+    17 => 'Migrate From Backup',
+    18 => 'No backup file was selected',
+    19 => 'Could not save ',
+    20 => ' to ',
+    21 => 'The file',
+    22 => 'already exists. Would you like to replace it?',
+    23 => 'Yes',
+    24 => 'No',
+    25 => 'The version of Geeklog you chose to migrate from is out of date.',
+    26 => 'Migration notice: ',
+    27 => 'The "',
+    28 => '" plugin is missing and has been disabled. You can install and reactivate it at any time from the administration section.',
+    29 => 'The image "',
+    30 => '" listed in the "',
+    31 => '" table could not be found in ',
+    32 => 'The database file contained information for one or more plugins that the migration script could not locate in your',
+    33 => 'directory. The plugins have been deactivated. You can install and reactivate them at any time from the administration section.',
+    34 => 'The database file contained information for one or more files that the migration script could not locate in your',
+    35 => 'directory. Check <code>error.log</code> for more details.',
+    36 => 'You can correct these any time.',
+    37 => 'Migration Complete',
+    38 => 'The migration process has completed. However, the installation script found the following issues:'
+);
+
+// +---------------------------------------------------------------------------+
+// install-plugins.php
+
+$LANG_PLUGINS = array(
+    1 => 'Plugin Installation',
+    2 => 'Step',
+    3 => 'Geeklog plugins are addon components that provide new functionality and leverage the internal services of Geeklog. By default, Geeklog includes a few useful plugins that you may want to install.',
+    4 => 'You can also choose to upload additional plugins.',
+    5 => 'The file you uploaded was not a GZip compressed plugin file.',
+    6 => 'The plugin you uploaded already exists!',
+    7 => 'Success!',
+    8 => 'The %s plugin was uploaded successfully.',
+    9 => 'Upload a plugin',
+    10 => 'Select plugin file',
+    11 => 'Upload',
+    12 => 'Select which plugins to install',
+    13 => 'Install?',
+    14 => 'Plugin',
+    15 => 'Version',
+    16 => 'Unknown',
+    17 => 'Note',
+    18 => 'This plugin requires manual activation from the Plugins admin panel.',
+    19 => 'Refresh',
+    20 => 'There are no new plugins to install.'
+);
+
+// +---------------------------------------------------------------------------+
+// bigdump.php
+
+$LANG_BIGDUMP = array(
+    0 => 'Start Import',
+    1 => ' from ',
+    2 => ' into ',
+    3 => ' at ',



More information about the geeklog-cvs mailing list