if (@file_exists($po)) {
Translate_Display::info(_("Commit") . " $po ($lang)");
- Translation::callHook('commit', array($po, $lang));
+ Babel::callHook('commit', array($po, $lang));
}
}
<?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];
}
}
-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";
*/
$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" => "",
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 */
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 {
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');
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();
Translate_Display::info();
Translate_Display::header(_("Done!"));
- Translation::RB_close();
+ Babel::RB_close();
}
require $registry->get('templates', 'horde') . '/common-footer.inc';
--- /dev/null
+<?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 .= ' | ' . 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 . '">' . '– ' . $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 .= ' ';
+ $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 . '">' . '– ' . $desc;
+ }
+ }
+
+ $html .= '</select>';
+ $html .= ' ';
+ $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>';
+ }
+
+}
+++ /dev/null
-<?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 .= ' | ' . 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 . '">' . '– ' . $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 .= ' ';
- $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 . '">' . '– ' . $desc;
- }
- }
-
- $html .= '</select>';
- $html .= ' ';
- $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>';
- }
-
-}
'type' => '{urn:horde}hash'
);
-function _translation_perms()
+function _babel_perms()
{
global $nls, $registry;
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') {
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");
$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;
/* 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();
}
/* 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';
/* 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'];
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);
}
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');
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();
Translate_Display::info();
Translate::make();
- Translation::RB_close();
+ Babel::RB_close();
}
require $registry->get('templates', 'horde') . '/common-footer.inc';
--- /dev/null
+# 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 ""
+++ /dev/null
-# 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 ""
@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');
$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';
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');
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();
continue;
}
- if (!Translation::hasPermission("module:$_app")) {
+ if (!Babel::hasPermission("module:$_app")) {
continue;
}
$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) . "\">";
Translate_Display::info();
}
- Translation::RB_close();
+ Babel::RB_close();
}
require $registry->get('templates', 'horde') . '/common-footer.inc';
?>
<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 . '"' ?>>
$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>';
/* 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);
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" => "",
if ($app) {
/* Render the page. */
- Translation::RB_init();
+ Babel::RB_init();
}
/* Render the page. */
if ($app) {
if ($editmode) {
- Translation::RB_start(10);
+ Babel::RB_start(10);
} else {
- Translation::RB_start(60);
+ Babel::RB_start(60);
}
}
//
/* 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 */
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();
$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,
$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,
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") . "</a>";
+ echo Horde::link($surl, _("Edit Translation")) . Horde::img('babel.png') . ' ' ._("Edit Translation") . "</a>";
} elseif ($editmode && $cstring == $encstr) {
echo '<input type="submit" class="button" name="submit" value="' . _("Save") . '">';
echo ' ';
<!-- END PAGER -->
<?php
if ($app) {
- Translation::RB_close();
+ Babel::RB_close();
}
require $registry->get('templates', 'horde') . '/common-footer.inc';