From 61fe60646d024a181a8f0d1ea13fc2c98e1f2b2a Mon Sep 17 00:00:00 2001 From: Jan Schneider Date: Mon, 19 Jan 2009 11:07:30 +0100 Subject: [PATCH] Translation -> Babel --- babel/commit.php | 2 +- babel/config/hooks.php.dist | 8 +++--- babel/edit.php | 8 +++--- babel/extract.php | 8 +++--- babel/lib/{Translation.php => Babel.php} | 30 ++++++++++----------- babel/lib/api.php | 30 ++++++++++----------- babel/lib/base.php | 28 +++++++++---------- babel/make.php | 8 +++--- babel/po/{translation.pot => babel.pot} | 0 babel/reset.php | 8 +++--- babel/stats.php | 14 +++++----- babel/templates/common-header.inc | 2 +- babel/templates/index.php | 2 +- .../themes/graphics/{translation.png => babel.png} | Bin babel/themes/graphics/skeleton.png | Bin 743 -> 0 bytes babel/upload.php | 2 +- babel/view.php | 22 +++++++-------- 17 files changed, 86 insertions(+), 86 deletions(-) rename babel/lib/{Translation.php => Babel.php} (89%) rename babel/po/{translation.pot => babel.pot} (100%) rename babel/themes/graphics/{translation.png => babel.png} (100%) delete mode 100644 babel/themes/graphics/skeleton.png 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/Translation.php b/babel/lib/Babel.php similarity index 89% rename from babel/lib/Translation.php rename to babel/lib/Babel.php index 06c173645..8037f0262 100644 --- a/babel/lib/Translation.php +++ b/babel/lib/Babel.php @@ -9,14 +9,14 @@ * @package Babel */ -class Translation { +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 = '_translation_hook_' . $fname; + $func = '_babel_hook_' . $fname; if (function_exists($func)) { $res = call_user_func($func, $info); @@ -50,10 +50,10 @@ class Translation { $html .= '
'; $html .= ''; echo ' '; @@ -496,7 +496,7 @@ $viewurl = Util::addParameter($viewurl, array('editmode' => $editmode, get('templates', 'horde') . '/common-footer.inc'; -- 2.11.0