Translation -> Babel
authorJan Schneider <jan@horde.org>
Mon, 19 Jan 2009 10:07:30 +0000 (11:07 +0100)
committerJan Schneider <jan@horde.org>
Mon, 19 Jan 2009 10:07:30 +0000 (11:07 +0100)
20 files changed:
babel/commit.php
babel/config/hooks.php.dist
babel/edit.php
babel/extract.php
babel/lib/Babel.php [new file with mode: 0644]
babel/lib/Translation.php [deleted file]
babel/lib/api.php
babel/lib/base.php
babel/make.php
babel/po/babel.pot [new file with mode: 0644]
babel/po/translation.pot [deleted file]
babel/reset.php
babel/stats.php
babel/templates/common-header.inc
babel/templates/index.php
babel/themes/graphics/babel.png [new file with mode: 0644]
babel/themes/graphics/skeleton.png [deleted file]
babel/themes/graphics/translation.png [deleted file]
babel/upload.php
babel/view.php

index f3d62ab..809e639 100644 (file)
@@ -45,7 +45,7 @@ if ($custom_commit) {
        
        if (@file_exists($po)) {
            Translate_Display::info(_("Commit") . " $po ($lang)");
-           Translation::callHook('commit', array($po, $lang));
+           Babel::callHook('commit', array($po, $lang));
        }
        
     }
