Subversion Repositories LCARS

Compare Revisions

Last modification

Ignore whitespace Rev 151 → Rev 150

/trunk/index.phtml
16,7 → 16,7
<?php /*
<meta name="description"
content="PointedEars' Website: <?php
$description = tr("Access to the United Federation of Planets Databanks, an online songbook and software downloads always worth a click. Coming soon: The best internet links categorized and much more via a bilingual (English/German) LCARS terminal styled user interface that can be also used to surf the web anonymously! Bookmark NOW!");
$description = _("Access to the United Federation of Planets Databanks, an online songbook and software downloads always worth a click. Coming soon: The best internet links categorized and much more via a bilingual (English/German) LCARS terminal styled user interface that can be also used to surf the web anonymously! Bookmark NOW!");
echo $description;
?>">
*/ ?>
53,7 → 53,7
<meta name="dcterms.rightsHolder"
content="Copyright © 2002&#8211;<?php echo gmdate('Y', $modi); ?> Thomas&nbsp;Lahn.">
<meta name="dcterms.rights"
content="<?php echo tr("All rights reserved."); ?> <?php echo tr("The author is not responsible for the availability and the content of websites referred by this site, and not responsible for the availability and the content of websites referred by those sites. Whereever outsourced material is used, copyright or trademark infringement is not intended. Third parties who claim copyrights or trademarks used herein are asked to send an informal email to webmaster@PointedEars.de for immediate removal or modification of the respective material on the website instead of reminding the author of usage of this material. Thank you."); ?>">
content="<?php echo _("All rights reserved."); ?> <?php echo _("The author is not responsible for the availability and the content of websites referred by this site, and not responsible for the availability and the content of websites referred by those sites. Whereever outsourced material is used, copyright or trademark infringement is not intended. Third parties who claim copyrights or trademarks used herein are asked to send an informal email to webmaster@PointedEars.de for immediate removal or modification of the respective material on the website instead of reminding the author of usage of this material. Thank you."); ?>">
 
