[Frhed-commits] SF.net SVN: frhed:[902] trunk/Web
Brought to you by:
kimmov
From: <ge...@us...> - 2010-11-28 12:10:18
|
Revision: 902 http://frhed.svn.sourceforge.net/frhed/?rev=902&view=rev Author: gerundt Date: 2010-11-28 12:10:11 +0000 (Sun, 28 Nov 2010) Log Message: ----------- Web: Move languages to own directories Modified Paths: -------------- trunk/Web/.htaccess trunk/Web/engine/engine.inc trunk/Web/engine/page.inc trunk/Web/engine/simpletranslate.inc Added Paths: ----------- trunk/Web/router.php trunk/Web/templates/ trunk/Web/templates/.htaccess trunk/Web/templates/index.php trunk/Web/templates/screenshots/ trunk/Web/templates/screenshots/index.php trunk/Web/templates/translations/ trunk/Web/templates/translations/index.php trunk/Web/templates/translations/status_branch.php trunk/Web/templates/translations/status_branch_rss.php trunk/Web/templates/translations/status_trunk.php trunk/Web/templates/translations/status_trunk_rss.php Removed Paths: ------------- trunk/Web/index.php trunk/Web/screenshots/ trunk/Web/translations/ Modified: trunk/Web/.htaccess =================================================================== --- trunk/Web/.htaccess 2010-11-17 14:36:51 UTC (rev 901) +++ trunk/Web/.htaccess 2010-11-28 12:10:11 UTC (rev 902) @@ -27,8 +27,8 @@ </IfModule> <FilesMatch "\.inc$"> - Order Deny,Allow - Deny from all + Order Deny,Allow + Deny from all </FilesMatch> #Redirect PAD download URL to current Frhed version... @@ -36,4 +36,13 @@ #Move screenshots... Redirect permanent /screenshots/frhed_main_window.png http://frhed.sourceforge.net/sites/screenshots/frhed_main_window.png -Redirect permanent /screenshots/frhed_icon.png http://frhed.sourceforge.net/sites/screenshots/frhed_icon.png \ No newline at end of file +Redirect permanent /screenshots/frhed_icon.png http://frhed.sourceforge.net/sites/screenshots/frhed_icon.png + +#... +<IfModule mod_rewrite.c> + RewriteEngine On + RewriteBase / + RewriteCond %{REQUEST_FILENAME} !-f + RewriteCond %{REQUEST_FILENAME} !-d + RewriteRule . /router.php [L] +</IfModule> \ No newline at end of file Modified: trunk/Web/engine/engine.inc =================================================================== --- trunk/Web/engine/engine.inc 2010-11-17 14:36:51 UTC (rev 901) +++ trunk/Web/engine/engine.inc 2010-11-28 12:10:11 UTC (rev 902) @@ -15,12 +15,12 @@ $languagesdir = dirname(__FILE__) . '/languages/'; $translations = new SimpleTranslate; - $translations->setUrlParameter('lang'); + $translations->setUseRootDirectory(true); $translations->addLanguage('en', __('English')); $translations->addLanguage('de', __('German'), $languagesdir . 'de.po'); $translations->addLanguage('fr', __('French'), $languagesdir . 'fr.po'); $translations->addLanguage('nl', __('Dutch'), $languagesdir . 'nl.po'); - if (!$translations->detectLanguageFromUrl()) { //if NOT detect language from URL... + if (!$translations->detectLanguageFromRootDirectory()) { //if NOT detect language from root directory... $translations->detectLanguageFromBrowser(); } Modified: trunk/Web/engine/page.inc =================================================================== --- trunk/Web/engine/page.inc 2010-11-17 14:36:51 UTC (rev 901) +++ trunk/Web/engine/page.inc 2010-11-28 12:10:11 UTC (rev 902) @@ -196,15 +196,15 @@ global $translations; $sidenaventry = new SideNavEntry('', __('Frhed')); - $sidenaventry->addSubEntry($translations->prepareLink('/'), __('Home')); - $sidenaventry->addSubEntry($translations->prepareLink('/screenshots/'), __('Screenshots')); + $sidenaventry->addSubEntry($translations->prepareLink('/{lang}/'), __('Home')); + $sidenaventry->addSubEntry($translations->prepareLink('/{lang}/screenshots/'), __('Screenshots')); $sidenaventry->addSubEntry('http://sourceforge.net/projects/frhed', __('Project Page')); $sidenaventry->addSubEntry('/frhed_pad.xml', __('PAD File')); $sidenaventries[] = $sidenaventry; $sidenaventry = new SideNavEntry('', __('Translations')); - $sidenaventry->addSubEntry($translations->prepareLink('/translations/'), __('Index')); - $sidenaventry->addSubEntry($translations->prepareLink('/translations/status_branch.php'), __('Status (Stable Branch)')); - $sidenaventry->addSubEntry($translations->prepareLink('/translations/status_trunk.php'), __('Status (Unstable Trunk)')); + $sidenaventry->addSubEntry($translations->prepareLink('/{lang}/translations/'), __('Index')); + $sidenaventry->addSubEntry($translations->prepareLink('/{lang}/translations/status_branch.php'), __('Status (Stable Branch)')); + $sidenaventry->addSubEntry($translations->prepareLink('/{lang}/translations/status_trunk.php'), __('Status (Unstable Trunk)')); $sidenaventries[] = $sidenaventry; $sidenaventry = new SideNavEntry('', __('Support')); $sidenaventry->addSubEntry('http://sourceforge.net/tracker/?atid=1100163&group_id=236485', __('Bugs')); Modified: trunk/Web/engine/simpletranslate.inc =================================================================== --- trunk/Web/engine/simpletranslate.inc 2010-11-17 14:36:51 UTC (rev 901) +++ trunk/Web/engine/simpletranslate.inc 2010-11-28 12:10:11 UTC (rev 902) @@ -11,9 +11,17 @@ /** * ... + * @todo Rename variables to camelCase and don't use _underscore? + * @todo Use 4 spaces for indent? */ class SimpleTranslate { /** + * Use root directory? + * @var string + * @access private + */ + private $_userootdirectory; + /** * Language placeholder * @var string * @access private @@ -60,6 +68,7 @@ * Constructor */ public function __construct() { + $this->_userootdirectory = false; $this->_langplaceholder = '{lang}'; $this->_urlparameter = 'lang'; $this->_forceurlparameter = false; @@ -70,6 +79,22 @@ } /** + * get using root directory... + * @return bool Use root directory? + */ + public function getUseRootDirectory() { + return $this->_userootdirectory; + } + + /** + * set using root directory... + * @param bool $userootdirectory Use root directory? + */ + public function setUseRootDirectory($userootdirectory) { + $this->_userootdirectory = $userootdirectory; + } + + /** * get the language placeholder... * @return string Language placeholder */ @@ -99,6 +124,21 @@ } /** + * replace root directory in link... + * @param string $link Link + * @param string $id Language ID + * @return string Link with replaced root directory + */ + public function replaceRootDirectory($link, $id = '') { + if (!empty($id)) { + return preg_replace('/^\/[a-z][a-z](\/?)/', '/' . $id . '$1', $link); + } + else { + return preg_replace('/^\/[a-z][a-z](\/?)/', '/$1', $link); + } + } + + /** * get the URL parameter... * @return string URL parameter */ @@ -351,10 +391,19 @@ return false; } else { //if language ID NOT committed... - if (isset($_GET[$this->_urlparameter])) { - return $this->existsLanguage(strtolower($_GET[$this->_urlparameter])); + if ($this->_userootdirectory) { //if use root directory... + $parts = explode('/', trim($_SERVER['REQUEST_URI'], '/')); + if (count($parts) > 0) { //if has parts... + return $this->existsLanguage($parts[0]); + } + return false; } - return true; + else { //if use URL parameter... + if (isset($_GET[$this->_urlparameter])) { + return $this->existsLanguage(strtolower($_GET[$this->_urlparameter])); + } + return true; + } } } @@ -374,7 +423,7 @@ * detect the language from the url... * @return bool Detected? */ - public function detectLanguageFromUrl() { + public function detectLanguageFromUrlParameter() { if (isset($_GET[$this->_urlparameter])) { return $this->setActiveLanguage($_GET[$this->_urlparameter]); } @@ -418,7 +467,31 @@ * @return string Prepared link */ public function prepareLink($link) { + if ($this->_userootdirectory) { //if use root directory... + return $this->prepareLinkWithRootDirectory($link); + } + else { //if use URL parameter... + return $this->prepareLinkWithUrlParameter($link); + } + } + + /** + * prepare link (with root directory)... + * @param string $link Link + * @return string Prepared link (with root directory) + */ + private function prepareLinkWithRootDirectory($link) { $activelanguage = $this->getActiveLanguage(); + return $this->replaceLanguagePlaceholder($link, $activelanguage->getId()); + } + + /** + * prepare link (with URL parameter)... + * @param string $link Link + * @return string Prepared link (with URL parameter) + */ + private function prepareLinkWithUrlParameter($link) { + $activelanguage = $this->getActiveLanguage(); if ((strtolower(get_class($activelanguage)) == 'simpletranslatelanguage') || ($this->_forceurlparameter == true)) { //if normal language OR forcing URL parameter... return $this->appendUrlParameter($link, $this->_urlparameter, $activelanguage->getId()); } @@ -434,6 +507,34 @@ * @return string Language link */ public function getLink($language = null, $forceurlparameter = null) { + if ($this->_userootdirectory) { //if use root directory... + return $this->getLinkWithRootDirectory($language); + } + else { //if use URL parameter... + return $this->getLinkWithUrlParameter($language, $forceurlparameter); + } + } + + /** + * get the language link (with root directory)... + * @param object $language Language + * @return string Language link (with root directory) + */ + private function getLinkWithRootDirectory($language = null) { + $requesturi = str_replace('index.php', '', $_SERVER['REQUEST_URI']); + if (isset($language)) { //if language committed... + return $this->replaceRootDirectory($requesturi, $language->getId()); + } + return $requesturi; + } + + /** + * get the language link (with URL parameter)... + * @param object $language Language + * @param bool $forceurlparameter Force URL parameter? + * @return string Language link (with URL parameter) + */ + private function getLinkWithUrlParameter($language = null, $forceurlparameter = null) { $phpself = str_replace('index.php', '', $_SERVER['PHP_SELF']); if (isset($language)) { //if language committed... $forceing = $this->_forceurlparameter; Deleted: trunk/Web/index.php =================================================================== --- trunk/Web/index.php 2010-11-17 14:36:51 UTC (rev 901) +++ trunk/Web/index.php 2010-11-28 12:10:11 UTC (rev 902) @@ -1,82 +0,0 @@ -<?php - include('engine/engine.inc'); - include('engine/simplepie/simplepie.inc'); - - $page = new Page; - $page->setDescription(__('Frhed is an binary file editor for Windows. It is small but has many advanced features like ability to load big files partially.')); - $page->setKeywords(__('Frhed, free, hex editor, binary file, load partially, hexdump, compare')); - $page->addRssFeed('http://sourceforge.net/export/rss2_projnews.php?group_id=236485', __('Frhed News')); - $page->addRssFeed('http://sourceforge.net/export/rss2_projfiles.php?group_id=236485', __('Frhed File Releases')); - $page->printHead(); - $page->printPara(__('Frhed is an binary file editor for Windows. It is small but has many advanced features like ability to load big files partially.')); - - $page->printHeading(__('Features')); -?> -<ul> - <li><?php __e('Editable file size limited only by available system memory')?></li> - <li><?php __e('Load files partially')?></li> - <li><?php __e('Export as hexdump to file or clipboard')?></li> - <li><?php __e('Search for any combination of text and binary values')?></li> - <li><?php __e('Compare files')?></li> -</ul> - -<?php - $page->printRssHeading(__('News'), 'http://sourceforge.net/export/rss2_projnews.php?group_id=236485'); - $feed = new SimplePie(); - $feed->set_feed_url('http://sourceforge.net/export/rss2_projnews.php?group_id=236485'); - $feed->set_cache_location('./engine/simplepie/cache'); - $feed->init(); - print("<ul class=\"rssfeeditems\">\n"); - foreach ($feed->get_items(0, 3) as $item) { //for the last 3 news items... - print(" <li><a href=\"".$item->get_link()."\">".$item->get_title()."</a> <em>".$item->get_date(__('Y-m-d'))."</em></li>\n"); - } - print(" <li><a href=\"http://sourceforge.net/news/?group_id=236485\">" . __('View all news …') . "</a></li>\n"); - print("</ul>\n"); -?> - -<?php - $page->printRssHeading(__('Download'), 'http://sourceforge.net/export/rss2_projfiles.php?group_id=236485'); - $page->printSubHeading(__('Stable releases')); -?> - <ul> - <li><a href="https://sourceforge.net/project/showfiles.php?group_id=236485&package_id=308801&release_id=688790"> - Frhed 1.6.0</a> (2009-06-23)</li> - <li><a href="https://sourceforge.net/project/showfiles.php?group_id=236485&package_id=308801&release_id=674196"> - Frhed 1.4.2</a> (2009-04-07)</li> - <li><a href="https://sourceforge.net/project/showfiles.php?group_id=236485&package_id=308801&release_id=658634"> - Frhed 1.4.0</a> (2009-02-04)</li> - </ul> -<?php - $page->printSubHeading(__('Beta releases')); -?> - <ul> - <li><a href="https://sourceforge.net/project/showfiles.php?group_id=236485&package_id=307097&release_id=688792"> - Frhed 1.5.10</a> (2009-06-10)</li> - </ul> -<?php - $page->printSubHeading(__('Alpha releases')); -?> - <ul> - <li><a href="https://sourceforge.net/projects/frhed/files/3.%20Alpha%20Releases/1.7.1/"> - Frhed 1.7.1</a> (2009-07-30)</li> - </ul> - -<?php - $page->printHeading(__('Support')); - $page->printPara(__('For support you can try the <a href="%1$s">forums</a> or the <a href="%2$s">mailing lists</a>.', 'http://apps.sourceforge.net/phpbb/frhed/', 'https://sourceforge.net/mail/?group_id=236485'), - __('If you found bugs, please submit them to our <a href="%1$s">bug tracker</a> or leave wishes at the <a href="%2$s">feature requests</a> list.', 'https://sourceforge.net/tracker/?atid=1100163&group_id=236485', 'https://sourceforge.net/tracker/?atid=1100166&group_id=236485')); - - $page->printHeading(__('Open Source')); - $page->printPara(__('Frhed is <a href="%1$s">open source</a> software and is licenced under the <a href="%2$s">GNU General Public License</a>. -This means everybody can download the source code and improve and modify them.', 'http://www.opensource.org/', 'http://www.gnu.org/licenses/gpl-2.0.html')); - - $page->printHeading(__('History')); - $page->printPara(__('Frhed is originally developed by <a href="%s">Raihan Kibria</a>.', 'http://www.kibria.de/frhed.html')); - $page->printPara(__('Version 1.1 included many improvements and new features from versions that several other programmers had been working on. -Unfortunately version 1.1 never matured to "stable" release. Latest 1.1 release is labeled as "beta" release.')); - $page->printPara(__('At autumn 2008 the <a href="%1$s">WinMerge Team</a> decided to use Frhed as binary file editor component -for WinMerge. For developing Frhed further new <a href="%2$s">SourceForge project</a> -was created. This new project will develop Frhed as stand alone product.', 'http://winmerge.org/' , 'https://sourceforge.net/projects/frhed')); - - $page->printFoot(); -?> Added: trunk/Web/router.php =================================================================== --- trunk/Web/router.php (rev 0) +++ trunk/Web/router.php 2010-11-28 12:10:11 UTC (rev 902) @@ -0,0 +1,47 @@ +<?php + include('engine/engine.inc'); + include('engine/simplepie/simplepie.inc'); + include('engine/translations.inc'); + + function Send301($url) { + header('HTTP/1.1 301 Moved Permanently'); + header('Location: ' . $url); + header('Connection: close'); + } + + $parse = parse_url($_SERVER['REQUEST_URI']); + $path = $parse['path']; + $basepath = $translations->replaceRootDirectory($parse['path'], '{lang}'); + + switch($basepath) { + case '/{lang}/': + include('templates/index.php'); + break; + case '/{lang}/screenshots/': + include('templates/screenshots/index.php'); + break; + case '/{lang}/translations/': + include('templates/translations/index.php'); + break; + case '/{lang}/translations/status_branch.php': + include('templates/translations/status_branch.php'); + break; + case '/{lang}/translations/status_branch_rss.php': + include('templates/translations/status_branch_rss.php'); + break; + case '/{lang}/translations/status_trunk.php': + include('templates/translations/status_trunk.php'); + break; + case '/{lang}/translations/status_trunk_rss.php': + include('templates/translations/status_trunk_rss.php'); + break; + case '/{lang}': + case '/{lang}/screenshots': + case '/{lang}/translations': + Send301($path . '/'); + break; + default: + header('HTTP/1.1 404 Not Found'); + header('Status: 404 Not Found'); + } +?> \ No newline at end of file Added: trunk/Web/templates/.htaccess =================================================================== --- trunk/Web/templates/.htaccess (rev 0) +++ trunk/Web/templates/.htaccess 2010-11-28 12:10:11 UTC (rev 902) @@ -0,0 +1,2 @@ +Order Deny,Allow +Deny from all \ No newline at end of file Copied: trunk/Web/templates/index.php (from rev 900, trunk/Web/index.php) =================================================================== --- trunk/Web/templates/index.php (rev 0) +++ trunk/Web/templates/index.php 2010-11-28 12:10:11 UTC (rev 902) @@ -0,0 +1,79 @@ +<?php + $page = new Page; + $page->setDescription(__('Frhed is an binary file editor for Windows. It is small but has many advanced features like ability to load big files partially.')); + $page->setKeywords(__('Frhed, free, hex editor, binary file, load partially, hexdump, compare')); + $page->addRssFeed('http://sourceforge.net/export/rss2_projnews.php?group_id=236485', __('Frhed News')); + $page->addRssFeed('http://sourceforge.net/export/rss2_projfiles.php?group_id=236485', __('Frhed File Releases')); + $page->printHead(); + $page->printPara(__('Frhed is an binary file editor for Windows. It is small but has many advanced features like ability to load big files partially.')); + + $page->printHeading(__('Features')); +?> +<ul> + <li><?php __e('Editable file size limited only by available system memory')?></li> + <li><?php __e('Load files partially')?></li> + <li><?php __e('Export as hexdump to file or clipboard')?></li> + <li><?php __e('Search for any combination of text and binary values')?></li> + <li><?php __e('Compare files')?></li> +</ul> + +<?php + $page->printRssHeading(__('News'), 'http://sourceforge.net/export/rss2_projnews.php?group_id=236485'); + $feed = new SimplePie(); + $feed->set_feed_url('http://sourceforge.net/export/rss2_projnews.php?group_id=236485'); + $feed->set_cache_location('./engine/simplepie/cache'); + $feed->init(); + print("<ul class=\"rssfeeditems\">\n"); + foreach ($feed->get_items(0, 3) as $item) { //for the last 3 news items... + print(" <li><a href=\"".$item->get_link()."\">".$item->get_title()."</a> <em>".$item->get_date(__('Y-m-d'))."</em></li>\n"); + } + print(" <li><a href=\"http://sourceforge.net/news/?group_id=236485\">" . __('View all news …') . "</a></li>\n"); + print("</ul>\n"); +?> + +<?php + $page->printRssHeading(__('Download'), 'http://sourceforge.net/export/rss2_projfiles.php?group_id=236485'); + $page->printSubHeading(__('Stable releases')); +?> + <ul> + <li><a href="https://sourceforge.net/project/showfiles.php?group_id=236485&package_id=308801&release_id=688790"> + Frhed 1.6.0</a> (2009-06-23)</li> + <li><a href="https://sourceforge.net/project/showfiles.php?group_id=236485&package_id=308801&release_id=674196"> + Frhed 1.4.2</a> (2009-04-07)</li> + <li><a href="https://sourceforge.net/project/showfiles.php?group_id=236485&package_id=308801&release_id=658634"> + Frhed 1.4.0</a> (2009-02-04)</li> + </ul> +<?php + $page->printSubHeading(__('Beta releases')); +?> + <ul> + <li><a href="https://sourceforge.net/project/showfiles.php?group_id=236485&package_id=307097&release_id=688792"> + Frhed 1.5.10</a> (2009-06-10)</li> + </ul> +<?php + $page->printSubHeading(__('Alpha releases')); +?> + <ul> + <li><a href="https://sourceforge.net/projects/frhed/files/3.%20Alpha%20Releases/1.7.1/"> + Frhed 1.7.1</a> (2009-07-30)</li> + </ul> + +<?php + $page->printHeading(__('Support')); + $page->printPara(__('For support you can try the <a href="%1$s">forums</a> or the <a href="%2$s">mailing lists</a>.', 'http://apps.sourceforge.net/phpbb/frhed/', 'https://sourceforge.net/mail/?group_id=236485'), + __('If you found bugs, please submit them to our <a href="%1$s">bug tracker</a> or leave wishes at the <a href="%2$s">feature requests</a> list.', 'https://sourceforge.net/tracker/?atid=1100163&group_id=236485', 'https://sourceforge.net/tracker/?atid=1100166&group_id=236485')); + + $page->printHeading(__('Open Source')); + $page->printPara(__('Frhed is <a href="%1$s">open source</a> software and is licenced under the <a href="%2$s">GNU General Public License</a>. +This means everybody can download the source code and improve and modify them.', 'http://www.opensource.org/', 'http://www.gnu.org/licenses/gpl-2.0.html')); + + $page->printHeading(__('History')); + $page->printPara(__('Frhed is originally developed by <a href="%s">Raihan Kibria</a>.', 'http://www.kibria.de/frhed.html')); + $page->printPara(__('Version 1.1 included many improvements and new features from versions that several other programmers had been working on. +Unfortunately version 1.1 never matured to "stable" release. Latest 1.1 release is labeled as "beta" release.')); + $page->printPara(__('At autumn 2008 the <a href="%1$s">WinMerge Team</a> decided to use Frhed as binary file editor component +for WinMerge. For developing Frhed further new <a href="%2$s">SourceForge project</a> +was created. This new project will develop Frhed as stand alone product.', 'http://winmerge.org/' , 'https://sourceforge.net/projects/frhed')); + + $page->printFoot(); +?> Copied: trunk/Web/templates/screenshots/index.php (from rev 900, trunk/Web/screenshots/index.php) =================================================================== --- trunk/Web/templates/screenshots/index.php (rev 0) +++ trunk/Web/templates/screenshots/index.php 2010-11-28 12:10:11 UTC (rev 902) @@ -0,0 +1,13 @@ +<?php + $page = new Page; + $page->printHead(__('Screenshots')); + $page->printHeading(__('Screenshots')); + + $page->printSubHeading(__('Main Window')); +?> +<a href="/sites/screenshots/frhed_main_window.png" target="_blank"><img src="/sites/screenshots/frhed_main_window_small.png" alt="<?php __e('Main Window');?>" style="border:none;" /></a> +<?php + $page->printPara(__('The main window from Frhed.')); + + $page->printFoot(); +?> Copied: trunk/Web/templates/translations/index.php (from rev 900, trunk/Web/translations/index.php) =================================================================== --- trunk/Web/templates/translations/index.php (rev 0) +++ trunk/Web/templates/translations/index.php 2010-11-28 12:10:11 UTC (rev 902) @@ -0,0 +1,32 @@ +<?php + $page = new Page; + $page->addRssFeed('status_branch_rss.php', __('Frhed Translations Status (Stable Branch)')); + $page->addRssFeed('status_trunk_rss.php', __('Frhed Translations Status (Unstable Trunk)')); + $page->printHead(__('Translations')); + + $page->printHeading(__('Translations')); + $page->printPara(__('We currently have Frhed translated into the languages listed below:')); + print("<ul>\n"); + try { + $status = New TranslationsStatus('status_trunk.xml'); + + $languages = $status->getLanguagesArray(); + foreach ($languages as $language) { //for all languages... + print(" <li>" . __($language) . "</li>\n"); + } + } + catch (Exception $ex) { //If problems with translations status... + print(" <li>" . __('English') . "</li>\n"); + } + print("</ul>\n"); + + $page->printSubHeading(__('Status')); + $page->printPara(__('The following two pages inform you about the translations status of the stable and developer version of Frhed:')); +?> +<ul> + <li><a href="status_branch.php"><?php __e('Stable Version (Branch)');?></a> <?php $page->printRssFeedLink('status_branch_rss.php'); ?></li> + <li><a href="status_trunk.php"><?php __e('Unstable Version (Trunk)');?></a> <?php $page->printRssFeedLink('status_trunk_rss.php'); ?></li> +</ul> +<?php + $page->printFoot(); +?> \ No newline at end of file Copied: trunk/Web/templates/translations/status_branch.php (from rev 900, trunk/Web/translations/status_branch.php) =================================================================== --- trunk/Web/templates/translations/status_branch.php (rev 0) +++ trunk/Web/templates/translations/status_branch.php 2010-11-28 12:10:11 UTC (rev 902) @@ -0,0 +1,18 @@ +<?php + $page = new Page; + $page->addRssFeed('status_branch_rss.php'); + $page->printHead(__('Translations Status (Stable Branch)')); + + $page->printRssHeading(__('Translations Status (Stable Branch)'), 'status_branch_rss.php'); + try { + $status = New TranslationsStatus('status_branch.xml'); + $status->svnUrl = 'http://frhed.svn.sourceforge.net/viewvc/frhed/branches/R1_6/Translations/'; + $status->printTOC(); + $status->printStatus(); + $status->printTranslators(); + } + catch (Exception $ex) { //If problems with translations status... + print("<p>" . __('The translations status is currently not available...') . "</p>\n"); + } + $page->printFoot(); +?> \ No newline at end of file Copied: trunk/Web/templates/translations/status_branch_rss.php (from rev 900, trunk/Web/translations/status_branch_rss.php) =================================================================== --- trunk/Web/templates/translations/status_branch_rss.php (rev 0) +++ trunk/Web/templates/translations/status_branch_rss.php 2010-11-28 12:10:11 UTC (rev 902) @@ -0,0 +1,16 @@ +<?php + header('Content-type: application/rss+xml'); + + try { + $status = New TranslationsStatus('status_branch.xml'); + $status->version = 'Stable Branch'; + $status->svnUrl = 'http://frhed.svn.sourceforge.net/viewvc/frhed/branches/R1_6/Translations/'; + $status->rssLink = 'http://frhed.sourceforge.net/translations/status_branch.php'; + $status->printRSS(); + } + catch (Exception $ex) { //If problems with translations status... + print("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"); + print("<rss version=\"2.0\">\n"); + print("</rss>\n"); + } +?> \ No newline at end of file Copied: trunk/Web/templates/translations/status_trunk.php (from rev 900, trunk/Web/translations/status_trunk.php) =================================================================== --- trunk/Web/templates/translations/status_trunk.php (rev 0) +++ trunk/Web/templates/translations/status_trunk.php 2010-11-28 12:10:11 UTC (rev 902) @@ -0,0 +1,18 @@ +<?php + $page = new Page; + $page->addRssFeed('status_trunk_rss.php'); + $page->printHead(__('Translations Status (Unstable Trunk)')); + + $page->printRssHeading(__('Translations Status (Unstable Trunk)'), 'status_trunk_rss.php'); + try { + $status = New TranslationsStatus('status_trunk.xml'); + $status->svnUrl = 'http://frhed.svn.sourceforge.net/viewvc/frhed/trunk/Translations/'; + $status->printTOC(); + $status->printStatus(); + $status->printTranslators(); + } + catch (Exception $ex) { //If problems with translations status... + print("<p>" . __('The translations status is currently not available...') . "</p>\n"); + } + $page->printFoot(); +?> \ No newline at end of file Copied: trunk/Web/templates/translations/status_trunk_rss.php (from rev 900, trunk/Web/translations/status_trunk_rss.php) =================================================================== --- trunk/Web/templates/translations/status_trunk_rss.php (rev 0) +++ trunk/Web/templates/translations/status_trunk_rss.php 2010-11-28 12:10:11 UTC (rev 902) @@ -0,0 +1,16 @@ +<?php + header('Content-type: application/rss+xml'); + + try { + $status = New TranslationsStatus('status_trunk.xml'); + $status->version = 'Unstable Trunk'; + $status->svnUrl = 'http://frhed.svn.sourceforge.net/viewvc/frhed/trunk/Translations/'; + $status->rssLink = 'http://frhed.sourceforge.net/translations/status_trunk.php'; + $status->printRSS(); + } + catch (Exception $ex) { //If problems with translations status... + print("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"); + print("<rss version=\"2.0\">\n"); + print("</rss>\n"); + } +?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |