Add initial support for 8.3's built in FTS. Based on patch from Ivan Zolotukhin as...
authorxzilla <xzilla>
Thu, 13 Sep 2007 05:16:41 +0000 (05:16 +0000)
committerxzilla <xzilla>
Thu, 13 Sep 2007 05:16:41 +0000 (05:16 +0000)
to work with the actually committed full-text-search code in PG core. Note in Ivan's version, istm you could map multiple dictionaries for each configuration, but the committed core schema doesn't imply that; we might need to change that later. I also updated the TODO file with some
left over pieces for FTS support.

CREDITS
HISTORY
TODO
classes/Misc.php
classes/database/Postgres.php
classes/database/Postgres83.php
images/themes/default/Fts.png [new file with mode: 0644]
lang/english.php
lang/recoded/english.php

diff --git a/CREDITS b/CREDITS
index 7f6e774c9d0e83ba3ecfe12f314a715bff771d28..209869b175f1d386fbc4662379ce971b2421e409 100644 (file)
--- a/CREDITS
+++ b/CREDITS
@@ -63,6 +63,7 @@ Contributors
 - JGuillaume 'ioguix' De Rorthais
 - Karl O. Pinc  
 - Tomasz Pala
+- Ivan Zolotukhin 
 
 Third Party Libraries
 
diff --git a/HISTORY b/HISTORY
index 1317933b5821ca4b0c01e522f39214ad460d0877..7056b9e86948048d99f38b11096b274f98eec9db 100644 (file)
--- a/HISTORY
+++ b/HISTORY
@@ -14,6 +14,7 @@ Features
 * Add support for creating a table using an exsting one (ioguix)
 * Auto-expand a node in the tree browser if there are no other nodes (Tomasz Pala)
 * Add column about fields constraints type + links in table properties page (ioguix)
+* Support for built-in Full Text Search (Ivan Zolotukhin)  
 
 Bugs
 * Fix inability to assign a field type/domain of a different schema
diff --git a/TODO b/TODO
index 753b383f722a975bd3ddb8cef904f3b9bdbeab3c..53ce0f8d9422c67c1e10c1a0afba127b469ce652 100644 (file)
--- a/TODO
+++ b/TODO
@@ -168,6 +168,15 @@ Casts (7.3)
 * Drop
 * Create
 
+
+Full Text Search (8.3)
+----------------------
+
+* Create/Alter/Drop parser
+* Help Pages
+* Alter Owner
+
+
 Miscellaneous
 -------------
 
index 7ba9a21234d1e0acb743acbd695a09690f361a24..96bbcf9206134968c513cb82652e65dfc0a11c66 100644 (file)
@@ -2,7 +2,7 @@
        /**
         * Class to hold various commonly used functions
         *
-        * $Id: Misc.php,v 1.159 2007/08/31 18:30:11 ioguix Exp $
+        * $Id: Misc.php,v 1.160 2007/09/13 05:16:41 xzilla Exp $
         */
         
        class Misc {
                                                        'tree'  => false,
                                                        'icon'  => 'Privileges',
                                                ),
+                                               'fulltext' => array (
+                                                       'title' => $lang['strfulltext'],
+                                                       'url'   => 'fulltext.php',
+                                                       'urlvars' => array('subject' => 'database'),
+                                                       'hide'  => false,
+                                                       'help'  => 'PUT_DOC_LINK_HERE',
+                                                       'tree'  => true,
+                                                       'icon'  => 'Fts',
+                                               ),
                                                'languages' => array (
                                                        'title' => $lang['strlanguages'],
                                                        'url'   => 'languages.php',
                                        'help'  => 'pg.view',
                                        'icon'  => 'View'
                                );
