summaryrefslogtreecommitdiffstats
path: root/custom
diff options
context:
space:
mode:
authorPascal Chevrel <pascal@chevrel.org>2012-03-12 15:40:15 +0100
committerPascal Chevrel <pascal@chevrel.org>2012-03-12 15:40:15 +0100
commit5378cf37d8d3dde29a2e7a67e94f3966696288e6 (patch)
treed2beff7282a5e5e2ddcd870113117944587084a7 /custom
parente6ab308bbdb024fe8f65f6e6419482d94dc54eab (diff)
downloadplanet-5378cf37d8d3dde29a2e7a67e94f3966696288e6.tar
planet-5378cf37d8d3dde29a2e7a67e94f3966696288e6.tar.gz
planet-5378cf37d8d3dde29a2e7a67e94f3966696288e6.tar.bz2
planet-5378cf37d8d3dde29a2e7a67e94f3966696288e6.tar.xz
planet-5378cf37d8d3dde29a2e7a67e94f3966696288e6.zip
l10n support for moonmoon
Diffstat (limited to 'custom')
-rwxr-xr-x[-rw-r--r--]custom/views/archive/footer.tpl.php4
-rwxr-xr-x[-rw-r--r--]custom/views/archive/index.tpl.php42
-rwxr-xr-x[-rw-r--r--]custom/views/archive/sidebar.tpl.php20
-rwxr-xr-x[-rw-r--r--]custom/views/default/footer.tpl.php4
-rwxr-xr-x[-rw-r--r--]custom/views/default/index.tpl.php20
-rwxr-xr-x[-rw-r--r--]custom/views/default/sidebar.tpl.php20
6 files changed, 55 insertions, 55 deletions
diff --git a/custom/views/archive/footer.tpl.php b/custom/views/archive/footer.tpl.php
index 5b27882..bfc0210 100644..100755
--- a/custom/views/archive/footer.tpl.php
+++ b/custom/views/archive/footer.tpl.php
@@ -1,3 +1,3 @@
<div id="footer">
- <p>Powered by <a href="http://moonmoon.org/">moonmoon</a> | <a href="./admin/">Administration</a></p>
- </div> \ No newline at end of file
+ <p><? echo str_replace('%s', 'href="http://moonmoon.org"', _g('Powered by <a %s>moonmoon</a>'))?> | <a href="./admin/"><?=_g('Administration')?></a></p>
+ </div>
diff --git a/custom/views/archive/index.tpl.php b/custom/views/archive/index.tpl.php
index c09e266..2bb8f36 100644..100755
--- a/custom/views/archive/index.tpl.php
+++ b/custom/views/archive/index.tpl.php
@@ -5,7 +5,7 @@ $week = Array();
$month = Array();
$older = Array();
$now = time();
-
+
foreach ($items as $item) {
$age = ($now - $item->get_date('U')) / (60*60*24);
if ($age < 1) {
@@ -22,7 +22,7 @@ foreach ($items as $item) {
header('Content-type: text/html; charset=UTF-8');
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?=$conf['locale']?>" lang="<?=$conf['locale']?>">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
@@ -35,69 +35,69 @@ header('Content-type: text/html; charset=UTF-8');
<body>
<div id="page">
<?php include(dirname(__FILE__).'/top.tpl.php'); ?>
-
+
<div id="content">
<?php if (0 == count($items)) :?>
<div class="article">
<h2 class="article-title">
- No article
+ <?=_g('No article')?>
</h2>
- <p class="article-content">No news, good news.</p>
+ <p class="article-content"><?=_g('No news, good news.')?></p>
</div>
<?php endif; ?>
<?php if (count($today)): ?>
<div class="article">
- <h2>Today</h2>
+ <h2><?=_g('Today')?></h2>
<ul>
<?php foreach ($today as $item): ?>
<?php $feed = $item->get_feed(); ?>
<li>
- <a href="<?php echo $feed->getWebsite() ?>" class="source"><?php echo $feed->getName() ?></a> :
- <a href="<?php echo $item->get_permalink(); ?>" title="Go to original place"><?php echo $item->get_title(); ?></a>
+ <a href="<?php echo $feed->getWebsite() ?>" class="source"><?php echo $feed->getName() ?></a> :
+ <a href="<?php echo $item->get_permalink(); ?>" title="<?=_g('Go to original place')?>"><?php echo $item->get_title(); ?></a>
</li>
<?php endforeach; ?>
</ul>
</div>
<?php endif; ?>
-
+
<?php if (count($week)): ?>
<div class="article">
- <h2>This week</h2>
+ <h2><?=_g('This week')?></h2>
<ul>
<?php foreach ($week as $item): ?>
<?php $feed = $item->get_feed(); ?>
<li>
- <a href="<?php echo $feed->getWebsite() ?>" class="source"><?php echo $feed->getName() ?></a> :
- <a href="<?php echo $item->get_permalink(); ?>" title="Go to original place"><?php echo $item->get_title(); ?></a>
+ <a href="<?php echo $feed->getWebsite() ?>" class="source"><?php echo $feed->getName() ?></a> :
+ <a href="<?php echo $item->get_permalink(); ?>" title="<?=_g('Go to original place')?>"><?php echo $item->get_title(); ?></a>
</li>
<?php endforeach; ?>
</ul>
</div>
<?php endif; ?>
-
+
<?php if (count($month)): ?>
<div class="article">
- <h2>This month</h2>
+ <h2><?=_g('This month')?></h2>
<ul>
<?php foreach ($month as $item): ?>
<?php $feed = $item->get_feed(); ?>
<li>
- <a href="<?php echo $feed->getWebsite() ?>" class="source"><?php echo $feed->getName() ?></a> :
- <a href="<?php echo $item->get_permalink(); ?>" title="Go to original place"><?php echo $item->get_title(); ?></a>
+ <a href="<?php echo $feed->getWebsite() ?>" class="source"><?php echo $feed->getName() ?></a> :
+ <a href="<?php echo $item->get_permalink(); ?>" title="<?=_g('Go to original place')?>"><?php echo $item->get_title(); ?></a>
</li>
<?php endforeach; ?>
</ul>
</div>
<?php endif; ?>
-
+
<?php if (count($older)): ?>
<div class="article">
- <h2>Older items</h2>
+ <h2><?=_g('Older items')?></h2>
<ul>
<?php foreach ($older as $item): ?>
<?php $feed = $item->get_feed(); ?>
<li>
- <a href="<?php echo $feed->getWebsite() ?>" class="source"><?php echo $feed->getName() ?></a> :
+ <a href="<?php echo $feed->getWebsite() ?>" class="source"><?php echo $feed->getName() ?></a> :
<a href="<?php echo $item->get_permalink(); ?>" title="Go to original place"><?php echo $item->get_title(); ?></a>
</li>
<?php endforeach; ?>
@@ -105,9 +105,9 @@ header('Content-type: text/html; charset=UTF-8');
</div>
<?php endif; ?>
</div>
-
+
<?php include_once(dirname(__FILE__).'/sidebar.tpl.php'); ?>
-
+
<?php include(dirname(__FILE__).'/footer.tpl.php'); ?>
</div>
</body>
diff --git a/custom/views/archive/sidebar.tpl.php b/custom/views/archive/sidebar.tpl.php
index fc2c881..3f0d617 100644..100755
--- a/custom/views/archive/sidebar.tpl.php
+++ b/custom/views/archive/sidebar.tpl.php
@@ -4,31 +4,31 @@ usort($all_people, array('PlanetFeed', 'compare'));
?>
<div id="sidebar">
<div id="sidebar-people">
- <h2>People (<?php echo count($all_people); ?>)</h2>
+ <h2><?=_g('People')?> (<?php echo count($all_people); ?>)</h2>
<ul>
<?php foreach ($all_people as $person) : ?>
<li>
- <a href="<?php echo htmlspecialchars($person->getFeed(), ENT_QUOTES, 'UTF-8'); ?>" title="Feed"><img src="postload.php?url=<?php echo urlencode(htmlspecialchars($person->getFeed(), ENT_QUOTES, 'UTF-8')); ?>" alt="feed" height="12" width="12" /></a>
- <a href="<?php echo $person->getWebsite(); ?>" title="Website"><?php echo htmlspecialchars($person->getName(), ENT_QUOTES, 'UTF-8'); ?></a>
+ <a href="<?php echo htmlspecialchars($person->getFeed(), ENT_QUOTES, 'UTF-8'); ?>" title="<?=_g('Feed')?>"><img src="postload.php?url=<?php echo urlencode(htmlspecialchars($person->getFeed(), ENT_QUOTES, 'UTF-8')); ?>" alt="<?=_g('Feed')?>" height="12" width="12" /></a>
+ <a href="<?php echo $person->getWebsite(); ?>" title="<?=_g('Website')?>"><?php echo htmlspecialchars($person->getName(), ENT_QUOTES, 'UTF-8'); ?></a>
</li>
<?php endforeach; ?>
</ul>
<p>
- <a href="custom/people.opml"><img src="custom/img/opml.png" alt="feed" height="12" width="12" />&nbsp;All feeds in OPML format</a>
+ <a href="custom/people.opml"><img src="custom/img/opml.png" alt="<?=_g('Feed')?>" height="12" width="12" />&nbsp;<?=_g('All feeds in OPML format')?></a>
</p>
</div>
-
+
<div>
- <h2>Syndicate</h2>
+ <h2><?=_g('Syndicate')?></h2>
<ul>
- <li><img src="custom/img/feed.png" alt="feed" height="12" width="12" />&nbsp;<a href="?type=atom10">Feed (ATOM)</a></li>
+ <li><img src="custom/img/feed.png" alt="<?=_g('Feed')?>" height="12" width="12" />&nbsp;<a href="?type=atom10"><?=_g('Feed (ATOM)')?></a></li>
</ul>
</div>
<div>
- <h2>Archives</h2>
+ <h2><?=_g('Archives')?></h2>
<ul>
- <li><a href="?type=archive">See all headlines</a></li>
+ <li><a href="?type=archive"><?=_g('See all headlines')?></a></li>
</ul>
</div>
-</div> \ No newline at end of file
+</div>
diff --git a/custom/views/default/footer.tpl.php b/custom/views/default/footer.tpl.php
index 5b27882..bfc0210 100644..100755
--- a/custom/views/default/footer.tpl.php
+++ b/custom/views/default/footer.tpl.php
@@ -1,3 +1,3 @@
<div id="footer">
- <p>Powered by <a href="http://moonmoon.org/">moonmoon</a> | <a href="./admin/">Administration</a></p>
- </div> \ No newline at end of file
+ <p><? echo str_replace('%s', 'href="http://moonmoon.org"', _g('Powered by <a %s>moonmoon</a>'))?> | <a href="./admin/"><?=_g('Administration')?></a></p>
+ </div>
diff --git a/custom/views/default/index.tpl.php b/custom/views/default/index.tpl.php
index 9efc5f7..8153f2f 100644..100755
--- a/custom/views/default/index.tpl.php
+++ b/custom/views/default/index.tpl.php
@@ -5,7 +5,7 @@ $count = 0;
header('Content-type: text/html; charset=UTF-8');
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?=$conf['locale']?>" lang="<?=$conf['locale']?>">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
@@ -21,7 +21,7 @@ header('Content-type: text/html; charset=UTF-8');
</script>
<div id="page">
<?php include(dirname(__FILE__).'/top.tpl.php'); ?>
-
+
<div id="content">
<?php if (0 == count($items)) : ?>
<div class="article">
@@ -32,7 +32,7 @@ header('Content-type: text/html; charset=UTF-8');
</div>
<?php else : ?>
<?php foreach ($items as $item): ?>
- <?php
+ <?php
$arParsedUrl = parse_url($item->get_feed()->getWebsite());
$host = 'from-' . preg_replace('/[^a-zA-Z0-9]/i', '-', $arParsedUrl['host']);
?>
@@ -41,17 +41,17 @@ header('Content-type: text/html; charset=UTF-8');
<a href="<?php echo $item->get_permalink(); ?>" title="Go to original place"><?php echo $item->get_title(); ?></a>
</h2>
<p class="article-info">
-
+
<?php echo ($item->get_author()? $item->get_author()->get_name() : 'Anonymous'); ?>,
- <?php
+ <?php
$ago = time() - $item->get_date('U');
//echo '<span title="'.Duration::toString($ago).' ago" class="date">'.date('d/m/Y', $item->get_date('U')).'</span>';
echo '<span id="post'.$item->get_date('U').'" class="date">'.$item->get_date('d/m/Y').'</span>';
?>
-
+
|
-
- Source: <?php
+
+ <?=_g('Source:')?> <?php
$feed = $item->get_feed();
echo '<a href="'.$feed->getWebsite().'" class="source">'.$feed->getName().'</a>';
?>
@@ -64,9 +64,9 @@ header('Content-type: text/html; charset=UTF-8');
<?php endforeach; ?>
<?php endif; ?>
</div>
-
+
<?php include_once(dirname(__FILE__).'/sidebar.tpl.php'); ?>
-
+
<?php include(dirname(__FILE__).'/footer.tpl.php'); ?>
</div>
</body>
diff --git a/custom/views/default/sidebar.tpl.php b/custom/views/default/sidebar.tpl.php
index 9e7631c..2a3a360 100644..100755
--- a/custom/views/default/sidebar.tpl.php
+++ b/custom/views/default/sidebar.tpl.php
@@ -4,31 +4,31 @@ usort($all_people, array('PlanetFeed', 'compare'));
?>
<div id="sidebar" class="aside">
<div id="sidebar-people" class="section">
- <h2>People (<?php echo count($all_people); ?>)</h2>
+ <h2><?php echo _g('People') . ' (' . count($all_people) . ')'?></h2>
<ul>
<?php foreach ($all_people as $person) : ?>
<li>
- <a href="<?php echo htmlspecialchars($person->getFeed(), ENT_QUOTES, 'UTF-8'); ?>" title="Feed"><img src="postload.php?url=<?php echo urlencode(htmlspecialchars($person->getFeed(), ENT_QUOTES, 'UTF-8')); ?>" alt="" height="12" width="12" /></a>
- <a href="<?php echo $person->getWebsite(); ?>" title="Website"><?php echo htmlspecialchars($person->getName(), ENT_QUOTES, 'UTF-8'); ?></a>
+ <a href="<?php echo htmlspecialchars($person->getFeed(), ENT_QUOTES, 'UTF-8'); ?>" title="<?=_g('Feed')?>"><img src="postload.php?url=<?php echo urlencode(htmlspecialchars($person->getFeed(), ENT_QUOTES, 'UTF-8')); ?>" alt="" height="12" width="12" /></a>
+ <a href="<?php echo $person->getWebsite(); ?>" title="<?=_g('Website')?>"><?php echo htmlspecialchars($person->getName(), ENT_QUOTES, 'UTF-8'); ?></a>
</li>
<?php endforeach; ?>
</ul>
<p>
- <img src="custom/img/opml.png" alt="feed" height="12" width="12" /> <a href="custom/people.opml">All feeds in OPML format</a>
+ <img src="custom/img/opml.png" alt="<?=_g('Feed')?>" height="12" width="12" /> <a href="custom/people.opml"><?=_g('All feeds in OPML format')?></a>
</p>
</div>
-
+
<div class="section">
- <h2>Syndicate</h2>
+ <h2><?=_g('Syndicate')?></h2>
<ul>
- <li><img src="custom/img/feed.png" alt="feed" height="12" width="12" />&nbsp;<a href="?type=atom10">Feed (ATOM)</a></li>
+ <li><img src="custom/img/feed.png" alt="<?=_g('Feed')?>" height="12" width="12" />&nbsp;<a href="?type=atom10"><?=_g('Feed (ATOM)')?></a></li>
</ul>
</div>
<div class="section">
- <h2>Archives</h2>
+ <h2><?=_g('Archives')?></h2>
<ul>
- <li><a href="?type=archive">See all headlines</a></li>
+ <li><a href="?type=archive"><?=_g('See all headlines')?></a></li>
</ul>
</div>
-</div> \ No newline at end of file
+</div>