From 701c9c6ba2c8723341a19a7e952e0d3d4bfbad77 Mon Sep 17 00:00:00 2001 From: fidian Date: Wed, 31 Jan 2001 17:24:23 +0000 Subject: [PATCH] Changed _('String') into _("String") to help out the gettext stuff git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@1007 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/abook_database.php | 26 +++++++++++++------------- functions/abook_local_file.php | 30 +++++++++++++++--------------- functions/imap_messages.php | 2 +- functions/mime.php | 4 ++-- 4 files changed, 31 insertions(+), 31 deletions(-) diff --git a/functions/abook_database.php b/functions/abook_database.php index cd408586..62a2610b 100644 --- a/functions/abook_database.php +++ b/functions/abook_database.php @@ -44,7 +44,7 @@ // Constructor function abook_database($param) { - $this->sname = _('Personal address book'); + $this->sname = _("Personal address book"); if(is_array($param)) { if(empty($param['dsn']) || @@ -83,7 +83,7 @@ $dbh = DB::connect($this->dsn, true); if(DB::isError($dbh) || DB::isWarning($dbh)) - return $this->set_error(sprintf(_('Database error: %s'), + return $this->set_error(sprintf(_("Database error: %s"), DB::errorMessage($dbh))); $this->dbh = $dbh; @@ -119,7 +119,7 @@ $res = $this->dbh->query($query); if(DB::isError($res)) - return $this->set_error(sprintf(_('Database error: %s'), + return $this->set_error(sprintf(_("Database error: %s"), DB::errorMessage($res))); while ($row = $res->fetchRow(DB_FETCHMODE_ASSOC)) { @@ -151,7 +151,7 @@ $res = $this->dbh->query($query); if(DB::isError($res)) - return $this->set_error(sprintf(_('Database error: %s'), + return $this->set_error(sprintf(_("Database error: %s"), DB::errorMessage($res))); if ($row = $res->fetchRow(DB_FETCHMODE_ASSOC)) { @@ -180,7 +180,7 @@ $res = $this->dbh->query($query); if(DB::isError($res)) - return $this->set_error(sprintf(_('Database error: %s'), + return $this->set_error(sprintf(_("Database error: %s"), DB::errorMessage($res))); while ($row = $res->fetchRow(DB_FETCHMODE_ASSOC)) { @@ -199,7 +199,7 @@ // Add address function add($userdata) { if(!$this->writeable) - return $this->set_error(_('Addressbook is read-only')); + return $this->set_error(_("Addressbook is read-only")); if(!$this->open()) return false; @@ -207,7 +207,7 @@ // See if user exist already $ret = $this->lookup($userdata['nickname']); if(!empty($ret)) - return $this->set_error(sprintf(_('User \'%s\' already exist'), + return $this->set_error(sprintf(_((User \'%s\' already exist"), $ret['nickname'])); // Create query @@ -226,14 +226,14 @@ if($r == DB_OK) return true; // Fail - return $this->set_error(sprintf(_('Database error: %s'), + return $this->set_error(sprintf(_("Database error: %s"), DB::errorMessage($r))); } // Delete address function remove($alias) { if(!$this->writeable) - return $this->set_error(_('Addressbook is read-only')); + return $this->set_error(_("Addressbook is read-only")); if(!$this->open()) return false; @@ -255,14 +255,14 @@ if($r == DB_OK) return true; // Fail - return $this->set_error(sprintf(_('Database error: %s'), + return $this->set_error(sprintf(_("Database error: %s"), DB::errorMessage($r))); } // Modify address function modify($alias, $userdata) { if(!$this->writeable) - return $this->set_error(_('Addressbook is read-only')); + return $this->set_error(_("Addressbook is read-only")); if(!$this->open()) return false; @@ -270,7 +270,7 @@ // See if user exist $ret = $this->lookup($alias); if(empty($ret)) - return $this->set_error(sprintf(_('User \'%s\' does not exist'), + return $this->set_error(sprintf(_("User '%s' does not exist"), $alias)); // Create query @@ -291,7 +291,7 @@ if($r == DB_OK) return true; // Fail - return $this->set_error(sprintf(_('Database error: %s'), + return $this->set_error(sprintf(_("Database error: %s"), DB::errorMessage($r))); } } // End of class abook_database diff --git a/functions/abook_local_file.php b/functions/abook_local_file.php index 09446765..8bc02405 100644 --- a/functions/abook_local_file.php +++ b/functions/abook_local_file.php @@ -31,7 +31,7 @@ // Constructor function abook_local_file($param) { - $this->sname = _('Personal address book'); + $this->sname = _("Personal address book"); $this->umask = Umask(); if(is_array($param)) { @@ -39,7 +39,7 @@ return $this->set_error('Invalid parameters'); if(!is_string($param['filename'])) return $this->set_error($param['filename'] . ': '. - _('Not a file name')); + _("Not a file name")); $this->filename = $param['filename']; @@ -72,7 +72,7 @@ // Check that new file exitsts if((!(file_exists($file) && is_readable($file))) && !$create) - return $this->set_error("$file: " . _('No such file or directory')); + return $this->set_error("$file: " . _("No such file or directory")); // Close old file, if any if($this->filehandle) $this->close(); @@ -92,7 +92,7 @@ $this->filename = $file; $this->writeable = false; } else { - return $this->set_error("$file: " . _('Open failed')); + return $this->set_error("$file: " . _("Open failed")); } } @@ -128,7 +128,7 @@ function overwrite($rows) { $newfh = @fopen($this->filename, 'w'); if(!$newfh) - return $this->set_error("$file: " . _('Open failed')); + return $this->set_error("$file: " . _("Open failed")); for($i = 0 ; $i < sizeof($rows) ; $i++) { if(is_array($rows[$i])) @@ -224,12 +224,12 @@ // Add address function add($userdata) { if(!$this->writeable) - return $this->set_error(_('Addressbook is read-only')); + return $this->set_error(_("Addressbook is read-only")); // See if user exist already $ret = $this->lookup($userdata['nickname']); if(!empty($ret)) - return $this->set_error(sprintf(_('User \'%s\' already exist'), + return $this->set_error(sprintf(_("User '%s' already exist"), $ret['nickname'])); // Here is the data to write @@ -244,11 +244,11 @@ // Reopen file, just to be sure $this->open(true); if(!$this->writeable) - return $this->set_error(_('Addressbook is read-only')); + return $this->set_error(_("Addressbook is read-only")); // Lock the file if(!$this->lock()) - return $this->set_error(_('Could not lock datafile')); + return $this->set_error(_("Could not lock datafile")); // Write $r = fwrite($this->filehandle, $data); @@ -260,19 +260,19 @@ if($r > 0) return true; // Fail - $this->set_error(_('Write to addressbook failed')); + $this->set_error(_("Write to addressbook failed")); return false; } // Delete address function remove($alias) { if(!$this->writeable) - return $this->set_error(_('Addressbook is read-only')); + return $this->set_error(_("Addressbook is read-only")); // Lock the file to make sure we're the only process working // on it. if(!$this->lock()) - return $this->set_error(_('Could not lock datafile')); + return $this->set_error(_("Could not lock datafile")); // Read file into memory, ignoring nicknames to delete $this->open(); @@ -297,18 +297,18 @@ // Modify address function modify($alias, $userdata) { if(!$this->writeable) - return $this->set_error(_('Addressbook is read-only')); + return $this->set_error(_("Addressbook is read-only")); // See if user exist $ret = $this->lookup($alias); if(empty($ret)) - return $this->set_error(sprintf(_('User \'%s\' does not exist'), + return $this->set_error(sprintf(_("User '%s' does not exist"), $alias)); // Lock the file to make sure we're the only process working // on it. if(!$this->lock()) - return $this->set_error(_('Could not lock datafile')); + return $this->set_error(_("Could not lock datafile")); // Read file into memory, modifying the data for the // user identifyed by $alias diff --git a/functions/imap_messages.php b/functions/imap_messages.php index 134b8b72..e0215d6f 100755 --- a/functions/imap_messages.php +++ b/functions/imap_messages.php @@ -123,7 +123,7 @@ $header = new small_header; if ($sent == true) - $header->from = (trim($to) != '')? $to : _('(only Cc/Bcc)'); + $header->from = (trim($to) != '')? $to : _("(only Cc/Bcc)"); else $header->from = $from; diff --git a/functions/mime.php b/functions/mime.php index 379bdb27..57833735 100644 --- a/functions/mime.php +++ b/functions/mime.php @@ -544,7 +544,7 @@ $body .= "\n"; $body .= "
\n"; - $body .= _('Attachments') . ':'; + $body .= _("Attachments") . ':'; $body .= "
\n"; $body .= "\n"; @@ -576,7 +576,7 @@ "../src/download.php?startMessage=$startMessage&passed_id=$id&mailbox=$urlMailbox&passed_ent_id=$ent"; if ($where && $what) $DefaultLink .= '&where=' . urlencode($where) . '&what=' . urlencode($what); - $Links['download link']['text'] = _('download'); + $Links['download link']['text'] = _("download"); $Links['download link']['href'] = "../src/download.php?absolute_dl=true&passed_id=$id&mailbox=$urlMailbox&passed_ent_id=$ent"; $ImageURL = ''; -- 2.25.1