<?php /*
<!-- <link rel="stylesheet" type="text/css" href="styles/lcars.css"> -->
134,12 → 134,12
src="media/video/img/vulcan_hand-black-bg.png"
width="120"
height="168"
alt="<?php echo tr("Vulcan greeting"); ?>"
title="<?php echo tr("Vulcan greeting"); ?>"
alt="<?php echo _("Vulcan greeting"); ?>"
title="<?php echo _("Vulcan greeting"); ?>"
style="border: none; cursor: default"
onmouseover="return setStatus(this.title)"
onmouseout="return resetStatus()"><br>
<?php echo tr("Welcome to PointedEars’ Website"); ?></h1>
<?php echo _("Welcome to PointedEars’ Website"); ?></h1>
<?php
if (!$printable)
{
146,12 → 146,12
?>
<p class="instruction" style="font-size: 100%; text-align: center"><?php
echo sprintf(
tr("This site uses recent <a href='https://developer.mozilla.org/en-US/docs/'"
_("This site uses recent <a href='https://developer.mozilla.org/en-US/docs/'"
. " title='Learn more: Mozilla Developer Network'>Web technologies</a>."
. " You can use the <a href='index.%s?printable=1'>%s</a>"
. " if it is not displayed properly with your software."),
$language,
tr('Printable version'));
_('Printable version'));
?></p>
<?php
}
287,7 → 287,7
<ul style="margin-bottom: 0.2em">
<li><a href="psf/" target="_top"
class="button ancillary"
><abbr title="<?php echo tr("PointedEars' Standard Frases"); ?>"
><abbr title="<?php echo _("PointedEars' Standard Frases"); ?>"
class="text">psf</abbr></a></li>
<li><a href="<?php echo $menu['series']['path']; ?>" target="_top" class="button ancillary"
title="List of recommended TV shows and episodes, with logos in CSS"
302,20 → 302,20
<ul>
<li><a href="http://climateapps2.oerc.ox.ac.uk/cpdnboinc/show_user.php?userid=648544"
target="_top" class="button secondary"
title="<?php echo tr("The world’s largest climate forecasting experiment for the 21st century"); ?>"
title="<?php echo _("The world’s largest climate forecasting experiment for the 21st century"); ?>"
><span class="text">climateprediction.net</span></a></li>
<?php /* http://vspx27.stanford.edu/cgi-bin/main.py?qtype=userpage&amp;username=Thomas_Lahn */ ?>
<li><a href="<?php echo tr("http://folding.stanford.edu/English/HomePage"); ?>"
<li><a href="<?php echo _("http://folding.stanford.edu/English/HomePage"); ?>"
target="_top" class="button secondary"
title="<?php echo tr("Distributed computing to understand protein folding, protein aggregation, and related diseases"); ?>"
title="<?php echo _("Distributed computing to understand protein folding, protein aggregation, and related diseases"); ?>"
><span class="text">Folding at home</span></a></li>
<li><a href="http://lhcathomeclassic.cern.ch/sixtrack/show_user.php?userid=221181"
target="_top" class="button secondary"
title="<?php echo tr("Particle physics research with the Large Hadron Collider at CERN"); ?>"
title="<?php echo _("Particle physics research with the Large Hadron Collider at CERN"); ?>"
><span class="text">LHC at home</span></a></li>
<li><a href="http://setiathome.berkeley.edu/show_user.php?userid=378921"
target="_top" class="button secondary"
title="<?php echo tr("The Search for Extra-Terrestrial Intelligence at HOME"); ?>"
title="<?php echo _("The Search for Extra-Terrestrial Intelligence at HOME"); ?>"
><span class="text">SETI at home</span></a></li>
</ul>
<?php /*
364,7 → 364,7
<div class="analysis">
<table>
<tr>
<th><?php echo tr('Display'); ?>:</th>
<th><?php echo _('Display'); ?>:</th>
<td><script type="text/javascript">
var runAsync = jsx.dom.timeout.runAsync;
var ID_SCREEN_DIM = 'screenDim';
382,18 → 382,18
getAvailText: function () {
var availDim = screenInfo.getAvailDim();
return availDim.width + "×" + availDim.height + " <?php echo tr('available'); ?>";
return availDim.width + "×" + availDim.height + " <?php echo _('available'); ?>";
},
getInnerText: function () {
var innerDim = screenInfo.getInnerDim();
return ", " + innerDim.width + "×" + innerDim.height + " <?php echo tr('used'); ?>";
return ", " + innerDim.width + "×" + innerDim.height + " <?php echo _('used'); ?>";
},
getColorDepthText: function () {
var colorDepth = screenInfo.getColorDepth();
return colorDepth
? '2<sup>' + colorDepth + "<\/sup> <?php echo tr('colors'); ?>"
? '2<sup>' + colorDepth + "<\/sup> <?php echo _('colors'); ?>"
: "";
}
};
406,11 → 406,11
var innerDimText = dim.getInnerText();
var colorDepthText = dim.getColorDepthText();
var displayInfo = (screenDimText || availDimText || innerDimText || colorDepthText)
? (screenDimText ? '<span id="' + ID_SCREEN_DIM + '">' + screenDimText + '<\/span> <?php echo tr('pixels'); ?>' : "")
? (screenDimText ? '<span id="' + ID_SCREEN_DIM + '">' + screenDimText + '<\/span> <?php echo _('pixels'); ?>' : "")
+ (availDimText ? ' (<span id="' + ID_AVAIL_DIM + '">' + availDimText + "<\/span>" : "")
+ (innerDimText ? '<span id="' + ID_INNER_DIM + '">' + innerDimText + "<\/span>)" : "")
+ (colorDepthText ? ' ×&nbsp;<span id="colorDepth">' + colorDepthText + "<\/span>" : "")
: "<?php echo tr('N/A'); ?>";
: "<?php echo _('N/A'); ?>";
/* FIXME: Convert HTML to text, update whole title text */
document.write('<span>' + displayInfo + '<\/span>');
435,10 → 435,10
this.run();
}, 1000);
}());
</script><noscript><?php echo tr('N/A'); ?></noscript></td>
</script><noscript><?php echo _('N/A'); ?></noscript></td>
</tr>
<tr>
<th><?php echo tr('User Agent'); ?>:</th>
<th><?php echo _('User Agent'); ?>:</th>
<td><script type="text/javascript">
(function () {
var ua = navigator.userAgent;
471,10 → 471,10
this.run();
}, 1000);
}());
</script><noscript><?php echo tr('N/A'); ?></noscript></td>
</script><noscript><?php echo _('N/A'); ?></noscript></td>
</tr>
<tr>
<th><?php echo tr('Features'); ?>:</th>
<th><?php echo _('Features'); ?>:</th>
<td><script type="text/javascript">
var fullscreen = jsx.dom.window.fullscreen;
484,7 → 484,7
var features = [];
if (typeof document.cookie != "undefined")
{
var cookiesText = "<?php echo tr('Cookies'); ?>"
var cookiesText = "<?php echo _('Cookies'); ?>"
if (navigator.cookieEnabled)
{
if (document.cookie)
494,7 → 494,7
else
{
features.push('<span class="unavailable"'
+ ' title="<?php echo tr('Cookies supported, but no data for this site'); ?>"'
+ ' title="<?php echo _('Cookies supported, but no data for this site'); ?>"'
+ '>' + cookiesText + '<\/span>');
}
}
501,7 → 501,7
else
{
features.push('<span class="offline"'
+ ' title="<?php echo tr('Cookies supported, but disabled'); ?>"'
+ ' title="<?php echo _('Cookies supported, but disabled'); ?>"'
+ '>' + cookiesText + '<\/span>');
}
}
508,17 → 508,17
 
