From: Jan Schneider Date: Mon, 19 Jan 2009 10:07:30 +0000 (+0100) Subject: Translation -> Babel X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=61fe60646d024a181a8f0d1ea13fc2c98e1f2b2a;p=horde.git Translation -> Babel --- diff --git a/babel/commit.php b/babel/commit.php index f3d62ab43..809e639bc 100644 --- a/babel/commit.php +++ b/babel/commit.php @@ -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)); } } diff --git a/babel/config/hooks.php.dist b/babel/config/hooks.php.dist index ae9ac5c3c..57602d196 100644 --- a/babel/config/hooks.php.dist +++ b/babel/config/hooks.php.dist @@ -1,7 +1,7 @@ @$_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 { diff --git a/babel/extract.php b/babel/extract.php index 57ad0deb6..1ab3aba08 100644 --- a/babel/extract.php +++ b/babel/extract.php @@ -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 index 000000000..8037f0262 --- /dev/null +++ b/babel/lib/Babel.php @@ -0,0 +1,312 @@ + + * @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 .= '  |   ' . sprintf(_("Module: %s"), $app); + } + + return $res; + } + + + function ModuleSelection() { + $html = ''; + $html .= ''; + $html .= '
'; + $html .= ''; + $html .= '
'; + $html .= '
'; + + $html .= '' . "\n"; + return $html; + } + + function LanguageSelection() { + global $nls, $app; + + $html = ''; + $html .= ''; + $html .= '
'; + $html .= ' '; + $html .= ''; + $html .= ''; + $html .= ' '; + $html .= '
'; + $html .= '
'; + + $html .= '' . "\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 .= '
'; + $msg .= '' . _("Please be patient ...") . ''; + $msg .= '
'; + $msg .= '
'; + 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 .= '
'; + + $msg .= '
'; + echo ''; + flush(); + } + + function RB_close() { + echo ''; + } + +} diff --git a/babel/lib/Translation.php b/babel/lib/Translation.php deleted file mode 100644 index 06c173645..000000000 --- a/babel/lib/Translation.php +++ /dev/null @@ -1,312 +0,0 @@ - - * @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 .= '  |   ' . sprintf(_("Module: %s"), $app); - } - - return $res; - } - - - function ModuleSelection() { - $html = ''; - $html .= ''; - $html .= '
'; - $html .= ''; - $html .= '
'; - $html .= '
'; - - $html .= '' . "\n"; - return $html; - } - - function LanguageSelection() { - global $nls, $app; - - $html = ''; - $html .= ''; - $html .= '
'; - $html .= ' '; - $html .= ''; - $html .= ''; - $html .= ' '; - $html .= '
'; - $html .= '
'; - - $html .= '' . "\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 .= '
'; - $msg .= '' . _("Please be patient ...") . ''; - $msg .= '
'; - $msg .= '
'; - 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 .= '
'; - - $msg .= '
'; - echo ''; - flush(); - } - - function RB_close() { - echo ''; - } - -} diff --git a/babel/lib/api.php b/babel/lib/api.php index e0c49af91..58a2a52aa 100644 --- a/babel/lib/api.php +++ b/babel/lib/api.php @@ -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; diff --git a/babel/lib/base.php b/babel/lib/base.php index 93283a14c..dd822189c 100644 --- a/babel/lib/base.php +++ b/babel/lib/base.php @@ -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); } diff --git a/babel/make.php b/babel/make.php index 91b7f1eae..d31221a5d 100644 --- a/babel/make.php +++ b/babel/make.php @@ -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 index 000000000..1421ca3b6 --- /dev/null +++ b/babel/po/babel.pot @@ -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 , 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 \n" +"Language-Team: LANGUAGE \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 "" +" 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 index 1421ca3b6..000000000 --- a/babel/po/translation.pot +++ /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 , 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 \n" -"Language-Team: LANGUAGE \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 "" -" 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/reset.php b/babel/reset.php index e419b3d90..e532360a2 100644 --- a/babel/reset.php +++ b/babel/reset.php @@ -12,12 +12,12 @@ @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'; diff --git a/babel/stats.php b/babel/stats.php index 3a6ea801e..2841e6a71 100644 --- a/babel/stats.php +++ b/babel/stats.php @@ -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"; } else { echo "\n"; @@ -114,7 +114,7 @@ if (!$app) { Translate_Display::info(); } - Translation::RB_close(); + Babel::RB_close(); } require $registry->get('templates', 'horde') . '/common-footer.inc'; diff --git a/babel/templates/common-header.inc b/babel/templates/common-header.inc index a99bc08ca..5c7c1ba4c 100644 --- a/babel/templates/common-header.inc +++ b/babel/templates/common-header.inc @@ -19,7 +19,7 @@ Horde::includeScriptFiles(); ?> <?php echo $page_title ?> - + > diff --git a/babel/templates/index.php b/babel/templates/index.php index 18fc496af..e5b5f6f4a 100644 --- a/babel/templates/index.php +++ b/babel/templates/index.php @@ -67,7 +67,7 @@ $cmds['reset'] = array( $i = 0; foreach($cmds as $cmdid => $cmd) { - if (Translation::hasPermission($cmdid)) { + if (Babel::hasPermission($cmdid)) { echo ''; echo ''; echo '' . $cmd['text'] . ''; diff --git a/babel/themes/graphics/babel.png b/babel/themes/graphics/babel.png new file mode 100644 index 000000000..63ce64dad 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 index af7b9ffdd..000000000 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 index 63ce64dad..000000000 Binary files a/babel/themes/graphics/translation.png and /dev/null differ diff --git a/babel/upload.php b/babel/upload.php index e3bc26c4c..a9b297121 100644 --- a/babel/upload.php +++ b/babel/upload.php @@ -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); diff --git a/babel/view.php b/babel/view.php index 4336b46f4..6f27bf520 100644 --- a/babel/view.php +++ b/babel/view.php @@ -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') . ' ' . 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') . ' ' ._("Edit Translation") . ""; + echo Horde::link($surl, _("Edit Translation")) . Horde::img('babel.png') . ' ' ._("Edit Translation") . ""; } elseif ($editmode && $cstring == $encstr) { echo ''; echo ' '; @@ -496,7 +496,7 @@ $viewurl = Util::addParameter($viewurl, array('editmode' => $editmode, get('templates', 'horde') . '/common-footer.inc';