<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>the bemused blog &#187; geeky stuff</title>
	<atom:link href="http://bemused.org/blog/category/geeky-stuff/feed/" rel="self" type="application/rss+xml" />
	<link>http://bemused.org/blog</link>
	<description>can you get more random?</description>
	<lastBuildDate>Sat, 28 Apr 2012 17:27:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Symfony: extracting strings from 1.2 forms using i18n:extract</title>
		<link>http://bemused.org/blog/2010/06/09/symfony-extracting-strings-from-1-2-forms-using-i18nextract/</link>
		<comments>http://bemused.org/blog/2010/06/09/symfony-extracting-strings-from-1-2-forms-using-i18nextract/#comments</comments>
		<pubDate>Wed, 09 Jun 2010 22:25:07 +0000</pubDate>
		<dc:creator>gareth</dc:creator>
				<category><![CDATA[geeky stuff]]></category>

		<guid isPermaLink="false">http://bemused.org/blog/?p=89</guid>
		<description><![CDATA[Anyone using Sympfony 1.2 will probably have realised by now that the i18n:extract task doesn&#8217;t extract strings from any files in lib/form/* This useful thread shows how to dump all translated strings into a file which can later be parsed by the i18n:extract task, unfortunately it creates huge files, and needs to be disabled in [...]]]></description>
			<content:encoded><![CDATA[<p>Anyone using Sympfony 1.2 will probably have realised by now that the i18n:extract task doesn&#8217;t extract strings from any files in lib/form/*</p>
<p><a href="http://groups.google.com/group/symfony-devs/browse_thread/thread/9780f8111273423b">This useful thread</a> shows how to dump all translated strings into a file which can later be parsed by the i18n:extract task, unfortunately it creates huge files, and needs to be disabled in production environments for performance reasons.</p>
<p>After a quick search through the code, I  have patched my code to only dump untranslated strings to the i18n.temp file.</p>
<p>Here&#8217;s the patch for lib/vendor/symfony/lib/i18n/sfMessageFormat.class.php</p>
<pre>// found, but untranslated
 if (empty($target))
 {
+          file_put_contents(sfConfig::get('sf_app_template_dir').'/i18n.temp.php',"&lt;?php __('$string'); ?&gt;\n",FILE_APPEND);
 return $this-&gt;postscript[0].$this-&gt;replaceArgs($string, $args).$this-&gt;postscript[1];
 }
 return $this-&gt;replaceArgs($target, $args);</pre>
<p>(I would have posted this in reply to the original comment, but I couldn&#8217;t find the original post for some reason)</p>
<p class="addtoany_share_save_container">
    <a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?sitename=the%20bemused%20blog&amp;siteurl=http%3A%2F%2Fbemused.org%2Fblog%2F&amp;linkname=Symfony%3A%20extracting%20strings%20from%201.2%20forms%20using%20i18n%3Aextract&amp;linkurl=http%3A%2F%2Fbemused.org%2Fblog%2F2010%2F06%2F09%2Fsymfony-extracting-strings-from-1-2-forms-using-i18nextract%2F"><img src="http://bemused.org/blog/wp-content/plugins/add-to-any/share_save_120_16.png" width="120" height="16" alt="Share/Save/Bookmark"/></a>

	</p>]]></content:encoded>
			<wfw:commentRss>http://bemused.org/blog/2010/06/09/symfony-extracting-strings-from-1-2-forms-using-i18nextract/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>I18n of sfSimpleForumPlugin</title>
		<link>http://bemused.org/blog/2009/01/19/i18n-of-sfsimpleforumplugin/</link>
		<comments>http://bemused.org/blog/2009/01/19/i18n-of-sfsimpleforumplugin/#comments</comments>
		<pubDate>Mon, 19 Jan 2009 22:47:50 +0000</pubDate>
		<dc:creator>gareth</dc:creator>
				<category><![CDATA[geeky stuff]]></category>
		<category><![CDATA[i18n]]></category>
		<category><![CDATA[l10n]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[sfSimpleForumPlugin]]></category>
		<category><![CDATA[symfony]]></category>

		<guid isPermaLink="false">http://bemused.org/blog/?p=51</guid>
		<description><![CDATA[The sfSimpleForum plugin is a great way to quickly add a forum to a site, but it doesn&#8217;t handle multi-lingual sites, so here are my notes on how to add this feature. 1. Edit plugins/sfSimpleForumPlugin/config/schema.yml, add the culture field to the sf_simple_forum_category table : lang: { type: varchar, size: 7 } My thinking is that [...]]]></description>
			<content:encoded><![CDATA[<p>The sfSimpleForum plugin is a great way to quickly add a forum to a site, but it doesn&#8217;t handle multi-lingual sites, so here are my notes on how to add this feature.</p>
<p>1. Edit plugins/sfSimpleForumPlugin/config/schema.yml, add the culture field to the   sf_simple_forum_category table :</p>
<pre>lang:     { type: varchar, size: 7 }</pre>
<p>My thinking is that only the categories need an added lang field, as all forums belong to a category, and all posts belong to a forum, so the language of a post is implicit in its forum and category. Note I&#8217;m using &#8216;lang&#8217; and not &#8216;culture&#8217; here, as culture seems to have a specific meaning in symfony, and is used when an object can exist with several cultures, so a category would exist in all languages.  However in this case, the french site could have a diferent set of categories to the english site, so it&#8217;s not appropriate to use the field name &#8216;culture&#8217;.</p>
<p>2. Add culture to the test data :</p>
<pre>sfSimpleForumCategory:
  c1:
    name:        Public Boards
    description: We talk about stuff here.
    rank:        1
    culture:     en_GB
  c2:
    name:        Miscellaneous
    description: Secret matters
    rank:        2
    culture:     en_GB
  c3:
    name:        Alleatoire
    description: Les choses alleatoires
    rank:        1
    culture:     fr_FR</pre>
<p>3. Select by culture when getting list of all categories in plugins/sfSimpleForumPlugin/lib/model/plugin/PluginsfSimpleForumForumPeer.php:</p>
<pre>public static function getAllOrderedByCategory()
{
  $c = new Criteria();
  $c-&gt;addJoin(self::CATEGORY_ID, sfSimpleForumCategoryPeer::ID);
  $c-&gt;add(sfSimpleForumCategoryPeer::LANG, sfContext::getInstance()-&gt;getUser()-&gt;getCulture());
  $c-&gt;addAscendingOrderByColumn(sfSimpleForumCategoryPeer::RANK);
  $c-&gt;addAscendingOrderByColumn(self::RANK);return self::doSelectJoinCategoryLeftJoinPost($c);
}</pre>
<p>4. Add culture to admin interface in plugins/sfSimpleForumPlugin/modules/sfSimpleForumCategoryAdmin/config/generator.yml :</p>
<pre>list:
  title: Category Administration</pre>
<pre>  display: [=name, description, rank, lang]
edit:
  title: Edit category "%%name%%"
  display: [name, description, rank, _lang, _forums]</pre>
<p>5. Add set_culture partial in plugins/sfSimpleForumPlugin/modules/sfSimpleForumCategoryAdmin/templates/_lang.php :</p>
<pre>&lt; ?php
use_helper('Utils');
$cultures = array('en_GB' =&gt; 'English', 'fr_FR' =&gt; 'French', 'de_DE' =&gt; 'German');
echo select_culture_tag('sf_simple_forum_category[lang]', $sf_simple_forum_category-&gt;getLang(), $cultures, array('id' =&gt; 'lang'));</pre>
<p>6. add select_culture_tag function in apps/backend/lib/helper/UtilsHelper.php :</p>
<pre>function select_culture_tag($name, $selected = null, $cultures = array(), $options = array())
{
$c = new sfCultureInfo(sfContext::getInstance()-&gt;getUser()-&gt;getCulture());
if (! is_array($cultures)) {
$cultures = $c-&gt;getCultures();
}</pre>
<pre>if ($culture_option = _get_option($options, 'cultures'))
{
foreach ($cultures as $key =&gt; $value)
{
if (!in_array($key, $culture_option))
{
unset($cultures[$key]);
}
}
}</pre>
<pre>asort($cultures);</pre>
<pre>$option_tags = options_for_select($cultures, $selected);</pre>
<pre>return select_tag($name, $option_tags, $options);
}</pre>
<p>7. Rebuild model and you&#8217;re good to go:</p>
<pre>symfony propel:build-model</pre>
<p class="addtoany_share_save_container">
    <a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?sitename=the%20bemused%20blog&amp;siteurl=http%3A%2F%2Fbemused.org%2Fblog%2F&amp;linkname=I18n%20of%20sfSimpleForumPlugin&amp;linkurl=http%3A%2F%2Fbemused.org%2Fblog%2F2009%2F01%2F19%2Fi18n-of-sfsimpleforumplugin%2F"><img src="http://bemused.org/blog/wp-content/plugins/add-to-any/share_save_120_16.png" width="120" height="16" alt="Share/Save/Bookmark"/></a>

	</p>]]></content:encoded>
			<wfw:commentRss>http://bemused.org/blog/2009/01/19/i18n-of-sfsimpleforumplugin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Test from phone</title>
		<link>http://bemused.org/blog/2009/01/19/test-from-phone/</link>
		<comments>http://bemused.org/blog/2009/01/19/test-from-phone/#comments</comments>
		<pubDate>Mon, 19 Jan 2009 18:46:29 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[geeky stuff]]></category>
		<category><![CDATA[test phone iphone]]></category>

		<guid isPermaLink="false">http://bemused.org/blog/2009/01/19/test-from-phone/</guid>
		<description><![CDATA[Not much to say, the clue is in the title]]></description>
			<content:encoded><![CDATA[<p>Not much to say, the clue is in the title <img src='http://bemused.org/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p class="addtoany_share_save_container">
    <a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?sitename=the%20bemused%20blog&amp;siteurl=http%3A%2F%2Fbemused.org%2Fblog%2F&amp;linkname=Test%20from%20phone&amp;linkurl=http%3A%2F%2Fbemused.org%2Fblog%2F2009%2F01%2F19%2Ftest-from-phone%2F"><img src="http://bemused.org/blog/wp-content/plugins/add-to-any/share_save_120_16.png" width="120" height="16" alt="Share/Save/Bookmark"/></a>

	</p>]]></content:encoded>
			<wfw:commentRss>http://bemused.org/blog/2009/01/19/test-from-phone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Symfony and i18n &#8211; site interface translation</title>
		<link>http://bemused.org/blog/2008/02/20/symfony-and-i18n/</link>
		<comments>http://bemused.org/blog/2008/02/20/symfony-and-i18n/#comments</comments>
		<pubDate>Tue, 19 Feb 2008 23:24:59 +0000</pubDate>
		<dc:creator>gareth</dc:creator>
				<category><![CDATA[geeky stuff]]></category>

		<guid isPermaLink="false">http://bemused.org/blog/?p=49</guid>
		<description><![CDATA[UPDATE: I&#8217;ve packaged up the files into a plugin, which can be found here. I&#8217;ve been playing around with Symfony recently, with some interesting results. One frustrations for me was the lack of documentation explaining how to store translations in a database. While symfony provides a way to localise records in the DB, the default [...]]]></description>
			<content:encoded><![CDATA[<p>UPDATE: I&#8217;ve packaged up the files into a plugin, which can be found <a href="http://bemused.org/symfony/sfI18nDbTranslationPlugin/">here</a>.</p>
<p>I&#8217;ve been playing around with <a href="http://www.symfony-project.org/">Symfony</a> recently, with some <a href="http://en.restaurant-paris.org/">interesting results</a>.<br />
One frustrations for me was the lack of documentation explaining how to  store translations in a database.  While symfony provides a way to localise records in the DB, the default method of using XLIFF files for site translation seemed more complicated than necessary.<br />
As I couldnt find any information about implementing a admin interface to manage site translations, I&#8217;ve implemented this myself, what follows is a description of the steps to do this.  If there are better ways to do this, I&#8217;d love to know, I&#8217;m new to symfony, so still learning.</p>
<p>Here are the steps to add a admin interface to manage site interface translations.<br />
<span id="more-49"></span><br />
1. Add DB schema details in config/translation_schema.yml:</p>
<p><code><br />
propel:<br />
  catalogue:<br />
    cat_id: { type: integer, size: 11,  required: true, autoincrement: true, primaryKey: true }<br />
    name: { type: varchar, size: 100, required: true,  default: '' }<br />
    source_lang: { type: varchar, size: 100, required: true,  default: '' }<br />
    target_lang: { type: varchar, size: 100, required: true,  default: '' }<br />
    date_created: { type: integer, size: 11, required: true,  default: 0 }<br />
    date_modified: { type: integer, size: 11, required: true,  default: 0 }<br />
    author: { type: varchar, size: 255, required: true,  default: '' }<br />
  trans_unit:<br />
    msg_id: { type: integer, size: 11, required: true, autoincrement: true, primaryKey: true }<br />
    cat_id: { type: integer, size: 11, required: true, default: 1, foreignTable: catalogue, foreignRef<br />
erence: cat_id }<br />
    source: { type: longvarchar, required: true  }<br />
    target: { type: longvarchar, required: true  }<br />
    comments: { type: longvarchar }<br />
    date_added: { type: integer, size: 11, required: true, default: now }<br />
    date_modified: { type: integer, size: 11, required: true, default: now }<br />
    author: { type: varchar, size: 255, required: true, default: ''}<br />
    translated: { type: boolean, required: true, default: false }<br />
</code></p>
<p>2. rebuild model: <code>symfony propel-build-model</code> and add the tables to your database.<br />
<code><br />
CREATE TABLE `trans_unit` (<br />
  `msg_id` int(11) NOT NULL auto_increment,<br />
  `cat_id` int(11) NOT NULL default '1',<br />
  `id` varchar(255) NOT NULL default '',<br />
  `source` text NOT NULL,<br />
  `target` text NOT NULL,<br />
  `comments` text NOT NULL,<br />
  `date_added` int(11) NOT NULL default '0',<br />
  `date_modified` int(11) NOT NULL default '0',<br />
  `author` varchar(255) NOT NULL default '',<br />
  `translated` tinyint(1) NOT NULL default '0',<br />
  PRIMARY KEY  (`msg_id`)<br />
)<br />
CREATE TABLE `catalogue` (<br />
  `cat_id` int(11) NOT NULL auto_increment,<br />
  `name` varchar(100) NOT NULL default '',<br />
  `source_lang` varchar(100) NOT NULL default '',<br />
  `target_lang` varchar(100) NOT NULL default '',<br />
  `date_created` int(11) NOT NULL default '0',<br />
  `date_modified` int(11) NOT NULL default '0',<br />
  `author` varchar(255) NOT NULL default '',<br />
  PRIMARY KEY  (`cat_id`)<br />
)<br />
</code></p>
<p>3. enable dictionary translation of interface in apps/frontend/config/i18n.yml:<br />
<code><br />
prod:<br />
  default_culture:     en_GB<br />
#  source:              XLIFF<br />
  source:              MySQL<br />
  database: mysql://user:password@host/database<br />
  debug:               off<br />
  cache:               on<br />
  untranslated_prefix: "[T]"<br />
  untranslated_suffix: "[/T]"<br />
dev:<br />
  default_culture:     en_GB<br />
  source:              MySQL<br />
  database: mysql://user:password@host/database<br />
  debug:               on<br />
  cache:               off<br />
  untranslated_prefix: "[T]"<br />
  untranslated_suffix: "[/T]"<br />
</code></p>
<p>At this stage, if you&#8217;ve been using __(&#8216;string to translate&#8217;) in your templates, you should be able to see [T]untranslated strings[/T] tagged in your development environment.</p>
<p>4. To check if everything is working correctly, you can manually add some data into the DB :</p>
<p>to define the dictionaries, you need an record in the catalogue table for each culture:<br />
<code><br />
INSERT INTO `catalogue` VALUES (1,'messages.fr_FR','en_GB','fr_FR',0,1197401102,'username'),(2,'messages.de_DE','en_GB','de_DE',0,1197401129,'username'),(3,'messages.en_GB','en_GB','en_GB',0,1197397744,'username');<br />
</code></p>
<p>The translations are stores in the trans_unit table :<br />
<code><br />
INSERT INTO `trans_unit` VALUES (1,3,'1','Hello %1%','Hello %1%','',1197393042,0,'',1), (79,1,'2','Hello %1%','Bonjour %1%','',1197401102,0,'',1), (154,2,'2','Hello %1%','Hallo %1%','',1197401129,0,'',1);<br />
</code></p>
<p>Using something similar to <code>echo __('Hello %1%', array('%1%' => $username)</code> in your templates should give you the correct translations.</p>
<p>Next I wanted to add an admin interface so an admin user can edit these translations without having to upload an XLIFF file.  Here&#8217;s the trans_unit generator.yml file I used:<br />
<code><br />
generator:<br />
  class:              sfPropelAdminGenerator<br />
  param:<br />
    model_class:      TransUnit<br />
    theme:            default<br />
    list:<br />
      title:        "Translation list"<br />
      max_per_page: 50<br />
      display:      [_lang, =source, target, comments, translated]<br />
      filters: [source, _translated, _catfilter]<br />
      object_actions:<br />
        _edit: ~<br />
        _delete: ~<br />
      sort: source<br />
      fields:<br />
        source: { params: disabled=false }<br />
        translated: { params: disabled=false type: boolean }<br />
        _lang { params: lang }<br />
        catfilter { name: language }<br />
    create:<br />
      title:            "create Translation"<br />
      display: [source, comments]<br />
      fields:<br />
        source:      { params: disabled=false size=80, type: input_tag  }<br />
        comments:      { params: disabled=false size=80x5, type: textarea_tag }<br />
      actions:<br />
        _list: ~<br />
        _save: ~<br />
        _delete: ~<br />
    edit:<br />
      title:            "Edit Translation"<br />
      display: [_cat, source, target, comments]<br />
      fields:<br />
        source:      { params: disabled=false size=80, type: input_tag  }<br />
        target:      { params: disabled=false size=80, type: input_tag }<br />
        comments:      { params: disabled=false size=80x5, type: textarea_tag }<br />
      actions:<br />
        _list: ~<br />
        _save: ~<br />
        _delete: ~<br />
</code></p>
<p>the aim was to add the source string for all cultures simultaneously, but only mark the string as translated once the translation has been added.  This allows the admin to search for untranslated strings. This is what I added in trans_unit/actions.class.php:<br />
<code><br />
class trans_unitActions extends autotrans_unitActions<br />
{</p>
<p>  // need to add to all languages by default<br />
  public function executeCreate()<br />
  {<br />
    $this->trans_unit = new TransUnit();<br />
    if ($this->getRequest()->getMethod() == sfRequest::POST)<br />
    {<br />
      $trans_unit = $this->getRequestParameter('trans_unit');<br />
      foreach (CataloguePeer::getCatalogues() as $catalogue) {<br />
        $c = new Criteria();<br />
        $c->add(TransUnitPeer::SOURCE, $trans_unit['source']);<br />
        $c->add(TransUnitPeer::CAT_ID, $catalogue->getCatId());<br />
        if (! TransUnitPeer::doSelectOne($c)) {<br />
          $this->trans_unit = new TransUnit();<br />
          $this->trans_unit->setSource($trans_unit['source']);<br />
          $this->trans_unit->setTarget('');<br />
          $this->trans_unit->setCatalogue($catalogue);<br />
          $this->trans_unit->save();<br />
        }<br />
      }<br />
      parent::executeList();<br />
      $this->setTemplate('list');<br />
    }<br />
    $this->labels = $this->getLabels();<br />
    //$this->setFlash('notice', $string);<br />
    //$this->setTemplate('create');<br />
  }</p>
<p>  public function executeEdit()<br />
  {<br />
    $c = new Criteria();<br />
    if ($this->getRequestParameter('cat_id')) {<br />
      $c->add(TransUnitPeer::CAT_ID,$this->getRequestParameter('cat_id'));<br />
    }<br />
    $this->trans_unit = TransUnitPeer::doSelectOne($c);<br />
    if ($this->trans_unit) {<br />
      $this->lang = $this->trans_unit->getTargetLang();<br />
    }<br />
    $this->labels = $this->getLabels();<br />
    parent::executeEdit();<br />
  }</p>
<p>  protected function updateTransUnitFromRequest()<br />
  {<br />
    $trans_unit = $this->getRequestParameter('trans_unit');<br />
    $this->trans_unit->setTranslated(1);<br />
    parent::updateTransUnitFromRequest();<br />
  }<br />
  protected function addFiltersCriteria($c)<br />
  {<br />
    if (isset($this->filters['source_is_empty']))<br />
    {<br />
      $criterion = $c->getNewCriterion(TransUnitPeer::SOURCE, '');<br />
      $criterion->addOr($c->getNewCriterion(TransUnitPeer::SOURCE, null, Criteria::ISNULL));<br />
      $c->add($criterion);<br />
    }<br />
    else if (isset($this->filters['source']) &#038;&#038; $this->filters['source'] !== '')<br />
    {<br />
      $c->add(TransUnitPeer::SOURCE, '%' . $this->filters['source']. '%', Criteria::LIKE);<br />
    }<br />
    if (isset($this->filters['translated_is_empty']))<br />
    {<br />
      $criterion = $c->getNewCriterion(TransUnitPeer::TRANSLATED, '');<br />
      $criterion->addOr($c->getNewCriterion(TransUnitPeer::TRANSLATED, null, Criteria::ISNULL));<br />
      $c->add($criterion);<br />
    }<br />
    else if (isset($this->filters['translated']) &#038;&#038; $this->filters['translated'] !== '')<br />
    {<br />
      $c->add(TransUnitPeer::TRANSLATED, $this->filters['translated']);<br />
    }<br />
    if (isset($this->filters['cat_is_empty']))<br />
    {<br />
      $criterion = $c->getNewCriterion(TransUnitPeer::CAT_ID, '');<br />
      $criterion->addOr($c->getNewCriterion(TransUnitPeer::CAT_ID, null, Criteria::ISNULL));<br />
      $c->add($criterion);<br />
    }<br />
    else if (isset($this->filters['cat_id']) &#038;&#038; $this->filters['cat_id'] !== '')<br />
    {<br />
      $c->add(TransUnitPeer::CAT_ID, $this->filters['cat_id']);<br />
    }<br />
  }<br />
}<br />
</code></p>
<p>This gives the interface shown in the following screenshot.<a href='http://bemused.org/blog/wp-content/uploads/2008/02/xlation.jpg' title='Screenshot of translation interface'><img src='http://bemused.org/blog/wp-content/uploads/2008/02/xlation-150x150.jpg' alt='Screenshot of translation interface' /></a></p>
<p class="addtoany_share_save_container">
    <a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?sitename=the%20bemused%20blog&amp;siteurl=http%3A%2F%2Fbemused.org%2Fblog%2F&amp;linkname=Symfony%20and%20i18n%20%26%238211%3B%20site%20interface%20translation&amp;linkurl=http%3A%2F%2Fbemused.org%2Fblog%2F2008%2F02%2F20%2Fsymfony-and-i18n%2F"><img src="http://bemused.org/blog/wp-content/plugins/add-to-any/share_save_120_16.png" width="120" height="16" alt="Share/Save/Bookmark"/></a>

	</p>]]></content:encoded>
			<wfw:commentRss>http://bemused.org/blog/2008/02/20/symfony-and-i18n/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>is this page in france?</title>
		<link>http://bemused.org/blog/2007/08/12/is-this-page-in-france/</link>
		<comments>http://bemused.org/blog/2007/08/12/is-this-page-in-france/#comments</comments>
		<pubDate>Sun, 12 Aug 2007 14:14:32 +0000</pubDate>
		<dc:creator>gareth</dc:creator>
				<category><![CDATA[geeky stuff]]></category>

		<guid isPermaLink="false">http://bemused.org/blog/?p=45</guid>
		<description><![CDATA[This is of no interest for anyone except me, check out this HanhonZendcomlane]]></description>
			<content:encoded><![CDATA[<p>This is of no interest for anyone except me, check out this <a href="http://new.oubouffer.com/restaurant.html">HanhonZendcomlane</a></p>
<p class="addtoany_share_save_container">
    <a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?sitename=the%20bemused%20blog&amp;siteurl=http%3A%2F%2Fbemused.org%2Fblog%2F&amp;linkname=is%20this%20page%20in%20france%3F&amp;linkurl=http%3A%2F%2Fbemused.org%2Fblog%2F2007%2F08%2F12%2Fis-this-page-in-france%2F"><img src="http://bemused.org/blog/wp-content/plugins/add-to-any/share_save_120_16.png" width="120" height="16" alt="Share/Save/Bookmark"/></a>

	</p>]]></content:encoded>
			<wfw:commentRss>http://bemused.org/blog/2007/08/12/is-this-page-in-france/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SEO gafoogteseitans</title>
		<link>http://bemused.org/blog/2006/07/25/seo-gafoogteseitans/</link>
		<comments>http://bemused.org/blog/2006/07/25/seo-gafoogteseitans/#comments</comments>
		<pubDate>Tue, 25 Jul 2006 16:25:06 +0000</pubDate>
		<dc:creator>gareth</dc:creator>
				<category><![CDATA[geeky stuff]]></category>

		<guid isPermaLink="false">http://bemused.org/blog/?p=42</guid>
		<description><![CDATA[so I&#8217;ve been meaning to do this for a while, but only just got round to it. If you&#8217;re looking for a gafoogteseitans, try here or here. PS. thanks to WordConstructor]]></description>
			<content:encoded><![CDATA[<p>so I&#8217;ve been meaning to do this for a while, but only just got round to it.  If you&#8217;re looking for a <a href="http://blog.360.yahoo.com/blog-UqRf_jo2erQjjtinWvbw2CY-?cq=1&#038;p=36">gafoogteseitans</a>, try <a href="http://search.yahoo.com/search?p=gafoogteseitans">here</a> or <a href="http://www.google.com/search?q=gafoogteseitans">here</a>.</p>
<p>PS. thanks to <a href="http://www.wordconstructor.com/">WordConstructor</a></p>
<p class="addtoany_share_save_container">
    <a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?sitename=the%20bemused%20blog&amp;siteurl=http%3A%2F%2Fbemused.org%2Fblog%2F&amp;linkname=SEO%20gafoogteseitans&amp;linkurl=http%3A%2F%2Fbemused.org%2Fblog%2F2006%2F07%2F25%2Fseo-gafoogteseitans%2F"><img src="http://bemused.org/blog/wp-content/plugins/add-to-any/share_save_120_16.png" width="120" height="16" alt="Share/Save/Bookmark"/></a>

	</p>]]></content:encoded>
			<wfw:commentRss>http://bemused.org/blog/2006/07/25/seo-gafoogteseitans/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Moving Mail from Mail.app to Thunderbird on OS X</title>
		<link>http://bemused.org/blog/2005/04/09/moving-mail-from-mailapp-to-thunderbird-on-os-x/</link>
		<comments>http://bemused.org/blog/2005/04/09/moving-mail-from-mailapp-to-thunderbird-on-os-x/#comments</comments>
		<pubDate>Sat, 09 Apr 2005 11:08:41 +0000</pubDate>
		<dc:creator>gareth</dc:creator>
				<category><![CDATA[geeky stuff]]></category>

		<guid isPermaLink="false">http://bemused.org/blog/?p=40</guid>
		<description><![CDATA[I finally decided to switch from OS X default Mail.app to thunderbird. apparently the Mail.app in 10.4 is going to be amazing, but I cant wait that long, and I&#8217;m fed up with using a basic email client, especially when I&#8217;m more used to mutt. I found this page, which was helpful, but I have [...]]]></description>
			<content:encoded><![CDATA[<p>I finally decided to switch from OS X default Mail.app to thunderbird.  apparently the Mail.app in 10.4 is going to be amazing, but I cant wait that long, and I&#8217;m fed up with using a basic email client, especially when I&#8217;m more used to <a href="http://www.mutt.org/">mutt</a>.</p>
<p>I found <a href="http://www.macosxhints.com/article.php?story=20040401075611985">this page</a>, which was helpful, but I have dozens of mailboxes that I wanted to import, so I needed an automated solution.</p>
<p>Try the following at your own risk, I&#8217;m not responsable for any lost mail.  You do backup, don&#8217;t you ?</p>
<p>1. in Mail.app, select all your folders, ctrl click and select &#8220;Remove deleted messages&#8221; (or whatever it is in English &#8211; I see &#8220;Eliminer les messages suprimés&#8221;)</p>
<p>2. Close Mail.app</p>
<p>3. Make a copy of your mailbox :</p>
<p><code>$ cp -r ~/Library/Mail ~/mail-bak</code></p>
<p>4. Make a list of all mailboxes you want to copy :</p>
<p><code>$ cd ~/mail-bak</code><br />
<code>$ find . -name mbox | grep -v Deleted > mbox.list</code><br />
<code>$ find . -name Incoming_Mail >> mbox.list</code><br />
(Incoming_Mail is the name of the inbox where IMAP mail is stored)</p>
<p>5. Copy the mail over to Thunderbird&#8217;s mail directory</p>
<p><code>$ cat mbox.list | while read line ; do newfile=`echo $line | sed 's/ /_/g' | sed 's/^\.\///g' | sed 's/\//-/g'`; cp  "$line" /Users/gareth/Library/Thunderbird/Profiles/xxxxxxxx.default/Mail/Local\ Folders/$newfile ; done</code></p>
<p>this will create a folder with the name equal to the path where the mbox file was found.  Its a bit messy, but at least you know which folder is which, and you can rename after.</p>
<p>After this, start Thunderbird, and you should see all your new folders in the &#8216;Local Folders&#8217; subfolder</p>
<p>good luck <img src='http://bemused.org/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p class="addtoany_share_save_container">
    <a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?sitename=the%20bemused%20blog&amp;siteurl=http%3A%2F%2Fbemused.org%2Fblog%2F&amp;linkname=Moving%20Mail%20from%20Mail.app%20to%20Thunderbird%20on%20OS%20X&amp;linkurl=http%3A%2F%2Fbemused.org%2Fblog%2F2005%2F04%2F09%2Fmoving-mail-from-mailapp-to-thunderbird-on-os-x%2F"><img src="http://bemused.org/blog/wp-content/plugins/add-to-any/share_save_120_16.png" width="120" height="16" alt="Share/Save/Bookmark"/></a>

	</p>]]></content:encoded>
			<wfw:commentRss>http://bemused.org/blog/2005/04/09/moving-mail-from-mailapp-to-thunderbird-on-os-x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>open source blog software</title>
		<link>http://bemused.org/blog/2005/02/24/open-source-blog-software/</link>
		<comments>http://bemused.org/blog/2005/02/24/open-source-blog-software/#comments</comments>
		<pubDate>Thu, 24 Feb 2005 22:38:19 +0000</pubDate>
		<dc:creator>gareth</dc:creator>
				<category><![CDATA[geeky stuff]]></category>

		<guid isPermaLink="false">http://bemused.org/blog/?p=32</guid>
		<description><![CDATA[funny thing is that when you search for an open source blog software, you dont find wordpress. Not sure what thats all about&#8230;]]></description>
			<content:encoded><![CDATA[<p>funny thing is that when you search for an <a href="http://www.google.com/search?hl=en&#038;ie=ISO-8859-1&#038;q=open%20source%20blog%20software&#038;btnG=Google+Search">open  source</a> <a href="http://search.yahoo.com/search?fr=fp-pull-web-t&#038;p=open%20source%20blog%20software">blog software</a>, you dont find <a href="http://www.wordpress.org">wordpress</a>.  Not sure what thats all about&#8230;</p>
<p class="addtoany_share_save_container">
    <a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?sitename=the%20bemused%20blog&amp;siteurl=http%3A%2F%2Fbemused.org%2Fblog%2F&amp;linkname=open%20source%20blog%20software&amp;linkurl=http%3A%2F%2Fbemused.org%2Fblog%2F2005%2F02%2F24%2Fopen-source-blog-software%2F"><img src="http://bemused.org/blog/wp-content/plugins/add-to-any/share_save_120_16.png" width="120" height="16" alt="Share/Save/Bookmark"/></a>

	</p>]]></content:encoded>
			<wfw:commentRss>http://bemused.org/blog/2005/02/24/open-source-blog-software/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>noos = arnaque</title>
		<link>http://bemused.org/blog/2004/02/06/noos-arnaque/</link>
		<comments>http://bemused.org/blog/2004/02/06/noos-arnaque/#comments</comments>
		<pubDate>Fri, 06 Feb 2004 17:26:33 +0000</pubDate>
		<dc:creator>gareth</dc:creator>
				<category><![CDATA[geeky stuff]]></category>

		<guid isPermaLink="false">http://bemused.org/blog/?p=28</guid>
		<description><![CDATA[I&#8217;m currently in dissagreement with noos about the resiliation of my internet connection. They claim I owe them 40, even though this isn&#8217;t mentioned in my contract. It seems like lots of other people have had the same problem (scroll down to &#8220;Les arnaques de Noos lors de certaines résiliations.&#8221;). Anyway, I&#8217;m not giving in]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m currently in dissagreement with noos about the resiliation of my internet connection.  They claim I owe them 40, even though this isn&#8217;t mentioned in my contract.  It seems like lots of other people have had the <a href="http://www.luccas.org/index.php3?Page=reactions">same problem</a> (scroll down to &#8220;Les arnaques de Noos lors de certaines résiliations.&#8221;). Anyway, I&#8217;m not giving in <img src='http://bemused.org/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p class="addtoany_share_save_container">
    <a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?sitename=the%20bemused%20blog&amp;siteurl=http%3A%2F%2Fbemused.org%2Fblog%2F&amp;linkname=noos%20%3D%20arnaque&amp;linkurl=http%3A%2F%2Fbemused.org%2Fblog%2F2004%2F02%2F06%2Fnoos-arnaque%2F"><img src="http://bemused.org/blog/wp-content/plugins/add-to-any/share_save_120_16.png" width="120" height="16" alt="Share/Save/Bookmark"/></a>

	</p>]]></content:encoded>
			<wfw:commentRss>http://bemused.org/blog/2004/02/06/noos-arnaque/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>abandoned blogs:</title>
		<link>http://bemused.org/blog/2003/10/08/abandoned-blogs/</link>
		<comments>http://bemused.org/blog/2003/10/08/abandoned-blogs/#comments</comments>
		<pubDate>Wed, 08 Oct 2003 08:57:40 +0000</pubDate>
		<dc:creator>gareth</dc:creator>
				<category><![CDATA[geeky stuff]]></category>

		<guid isPermaLink="false">http://bemused.org/blog/?p=23</guid>
		<description><![CDATA[Talking of abandoned blogs, there are (http://clothespin.org) quite a (www.metropolitic.net) few good blogs that are no more. Shame really. I guess its difficult to keep motivated without page views Update &#8211; removed links as theres no good reason to link to the spam sites that have since bought these domain names]]></description>
			<content:encoded><![CDATA[<p>Talking of abandoned blogs, there are (http://clothespin.org) quite a (www.metropolitic.net) few good blogs that are no more.  Shame really.  I guess its difficult to keep motivated without page views</p>
<p>Update &#8211; removed links as theres no good reason to link to the spam sites that have since bought these domain names</p>
<p class="addtoany_share_save_container">
    <a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?sitename=the%20bemused%20blog&amp;siteurl=http%3A%2F%2Fbemused.org%2Fblog%2F&amp;linkname=abandoned%20blogs%3A&amp;linkurl=http%3A%2F%2Fbemused.org%2Fblog%2F2003%2F10%2F08%2Fabandoned-blogs%2F"><img src="http://bemused.org/blog/wp-content/plugins/add-to-any/share_save_120_16.png" width="120" height="16" alt="Share/Save/Bookmark"/></a>

	</p>]]></content:encoded>
			<wfw:commentRss>http://bemused.org/blog/2003/10/08/abandoned-blogs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