if (fullscreen.isSupportedBy(document.documentElement))
{
features.push("<?php echo tr('Fullscreen'); ?>");
features.push("<?php echo _('Fullscreen'); ?>");
}
if (navigator.webkitGetGamepads && navigator.webkitGetGamepads().length)
{
features.push("<?php echo tr('Gamepad'); ?>");
features.push("<?php echo _('Gamepad'); ?>");
}
if (navigator.geolocation)
{
features.push("<?php echo tr('Geolocation'); ?>");
features.push("<?php echo _('Geolocation'); ?>");
}
 
if (typeof navigator.javaEnabled != "undefined" && navigator.javaEnabled())
535,12 → 535,12
{
features.push('<span title="'
+ navigator.plugins.length
+ ' <?php echo tr('plugins installed'); ?>">Plugins<\/span>');
+ ' <?php echo _('plugins installed'); ?>">Plugins<\/span>');
}
else
{
features.push('<span class="unavailable"'
+ ' title="<?php echo tr('Plugins supported, but none detected'); ?>"'
+ ' title="<?php echo _('Plugins supported, but none detected'); ?>"'
+ '>Plugins<\/span>');
}
}
604,8 → 604,8
}, 1000);
}());
 
var windowText = "<?php echo tr("Window"); ?>";
</script><noscript><?php echo tr('N/A'); ?></noscript></td>
var windowText = "<?php echo _("Window"); ?>";
</script><noscript><?php echo _('N/A'); ?></noscript></td>
</tr>
</table>
</div>
620,7 → 620,7
onblur="return this.onmouseout()"
><abbr class="text" title="Language selection">Language</abbr></a></li>
<li id="cmd2"><a href="index.<?php echo $language; ?>?printable=1"
title="<?php echo tr('Printable version'); ?>"
title="<?php echo _('Printable version'); ?>"
tabindex="1"
class="button left right"
onmouseover="return setStatus(this.title + ': ' + this.href)"
627,7 → 627,7
onmouseout="return resetStatus()"
onfocus="return this.onmouseover()"
onblur="return this.onmouseout()"
><span class="text"><?php echo tr("Printable"); ?></span></a></li>
><span class="text"><?php echo _("Printable"); ?></span></a></li>
<li id="cmd3"><div class="button left right"
style="cursor: not-allowed !important"
onclick="fullscreen.requestOn(document.documentElement, this)"
648,7 → 648,7
}
});
 
