[Xfce4-commits] <www:nick/gettext> News updates.

Nick Schermer noreply at xfce.org
Sat Jan 15 19:08:01 CET 2011


Updating branch refs/heads/nick/gettext
         to 89eed51b2b349883cebd9ebf210d7798cab45ffd (commit)
       from 4a959b77974abd622476d3447656bfbea0613498 (commit)

commit 89eed51b2b349883cebd9ebf210d7798cab45ffd
Author: Nick Schermer <nick at xfce.org>
Date:   Sat Jan 15 18:02:09 2011 +0100

    News updates.

 lib/core.php                        |    2 -
 lib/locales.php                     |    6 +--
 pages/about/news.php                |   29 +++++++++++---
 pages/download/changelogs/4.6.0.php |   20 +++------
 pages/download/changelogs/4.6.1.php |    8 +--
 pages/feed.php                      |   28 +++++++++-----
 pages/frontpage.php                 |    2 +-
 pages/header.php                    |    4 ++
 pages/news-array.php                |   70 +++++++++++++++++++++++++++++++---
 style/img/feed.png                  |  Bin 0 -> 3251 bytes
 style/news.css                      |    5 ++
 11 files changed, 126 insertions(+), 48 deletions(-)

diff --git a/lib/core.php b/lib/core.php
index b0f97fb..4696f19 100644
--- a/lib/core.php
+++ b/lib/core.php
@@ -17,8 +17,6 @@ function R_($text)
 	global $gettext_reader, $lang;
 	if ($gettext_reader)
 		return $gettext_reader->translate($text);
-	elseif ($lang == 'foo')
-		return '###';
 	else
 		return $text;
 }
diff --git a/lib/locales.php b/lib/locales.php
index 4975dfe..cb28db0 100644
--- a/lib/locales.php
+++ b/lib/locales.php
@@ -7,10 +7,8 @@
 
 /* known languages in this directory */
 $languages = array (
-	'en' => 'English',
-	'nl' => 'Nederlands',
-	'foo' => '###');
-	
+	'en' => 'English');
+
 /* used in header and language detection functions */
 $language_codes = array_keys ($languages);
 ?>
diff --git a/pages/about/news.php b/pages/about/news.php
index 99d424a..ef7f0fa 100644
--- a/pages/about/news.php
+++ b/pages/about/news.php
@@ -1,17 +1,20 @@
 <?php
 
+/* if you want to update news: update the news-array.php file */
 include ('pages/news-array.php');
 
 $head['title'] = R_('News');
 $head['stylesheet'] = array ('/style/news.css');
-$head['feed'] = '/feed';
+$head['feed'] = 'http://www.xfce.org/feed?lang='.$lang;
 
 $toc['anchors'] = array ();
 
 echo '<h1>'.$head['title'].'</h1>';
 
-if (isset ($_GET['id']))
-  $only_stamp = (int) $_GET['id'];
+echo '<span class="rss"><a href="'.$head['feed'].'">Subscribe to articles using RSS Feed</a></span>';
+
+if (isset ($_GET['post']))
+  $only_stamp = (int) $_GET['post'];
 else
   $only_stamp = 0;
 
@@ -23,19 +26,33 @@ foreach ($news as $item)
 
   if ($only_stamp > 0 && $only_stamp != $stamp)
     continue;
+    
+  if (!empty ($item['version']))
+      $title = sprintf (R_('Xfce %s released'), $item['version']);
+    else
+      $title = $item['title'];
 
-  echo '<h2 id="'.$stamp.'">'.$item['title'].'</h2>'."\n";
+  echo '<h2 id="post-'.$stamp.'">'.$title.'</h2>'."\n";
 
   echo '<div class="post-date"><span class="post-month">'. date ('M', $stamp).
        '</span> <span class="post-day">'. date ('d', $stamp).
        '<br />'.date ('Y', $stamp).'</span></div>';
 
   echo '<div class="post-wrap">';
-  foreach ($item['content'] as $p)
+  foreach ($item['paragraphs'] as $p)
     echo '<p>'.$p.'</p>'."\n";