index ae9ac5c..57602d1 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 
-if (!function_exists('_translation_hook_commit')) {
-    function _translation_hook_commit($info)
+if (!function_exists('_babel_hook_commit')) {
+    function _babel_hook_commit($info)
     {
        $po   = $info[0];
        $lang = $info[1];
@@ -10,8 +10,8 @@ if (!function_exists('_translation_hook_commit')) {
     }
 }
 
-if (!function_exists('_translation_hook_reset')) {
-    function _translation_hook_reset($po)
+if (!function_exists('_babel_hook_reset')) {
+    function _babel_hook_reset($po)
     {
 
        $cmd = "rm -rf $po";
index 1b69854..fa642bb 100644 (file)
@@ -10,7 +10,7 @@
  */
 
 $meta_params = array(
-                    "Project-Id-Version" => @$_SESSION['translation']['language'],
+                    "Project-Id-Version" => @$_SESSION['babel']['language'],
                     "Report-Msgid-Bugs-To" => "support@scopserv.com",
                     "POT-Creation-Date" => "",
                     "PO-Revision-Date" => "",
@@ -39,13 +39,13 @@ $vars = &Variables::getDefaultVariables();
 
 if ($app) {
     $napp = ($app == 'horde') ? '' : $app;
-    $pofile = HORDE_BASE . '/' . $napp . '/po/' . $_SESSION['translation']['language'] . '.po';
+    $pofile = HORDE_BASE . '/' . $napp . '/po/' . $_SESSION['babel']['language'] . '.po';
     $po = &new File_Gettext_PO();
     $po->load($pofile);
 }
 
 /* Set up the template fields. */
-$template->set('menu', Translation::getMenu('string'));
+$template->set('menu', Babel::getMenu('string'));
 $template->set('notify', Util::bufferOutput(array($notification, 'notify'), array('listeners' => 'status')));
 
 /* Create upload form */
@@ -76,7 +76,7 @@ if ($app && Util::getFormData('submitbutton') == _("Save")) {
 
 if (!$app) {
     $form->setButtons(_("Edit"));
-    $form->addVariable(_("Module"), 'module', 'enum', true, false, null, array(Translation::listApps(), true));
+    $form->addVariable(_("Module"), 'module', 'enum', true, false, null, array(Babel::listApps(), true));
     $form->addVariable('', '', 'spacer', true);
 } else {
 
index 57ad0de..1ab3aba 100644 (file)
@@ -15,14 +15,14 @@ set_time_limit(0);
 require_once BABEL_BASE . '/lib/base.php';
 
 if ($app) {
-    Translation::RB_init();
+    Babel::RB_init();
 }
 
 /* Render the page. */
 require BABEL_TEMPLATES . '/common-header.inc';
 
 if ($app) {
-    Translation::RB_start(300);
+    Babel::RB_start(300);
 }
 
 echo $template->fetch(BABEL_TEMPLATES . '/layout.html');
@@ -34,7 +34,7 @@ $form = &new Horde_Form($vars, _("Extract Translation"), 'extract');
 
 if (!$app) {
     $form->setButtons(_("Extract"));
-    $form->addVariable(_("Module"), 'module', 'enum', true, false, null, array(Translation::listApps(true), true));
+    $form->addVariable(_("Module"), 'module', 'enum', true, false, null, array(Babel::listApps(true), true));
     $form->addVariable('', '', 'spacer', true);
     
     $renderer_params = array();
@@ -113,7 +113,7 @@ if (!$app) {
     Translate_Display::info();
     Translate_Display::header(_("Done!"));
     
-    Translation::RB_close();
+    Babel::RB_close();
 }
 
 require $registry->get('templates', 'horde') . '/common-footer.inc';
diff --git a/babel/lib/Babel.php b/babel/lib/Babel.php
new file mode 100644 (file)
index 0000000..8037f02
--- /dev/null
@@ -0,0 +1,312 @@
+<?php
+/**
+ * Copyright 2009 The Horde Project (http://www.horde.org/)
+ *
+ * See the enclosed file COPYING for license information (GPL). If you
+ * did not receive this file, see http://www.fsf.org/copyleft/gpl.html.
+ *
+ * @author  Joel Vandal <joel@scopserv.com>
+ * @package Babel
+ */
+
+class Babel {
+
+    function callHook($fname, $info) {
+       /* Check if an hooks file exist */
+       if (file_exists(BABEL_BASE . '/config/hooks.php')) {
+           include_once BABEL_BASE . '/config/hooks.php';
+           
+           $func = '_babel_hook_' . $fname;
+           
+           if (function_exists($func)) {
+               $res = call_user_func($func, $info);
+           } else {
+               Translate_Display::warning(sprintf(_("Function doesn't exist: %s"), $func));
+           }
+       } else {
+           Translate_Display::warning(_("Hook file doesn't exist"));
+       }
+    }
+    
+    function displayLanguage() {
+       global $nls, $lang, $app;
+       
+       if (!isset($nls['languages'][$lang])) {
+           return;
+       }
+       
+       $res = sprintf(_("Language: %s (%s)"), $nls['languages'][$lang], $lang);
+       if ($app) {
+           $res .= '&nbsp; | &nbsp; ' . sprintf(_("Module: %s"), $app);
+       }
+       
+       return $res;
+    }
+
+    
+    function ModuleSelection() {
+       $html = '';
+       $html .= '<span style="float:right">';
+       $html .= '<form action="' . Horde::selfUrl() . '" method="post" name="moduleSelector">';
+       $html .= '<select name="module" onchange="moduleSubmit()">';
+       
+       $apps = array('ALL' => _("All Applications")) +  Babel::listApps();
+       
+       foreach($apps as $app => $desc) {
+           if (!Babel::hasPermission("module:$app")) {
+               continue;
+           }
+           
+           if (Util::getFormData('module') == $app) {
+               $html .= '<option class="control" value="' . $app . '" selected>' .  '+ ' . $desc;
+           } else {
+               $html .= '<option value="' . $app . '">' . '&#8211; ' . $desc;
+           }
+       }
+       
+       $html .= '</select>';
+       $html .= '</form>';
+       $html .= '</span>';
+       
+       $html .= '<script language="JavaScript" type="text/javascript">' . "\n";
+       $html .= '<!--' . "\n";
+       $html .= 'var loading;' . "\n";
+       $html .= 'function moduleSubmit()' . "\n";
+       $html .= '{' . "\n";
+       $html .= 'document.moduleSelector.submit();' . "\n";
+       $html .= 'return false;' . "\n";
+       $html .= '}' . "\n";
+       $html .= '// -->' . "\n";
+       $html .= '</script>' . "\n";
+       return $html;
+    }
+    
+    function LanguageSelection() {
+       global $nls, $app;
+       
+       $html = '';
+       $html .= '<span style="float:right">';
+       $html .= '<form action="' . Horde::selfUrl() . '" method="post" name="languageSelector">';
+       $html .= '&nbsp;';
+       $html .= '<input type="hidden" name="module" value="' . $app . '">';
+       $html .= '<select name="display_language" onchange="languageSubmit()">';
+       
+       $tests =  $nls['languages'];
+       
+       // Unset English
+       unset($tests['en_US']);
+       
+       foreach($tests as $dir => $desc) {
+           if (!Babel::hasPermission("language:$dir")) {
+               continue;
+           }
+           
+           if (isset($_SESSION['babel']['language']) && $dir == $_SESSION['babel']['language']) {
+               $html .= '<option class="control" value="' . $dir . '" selected>' .  '+ ' . $desc;
+           } else {
+               $html .= '<option value="' . $dir . '">' . '&#8211; ' . $desc;
+           }
+       }
+       
+       $html .= '</select>';
+       $html .= '&nbsp;';
+       $html .= '</form>';
+       $html .= '</span>';
+       
+       $html .= '<script language="JavaScript" type="text/javascript">' . "\n";
+       $html .= '<!--' . "\n";
+       $html .= 'var loading;' . "\n";
+       $html .= 'function languageSubmit()' . "\n";
+       $html .= '{' . "\n";
+       $html .= 'document.languageSelector.submit();' . "\n";
+       $html .= 'return false;' . "\n";
+       $html .= '}' . "\n";
+       $html .= '// -->' . "\n";
+       $html .= '</script>' . "\n";
+       return $html;
+    }
+    
+    function listApps($all = false) {
+       global $registry;
+
+       $res = array();
+       
+       if ($all) {
+           $res['ALL'] = _("All Applications");
+       }
+       
+       foreach ($registry->applications as $app => $params) {
+           if ($params['status'] == 'heading' || $params['status'] == 'block') {
+               continue;
+           }
+           
+           if (isset($params['fileroot']) && !is_dir($params['fileroot'])) {
+               continue;
+           }
+           
+           if (preg_match('/_reports$/', $app) || preg_match('/_tools$/', $app)) {
+               continue;
+           }
+           
+           if (Babel::hasPermission("module:$app")) {
+               $res[$app] = sprintf("%s (%s)", $params['name'], $app);
+           }
+       }
+       return $res;
+    }
+      
+    /**
+     * Returns the value of the specified permission for $userId.
+     *
+     * @return mixed  Does user have $permission?
+     */
+    function hasPermission($permission, $filter = null, $perm = null)
+    {
+       global $perms;
+       
+       $userId = Auth::getAuth();
+       $admin = ($userId == 'admin') ? true : false;
+       
+       if ($admin || !$perms->exists('babel:' . $permission)) {
+           return true;
+       }
+       
+       $allowed = $perms->getPermissions('babel:' . $permission);
+       
+       switch ($filter) {
+        case 'tabs':
+           if ($perm) {
+               $allowed  = $perms->hasPermission('babel:' . $permission, Auth::getAuth(), $perm);
+           }
+           break;
+       }
+       return $allowed;
+    }
+
+    /**
+     * Get the module main Menu.
+     **/
+    function getMenu($returnType = 'object')
+    {
+        global $registry;
+
+       require_once 'Horde/Menu.php';
+       $menu = &new Menu();
+       
+        $menu->addArray(array('url' => Horde::applicationUrl('index.php'),
+                             'text' => _("_General"),
+                             'icon' => 'list.png'));
+
+       if (Babel::hasPermission('view')) {
+           $menu->addArray(array('url' => Horde::applicationUrl('view.php'),
+                                 'text' => _("_View"),
+                                 'icon' => 'view.png'));
+       }
+       
+       if (Babel::hasPermission('stats')) {
+           $menu->addArray(array('url' => Horde::applicationUrl('stats.php'),
+                                 'text' => _("_Stats"),
+                                 'icon' => 'extract.png'));
+       }
+       
+       if (Babel::hasPermission('extract')) {
+           $menu->addArray(array('url' => Horde::applicationUrl('extract.php'),
+                                 'text' => _("_Extract"),
+                                 'icon' => 'extract.png'));
+       }
+       
+       if (Babel::hasPermission('make')) {
+           $menu->addArray(array('url' => Horde::applicationUrl('make.php'),
+                                 'text' => _("_Make"),
+                                 'icon' => 'make.png'));
+       }
+
+       if (Babel::hasPermission('upload')) {
+           $menu->addArray(array('url' => Horde::applicationUrl('upload.php'),
+                                 'text' => _("_Upload"),
+                                 'icon' => 'upload.png'));
+       }
+       if ($returnType == 'object') {
+           return $menu;
+       } else {
+           return $menu->render();
+       }
+    }
+
+
+    /**
+     * Send an Email.
+     **/
+    function sendEmail($email, $type = 'html', $attachments = array()) {
+       global $client, $scopserv;
+       
+       include_once("Mail.php");
+       include_once("Mail/mime.php");
+
+       $headers["From"]    = $email['from'];
+       $headers["Subject"] = $email['subject'];
+       
+       $mime = new Mail_Mime();
+       if ($type == 'html') {
+           $mime->setHtmlBody($email['content']);
+       } else {
+           $mime->setTxtBody($email['content']);
+       }
+       
+       if (!empty($attachments)) {
+           foreach ($attachments as $info) {
+               $mime->addAttachment($info['file'],
+                                    $info['type'],
+                                    $info['name'], false);
+           }
+       }
+       
+       $body = $mime->get();
+       $hdrs = $mime->headers($headers);
+       
+       $mail_object = &Mail::factory("mail");
+       return $mail_object->send($email['to'], $hdrs, $body);
+    }
+
+
+    function RB_init() {
+       Horde::addScriptFile('prototype.js', 'horde', true);
+       Horde::addScriptFile('effects.js', 'horde', true);
+       Horde::addScriptFile('redbox.js', 'horde', true);
+    }
+    
+    function RB_start($secs = 30) {
+       
+       $msg = '';
+       $msg .= '<table width=100% id="RB_confirm"><tr><td>';
+       $msg .= '<b>' . _("Please be patient ...") . '</b>';
+       $msg .= '<br />';
+       $msg .= '<br />';
+       if ($secs < 60) {
+           $msg .= addslashes(sprintf(_("Can take up to %d seconds !"), $secs));
+       } else {
+           $min = intval($secs / 60);
+           if ($min == 1) {
+               $msg .= addslashes(_("Can take up to 1 minute !"));
+           } else {
+               $msg .= addslashes(sprintf(_("Can take up to %d minutes !"), $min));
+           }
+       }
+       
+       $msg .= '</td><td><img src="themes/graphics/redbox_spinner.gif">';
+       
+       $msg .= '</td></tr></table>';
+       echo '<script>';
+       echo 'RedBox.loading();';
+       echo "RedBox.showHtml('$msg');";
+       echo '</script>';
+       flush();
+    }
+
+    function RB_close() {
+       echo '<script>';
+       echo 'RedBox.close();';
+       echo '</script>';
+    }
+    
+}
diff --git a/babel/lib/Translation.php b/babel/lib/Translation.php
deleted file mode 100644 (file)
index 06c1736..0000000
+++ /dev/null
@@ -1,312 +0,0 @@
-<?php
-/**
- * Copyright 2009 The Horde Project (http://www.horde.org/)
- *
- * See the enclosed file COPYING for license information (GPL). If you
- * did not receive this file, see http://www.fsf.org/copyleft/gpl.html.
- *
- * @author  Joel Vandal <joel@scopserv.com>
- * @package Babel
- */
-
-class Translation {
-
-    function callHook($fname, $info) {
-       /* Check if an hooks file exist */
-       if (file_exists(BABEL_BASE . '/config/hooks.php')) {
-           include_once BABEL_BASE . '/config/hooks.php';
-           
-           $func = '_translation_hook_' . $fname;
-           
-           if (function_exists($func)) {
-               $res = call_user_func($func, $info);
-           } else {
-               Translate_Display::warning(sprintf(_("Function doesn't exist: %s"), $func));
-           }
-       } else {
-           Translate_Display::warning(_("Hook file doesn't exist"));
-       }
-    }
-    
-    function displayLanguage() {
-       global $nls, $lang, $app;
-       
-       if (!isset($nls['languages'][$lang])) {
-           return;
-       }
-       
-       $res = sprintf(_("Language: %s (%s)"), $nls['languages'][$lang], $lang);
-       if ($app) {
-           $res .= '&nbsp; | &nbsp; ' . sprintf(_("Module: %s"), $app);
-       }
-       
-       return $res;
-    }
-
-    
-    function ModuleSelection() {
-       $html = '';
-       $html .= '<span style="float:right">';
-       $html .= '<form action="' . Horde::selfUrl() . '" method="post" name="moduleSelector">';
-       $html .= '<select name="module" onchange="moduleSubmit()">';
-       
-       $apps = array('ALL' => _("All Applications")) +  Translation::listApps();
-       
-       foreach($apps as $app => $desc) {
-           if (!Translation::hasPermission("module:$app")) {
-               continue;
-           }
-           
-           if (Util::getFormData('module') == $app) {
-               $html .= '<option class="control" value="' . $app . '" selected>' .  '+ ' . $desc;
-           } else {
-               $html .= '<option value="' . $app . '">' . '&#8211; ' . $desc;
-           }
-       }
-       
-       $html .= '</select>';
-       $html .= '</form>';
-       $html .= '</span>';
-       
-       $html .= '<script language="JavaScript" type="text/javascript">' . "\n";
-       $html .= '<!--' . "\n";
-       $html .= 'var loading;' . "\n";
-       $html .= 'function moduleSubmit()' . "\n";
-       $html .= '{' . "\n";
-       $html .= 'document.moduleSelector.submit();' . "\n";
-       $html .= 'return false;' . "\n";
-       $html .= '}' . "\n";
-       $html .= '// -->' . "\n";
-       $html .= '</script>' . "\n";
-       return $html;
-    }
-    
-    function LanguageSelection() {
-       global $nls, $app;
-       
-       $html = '';
-       $html .= '<span style="float:right">';
-       $html .= '<form action="' . Horde::selfUrl() . '" method="post" name="languageSelector">';
-       $html .= '&nbsp;';
-       $html .= '<input type="hidden" name="module" value="' . $app . '">';
-       $html .= '<select name="display_language" onchange="languageSubmit()">';
-       
-       $tests =  $nls['languages'];
-       
-       // Unset English
-       unset($tests['en_US']);
-       
-       foreach($tests as $dir => $desc) {
-           if (!Translation::hasPermission("language:$dir")) {
-               continue;
-           }
-           
-           if (isset($_SESSION['translation']['language']) && $dir == $_SESSION['translation']['language']) {
-               $html .= '<option class="control" value="' . $dir . '" selected>' .  '+ ' . $desc;
-           } else {
-               $html .= '<option value="' . $dir . '">' . '&#8211; ' . $desc;
-           }
-       }
-       
-       $html .= '</select>';
-       $html .= '&nbsp;';
-       $html .= '</form>';
-       $html .= '</span>';
-       
-       $html .= '<script language="JavaScript" type="text/javascript">' . "\n";
-       $html .= '<!--' . "\n";
-       $html .= 'var loading;' . "\n";
-       $html .= 'function languageSubmit()' . "\n";
-       $html .= '{' . "\n";
-       $html .= 'document.languageSelector.submit();' . "\n";
-       $html .= 'return false;' . "\n";
-       $html .= '}' . "\n";
-       $html .= '// -->' . "\n";
-       $html .= '</script>' . "\n";
-       return $html;
-    }
-    
-    function listApps($all = false) {
-       global $registry;
-
-       $res = array();
-       
-       if ($all) {
-           $res['ALL'] = _("All Applications");
-       }
-       
-       foreach ($registry->applications as $app => $params) {
-           if ($params['status'] == 'heading' || $params['status'] == 'block') {
-               continue;
-           }
-           
-           if (isset($params['fileroot']) && !is_dir($params['fileroot'])) {
-               continue;
-           }
-           
-           if (preg_match('/_reports$/', $app) || preg_match('/_tools$/', $app)) {
-               continue;
-           }
-           
-           if (Translation::hasPermission("module:$app")) {
-               $res[$app] = sprintf("%s (%s)", $params['name'], $app);
-           }
-       }
-       return $res;
-    }
-      
-    /**
-     * Returns the value of the specified permission for $userId.
-     *
-     * @return mixed  Does user have $permission?
-     */
-    function hasPermission($permission, $filter = null, $perm = null)
-    {
-       global $perms;
-       
-       $userId = Auth::getAuth();
-       $admin = ($userId == 'admin') ? true : false;
-       
-       if ($admin || !$perms->exists('translation:' . $permission)) {
-           return true;
-       }
-       
-       $allowed = $perms->getPermissions('translation:' . $permission);
-       
-       switch ($filter) {
-        case 'tabs':
-           if ($perm) {
-               $allowed  = $perms->hasPermission('translation:' . $permission, Auth::getAuth(), $perm);
-           }
-           break;
-       }
-       return $allowed;
-    }
-
-    /**
-     * Get the module main Menu.
-     **/
-    function getMenu($returnType = 'object')
-    {
-        global $registry;
-
-       require_once 'Horde/Menu.php';
-       $menu = &new Menu();
-       
-        $menu->addArray(array('url' => Horde::applicationUrl('index.php'),
-                             'text' => _("_General"),
-                             'icon' => 'list.png'));
-
-       if (Translation::hasPermission('view')) {
-           $menu->addArray(array('url' => Horde::applicationUrl('view.php'),
-                                 'text' => _("_View"),
-                                 'icon' => 'view.png'));
-       }
-       
-       if (Translation::hasPermission('stats')) {
-           $menu->addArray(array('url' => Horde::applicationUrl('stats.php'),
-                                 'text' => _("_Stats"),
-                                 'icon' => 'extract.png'));
-       }
-       
-       if (Translation::hasPermission('extract')) {
-           $menu->addArray(array('url' => Horde::applicationUrl('extract.php'),
-                                 'text' => _("_Extract"),
-                                 'icon' => 'extract.png'));
-       }
-       
-       if (Translation::hasPermission('make')) {
-           $menu->addArray(array('url' => Horde::applicationUrl('make.php'),
-                                 'text' => _("_Make"),
-                                 'icon' => 'make.png'));
-       }
-
-       if (Translation::hasPermission('upload')) {
-           $menu->addArray(array('url' => Horde::applicationUrl('upload.php'),
-                                 'text' => _("_Upload"),
-                                 'icon' => 'upload.png'));
-       }
-       if ($returnType == 'object') {
-           return $menu;
-       } else {
-           return $menu->render();
-       }
-    }
-
-
-    /**
-     * Send an Email.
-     **/
-    function sendEmail($email, $type = 'html', $attachments = array()) {
-       global $client, $scopserv;
-       
-       include_once("Mail.php");
-       include_once("Mail/mime.php");
-
-       $headers["From"]    = $email['from'];
-       $headers["Subject"] = $email['subject'];
-       
-       $mime = new Mail_Mime();
-       if ($type == 'html') {
-           $mime->setHtmlBody($email['content']);
-       } else {
-           $mime->setTxtBody($email['content']);
-       }
-       
-       if (!empty($attachments)) {
-           foreach ($attachments as $info) {
-               $mime->addAttachment($info['file'],
-                                    $info['type'],
-                                    $info['name'], false);
-           }
-       }
-       
-       $body = $mime->get();
-       $hdrs = $mime->headers($headers);
-       
-       $mail_object = &Mail::factory("mail");
-       return $mail_object->send($email['to'], $hdrs, $body);
-    }
-
-
-    function RB_init() {
-       Horde::addScriptFile('prototype.js', 'horde', true);
-       Horde::addScriptFile('effects.js', 'horde', true);
-       Horde::addScriptFile('redbox.js', 'horde', true);
-    }
-    
-    function RB_start($secs = 30) {
-       
-       $msg = '';
-       $msg .= '<table width=100% id="RB_confirm"><tr><td>';
-       $msg .= '<b>' . _("Please be patient ...") . '</b>';
-       $msg .= '<br />';
-       $msg .= '<br />';
-       if ($secs < 60) {
-           $msg .= addslashes(sprintf(_("Can take up to %d seconds !"), $secs));
-       } else {
-           $min = intval($secs / 60);
-           if ($min == 1) {
-               $msg .= addslashes(_("Can take up to 1 minute !"));
-           } else {
-               $msg .= addslashes(sprintf(_("Can take up to %d minutes !"), $min));
-           }
-       }
-       
-       $msg .= '</td><td><img src="themes/graphics/redbox_spinner.gif">';
-       
-       $msg .= '</td></tr></table>';
-       echo '<script>';
-       echo 'RedBox.loading();';
-       echo "RedBox.showHtml('$msg');";
-       echo '</script>';
-       flush();
-    }
-
-    function RB_close() {
-       echo '<script>';
-       echo 'RedBox.close();';
-       echo '</script>';
-    }
-    
-}
index e0c49af..58a2a52 100644 (file)
@@ -17,7 +17,7 @@ $_services['perms'] = array(
     'type' => '{urn:horde}hash'
 );
 
-function _translation_perms()
+function _babel_perms()
 {
 
     global $nls, $registry;
@@ -27,19 +27,19 @@ function _translation_perms()
        return $perms;
     }
 
-    $perms['tree']['translation']['language'] = array();
-    $perms['title']['translation:language'] = _("Languages");
-    $perms['type']['translation:language']  = 'none';
+    $perms['tree']['babel']['language'] = array();
+    $perms['title']['babel:language'] = _("Languages");
+    $perms['type']['babel:language']  = 'none';
     
     foreach($nls['languages'] as $langcode => $langdesc) {
-       $perms['tree']['translation']['language'][$langcode] = false;
-       $perms['title']['translation:language:' . $langcode] = sprintf("%s (%s)", $langdesc, $langcode);
-       $perms['type']['translation:language:' . $langcode] = 'boolean';
+       $perms['tree']['babel']['language'][$langcode] = false;
+       $perms['title']['babel:language:' . $langcode] = sprintf("%s (%s)", $langdesc, $langcode);
+       $perms['type']['babel:language:' . $langcode] = 'boolean';
     }
 
-    $perms['tree']['translation']['module'] = array();
-    $perms['title']['translation:module'] = _("Modules");
-    $perms['type']['translation:module']  = 'none';
+    $perms['tree']['babel']['module'] = array();
+    $perms['title']['babel:module'] = _("Modules");
+    $perms['type']['babel:module']  = 'none';
     
     foreach ($registry->applications as $app => $params) {
        if ($params['status'] == 'heading' || $params['status'] == 'block') {
@@ -54,9 +54,9 @@ function _translation_perms()
            continue;
        }
        
-       $perms['tree']['translation']['module'][$app] = false;
-       $perms['title']['translation:module:' . $app] = sprintf("%s (%s)", $params['name'], $app);
-       $perms['type']['translation:module:' . $app] = 'boolean';
+       $perms['tree']['babel']['module'][$app] = false;
+       $perms['title']['babel:module:' . $app] = sprintf("%s (%s)", $params['name'], $app);
+       $perms['type']['babel:module:' . $app] = 'boolean';
     }
 
     $tabdesc['download']   = _("Download");
@@ -70,8 +70,8 @@ function _translation_perms()
     $tabdesc['reset']      = _("Reset");
     
     foreach ($tabdesc as $cat => $desc) {
-       $perms['tree']['translation'][$cat] = array();
-       $perms['title']['translation:' . $cat] = $desc;
+       $perms['tree']['babel'][$cat] = array();
+       $perms['title']['babel:' . $cat] = $desc;
     }
     
     return $perms;
index 93283a1..dd82218 100644 (file)
@@ -29,7 +29,7 @@ $notification->attach('status');
 /* Registry. */
 $registry = &Registry::singleton();
 
-if (is_a(($pushed = $registry->pushApp('translation', !defined('AUTH_HANDLER'))), 'PEAR_Error')) {
+if (is_a(($pushed = $registry->pushApp('babel', !defined('AUTH_HANDLER'))), 'PEAR_Error')) {
     if ($pushed->getCode() == 'permission_denied') {
         Horde::authenticationFailureRedirect(); 
     }
@@ -42,8 +42,8 @@ $conf = &$GLOBALS['conf'];
 /* Horde base libraries */
 require_once 'Horde/Secret.php';
 
-/* Translation base library */
-require_once BABEL_BASE . '/lib/Translation.php';
+/* Babel base library */
+require_once BABEL_BASE . '/lib/Babel.php';
 require_once BABEL_BASE . '/lib/Translate.php';
 require_once BABEL_BASE . '/lib/Translate_Help.php';
 require_once BABEL_BASE . '/lib/Display.php';
@@ -76,9 +76,9 @@ $app = Util::getFormData('module');
   
 /* Language selection */
 if (($lang = Util::getFormData('display_language')) !== null) {
-    $_SESSION['translation']['language'] = $lang;
-} elseif (isset($_SESSION['translation']['language'])) {
-    $lang = $_SESSION['translation']['language'];
+    $_SESSION['babel']['language'] = $lang;
+} elseif (isset($_SESSION['babel']['language'])) {
+    $lang = $_SESSION['babel']['language'];
 } else {
     
     $tests =  $nls['languages'];
@@ -87,33 +87,33 @@ if (($lang = Util::getFormData('display_language')) !== null) {
     unset($tests['en_US']);
     
     foreach($tests as $dir => $desc) {
-       if (!Translation::hasPermission("language:$dir")) {
+       if (!Babel::hasPermission("language:$dir")) {
            continue;
        } else {
            $lang = $dir;
            break;
        }
     }
-    $_SESSION['translation']['language'] = $lang;
+    $_SESSION['babel']['language'] = $lang;
 }
                                                  
 /* Set up the template fields. */
-$template->set('menu', Translation::getMenu('string'));
+$template->set('menu', Babel::getMenu('string'));
 $template->set('notify', Util::bufferOutput(array($notification, 'notify'), array('listeners' => 'status')));
-$template->set('lang', Translation::displayLanguage());
-$fmenu = Translation::LanguageSelection();
+$template->set('lang', Babel::displayLanguage());
+$fmenu = Babel::LanguageSelection();
 
 // Only display the Module Selection widget if an application has been set
 if ($app) {
-    $fmenu .= Translation::ModuleSelection();
+    $fmenu .= Babel::ModuleSelection();
 }
 $template->set('fmenu', $fmenu);
 
-if ($lang && !Translation::hasPermission("language:$lang")) {
+if ($lang && !Babel::hasPermission("language:$lang")) {
     Horde::fatal(sprintf(_("Access forbidden to '%s'."), $lang), __FILE__, __LINE__, true);
 }
 
-if ($app && !Translation::hasPermission("module:$app")) {
+if ($app && !Babel::hasPermission("module:$app")) {
     Horde::fatal(sprintf(_("Access forbidden to '%s'."), $app), __FILE__, __LINE__, true);
 }
 
index 91b7f1e..d31221a 100644 (file)
@@ -16,13 +16,13 @@ require_once BABEL_BASE . '/lib/base.php';
 
 if ($app) {
     /* Render the page. */
-    Translation::RB_init();
+    Babel::RB_init();
 }
 
 require BABEL_TEMPLATES . '/common-header.inc';
 
 if ($app) {
-    Translation::RB_start(30);
+    Babel::RB_start(30);
 }
 
 echo $template->fetch(BABEL_TEMPLATES . '/layout.html');
@@ -34,7 +34,7 @@ $form = &new Horde_Form($vars, _("Make Translation"), 'make');
 
 if (!$app) {
     $form->setButtons(_("Make"));
-    $form->addVariable(_("Module"), 'module', 'enum', true, false, null, array(Translation::listApps(true), true));
+    $form->addVariable(_("Module"), 'module', 'enum', true, false, null, array(Babel::listApps(true), true));
     $form->addVariable('', '', 'spacer', true);
     
     $renderer_params = array();
@@ -70,7 +70,7 @@ if (!$app) {
     Translate_Display::info();
     Translate::make();
     
-    Translation::RB_close();
+    Babel::RB_close();
 }
 
 require $registry->get('templates', 'horde') . '/common-footer.inc';
diff --git a/babel/po/babel.pot b/babel/po/babel.pot
new file mode 100644 (file)
index 0000000..1421ca3
--- /dev/null
@@ -0,0 +1,489 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR Horde Project
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: support@scopserv.com\n"
+"POT-Creation-Date: 2009-01-18 17:15-0500\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: lib/Translate.php:257 lib/Translate.php:276
+#, php-format
+msgid "%s is not writable."
+msgstr ""
+
+#: extract.php:65 lib/Translate.php:94 lib/Translate.php:117
+#, php-format
+msgid "%s not found."
+msgstr ""
+
+#: lib/Translate.php:428
+#, php-format
+msgid "%s not found. Run 'Extract' first."
+msgstr ""
+
+#: view.php:301
+#, php-format
+msgid "%s to %s of %s"
+msgstr ""
+
+#: lib/Translate.php:302
+#, php-format
+msgid ""
+"<gettext> tag not closed in file %s.\n"
+"Opening tag found in line %d."
+msgstr ""
+
+#: viewsource.php:30
+#, php-format
+msgid "Access denied to %s"
+msgstr ""
+
+#: lib/base.php:112 lib/base.php:116
+#, php-format
+msgid "Access forbidden to '%s'."
+msgstr ""
+
+#: view.php:223 view.php:225
+msgid "All"
+msgstr ""
+
+#: lib/Translation.php:53 lib/Translation.php:135
+msgid "All Applications"
+msgstr ""
+
+#: templates/index.php:50
+msgid "Build binary MO files from the specified PO files."
+msgstr ""
+
+#: lib/Translate.php:467
+#, php-format
+msgid "Building MO files for module %s..."
+msgstr ""
+
+#: lib/Translate.php:479
+#, php-format
+msgid "Building locale %s..."
+msgstr ""
+
+#: lib/Translation.php:292
+#, php-format
+msgid "Can take up to %d minutes !"
+msgstr ""
+
+#: lib/Translation.php:286
+#, php-format
+msgid "Can take up to %d seconds !"
+msgstr ""
+
+#: lib/Translation.php:290
+msgid "Can take up to 1 minute !"
+msgstr ""
+
+#: view.php:442
+msgid "Cancel"
+msgstr ""
+
+#: lib/Translate.php:626
+#, php-format
+msgid "Cleaning up PO files for module %s..."
+msgstr ""
+
+#: lib/Translate.php:638
+#, php-format
+msgid "Cleaning up locale %s..."
+msgstr ""
+
+#: commit.php:42 templates/index.php:55 lib/api.php:66
+msgid "Commit"
+msgstr ""
+
+#: commit.php:36
+msgid "Commit PO files ..."
+msgstr ""
+
+#: templates/index.php:56
+msgid "Commit translations to the SVN server."
+msgstr ""
+
+#: extract.php:114 lib/Translate.php:374 lib/Translate.php:405
+#: lib/Translate.php:446 lib/Translate.php:536 lib/Translate.php:584
+#: lib/Translate.php:646
+msgid "Done!"
+msgstr ""
+
+#: templates/index.php:25 lib/api.php:59
+msgid "Download"
+msgstr ""
+
+#: download.php:14
+msgid "Download File"
+msgstr ""
+
+#: templates/index.php:26
+msgid "Download all current PO files."
+msgstr ""
+
+#: edit.php:78
+msgid "Edit"
+msgstr ""
+
+#: view.php:164
+msgid "Edit Header"
+msgstr ""
+
+#: view.php:229
+msgid "Edit Mode"
+msgstr ""
+
+#: edit.php:52 view.php:438
+msgid "Edit Translation"
+msgstr ""
+
+#: lib/Translate.php:347 lib/Translate.php:386
+msgid "Error: No locale specified."
+msgstr ""
+
+#: extract.php:36 templates/index.php:43 lib/api.php:64
+msgid "Extract"
+msgstr ""
+
+#: extract.php:33
+msgid "Extract Translation"
+msgstr ""
+
+#: lib/Translate.php:242
+#, php-format
+msgid "Extracting from %s... "
+msgstr ""
+
+#: lib/Translate.php:407 lib/Translate.php:427 lib/Translate.php:448
+#: lib/Translate.php:564 lib/Translate.php:586 lib/Translate.php:649
+msgid "Failed!"
+msgstr ""
+
+#: config/hooks.php:24
+msgid "File doesn't exist ... "
+msgstr ""
+
+#: view.php:220
+msgid "Filter: "
+msgstr ""
+
+#: commit.php:32 make.php:61 reset.php:34 extract.php:92
+msgid "Found applications:"
+msgstr ""
+
+#: lib/Translation.php:24
+#, php-format
+msgid "Function doesn't exist: %s"
+msgstr ""
+
+#: view.php:198 view.php:244 view.php:246 stats.php:81
+msgid "Fuzzy"
+msgstr ""
+
+#: make.php:65 extract.php:105
+msgid "Generate Compendium ..."
+msgstr ""
+
+#: templates/index.php:44
+msgid "Generate and merge PO files."
+msgstr ""
+
+#: templates/index.php:38
+msgid "Get statistics about translations."
+msgstr ""
+
+#: extract.php:50 lib/Translate.php:80
+msgid "Gettext extension not found!"
+msgstr ""
+
+#: lib/Translation.php:27
+msgid "Hook file doesn't exist"
+msgstr ""
+
+#: commit.php:19 reset.php:24 stats.php:42 extract.php:46
+msgid "Horde translation generator"
+msgstr ""
+
+#: lib/Translate.php:425
+#, php-format
+msgid "Initializing module %s..."
+msgstr ""
+
+#: upload.php:37
+msgid "Invalid Translations file. Please submit a valid PO file!"
+msgstr ""
+
+#: view.php:194 stats.php:77
+msgid "Language"
+msgstr ""
+
+#: lib/Translation.php:38
+#, php-format
+msgid "Language: %s (%s)"
+msgstr ""
+
+#: lib/api.php:28
+msgid "Languages"
+msgstr ""
+
+#: extract.php:54 lib/Translate.php:83
+msgid "Loading libraries..."
+msgstr ""
+
+#: view.php:195 stats.php:78
+msgid "Locale"
+msgstr ""
+
+#: view.php:430
+#, php-format
+msgid "Locked by %s"
+msgstr ""
+
+#: make.php:36 templates/index.php:49 lib/api.php:65
+msgid "Make"
+msgstr ""
+
+#: make.php:33
+msgid "Make Translation"
+msgstr ""
+
+#: lib/Translate.php:101
+msgid "Make sure that you have PEAR installed and in your include path."
+msgstr ""
+
+#: lib/Translate.php:390
+#, php-format
+msgid "Merging all %s.po files to the compendium... "
+msgstr ""
+
+#: lib/Translate.php:371
+#, php-format
+msgid "Merging locale %s..."
+msgstr ""
+
+#: lib/Translate.php:574
+#, php-format
+msgid "Merging the PO file for %s to the compendium..."
+msgstr ""
+
+#: lib/Translate.php:358
+#, php-format
+msgid "Merging translation for module %s..."
+msgstr ""
+
+#: view.php:175
+msgid "Meta Informations"
+msgstr ""
+
+#: viewsource.php:25
+msgid "Missing filename!"
+msgstr ""
+
+#: edit.php:79 make.php:37 view.php:153 upload.php:20 stats.php:33
+#: extract.php:37
+msgid "Module"
+msgstr ""
+
+#: lib/Translation.php:40
+#, php-format
+msgid "Module: %s"
+msgstr ""
+
+#: lib/api.php:38
+msgid "Modules"
+msgstr ""
+
+#: lib/Translate.php:130
+msgid "Not all strings will be extracted."
+msgstr ""
+
+#: lib/Translate.php:333
+msgid "Not changed!"
+msgstr ""
+
+#: view.php:200 stats.php:83
+msgid "Obsolete"
+msgstr ""
+
+#: lib/Translation.php:282
+msgid "Please be patient ..."
+msgstr ""
+
+#: upload.php:31
+msgid "Please select module of translations PO file!"
+msgstr ""
+
+#: templates/index.php:61 lib/api.php:67
+msgid "Reset"
+msgstr ""
+
+#: reset.php:43
+msgid "Reset PO file on "
+msgstr ""
+
+#: reset.php:38
+msgid "Reset PO files ..."
+msgstr ""
+
+#: lib/Translate.php:595
+msgid "Results (including Horde):"
+msgstr ""
+
+#: lib/Translate.php:593
+msgid "Results:"
+msgstr ""
+
+#: edit.php:55 edit.php:83 view.php:440
+msgid "Save"
+msgstr ""
+
+#: view.php:267
+msgid "Search"
+msgstr ""
+
+#: lib/Translate.php:110
+msgid "Searching gettext binaries..."
+msgstr ""
+
+#: lib/Translate.php:364 lib/Translate.php:472 lib/Translate.php:631
+msgid "Skipped..."
+msgstr ""
+
+#: view.php:188
+msgid "Statistic"
+msgstr ""
+
+#: templates/index.php:37 lib/api.php:61
+msgid "Statistics"
+msgstr ""
+
+#: view.php:196 stats.php:79
+msgid "Status"
+msgstr ""
+
+#: templates/index.php:62
+msgid ""
+"The reset procedure will delete all PO files from the server for all modules "
+"and restore from SVN server."
+msgstr ""
+
+#: view.php:197 view.php:233 view.php:235 stats.php:80
+msgid "Translated"
+msgstr ""
+
+#: view.php:302
+msgid "Translations"
+msgstr ""
+
+#: upload.php:21
+msgid "Translations File (.PO)"
+msgstr ""
+
+#: view.php:199 view.php:254 view.php:256 stats.php:82
+msgid "Untranslated"
+msgstr ""
+
+#: lib/Translate.php:330
+msgid "Updated!"
+msgstr ""
+
+#: upload.php:19 upload.php:25 templates/index.php:31 lib/api.php:60
+msgid "Upload"
+msgstr ""
+
+#: templates/index.php:32
+msgid "Upload new PO files."
+msgstr ""
+
+#: upload.php:18
+msgid "Upload new Translation"
+msgstr ""
+
+#: upload.php:45
+#, php-format
+msgid "Upload successful for %s (%s)"
+msgstr ""
+
+#: view.php:152 stats.php:32 templates/index.php:19
+msgid "View"
+msgstr ""
+
+#: lib/api.php:63
+msgid "View Source"
+msgstr ""
+
+#: stats.php:29
+msgid "View Statistics"
+msgstr ""
+
+#: view.php:149
+msgid "View Translation"
+msgstr ""
+
+#: templates/index.php:20
+msgid "View all translations."
+msgstr ""
+
+#: viewsource.php:39
+#, php-format
+msgid "View source: %s"
+msgstr ""
+
+#: lib/api.php:62
+msgid "View/Edit"
+msgstr ""
+
+#: lib/Translate.php:484
+#, php-format
+msgid "Warning: Could not create locale directory for locale %s:"
+msgstr ""
+
+#: lib/Translate.php:129
+msgid ""
+"Warning: Your gettext version is too old and does not support PHP natively."
+msgstr ""
+
+#: lib/Translate.php:506
+msgid "Warning: an error has occured:"
+msgstr ""
+
+#: lib/Translate.php:520
+#, php-format
+msgid "Warning: the Horde PO file for the locale %s does not exist:"
+msgstr ""
+
+#: lib/Translation.php:214
+msgid "_Extract"
+msgstr ""
+
+#: lib/Translation.php:197
+msgid "_General"
+msgstr ""
+
+#: lib/Translation.php:220
+msgid "_Make"
+msgstr ""
+
+#: lib/Translation.php:208
+msgid "_Stats"
+msgstr ""
+
+#: lib/Translation.php:226
+msgid "_Upload"
+msgstr ""
+
+#: lib/Translation.php:202
+msgid "_View"
+msgstr ""
diff --git a/babel/po/translation.pot b/babel/po/translation.pot
deleted file mode 100644 (file)
index 1421ca3..0000000
+++ /dev/null
@@ -1,489 +0,0 @@
-# SOME DESCRIPTIVE TITLE.
-# Copyright (C) YEAR Horde Project
-# This file is distributed under the same license as the PACKAGE package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
-#
-#, fuzzy
-msgid ""
-msgstr ""
-"Project-Id-Version: PACKAGE VERSION\n"
-"Report-Msgid-Bugs-To: support@scopserv.com\n"
-"POT-Creation-Date: 2009-01-18 17:15-0500\n"
-"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: LANGUAGE <LL@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=CHARSET\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#: lib/Translate.php:257 lib/Translate.php:276
-#, php-format
-msgid "%s is not writable."
-msgstr ""
-
-#: extract.php:65 lib/Translate.php:94 lib/Translate.php:117
-#, php-format
-msgid "%s not found."
-msgstr ""
-
-#: lib/Translate.php:428
-#, php-format
-msgid "%s not found. Run 'Extract' first."
-msgstr ""
-
-#: view.php:301
-#, php-format
-msgid "%s to %s of %s"
-msgstr ""
-
-#: lib/Translate.php:302
-#, php-format
-msgid ""
-"<gettext> tag not closed in file %s.\n"
-"Opening tag found in line %d."
-msgstr ""
-
-#: viewsource.php:30
-#, php-format
-msgid "Access denied to %s"
-msgstr ""
-
-#: lib/base.php:112 lib/base.php:116
-#, php-format
-msgid "Access forbidden to '%s'."
-msgstr ""
-
-#: view.php:223 view.php:225
-msgid "All"
-msgstr ""
-
-#: lib/Translation.php:53 lib/Translation.php:135
-msgid "All Applications"
-msgstr ""
-
-#: templates/index.php:50
-msgid "Build binary MO files from the specified PO files."
-msgstr ""
-
-#: lib/Translate.php:467
-#, php-format
-msgid "Building MO files for module %s..."
-msgstr ""
-
-#: lib/Translate.php:479
-#, php-format
-msgid "Building locale %s..."
-msgstr ""
-
-#: lib/Translation.php:292
-#, php-format
-msgid "Can take up to %d minutes !"
-msgstr ""
-
-#: lib/Translation.php:286
-#, php-format
-msgid "Can take up to %d seconds !"
-msgstr ""
-
-#: lib/Translation.php:290
-msgid "Can take up to 1 minute !"
-msgstr ""
-
-#: view.php:442
-msgid "Cancel"
-msgstr ""
-
-#: lib/Translate.php:626
-#, php-format
-msgid "Cleaning up PO files for module %s..."
-msgstr ""
-
-#: lib/Translate.php:638
-#, php-format
-msgid "Cleaning up locale %s..."
-msgstr ""
-
-#: commit.php:42 templates/index.php:55 lib/api.php:66
-msgid "Commit"
-msgstr ""
-
-#: commit.php:36
-msgid "Commit PO files ..."
-msgstr ""
-
-#: templates/index.php:56
-msgid "Commit translations to the SVN server."
-msgstr ""
-
-#: extract.php:114 lib/Translate.php:374 lib/Translate.php:405
-#: lib/Translate.php:446 lib/Translate.php:536 lib/Translate.php:584
-#: lib/Translate.php:646
-msgid "Done!"
-msgstr ""
-
-#: templates/index.php:25 lib/api.php:59
-msgid "Download"
-msgstr ""
-
-#: download.php:14
-msgid "Download File"
-msgstr ""
-
-#: templates/index.php:26
-msgid "Download all current PO files."
-msgstr ""
-
-#: edit.php:78
-msgid "Edit"
-msgstr ""
-
-#: view.php:164
-msgid "Edit Header"
-msgstr ""
-
-#: view.php:229
-msgid "Edit Mode"
-msgstr ""
-
-#: edit.php:52 view.php:438
-msgid "Edit Translation"
-msgstr ""
-
-#: lib/Translate.php:347 lib/Translate.php:386
-msgid "Error: No locale specified."
-msgstr ""
-
-#: extract.php:36 templates/index.php:43 lib/api.php:64
-msgid "Extract"
-msgstr ""
-
-#: extract.php:33
-msgid "Extract Translation"
-msgstr ""
-
-#: lib/Translate.php:242
-#, php-format
-msgid "Extracting from %s... "
-msgstr ""
-
-#: lib/Translate.php:407 lib/Translate.php:427 lib/Translate.php:448
-#: lib/Translate.php:564 lib/Translate.php:586 lib/Translate.php:649
-msgid "Failed!"
-msgstr ""
-
-#: config/hooks.php:24
-msgid "File doesn't exist ... "
-msgstr ""
-
-#: view.php:220
-msgid "Filter: "
-msgstr ""
-
-#: commit.php:32 make.php:61 reset.php:34 extract.php:92
-msgid "Found applications:"
-msgstr ""
-
-#: lib/Translation.php:24
-#, php-format
-msgid "Function doesn't exist: %s"
-msgstr ""
-
-#: view.php:198 view.php:244 view.php:246 stats.php:81
-msgid "Fuzzy"
-msgstr ""
-
-#: make.php:65 extract.php:105
-msgid "Generate Compendium ..."
-msgstr ""
-
-#: templates/index.php:44
-msgid "Generate and merge PO files."
-msgstr ""
-
-#: templates/index.php:38
-msgid "Get statistics about translations."
-msgstr ""
-
-#: extract.php:50 lib/Translate.php:80
-msgid "Gettext extension not found!"
-msgstr ""
-
-#: lib/Translation.php:27
-msgid "Hook file doesn't exist"
-msgstr ""
-
-#: commit.php:19 reset.php:24 stats.php:42 extract.php:46
-msgid "Horde translation generator"
-msgstr ""
-
-#: lib/Translate.php:425
-#, php-format
-msgid "Initializing module %s..."
-msgstr ""
-
-#: upload.php:37
-msgid "Invalid Translations file. Please submit a valid PO file!"
-msgstr ""
-
-#: view.php:194 stats.php:77
-msgid "Language"
-msgstr ""
-
-#: lib/Translation.php:38
-#, php-format
-msgid "Language: %s (%s)"
-msgstr ""
-
-#: lib/api.php:28
-msgid "Languages"
-msgstr ""
-
-#: extract.php:54 lib/Translate.php:83
-msgid "Loading libraries..."
-msgstr ""
-
-#: view.php:195 stats.php:78
-msgid "Locale"
-msgstr ""
-
-#: view.php:430
-#, php-format
-msgid "Locked by %s"
-msgstr ""
-
-#: make.php:36 templates/index.php:49 lib/api.php:65
-msgid "Make"
-msgstr ""
-
-#: make.php:33
-msgid "Make Translation"
-msgstr ""
-
-#: lib/Translate.php:101
-msgid "Make sure that you have PEAR installed and in your include path."
-msgstr ""
-
-#: lib/Translate.php:390
-#, php-format
-msgid "Merging all %s.po files to the compendium... "
-msgstr ""
-
-#: lib/Translate.php:371
-#, php-format
-msgid "Merging locale %s..."
-msgstr ""
-
-#: lib/Translate.php:574
-#, php-format
-msgid "Merging the PO file for %s to the compendium..."
-msgstr ""
-
-#: lib/Translate.php:358
-#, php-format
-msgid "Merging translation for module %s..."
-msgstr ""
-
-#: view.php:175
-msgid "Meta Informations"
-msgstr ""
-
-#: viewsource.php:25
-msgid "Missing filename!"
-msgstr ""
-
-#: edit.php:79 make.php:37 view.php:153 upload.php:20 stats.php:33
-#: extract.php:37
-msgid "Module"
-msgstr ""
-
-#: lib/Translation.php:40
-#, php-format
-msgid "Module: %s"
-msgstr ""
-
-#: lib/api.php:38
-msgid "Modules"
-msgstr ""
-
-#: lib/Translate.php:130
-msgid "Not all strings will be extracted."
-msgstr ""
-
-#: lib/Translate.php:333
-msgid "Not changed!"
-msgstr ""
-
-#: view.php:200 stats.php:83
-msgid "Obsolete"
-msgstr ""
-
-#: lib/Translation.php:282
-msgid "Please be patient ..."
-msgstr ""
-
-#: upload.php:31
-msgid "Please select module of translations PO file!"
-msgstr ""
-
-#: templates/index.php:61 lib/api.php:67
-msgid "Reset"
-msgstr ""
-
-#: reset.php:43
-msgid "Reset PO file on "
-msgstr ""
-
-#: reset.php:38
-msgid "Reset PO files ..."
-msgstr ""
-
-#: lib/Translate.php:595
-msgid "Results (including Horde):"
-msgstr ""
-
-#: lib/Translate.php:593
-msgid "Results:"
-msgstr ""
-
-#: edit.php:55 edit.php:83 view.php:440
-msgid "Save"
-msgstr ""
-
-#: view.php:267
-msgid "Search"
-msgstr ""
-
-#: lib/Translate.php:110
-msgid "Searching gettext binaries..."
-msgstr ""
-
-#: lib/Translate.php:364 lib/Translate.php:472 lib/Translate.php:631
-msgid "Skipped..."
-msgstr ""
-
-#: view.php:188
-msgid "Statistic"
-msgstr ""
-
-#: templates/index.php:37 lib/api.php:61
-msgid "Statistics"
-msgstr ""
-
-#: view.php:196 stats.php:79
-msgid "Status"
-msgstr ""
-
-#: templates/index.php:62
-msgid ""
-"The reset procedure will delete all PO files from the server for all modules "
-"and restore from SVN server."
-msgstr ""
-
-#: view.php:197 view.php:233 view.php:235 stats.php:80
-msgid "Translated"
-msgstr ""
-
-#: view.php:302
-msgid "Translations"
-msgstr ""
-
-#: upload.php:21
-msgid "Translations File (.PO)"
-msgstr ""
-
-#: view.php:199 view.php:254 view.php:256 stats.php:82
-msgid "Untranslated"
-msgstr ""
-
-#: lib/Translate.php:330
-msgid "Updated!"
-msgstr ""
-
-#: upload.php:19 upload.php:25 templates/index.php:31 lib/api.php:60
-msgid "Upload"
-msgstr ""
-
-#: templates/index.php:32
-msgid "Upload new PO files."
-msgstr ""
-
-#: upload.php:18
-msgid "Upload new Translation"
-msgstr ""
-
-#: upload.php:45
-#, php-format
-msgid "Upload successful for %s (%s)"
-msgstr ""
-
-#: view.php:152 stats.php:32 templates/index.php:19
-msgid "View"
-msgstr ""
-
-#: lib/api.php:63
-msgid "View Source"
-msgstr ""
-
-#: stats.php:29
-msgid "View Statistics"
-msgstr ""
-
-#: view.php:149
-msgid "View Translation"
-msgstr ""
-
-#: templates/index.php:20
-msgid "View all translations."
-msgstr ""
-
-#: viewsource.php:39
-#, php-format
-msgid "View source: %s"
-msgstr ""
-
-#: lib/api.php:62
-msgid "View/Edit"
-msgstr ""
-
-#: lib/Translate.php:484
-#, php-format
-msgid "Warning: Could not create locale directory for locale %s:"
-msgstr ""
-
-#: lib/Translate.php:129
-msgid ""
-"Warning: Your gettext version is too old and does not support PHP natively."
-msgstr ""
-
-#: lib/Translate.php:506
-msgid "Warning: an error has occured:"
-msgstr ""
-
-#: lib/Translate.php:520
-#, php-format
-msgid "Warning: the Horde PO file for the locale %s does not exist:"
-msgstr ""
-
-#: lib/Translation.php:214
-msgid "_Extract"
-msgstr ""
-
-#: lib/Translation.php:197
-msgid "_General"
-msgstr ""
-
-#: lib/Translation.php:220
-msgid "_Make"
-msgstr ""
-
-#: lib/Translation.php:208
-msgid "_Stats"
-msgstr ""
-
-#: lib/Translation.php:226
-msgid "_Upload"
-msgstr ""
-
-#: lib/Translation.php:202
-msgid "_View"
-msgstr ""
index e419b3d..e532360 100644 (file)
 @define('BABEL_BASE', dirname(__FILE__)) ;
 require_once BABEL_BASE . '/lib/base.php';
 
-Translation::RB_init();
+Babel::RB_init();
 
 /* Render the page. */
 require BABEL_TEMPLATES . '/common-header.inc';
 
-Translation::RB_start(15);
+Babel::RB_start(15);
 
 echo $template->fetch(BABEL_TEMPLATES . '/layout.html');
 
@@ -41,13 +41,13 @@ foreach($dirs as $d => $dir) {
     $po  = $dir . '/po/' . $lang . '.po';
     
     Translate_Display::info(_("Reset PO file on ") . $po);
-    Translation::callHook('reset', $po);
+    Babel::callHook('reset', $po);
 
 }
 
 Translate_Display::info();
 Translate::cleanup(true);
 
-Translation::RB_close();
+Babel::RB_close();
 
 require $registry->get('templates', 'horde') . '/common-footer.inc';
index 3a6ea80..2841e6a 100644 (file)
@@ -14,12 +14,12 @@ require_once BABEL_BASE . '/lib/base.php';
 
 if ($app) {
     /* Render the page. */
-    Translation::RB_init();
+    Babel::RB_init();
 }
 require BABEL_TEMPLATES . '/common-header.inc';
 
 if ($app) {
-    Translation::RB_start(30);
+    Babel::RB_start(30);
 }
 echo $template->fetch(BABEL_TEMPLATES . '/layout.html');
 
@@ -30,7 +30,7 @@ $form = &new Horde_Form($vars, _("View Statistics"), 'stats');
 
 if (!$app) {
     $form->setButtons(_("View"));
-    $form->addVariable(_("Module"), 'module', 'enum', true, false, null, array(Translation::listApps(true), true));
+    $form->addVariable(_("Module"), 'module', 'enum', true, false, null, array(Babel::listApps(true), true));
     $form->addVariable('', '', 'spacer', true);
     
     $renderer_params = array();
@@ -64,7 +64,7 @@ if (!$app) {
            continue;
        }
 
-       if (!Translation::hasPermission("module:$_app")) {
+       if (!Babel::hasPermission("module:$_app")) {
            continue;
        }
        
@@ -89,11 +89,11 @@ if (!$app) {
        $last_key = null;
        foreach ($report as $key => $value) {
            
-           if (!Translation::hasPermission("language:$key")) {
+           if (!Babel::hasPermission("language:$key")) {
                continue;
            }
 
-           if ($key == $_SESSION['translation']['language']) {
+           if ($key == $_SESSION['babel']['language']) {
                echo "\n<tr class=\"smallheader control\">";
            } else {
                echo "\n<tr class=\"item" . ($i++ % 2) . "\">";
@@ -114,7 +114,7 @@ if (!$app) {
        Translate_Display::info();
     }
     
-    Translation::RB_close();
+    Babel::RB_close();
 }
 
 require $registry->get('templates', 'horde') . '/common-footer.inc';
index a99bc08..5c7c1ba 100644 (file)
@@ -19,7 +19,7 @@ Horde::includeScriptFiles();
 
 ?>
 <title><?php echo $page_title ?></title>
-<?php echo Horde::stylesheetLink('translation') ?>
+<?php echo Horde::stylesheetLink('babel') ?>
 </head>
 
 <body<?php if (Util::nonInputVar('bodyClass')) echo ' class="' . $bodyClass . '"' ?>>
index 18fc496..e5b5f6f 100644 (file)
@@ -67,7 +67,7 @@ $cmds['reset'] = array(
 $i = 0;
 
 foreach($cmds as $cmdid => $cmd) {
-    if (Translation::hasPermission($cmdid)) {
+    if (Babel::hasPermission($cmdid)) {
        echo '<tr height="50" class="item' . ($i++ % 2) . '">';
        echo '<td align="center"><div style="width: 140px;" onclick="window.location=\'' . $cmd['url'] . '\';" class="button"><a class="smallheader" href="' . $cmd['url'] . '">' . $cmd['desc'] . '</a></div></td>';
        echo '<td>' . $cmd['text'] . '</td>';
diff --git a/babel/themes/graphics/babel.png b/babel/themes/graphics/babel.png
new file mode 100644 (file)
index 0000000..63ce64d
Binary files /dev/null and b/babel/themes/graphics/babel.png differ
diff --git a/babel/themes/graphics/skeleton.png b/babel/themes/graphics/skeleton.png
deleted file mode 100644 (file)
index af7b9ff..0000000
Binary files a/babel/themes/graphics/skeleton.png and /dev/null differ
diff --git a/babel/themes/graphics/translation.png b/babel/themes/graphics/translation.png
deleted file mode 100644 (file)
index 63ce64d..0000000
Binary files a/babel/themes/graphics/translation.png and /dev/null differ
index e3bc26c..a9b2971 100644 (file)
@@ -17,7 +17,7 @@ $vars = &Variables::getDefaultVariables();
 /* Create upload form */
 $form = &new Horde_Form($vars, _("Upload new Translation"), 'upload');
 $form->setButtons(_("Upload"));
-$form->addVariable(_("Module"), 'module', 'enum', true, false, null, array(Translation::listApps(true), true));
+$form->addVariable(_("Module"), 'module', 'enum', true, false, null, array(Babel::listApps(true), true));
 $form->addVariable(_("Translations File (.PO)"), 'po_file', 'file', true, false);
 $form->addVariable('', '', 'spacer', true);
 
index 4336b46..6f27bf5 100644 (file)
@@ -14,7 +14,7 @@ require_once dirname(__FILE__) . '/lib/base.php';
 require_once 'Horde/Lock.php';
 
 $meta_params = array(
-                    "Project-Id-Version" => @$_SESSION['translation']['language'],
+                    "Project-Id-Version" => @$_SESSION['babel']['language'],
                     "Report-Msgid-Bugs-To" => "support@scopserv.com",
                     "POT-Creation-Date" => "",
                     "PO-Revision-Date" => "",
@@ -34,7 +34,7 @@ $search   = Util::getFormData('search');
 
 if ($app) {
     /* Render the page. */
-    Translation::RB_init();
+    Babel::RB_init();
 }
 
 /* Render the page. */
@@ -42,9 +42,9 @@ require BABEL_TEMPLATES . '/common-header.inc';
 
 if ($app) {
     if ($editmode) {
-       Translation::RB_start(10);
+       Babel::RB_start(10);
     } else {
-       Translation::RB_start(60);
+       Babel::RB_start(60);
     }
 }
 
@@ -142,7 +142,7 @@ if ($f_save && $cstring) {
 // 
 
 /* Set up the template fields. */
-$template->set('menu', Translation::getMenu('string'));
+$template->set('menu', Babel::getMenu('string'));
 $template->set('notify', Util::bufferOutput(array($notification, 'notify'), array('listeners' => 'status')));
 
 /* Create upload form */
@@ -150,7 +150,7 @@ $form = &new Horde_Form($vars, _("View Translation"), $show);
 
 if (!$app) {
     $form->setButtons(_("View"));
-    $form->addVariable(_("Module"), 'module', 'enum', true, false, null, array(Translation::listApps(), true));
+    $form->addVariable(_("Module"), 'module', 'enum', true, false, null, array(Babel::listApps(), true));
     $form->addVariable('', '', 'spacer', true);
     
     $renderer_params = array();
@@ -160,7 +160,7 @@ if (!$app) {
     $form->renderActive($renderer, $vars, Horde::selfURL(), 'post');
 } else {
     
-    if (Translation::hasPermission('view', 'tabs', PERMS_EDIT)) {
+    if (Babel::hasPermission('view', 'tabs', PERMS_EDIT)) {
        $hmenu_desc = _("Edit Header");
        $url = Horde::applicationUrl('edit.php');
        $url = Util::addParameter($url, array('module' => $app,
@@ -373,7 +373,7 @@ if (!$app) {
                $sfile = $m[1];
                $sline = $m[2];
 
-               if (Translation::hasPermission('viewsource', 'tabs', PERMS_EDIT)) {
+               if (Babel::hasPermission('viewsource', 'tabs', PERMS_EDIT)) {
                    $surl = Horde::applicationUrl('viewsource.php');
                    $surl = Util::addParameter($surl, array('module' => $app,
                                                            'file'   => $sfile,
@@ -429,13 +429,13 @@ if (!$app) {
          if ($locked) {
              echo Horde::img('locked.png') . '&nbsp;' . sprintf(_("Locked by %s"), $locked);
          } else {
-             if (Translation::hasPermission('view', 'tabs', PERMS_EDIT)) {
+             if (Babel::hasPermission('view', 'tabs', PERMS_EDIT)) {
                  if (!$editmode || $cstring != $encstr) {
                      $surl = Horde::applicationUrl('view.php');
                      $surl = Util::addParameter($surl, array('module' => $app, 'cstring' => $encstr, 'editmode' => 1, 'page' => $page, 'filter' => $filter, 'search' => $search));
                      $surl .= "#" . md5($encstr);
                      
-                     echo Horde::link($surl, _("Edit Translation")) . Horde::img('translation.png') . '&nbsp;' ._("Edit Translation") . "</a>";
+                     echo Horde::link($surl, _("Edit Translation")) . Horde::img('babel.png') . '&nbsp;' ._("Edit Translation") . "</a>";
                  } elseif ($editmode && $cstring == $encstr) {
                      echo '<input type="submit" class="button" name="submit" value="' . _("Save") . '">';
                      echo '&nbsp;';
@@ -496,7 +496,7 @@ $viewurl = Util::addParameter($viewurl, array('editmode' => $editmode,
 <!-- END PAGER -->
 <?php
 if ($app) {
-    Translation::RB_close();
+    Babel::RB_close();
 }
 
 require $registry->get('templates', 'horde') . '/common-footer.inc';