var fullscreenText = "<?php echo tr("Fullscreen"); ?>";
var fullscreenText = "<?php echo _("Fullscreen"); ?>";
document.write(fullscreenText);
}
688,7 → 688,7
target.onclick = function () {
fullscreen.cancel();
};
textTarget.textContent = "<?php echo tr("Window"); ?>";
textTarget.textContent = "<?php echo _("Window"); ?>";
}
else
{
705,7 → 705,7
</ul>
</div>
<div class="elbo-button">
<span class="text" title="<?php echo tr("Date of last modification"); ?>"
<span class="text" title="<?php echo _("Date of last modification"); ?>"
><?php echo gmdate('Ym.d', $modi); ?></span>
</div>
<div class="elbo">
/trunk/global.php
26,43 → 26,50
'de' => 'Deutsch'
);
 
/* TODO: Use Autoloader */
require_once 'Zend/Stdlib/ErrorHandler.php';
require_once 'Zend/I18n/Translator/TextDomain.php';
require_once 'Zend/I18n/Translator/Loader/FileLoaderInterface.php';
require_once 'Zend/I18n/Translator/Loader/Gettext.php';
require_once 'Zend/ServiceManager/ServiceLocatorAwareInterface.php';
require_once 'Zend/ServiceManager/ServiceLocatorInterface.php';
require_once 'Zend/ServiceManager/ServiceManager.php';
require_once 'Zend/ServiceManager/AbstractPluginManager.php';
require_once 'Zend/I18n/Translator/LoaderPluginManager.php';
require_once 'Zend/I18n/Translator/Translator.php';
$translator = new Zend\I18n\Translator\Translator();
$type = 'gettext';
/* Specify location of translation tables */
$textDomain = 'de.pointedears';
$baseDir = './LocaleData';
$pattern = '%s/LC_MESSAGES/%1$s.pointedears.mo';
$textDomain = 'de.pointedears';
$translator->addTranslationFilePattern($type, $baseDir, $pattern, $textDomain);
 
/**
* Returns the translation of the parameter, if any,
* using Zend Framework 2.1 Translate
* @param string $s
* @return string
*/
function tr ($s)
if (function_exists('_'))
{
global $translator;
global $textDomain;
global $language;
bindtextdomain($textDomain, $baseDir);
 
/* Choose domain */
/* Translation is looking for in ./LocaleData/de/LC_MESSAGES/de.pointedears.mo now */
textdomain($textDomain);
}
else
{
/* TODO: Use Autoloader */
require_once 'Zend\Stdlib\ErrorHandler.php';
require_once 'Zend\I18n\Translator\TextDomain.php';
require_once 'Zend\I18n\Translator\Loader\FileLoaderInterface.php';
require_once 'Zend\I18n\Translator\Loader\Gettext.php';
require_once 'Zend\ServiceManager\ServiceLocatorAwareInterface.php';
require_once 'Zend\ServiceManager\ServiceLocatorInterface.php';
require_once 'Zend\ServiceManager\ServiceManager.php';
require_once 'Zend\ServiceManager\AbstractPluginManager.php';
require_once 'Zend\I18n\Translator\LoaderPluginManager.php';
require_once 'Zend\I18n\Translator\Translator.php';
$translator = new Zend\I18n\Translator\Translator();
$type = 'gettext';
$pattern = '%s/LC_MESSAGES/%1$s.pointedears.mo';
$translator->addTranslationFilePattern($type, $baseDir, $pattern, $textDomain);
if ($translator)
function _($s)
{
return $translator->translate($s, $textDomain, $language);
global $translator;
global $textDomain;
global $language;
if ($translator)
{
return $translator->translate($s, $textDomain, $language);
}
 
return $s;
}
 
return $s;
}
 
$menu = array(
70,13 → 77,13
'es-matrix' => array(
'path' => 'es-matrix',
'text' => 'ES Matrix',
'title' => 'ECMAScript Support Matrix: ' . tr("A comparison of features of ECMAScript implementations")
'title' => 'ECMAScript Support Matrix: ' . _("A comparison of features of ECMAScript implementations")
),
'devel' => array('path' => 'devel/', 'text' => tr('Other software')),
'devel' => array('path' => 'devel/', 'text' => _('Other software')),
'series' => array('path' => "media/video/series/", 'text' => 'Seri-o-meter'),
'ufpdb' => array(
'path' => "ufpdb/index.$language",
'text' => 'UFPDB',
'title' => tr('United Federation of Planets DataBase')
'title' => _('United Federation of Planets DataBase')
)
);
/trunk/index.php
1,8 → 1,9
<?php
 