+
+  if (!empty ($item['version']))
+  {
+    echo '<ul>';
+      echo '<li>Download: <a href="http://archive.xfce.org/xfce/'.$item['version'].'/">http://archive.xfce.org/xfce/'.$item['version'].'/</a></li>';
+      echo '<li><a href="/download/changelogs/'.$item['version'].'/">'.R_('Changes in this release').'</a></li>';
+    echo '</ul>';
+  }
+
   echo '</div>';
 
-  $toc['anchors'] += array ($stamp => $item['title']);
+  $toc['anchors'] += array ('post-'. $stamp => $item['title']);
   $has_items = true;
 }
 
diff --git a/pages/download/changelogs/4.6.0.php b/pages/download/changelogs/4.6.0.php
index 12465ab..6384823 100644
--- a/pages/download/changelogs/4.6.0.php
+++ b/pages/download/changelogs/4.6.0.php
@@ -2,19 +2,13 @@
 
 <h1>Xfce 4.6 Changelog</h1>
 
-<br />
-<br />
-<a href="/documentation/changelogs/4.5.90">Changes introduced for the Alpha</a>
-<br />
-<a href="/documentation/changelogs/4.5.91">Changes introduced for the first Beta</a>
-<br />
-<a href="/documentation/changelogs/4.5.92">Changes introduced for the second Beta</a>
-<br />
-<a href="/documentation/changelogs/4.5.93">Changes introduced for the third Beta</a>
-<br/>
-<a href="/documentation/changelogs/4.5.99.1">Changes introduced for the first Release Candidate</a>
-<br />
-<br />
+<ul>
+  <li><a href="/download/changelogs/4.5.90">Changes introduced for the Alpha</a></li>
+  <li><a href="/download/changelogs/4.5.91">Changes introduced for the first Beta</a></li>
+  <li><a href="/download/changelogs/4.5.92">Changes introduced for the second Beta</a></li>
+  <li><a href="/download/changelogs/4.5.93">Changes introduced for the third Beta</a></li>
+  <li><a href="/download/changelogs/4.5.99.1">Changes introduced for the first Release Candidate</a></li>
+</ul>
 
 <h2>Utility Library <em>(libxfce4util)</em>:</h2>
 <ul>
diff --git a/pages/download/changelogs/4.6.1.php b/pages/download/changelogs/4.6.1.php
index b42de8f..89f7941 100644
--- a/pages/download/changelogs/4.6.1.php
+++ b/pages/download/changelogs/4.6.1.php
@@ -2,11 +2,9 @@
 
 <h1>Xfce 4.6.1 Changelog</h1>
 
-<br />
-<br />
-<a href="/documentation/changelogs/4.6.0">Changes introduced for Final release</a>
-<br />
-<br />
+<ul>
+  <li><a href="/download/changelogs/4.6.0">Changes introduced for Final release</a></li>
+</ul>
 
 <h2>Utility Library <em>(libxfce4util)</em>:</h2>
 <ul>
diff --git a/pages/feed.php b/pages/feed.php
index 6685f5d..012bfe1 100644
--- a/pages/feed.php
+++ b/pages/feed.php
@@ -1,11 +1,12 @@
 <?php
 
+/* if you want to update news: update the news-array.php file */
 include ('pages/news-array.php');
 
-function escape_content($str)
+function fixup ($str)
 {
-  $search = array ('<a href="/','<', '>', '"');
-  $replace = array ('<a href="http://www.xfce.org/', '<', '>','"');
+  $search = array ('<a href="/');
+  $replace = array ('<a href="http://www.xfce.org/');
 
   return str_replace ($search, $replace, $str);
 }
@@ -22,33 +23,40 @@ echo '<?xml version="1.0" encoding="UTF-8"?>'.
      '<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" '.
      'xmlns:wfw="http://wellformedweb.org/CommentAPI/" '.
      'xmlns:dc="http://purl.org/dc/elements/1.1/" '.