-                       }
-                       if ($subject == 'table' || $subject == 'view') $done = true;
+                       } elseif (isset($_REQUEST['ftscfg']) && !$done) {
+                               $vars .= "action=viewconfig&ftscfg=".urlencode($_REQUEST['ftscfg']);
+                               $trail['ftscfg'] = array(
+                                       'title' => $lang['strftsconfig'],
+                                       'text'  => $_REQUEST['ftscfg'],
+                                       'url'   => "fulltext.php?{$vars}",
+                                       'help'  => 'PUT_DOC_LINK_HERE',
+                                       'icon'  => 'Fts'
+                               );
+                       } 
+                       if ($subject == 'table' || $subject == 'view' || $subject == 'ftscfg') $done = true;
                        
                        if (!$done && !is_null($subject)) {
                                switch ($subject) {
index 5801134ccf5c403b8fc9e0084101970ea1a0b523..96a94391b19457ba1e80f7162d27f8904daf445f 100755 (executable)
@@ -4,7 +4,7 @@
  * A class that implements the DB interface for Postgres
  * Note: This class uses ADODB and returns RecordSets.
  *
- * $Id: Postgres.php,v 1.301 2007/09/09 20:20:31 ioguix Exp $
+ * $Id: Postgres.php,v 1.302 2007/09/13 05:16:41 xzilla Exp $
  */
 
 // @@@ THOUGHT: What about inherits? ie. use of ONLY???
@@ -3889,6 +3889,10 @@ class Postgres extends ADODB_base {
                        case 'TABLESPACE':
                        case 'TYPE':
                        case 'VIEW':
+                       case 'TEXT SEARCH CONFIGURATION':
+                       case 'TEXT SEARCH DICTIONARY':
+                       case 'TEXT SEARCH DICTIONARY TEMPLATE':
+                       case 'TEXT SEARCH PARSER':
                                $sql .= "\"{$obj_name}\" IS ";
                                break;
                        case 'FUNCTION':                                
@@ -4664,6 +4668,7 @@ class Postgres extends ADODB_base {
        function hasCreateTableLike() {return false;}
        function hasCreateTableLikeWithConstraints() {return false;}
        function hasCreateTableLikeWithIndexes() {return false;}
+       function hasFTS() {return false;}
 }
 
 ?>
index a704203f30248fc9f0f50af01c571247fbb824f5..d04d5232ca0f28b819710098d30ea6831d19f4f9 100644 (file)
@@ -3,7 +3,7 @@
 /**
  * PostgreSQL 8.3 support
  *
- * $Id: Postgres83.php,v 1.2 2007/09/09 20:20:31 ioguix Exp $
+ * $Id: Postgres83.php,v 1.3 2007/09/13 05:16:42 xzilla Exp $
  */
 
 include_once('./classes/database/Postgres82.php');
@@ -30,6 +30,444 @@ class Postgres83 extends Postgres82 {
                return $this->help_page;
        }
 
+       /**
+        * Creates a new FTS configuration.
+        * @param string $cfgname The name of the FTS configuration to create
+        * @param string $parser The parser to be used in new FTS configuration
+        * @param string $locale Locale of the FTS configuration 
+        * @param string $template The existing FTS configuration to be used as template for the new one
+        * @param string $withmap Should we copy whole map of existing FTS configuration to the new one
+        * @param string $makeDefault Should this configuration be the default for locale given 
+        * @param string $comment If omitted, defaults to nothing
+        * @return 0 success
+        */
+       function createFtsConfiguration($cfgname, $parser = '', $template = '', $withMap = '', $comment = '') {
+               $this->fieldClean($cfgname);
+               $this->fieldClean($template);
+               $this->fieldClean($parser);
+               $this->clean($comment);
+               $sql = "CREATE TEXT SEARCH CONFIGURATION \"{$cfgname}\"";
+               if ($parser != '') $sql .= " PARSER \"{$parser}\"";
+               if ($template != '') {
+                       $sql .= " LIKE \"{$template}\"";
+                       if ($withMap != '') $sql .= " WITH MAP";
+               }               
+               
+               if ($comment != '') {
+                       $status = $this->beginTransaction();
+                       if ($status != 0) return -1;
+               }
+               // Create the FTS configuration
+               $status =  $this->execute($sql);
+               if ($status != 0) {
+                       $this->rollbackTransaction();
+                       return -1;
+               }
+               // Set the comment
+               if ($comment != '') {
+                       $status = $this->setComment('TEXT SEARCH CONFIGURATION', $cfgname, '', $comment);
+                       if ($status != 0) {
+                               $this->rollbackTransaction();
+                               return -1;
+                       }
+                       
+                       return $this->endTransaction();
+               }
+               
+               return 0;
+       }
+       
+       /**
+        * Returns all FTS configurations available
+        */
+       function getFtsConfigurations() {
+               $sql = "SELECT 
+                       n.nspname as schema,
+                       c.cfgname as name,
+                       pg_catalog.obj_description(c.oid, 'pg_ts_config') as comment
+                       FROM 
+                                       pg_catalog.pg_ts_config c
+                       JOIN pg_catalog.pg_namespace n ON n.oid = c.cfgnamespace 
+                       WHERE 
+                                       pg_catalog.pg_ts_config_is_visible(c.oid)
+                       ORDER BY 
+                                       schema, name";
+               return $this->selectSet($sql);
+       }
+       
+       /**
+        * Return all information related to a FTS configuration
+        * @param $ftscfg The name of the FTS configuration
+        * @return FTS configuration information
+        */
+       function getFtsConfigurationByName($ftscfg) {
+               $this->clean($ftscfg);
+               $sql = "SELECT 
+            n.nspname as schema,
+            c.cfgname as name,
+            p.prsname as parser,
+            c.cfgparser as parser_id,
+            pg_catalog.obj_description(c.oid, 'pg_ts_config') as comment
+         FROM pg_catalog.pg_ts_config c
+         LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.cfgnamespace 
+         LEFT JOIN pg_catalog.pg_ts_parser p ON p.oid = c.cfgparser
+         WHERE pg_catalog.pg_ts_config_is_visible(c.oid)
+         AND c.cfgname = '{$ftscfg}'";
+         
+               return $this->selectSet($sql);
+       }
+       
+       
+       /**
+        * Returns the map of FTS configuration given (list of mappings (tokens) and their processing dictionaries)
+        * 
+        * @param string $ftscfg Name of the FTS configuration  
+        */
+       function getFtsConfigurationMap($ftscfg) {
+               $this->fieldClean($ftscfg);
+               $getOidSql = "SELECT oid FROM pg_catalog.pg_ts_config WHERE cfgname = '{$ftscfg}'";
+               $oidSet = $this->selectSet($getOidSql);
+               $oid = $oidSet->fields['oid'];
+               
+               $sql = " SELECT
+           (SELECT t.alias FROM pg_catalog.ts_token_type(c.cfgparser) AS t WHERE t.tokid = m.maptokentype) AS name,
+           (SELECT t.description FROM pg_catalog.ts_token_type(c.cfgparser) AS t WHERE t.tokid = m.maptokentype) AS description,
+ c.cfgname AS cfgname
+                 ,n.nspname ||'.'|| d.dictname as dictionaries
+         FROM pg_catalog.pg_ts_config AS c, pg_catalog.pg_ts_config_map AS m, pg_catalog.pg_ts_dict d, pg_catalog.pg_namespace n
+         WHERE c.oid = {$oid} AND m.mapcfg = c.oid and m.mapdict = d.oid and d.dictnamespace = n.oid
+         ORDER BY name 
+         ";
+               return $this->selectSet($sql);
+       }
+       
+       /**
+        * Returns all FTS parsers available
+        */
+       function getFtsParsers() {
+               $sql = "SELECT 
+           n.nspname as schema,
+           p.prsname as name,
+           pg_catalog.obj_description(p.oid, 'pg_ts_parser') as comment
+         FROM pg_catalog.pg_ts_parser p 
+         LEFT JOIN pg_catalog.pg_namespace n ON n.oid = p.prsnamespace WHERE pg_catalog.pg_ts_parser_is_visible(p.oid)
+         ORDER BY schema, name";
+               return $this->selectSet($sql);
+       }
+       
+       /**
+        * Returns all FTS dictionaries available
+        */
+       function getFtsDictionaries() {
+               $sql = "SELECT 
+           n.nspname as schema,
+           d.dictname as name,
+           pg_catalog.obj_description(d.oid, 'pg_ts_dict') as comment
+         FROM pg_catalog.pg_ts_dict d
+         LEFT JOIN pg_catalog.pg_namespace n ON n.oid = d.dictnamespace 
+         WHERE pg_catalog.pg_ts_dict_is_visible(d.oid)
+         ORDER BY schema, name;";
+               return $this->selectSet($sql);
+       }
+       /**
+        * Returns all FTS dictionary templates available
+        */
+       function getFtsDictionaryTemplates() {
+               $sql = "SELECT 
+           n.nspname as schema,
+           t.tmplname as name,
+           ( SELECT COALESCE(np.nspname, '(null)')::pg_catalog.text || '.' || p.proname FROM 
+             pg_catalog.pg_proc p 
+                                  LEFT JOIN pg_catalog.pg_namespace np ON np.oid = p.pronamespace 
+                                  WHERE t.tmplinit = p.oid ) AS  init, 
+           ( SELECT COALESCE(np.nspname, '(null)')::pg_catalog.text || '.' || p.proname FROM 
+             pg_catalog.pg_proc p 
+                                  LEFT JOIN pg_catalog.pg_namespace np ON np.oid = p.pronamespace 
+                                  WHERE t.tmpllexize = p.oid ) AS  lexize, 
+           pg_catalog.obj_description(t.oid, 'pg_ts_template') as comment
+         FROM pg_catalog.pg_ts_template t
+         LEFT JOIN pg_catalog.pg_namespace n ON n.oid = t.tmplnamespace 
+         WHERE pg_catalog.pg_ts_template_is_visible(t.oid)
+         ORDER BY schema, name;";
+               return $this->selectSet($sql);
+       }
+       /**
+        * Drops FTS coniguration
+        */     
+       function dropFtsConfiguration($ftscfg, $cascade) {
+               $this->fieldClean($ftscfg);
+               $sql = "DROP TEXT SEARCH CONFIGURATION \"{$ftscfg}\"";
+               if ($cascade) $sql .= " CASCADE";
+               return $this->execute($sql);
+       }
+       /**
+        * Drops FTS dictionary
+        * 
+        * @todo Support of dictionary templates dropping
+        */     
+       function dropFtsDictionary($ftsdict, $cascade = true) {
+               $this->fieldClean($ftsdict);
+               $sql = "DROP TEXT SEARCH DICTIONARY";
+               $sql .= " \"{$ftsdict}\"";
+               if ($cascade) $sql .= " CASCADE";
+               return $this->execute($sql);
+       }
+       
+       /**
+        * Alters FTS configuration
+        */
+       function updateFtsConfiguration($cfgname, $comment, $name, $prsname = null) {
+               $this->fieldClean($cfgname);
+               $this->fieldClean($name);
+               $this->clean($comment);
+       
+               $status = $this->beginTransaction();
+               if ($status != 0) {
+                       $this->rollbackTransaction();
+                       return -1;
+               }
+               $status = $this->setComment('TEXT SEARCH CONFIGURATION', $cfgname, '', $comment);
+               if ($status != 0) {
+                       $this->rollbackTransaction();
+                       return -1;
+               }
+               // Only if the name has changed
+               if ($name != $cfgname) {
+                       $sql = "ALTER TEXT SEARCH CONFIGURATION \"{$cfgname}\" RENAME TO \"{$name}\"";
+                       $status = $this->execute($sql);
+                       if ($status != 0) {
+                               $this->rollbackTransaction();
+                               return -1;
+                       }
+               }
+               
+               // Only if parser is defined
+               if ($prsname) {
+                       $sql = "ALTER TEXT SEARCH CONFIGURATION \"{$cfgname}\" SET PARSER \"{$prsname}\"";
+                       $status = $this->execute($sql);
+                       if ($status != 0) {
+                               $this->rollbackTransaction();
+                               return -1;
+                       }
+               }
+               
+               return $this->endTransaction();
+       }
+       
+       /**
+        * Creates a new FTS dictionary or FTS dictionary template.     
+        * @param string $dictname The name of the FTS dictionary to create
+        * @param boolean $isTemplate Flag whether we create usual dictionary or dictionary template
+        * @param string $template The existing FTS dictionary to be used as template for the new one
+        * @param string $lexize The name of the function, which does transformation of input word
+        * @param string $init The name of the function, which initializes dictionary 
+        * @param string $option Usually, it stores various options required for the dictionary
+        * @param string $comment If omitted, defaults to nothing
+        * @return 0 success
+        */
+       function createFtsDictionary($dictname, $isTemplate = false, $template = '', $lexize = '', $init = '', $option = '', $comment = '') {
+               $this->fieldClean($dictname);
+               $this->fieldClean($template);
+               $this->fieldClean($lexize);
+               $this->fieldClean($init);
+               $this->fieldClean($option);
+               $this->clean($comment);
+               $sql = "CREATE TEXT SEARCH DICTIONARY";
+               if ($isTemplate) {
+                       $sql .= " TEMPLATE \"{$dictname}\"";
+                       if ($lexize != '') $sql .= " LEXIZE \"{$lexize}\"";
+                       if ($init != '') $sql .= " INIT \"{$init}\"";
+                       $whatToComment = 'TEXT SEARCH DICTIONARY TEMPLATE';
+               } else {
+                       $sql .= " \"{$dictname}\"";
+                       if ($template != '') $sql .= " TEMPLATE \"{$template}\"";
+                       if ($option != '') $sql .= " OPTION \"{$option}\"";
+                       $whatToComment = 'TEXT SEARCH DICTIONARY';
+               }
+               
+               if ($comment != '') {
+                       $status = $this->beginTransaction();
+                       if ($status != 0) return -1;
+               }
+               
+               // Create the FTS dictionary
+               $status =  $this->execute($sql);
+               if ($status != 0) {
+                       $this->rollbackTransaction();
+                       return -1;
+               }
+               // Set the comment
+               if ($comment != '') {
+                       $status = $this->setComment($whatToComment, $dictname, '', $comment);
+                       if ($status != 0) {
+                               $this->rollbackTransaction();
+                               return -1;
+                       }
+               }
+               
+               return $this->endTransaction();
+       }
+       
+       /**
+        * Alters FTS dictionary or dictionary template
+        */
+       function updateFtsDictionary($dictname, $comment, $name) {
+               $this->fieldClean($dictname);
+               $this->fieldClean($name);
+               $this->clean($comment);
+       
+               $status = $this->beginTransaction();
+               if ($status != 0) {
+                       $this->rollbackTransaction();
+                       return -1;
+               }
+               $status = $this->setComment('TEXT SEARCH DICTIONARY', $dictname, '', $comment);
+               if ($status != 0) {
+                       $this->rollbackTransaction();
+                       return -1;
+               }
+               // Only if the name has changed
+               if ($name != $dictname) {
+                       $sql = "ALTER TEXT SEARCH CONFIGURATION \"{$dictname}\" RENAME TO \"{$name}\"";
+                       $status = $this->execute($sql);
+                       if ($status != 0) {
+                               $this->rollbackTransaction();
+                               return -1;
+                       }
+               }
+               
+               return $this->endTransaction();
+       }
+       /**
+        * Return all information relating to a FTS dictionary
+        * @param $ftsdict The name of the FTS dictionary
+        * @return FTS dictionary information
+        */
+       function getFtsDictionaryByName($ftsdict) {
+               $this->clean($ftsdict);
+               $sql = "SELECT 
+           n.nspname as schema,
+           d.dictname as name,
+           ( SELECT COALESCE(nt.nspname, '(null)')::pg_catalog.text || '.' || t.tmplname FROM 
+             pg_catalog.pg_ts_template t 
+                                  LEFT JOIN pg_catalog.pg_namespace nt ON nt.oid = t.tmplnamespace 
+                                  WHERE d.dicttemplate = t.oid ) AS  template, 
+           d.dictinitoption as init, 
+           pg_catalog.obj_description(d.oid, 'pg_ts_dict') as comment
+         FROM pg_catalog.pg_ts_dict d
+         LEFT JOIN pg_catalog.pg_namespace n ON n.oid = d.dictnamespace 
+         WHERE d.dictname = '{$ftsdict}'
+           AND pg_catalog.pg_ts_dict_is_visible(d.oid)
+         ORDER BY schema, name";
+         
+               return $this->selectSet($sql);
+       }
+       /**
+        * Creates/updates/deletes FTS mapping.
+        * @param string $cfgname The name of the FTS configuration to alter
+        * @param array $mapping Array of tokens' names
+        * @param string $action What to do with the mapping: add, alter or drop
+        * @param string $dictname Dictionary that will process tokens given or null in case of drop action  
+        * @return 0 success
+        */
+       function changeFtsMapping($ftscfg, $mapping, $action, $dictname = null) {
+               $this->fieldClean($ftscfg);
+               $this->fieldClean($dictname);
+               $this->arrayClean($mapping);
+               if (count($mapping) > 0) {
+                       switch ($action) {
+                               case 'alter':
+                                       $whatToDo = "ALTER";
+                                       break;
+                               case 'drop':
+                                       $whatToDo = "DROP";
+                                       break;
+                               default:
+                                       $whatToDo = "ADD";
+                                       break;
+                       }
+                       $sql = "ALTER TEXT SEARCH CONFIGURATION \"{$ftscfg}\" {$whatToDo} MAPPING FOR ";
+                       $sql .= implode(",", $mapping);
+                       if ($action != 'drop' && !empty($dictname)) { 
+                               $sql .= " WITH {$dictname}";
+                       }
+                       
+                       $status = $this->beginTransaction();
+                       if ($status != 0) {
+                               $this->rollbackTransaction();
+                               return -1;
+                       }
+                       $status =  $this->execute($sql);
+                       if ($status != 0) {
+                               $this->rollbackTransaction();
+                               return -1;
+                       }
+                       return $this->endTransaction(); 
+               } else {
+                       return -1;
+               }
+       }
+       /**
+        * Return all information related to a given FTS configuration's mapping
+        * @param $ftscfg The name of the FTS configuration
+        * @param $mapping The name of the mapping 
+        * @return FTS configuration information
+        */
+       function getFtsMappingByName($ftscfg, $mapping) {
+               $this->fieldClean($ftscfg);
+               $this->fieldClean($mapping);
+               
+               $getOidSql = "SELECT oid, cfgparser FROM pg_catalog.pg_ts_config WHERE cfgname = '{$ftscfg}'";
+               $oidSet = $this->selectSet($getOidSql);
+               $oid = $oidSet->fields['oid'];
+               $cfgparser = $oidSet->fields['cfgparser'];
+               
+               $getTokenIdSql = "SELECT tokid FROM pg_catalog.ts_token_type({$cfgparser}) WHERE alias = '{$mapping}'";
+               $tokenIdSet = $this->selectSet($getTokenIdSql);
+               $tokid = $tokenIdSet->fields['tokid'];
+               
+               $sql = "SELECT 
+    (SELECT t.alias FROM pg_catalog.ts_token_type(c.cfgparser) AS t WHERE t.tokid = m.maptokentype) AS name,
+                        d.dictname as dictionaries
+         FROM pg_catalog.pg_ts_config AS c, pg_catalog.pg_ts_config_map AS m, pg_catalog.pg_ts_dict d
+         WHERE c.oid = {$oid} AND m.mapcfg = c.oid AND m.maptokentype = {$tokid} AND m.mapdict = d.oid  
+         LIMIT 1;";
+               return $this->selectSet($sql);
+       }
+       /**
+        * Return list of FTS mappings possible for given parser (specified by given configuration since configuration
+        * can only have 1 parser)
+        */
+       function getFtsMappings($ftscfg) {
+               $cfg = $this->getFtsConfigurationByName($ftscfg);
+               $sql = "SELECT alias AS name, description FROM pg_catalog.ts_token_type({$cfg->fields['parser_id']}) ORDER BY name";
+               return $this->selectSet($sql);
+       }
+
+
+       // Capabilities
        function hasCreateTableLikeWithIndexes() {return true;}
 }
 ?>
diff --git a/images/themes/default/Fts.png b/images/themes/default/Fts.png
new file mode 100644 (file)
index 0000000..4bbc8a8
Binary files /dev/null and b/images/themes/default/Fts.png differ
index d51af4a00e2d56540c89ebc23527c9aa49b831c3..23f31afbd4f6e6a02a9daa2a575e73de1e9f1c52 100755 (executable)
@@ -4,7 +4,7 @@
         * English language file for phpPgAdmin.  Use this as a basis
         * for new translations.
         *
-        * $Id: english.php,v 1.215 2007/09/09 20:20:31 ioguix Exp $
+        * $Id: english.php,v 1.216 2007/09/13 05:16:42 xzilla Exp $
         */
 
        // Language and character set
        $lang['stractionsonmultiplelines'] = 'Actions on multiple lines';
        $lang['strselectall'] = 'Select all';
        $lang['strunselectall'] = 'Unselect all';
+       $lang['strlocale'] = 'Locale';
 
        // Database sizes
        $lang['strsize'] = 'Size';
        $lang['strpreparedxacts'] = 'Prepared transactions';
        $lang['strxactid'] = 'Transaction ID';
        $lang['strgid'] = 'Global ID';
-?>
+       
+       // Fulltext search
+       $lang['strfulltext'] = 'Full Text Search';
+       $lang['strftsconfig'] = 'FTS configuration';
+       $lang['strftscreateconfig'] = 'Create FTS configuration';
+       $lang['strftscreatedict'] = 'Create dictionary';
+       $lang['strftscreatedicttemplate'] = 'Create dictionary template';
+       $lang['strftscreateparser'] = 'Create parser';
+       $lang['strftsnoconfigs'] = 'No FTS configuration found.';
+       $lang['strftsconfigdropped'] = 'FTS configuration dropped.';
+       $lang['strftsconfigdroppedbad'] = 'FTS configuration drop failed.';
+       $lang['strconfdropftsconfig'] = 'Are you sure you want to drop the FTS configuration "%s"?';
+       $lang['strconfdropftsdict'] = 'Are you sure you want to drop the FTS dictionary "%s"?';
+       $lang['strconfdropftsmapping'] = 'Are you sure you want to drop mapping "%s" of FTS configuration "%s"?';
+       $lang['strftstemplate'] = 'Template';
+       $lang['strftsparser'] = 'Parser';
+       $lang['strftsconfigneedsname'] = 'You must give a name for your FTS configuration.';
+       $lang['strftsconfigcreated'] = 'FTS configuration created';
+       $lang['strftsconfigcreatedbad'] = 'FTS configuration creation failed.';
+       $lang['strftsmapping'] = 'Mapping';
+       $lang['strftsdicts'] = 'Dictionaries';
+       $lang['strftsdict'] = 'Dictionary';
+       $lang['strftsemptymap'] = 'Empty FTS configuration map.';
+       $lang['strftswithmap'] = 'With map';
+       $lang['strftsmakedefault'] = 'Make default for given locale';
+       $lang['strftsconfigaltered'] = 'FTS configuration altered.';
+       $lang['strftsconfigalteredbad'] = 'FTS configuration alter failed.';
+       $lang['strftsconfigmap'] = 'FTS configuration map';
+       $lang['strftsparsers'] = 'FTS parsers';
+       $lang['strftsnoparsers'] = 'No FTS parsers available.';
+       $lang['strftsnodicts'] = 'No FTS dictionaries available.';
+       $lang['strftsdictcreated'] = 'FTS dictionary created';
+       $lang['strftsdictcreatedbad'] = 'FTS dictionary creation failed.';
+       $lang['strftslexize'] = 'Lexize';
+       $lang['strftsinit'] = 'Init';
+       $lang['strftsoption'] = 'Option';
+       $lang['strftsdictneedsname'] = 'You must give a name for your FTS dictionary.';
+       $lang['strftsdictdropped'] = 'FTS dictionary dropped.';
+       $lang['strftsdictdroppedbad'] = 'FTS dictionary drop failed.';
+       $lang['strftsdictaltered'] = 'FTS dictionary altered.';
+       $lang['strftsdictalteredbad'] = 'FTS dictionary alter failed.';
+       $lang['strftsaddmapping'] = 'Add new mapping';
+       $lang['strftsspecifymappingtodrop'] = 'You must specify at least one mapping to drop';
+       $lang['strftsspecifyconfigtoalter'] = 'You must specify a FTS configuration to alter';
+       $lang['strftsmappingdropped'] = 'FTS mapping dropped.';
+       $lang['strftsmappingdroppedbad'] = 'FTS mapping drop failed.';
+       $lang['strftsnodictionaries'] = 'No dictionaries found.';
+       $lang['strftsmappingaltered'] = 'FTS mapping altered.';
+       $lang['strftsmappingalteredbad'] = 'FTS mapping alter failed.';
+       $lang['strftsmappingadded'] = 'FTS mapping added.';
+       $lang['strftsmappingaddedbad'] = 'FTS mapping add failed.';
+       
+       
+?>
\ No newline at end of file
index 26f2eeb5fd5e51cfd8bd798c0c6809c2e9badb9f..27470a2f1d0d026cb306e0e21ed09bbc008c6739 100644 (file)
@@ -4,7 +4,7 @@
         * English language file for phpPgAdmin.  Use this as a basis
         * for new translations.
         *
-        * $Id: english.php,v 1.167 2007/09/10 10:49:24 ioguix Exp $
+        * $Id: english.php,v 1.168 2007/09/13 05:16:42 xzilla Exp $
         */
 
        // Language and character set
        $lang['stractionsonmultiplelines'] = 'Actions on multiple lines';
        $lang['strselectall'] = 'Select all';
        $lang['strunselectall'] = 'Unselect all';
+       $lang['strlocale'] = 'Locale';
 
        // Database sizes
        $lang['strsize'] = 'Size';
        $lang['strpreparedxacts'] = 'Prepared transactions';
        $lang['strxactid'] = 'Transaction ID';
        $lang['strgid'] = 'Global ID';
+       
+       // Fulltext search
+       $lang['strfulltext'] = 'Full Text Search';
+       $lang['strftsconfig'] = 'FTS configuration';
+       $lang['strftscreateconfig'] = 'Create FTS configuration';
+       $lang['strftscreatedict'] = 'Create dictionary';
+       $lang['strftscreatedicttemplate'] = 'Create dictionary template';
+       $lang['strftscreateparser'] = 'Create parser';
+       $lang['strftsnoconfigs'] = 'No FTS configuration found.';
+       $lang['strftsconfigdropped'] = 'FTS configuration dropped.';
+       $lang['strftsconfigdroppedbad'] = 'FTS configuration drop failed.';
+       $lang['strconfdropftsconfig'] = 'Are you sure you want to drop the FTS configuration &quot;%s&quot;?';
+       $lang['strconfdropftsdict'] = 'Are you sure you want to drop the FTS dictionary &quot;%s&quot;?';
+       $lang['strconfdropftsmapping'] = 'Are you sure you want to drop mapping &quot;%s&quot; of FTS configuration &quot;%s&quot;?';
+       $lang['strftstemplate'] = 'Template';
+       $lang['strftsparser'] = 'Parser';
+       $lang['strftsconfigneedsname'] = 'You must give a name for your FTS configuration.';
+       $lang['strftsconfigcreated'] = 'FTS configuration created';
+       $lang['strftsconfigcreatedbad'] = 'FTS configuration creation failed.';
+       $lang['strftsmapping'] = 'Mapping';
+       $lang['strftsdicts'] = 'Dictionaries';
+       $lang['strftsdict'] = 'Dictionary';
+       $lang['strftsemptymap'] = 'Empty FTS configuration map.';
+       $lang['strftswithmap'] = 'With map';
+       $lang['strftsmakedefault'] = 'Make default for given locale';
+       $lang['strftsconfigaltered'] = 'FTS configuration altered.';
+       $lang['strftsconfigalteredbad'] = 'FTS configuration alter failed.';
+       $lang['strftsconfigmap'] = 'FTS configuration map';
+       $lang['strftsparsers'] = 'FTS parsers';
+       $lang['strftsnoparsers'] = 'No FTS parsers available.';
+       $lang['strftsnodicts'] = 'No FTS dictionaries available.';
+       $lang['strftsdictcreated'] = 'FTS dictionary created';
+       $lang['strftsdictcreatedbad'] = 'FTS dictionary creation failed.';
+       $lang['strftslexize'] = 'Lexize';
+       $lang['strftsinit'] = 'Init';
+       $lang['strftsoption'] = 'Option';
+       $lang['strftsdictneedsname'] = 'You must give a name for your FTS dictionary.';
+       $lang['strftsdictdropped'] = 'FTS dictionary dropped.';
+       $lang['strftsdictdroppedbad'] = 'FTS dictionary drop failed.';
+       $lang['strftsdictaltered'] = 'FTS dictionary altered.';
+       $lang['strftsdictalteredbad'] = 'FTS dictionary alter failed.';
+       $lang['strftsaddmapping'] = 'Add new mapping';
+       $lang['strftsspecifymappingtodrop'] = 'You must specify at least one mapping to drop';
+       $lang['strftsspecifyconfigtoalter'] = 'You must specify a FTS configuration to alter';
+       $lang['strftsmappingdropped'] = 'FTS mapping dropped.';
+       $lang['strftsmappingdroppedbad'] = 'FTS mapping drop failed.';
+       $lang['strftsnodictionaries'] = 'No dictionaries found.';
+       $lang['strftsmappingaltered'] = 'FTS mapping altered.';
+       $lang['strftsmappingalteredbad'] = 'FTS mapping alter failed.';
+       $lang['strftsmappingadded'] = 'FTS mapping added.';
+       $lang['strftsmappingaddedbad'] = 'FTS mapping add failed.';
+       
+       
 ?>