$language = 'en';
$locale = 'en_US.UTF-8';
require_once 'global.php';
if (!function_exists('_'))
{
function _($s) { return $s; }
}
 
$encoding = 'UTF-8';
header("Content-Type: text/html" . ($encoding ? "; charset=$encoding" : ""));
70,7 → 71,7
<meta name="DCTERMS.rightsHolder"
content="Copyright © 2002&#8211;<?php echo gmdate('Y', $modi); ?> Thomas&nbsp;Lahn.">
<meta name="DCTERMS.rights"
content="<?php echo tr("All rights reserved."); ?> <?php echo tr("The author is not responsible for the availability and the content of websites referred by this site, and not responsible for the availability and the content of websites referred by those sites. Whereever outsourced material is used, copyright or trademark infringement is not intended. Third parties who claim copyrights or trademarks used herein are asked to send an informal email to webmaster@PointedEars.de for immediate removal or modification of the respective material on the website instead of reminding the author of usage of this material. Thank you."); ?>">
content="<?php echo _("All rights reserved."); ?> <?php echo _("The author is not responsible for the availability and the content of websites referred by this site, and not responsible for the availability and the content of websites referred by those sites. Whereever outsourced material is used, copyright or trademark infringement is not intended. Third parties who claim copyrights or trademarks used herein are asked to send an informal email to webmaster@PointedEars.de for immediate removal or modification of the respective material on the website instead of reminding the author of usage of this material. Thank you."); ?>">
<?php /*
<!-- <link rel="stylesheet" type="text/css" href="styles/lcars21.css"> -->
*/ ?>
/trunk/footer.phtml
1,12 → 1,12
<script type="text/javascript">
function mailStatus ()
{
return setStatus("<?php echo tr("Send your feedback to PointedEars"); ?>");
return setStatus("<?php echo _("Send your feedback to PointedEars"); ?>");
}
</script>
<hr style="height: 0; border-width: 1px 0 0 0; width: 100%">
<p style="text-align: center"><?php echo sprintf(
tr("Original LCARS design by"
_("Original LCARS design by"
. " <a href='%s' title='%s'>Michael&nbsp;Okuda</a>."
. " Website design based on an <a href='%s'"
. " title='LCARS Standards Development Board'"
17,7 → 17,7
. " title='LCARS 47 Development Blog&nbsp;– LCARS&nbsp;101: A Designer’s Handbook'"
. ">Eleanor&nbsp;Denver</a>."),
'https://twitter.com/MikeOkuda',
tr('Michael Okuda on Twitter'),
_('Michael Okuda on Twitter'),
'http://www.lcarsdeveloper.com/',
'http://www.bracercom.com/tutorial/content/CoherentLCARSInterface/LCARSCoherentInterface.html',
'http://www.lcars47.com/p/lcars-101.html');
25,9 → 25,9
Copyright &copy;&nbsp;2002&#8211;<?php echo gmdate('Y', $modi); ?> <a
href="mailto:webmaster@PointedEars.de?subject=Feedback/LCARS/<?php echo $app;
?>&amp;body=<?php
echo rawurlencode(sprintf('[%s]', tr("Your feedback")));
echo rawurlencode(sprintf('[%s]', _("Your feedback")));
?>"
title="<?php echo tr("Send your feedback to PointedEars"); ?>"
title="<?php echo _("Send your feedback to PointedEars"); ?>"
onmouseover="return mailStatus()"
onmouseout="return resetStatus()"
>Thomas ‘PointedEars’ Lahn</a>. <?php echo tr("All rights reserved."); ?></p>
>Thomas ‘PointedEars’ Lahn</a>. <?php echo _("All rights reserved."); ?></p>