+     'xmlns:atom="http://www.w3.org/2005/Atom" '.
      'version="2.0">'.
      '<channel>'.
        '<title>'.R_('Xfce News').'</title>'.
        '<description>'.R_('Xfce release announcements').'</description>'.
        '<link>http://www.xfce.org/about/news</link>'.
        '<copyright>Olivier Fourdan 1996 - '. date ('Y') .'</copyright>'.
-       '<language>". $lang ."</language>'.
-       '<generator>Xfce feed spawner</generator>';
+       '<language>'.$lang.'</language>'.
+       '<generator>Xfce feed spawner</generator>'.
+       '<atom:link href="http://www.xfce.org/feed?lang='.$lang.'" rel="self" type="application/rss+xml" />';
 
 foreach ($news as $item)
 {
     $stamp = strtotime ($item['date']);
+    
+    if (isset ($item['version']) && !empty ($item['version']))
+      $title = sprintf (R_('Xfce %s released'), $item['version']);
+    else
+      $title = $item['title'];
 
     echo '<item>'.
            '<title>'.$item['title'].'</title>'.
-           '<description>'. escape_content ($item['content'][0]) .'</description>'.
+           '<description><![CDATA['. fixup ($item['paragraph'][0]) .']]></description>'.
            '<content:encoded><![CDATA[';
 
-    foreach ($item['content'] as $p)
-            echo '<p>'.$p.'</p>';
+    foreach ($item['paragraph'] as $p)
+            echo '<p>'.fixup ($p).'</p>';
 
     echo   ']]></content:encoded>'.
-           '<link>http://www.xfce.org/about/news/?id='.$stamp.'</link>'.
+           '<link>http://www.xfce.org/about/news/?post='.$stamp.'</link>'.
            '<dc:creator>'. $item['author'] .'</dc:creator>'.
            '<pubDate>'. date ($format, $stamp) .'</pubDate>'.
            '<category>Xfce News</category>'.
-           '<guid isPermaLink="false">http://www.xfce.org/about/news/?id='.$stamp.'</guid>'.
+           '<guid isPermaLink="false">http://www.xfce.org/about/news/?post='.$stamp.'</guid>'.
          '</item>';
 
     if ($item_limit-- < 0)
diff --git a/pages/frontpage.php b/pages/frontpage.php
index bd8662b..064e66e 100644
--- a/pages/frontpage.php
+++ b/pages/frontpage.php
@@ -3,6 +3,6 @@
 $head['description'] = 'Xfce Desktop Environment';
 $head['keywords'] = 'desktop environment, window manager, desktop, speed, lightweight, gtk+, open source, xforms common environment';
 $head['stylesheet'] = array ('/style/home.css');
-$head['feed'] = '/feed';
+$head['feed'] = 'http://www.xfce.org/feed?lang='.$lang;
 
 ?>
diff --git a/pages/header.php b/pages/header.php
index 39d6967..1966229 100644
--- a/pages/header.php
+++ b/pages/header.php
@@ -64,6 +64,9 @@ else
 				<li><a href="/projects"><?php E_('Projects') ?></a></li>
 			</ul>
 		</div>
+<?php
+	if (count ($languages) > 1) {
+?>
 		<form id="languageform" action="" method="get">
 			<select name="lang" onchange="document.getElementById('languageform').submit(); return true;" title="<?php E_('Change language') ?>">
 <?php
@@ -81,6 +84,7 @@ else
 			</select>
 			<button type="submit" class="hidden"><?php E_('Change language') ?></button>
 		</form>
+<?php } ?>
 		<div class="clearboth"></div>
 	</div>
 
diff --git a/pages/news-array.php b/pages/news-array.php
index 41fcc6d..3de3a4d 100644
--- a/pages/news-array.php
+++ b/pages/news-array.php
@@ -1,16 +1,72 @@
 <?php
+/* title:      use R_() for translations, can be null in case @version is set.
+ * version:    version number, will autoprepend download link and set a title.
+ * date:       release date
+ * author:     only used in feed
+ * paragraphs: array of <p></p> in the article.
+ * */
+
 $news = array (
-	array ( 'title' => R_('Xfce 4.8pre1 released'),
+	array ( 'title' => null,
+		'version' => '4.8pre3',
+		'date' => '2 jan 2011',
+		'author' => 'Release Manager',
+		'paragraphs' => array (
+			R_('Today we are pleased to announce the third and hopefully final preview release of Xfce 4.8 which is set to be pushed out to the public on January 16th, 2011. Compared to Xfce 4.8pre2 this release mostly features translation updates and bug fixes.'),
+			R_('With christmas and new year\'s eve between 4.8pre2 and 4.8pre3 it comes as no surprise that for most components only a few issues were tackled.'),
+			R_('Among other things we updated the default keyboard shortcuts to include monitor keys. The status icon of the file manager\'s progress dialog is now properly hidden when the dialog is destroyed. It\'s wallpaper plugin is now capable of handling filenames with spaces. The environment variables of commands launched from the Xfce run dialog were not set properly, so we fixed that so that commands launched from the dialog always inherit the environment of the Xfce session.'),
+			R_('We also made the --reboot and --halt parameters of xfce4-session-logout work again which previously simply logged out the active user. In order to avoid a race condition at session startup and in order to speed things up a little more we no longer use xrdb to update xft and cursor settings and instead, update the related XSETTINGS properties ourselves.'),
+			R_('In the window manager xfwm4, we aligned the time period required for a double click with that of normal applications. Via the hidden option /general/mousewheel_rollup one can now disable windows being rolled up via the mouse wheel. The window manager now also properly handles resolution changes in fullscreen windows like those appearing in games. Xfwm4\'s application switcher now only appears once in cloned mode.'),
+			R_('This may sound like a few useful fixes but it\'s nothing compared to the amount of work that went into the new Xfce panel once again. Around 20+ known bugs and regressions were fixed. Here is a short excerpt of the complete changelog: Translation domains were fixed for external plugins, plugins can be reordered with DND again, double-clicking items in the item editor shows their preferences, dragging items to the item editor dialog removes them from the panel again, tasklist windows can now be filtered by monitor. Another issue that appeared recently and has now been fixed is the icon sizing in the notification area, also known as the systray.'),
+			R_('Xfce 4.8pre3 also features a lot of translation updates, as can be seen in the complete changelog.'),
+			R_('Since we\'re following the Xfce <a href="/about/releasemodel">release model</a> for 4.8, we\'d normally announce code freeze and the creation of early lifecycle support branches today. We decided against this because there are not enough people active to take care of all this at the moment. So we will continue fixing bugs in master branches as we did between 4.8pre2 and 4.8pre3.'))
+		),
+	array ( 'title' => null,
+		'version' => '4.8pre2',
+		'date' => '5 dec 2010',
+		'author' => 'Release Manager',
+		'paragraphs' => array (
+			R_('We are pleased to announce the second preview release of Xfce 4.8. This release marks the beginning of the string freeze. From today on until the final release, strings may no longer be changed in the master branch of Xfce core components. This will help translators to prepare their translations for the final release scheduled on January 16th, 2011.'),
+			R_('For this release we focused on fixing bugs in all Xfce components. We managed to close a great number of them thanks to all the persons who reported them and tested proposed fixes quickly.'),
+			R_('A few minor panel features were added despite feature freeze. We also managed to work on two long time requests: proper support for editing the application menu with menu editors (Alacarte being the one that we tested) and integration with the Compiz viewport. Of course, this release also features a lot of new and improved translations thanks to the amazing work of our translation teams.'))
+		),
+	array ( 'title' => null,
+		'version' => '4.8pre1',
 		'date' => '7 nov 2010',
 		'author' => 'Release Manager',
-		'content' => array (
+		'paragraphs' => array (
 			R_('The Xfce development team is proud to announce the first preview release for Xfce 4.8. Together with this preview release, the Xfce project announces the feature freeze for the final 4.8 release which is set to be pushed out to the world on January 16th, 2011.'),
 			R_('This release incorporates major changes to the core of the Xfce desktop environment and hopefully succeeds in fulfilling a number of long time requests. Among the most notable updates is that we have ported the entire Xfce core (Thunar, xfdesktop and thunar-volman in particular) from ThunarVFS to GIO, bringing remote filesystems to the Xfce desktop. The panel has been rewritten from scratch and provides better launcher management and improved multi-head support. The list of new panel features is too long to mention in its entirety here. Thanks to the new menu library garcon (formerly known as libxfce4menu, but rewritten once again) we now support menu editing via a third-party menu editor such as Alacarte (we do not ship our own yet). Our core libraries have been streamlined a bit, a good examplle being the newly introduced libxfce4ui library which is meant to replace libxfcegui4.'),
 			R_('Perhaps the most important achievement we will accomplish with Xfce 4.8 is that, despite suffering from the small size of the development team from time to time, the core of the desktop environment has been aligned with today\'s desktop technologies such as GIO, ConsoleKit, PolicyKit, udev and many more. A lot of old cruft like has been stripped from the core as well, as has happened with HAL and ThunarVFS (which is still around for compatibility reasons).'),
-			R_('Thanks to the awesome Transifex translation platform, our language teams have been able to update their translations at an incredible pace. Please include them when praising this release!'),
-			R_('A complete list of all changes since the latest stable release is available <a href="/download/changelogs/4.8pre1">here</a>.'),
-			R_('Download the tarballs from here: <a href="http://archive.xfce.org/xfce/4.8pre1/">http://archive.xfce.org/xfce/4.8pre1/</a>.'),
-			R_('Kind regards and thanks to everyone who has contributed to this release,<br />The Xfce development team.'))
-	)
+			R_('Thanks to the awesome Transifex translation platform, our language teams have been able to update their translations at an incredible pace. Please include them when praising this release!'))
+	),
+	array ( 'title' => null,
+		'version' => '4.6.2',
+		'date' => '23 may 2010',
+		'author' => 'Release Manager',
+		'paragraphs' => array (
+			R_('The second bugfix-release of xfce 4.6 has been released.').
+			R_('This release features a lot of updated translations and fixes some bugs or regressions with new GTK+ versions.'))
+		),
+	array ( 'title' => null,
+		'version' => '4.6.1',
+		'date' => '19 apr 2009',
+		'author' => 'Release Manager',
+		'paragraphs' => array (
+			R_('The first bugfix-release of xfce 4.6 has been released.'),
+			R_('Thanks to all the people who have been using xfce 4.6 and took the time and effort to submit bugreports for stuff that wasn\'t quite working the way it is supposed to. We have been able to fix several issues during the past few weeks.'),
+			R_('thanks to all the translators, several translations have been improved and completed since the release of 4.6.0.'))
+		),
+	array ( 'title' => null,
+		'version' => '4.6.0',
+		'date' => '27 feb 2009',
+		'author' => 'Release Manager',
+		'paragraphs' => array (
+			R_('After more than two years of development, Xfce 4.6.0 has just been released.'),
+			R_('Xfce 4.6 features a new configuration backend, a new settings manager, a brand new sound mixer, and several huge improvements to the session manager and the rest of Xfce\'s core components. A list of all the changes since the last release candidate can be found on this page.'),
+			R_('A visual overview of Xfce 4.6 is available <a href="/about/tour46">here</a>.'))
+		)
 )
 ?>
+
+
diff --git a/style/img/feed.png b/style/img/feed.png
new file mode 100644
index 0000000..8afbdb0
Binary files /dev/null and b/style/img/feed.png differ
diff --git a/style/news.css b/style/news.css
index 6d1e0f5..fb111d3 100644
--- a/style/news.css
+++ b/style/news.css
@@ -28,3 +28,8 @@
 .post-wrap {
 	margin-left: 65px;
 }
+
+.rss {
+	padding-left: 17px;
+	background: url(img/feed.png) no-repeat left center;
+}



More information about the Xfce4-commits mailing list