can you get more random?

Bordeaux restaurants

September 27th, 2010 Posted in food and drink | No Comments »

Sitting at home in Paris on a cold wet september night, those three weeks of holiday in August seem like a distant memory. We travelled from Paris to Bordeaux, visiting the surrounding area, then up into the Pyrennées for a few days in the mountains, before continuing down the catalan coast via Cadaques to Barcelona.

In that short time we discovered some incredible restaurants. If you’re in the area, here’s a summary of the best discoveries.

Bordeaux

Bordeaux is a city that has undergone a revolution in the past 10 years. Until the end of the ’90s the centre of the city had a dirty, dusty, polluted feel to it. Since the beginning of the new millenium however, it has been reborn, after the car was banished from the narrow streets of the centre and the exteriors of most of the buildings were given a good clean. Today the town is much more welcoming, if somewhat touristic.

If you’re in Bordeaux for a few days, try to visit some of the following restaurants:

  • Le petit commerce – situated in a tiny pedestrian steet between the Place st. Pierre and Place du Parlement, this bistrot-style restaurant is open for lunch and dinner throughout the week. The lunchtime menu is a bargain at 12 €. If the weather is good, try to arrive early to get a seat on the terrace.
  • For something a little more traditional, try Le plat a oreilles. This small family-run restaurant is somewhat out of place on Rue des Faussets amongst a bunch of mediocre ‘attrape-touriste’ restaurants. Open every evening, the menu at 25€ is great value. Everything (from the starter to the desert) is home-made. the house wine was respectable too and reasonably priced
  • I was a little dissapointed by le Bô Bar. After having read the review in Le guide du Fooding I was curious to discover their concept – the wine is served anonymously by the glass, with the only choice being between a light, medium, full-bodied red, or a fruity or dry white. No other clues are given as to the provenance of the wine. While all of the wines we tasted were wonderful, the food was a disapointment, I had the impression our meal was reheated in a microwave, the dry congealed rice was simply unappetizing.
  • On sunday morning, you can’t do better than Karl in Place du parlement. We arrived early and were lucky to get a seat in the sun on the terrace, but 1/2 hour later and people were queueing up to get a seat inside. An enourmous selection and huge portions, highly recommended

Its late so I’ll stop there. Tomorrow I’ll try and jot down some of the best restaurants in Arcachon, Saillagouse, Cadaques and Barcelona

Share

Symfony: extracting strings from 1.2 forms using i18n:extract

June 9th, 2010 Posted in geeky stuff | No Comments »

Anyone using Sympfony 1.2 will probably have realised by now that the i18n:extract task doesn’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 production environments for performance reasons.

After a quick search through the code, I  have patched my code to only dump untranslated strings to the i18n.temp file.

Here’s the patch for lib/vendor/symfony/lib/i18n/sfMessageFormat.class.php

// found, but untranslated
 if (empty($target))
 {
+          file_put_contents(sfConfig::get('sf_app_template_dir').'/i18n.temp.php',"<?php __('$string'); ?>\n",FILE_APPEND);
 return $this->postscript[0].$this->replaceArgs($string, $args).$this->postscript[1];
 }
 return $this->replaceArgs($target, $args);

(I would have posted this in reply to the original comment, but I couldn’t find the original post for some reason)

Share

I18n of sfSimpleForumPlugin

January 19th, 2009 Posted in geeky stuff | No Comments »

The sfSimpleForum plugin is a great way to quickly add a forum to a site, but it doesn’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 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’m using ‘lang’ and not ‘culture’ 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’s not appropriate to use the field name ‘culture’.

2. Add culture to the test data :

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

3. Select by culture when getting list of all categories in plugins/sfSimpleForumPlugin/lib/model/plugin/PluginsfSimpleForumForumPeer.php:

public static function getAllOrderedByCategory()
{
  $c = new Criteria();
  $c->addJoin(self::CATEGORY_ID, sfSimpleForumCategoryPeer::ID);
  $c->add(sfSimpleForumCategoryPeer::LANG, sfContext::getInstance()->getUser()->getCulture());
  $c->addAscendingOrderByColumn(sfSimpleForumCategoryPeer::RANK);
  $c->addAscendingOrderByColumn(self::RANK);return self::doSelectJoinCategoryLeftJoinPost($c);
}

4. Add culture to admin interface in plugins/sfSimpleForumPlugin/modules/sfSimpleForumCategoryAdmin/config/generator.yml :

list:
  title: Category Administration
  display: [=name, description, rank, lang]
edit:
  title: Edit category "%%name%%"
  display: [name, description, rank, _lang, _forums]

5. Add set_culture partial in plugins/sfSimpleForumPlugin/modules/sfSimpleForumCategoryAdmin/templates/_lang.php :

< ?php
use_helper('Utils');
$cultures = array('en_GB' => 'English', 'fr_FR' => 'French', 'de_DE' => 'German');
echo select_culture_tag('sf_simple_forum_category[lang]', $sf_simple_forum_category->getLang(), $cultures, array('id' => 'lang'));

6. add select_culture_tag function in apps/backend/lib/helper/UtilsHelper.php :

function select_culture_tag($name, $selected = null, $cultures = array(), $options = array())
{
$c = new sfCultureInfo(sfContext::getInstance()->getUser()->getCulture());
if (! is_array($cultures)) {
$cultures = $c->getCultures();
}
if ($culture_option = _get_option($options, 'cultures'))
{
foreach ($cultures as $key => $value)
{
if (!in_array($key, $culture_option))
{
unset($cultures[$key]);
}
}
}
asort($cultures);
$option_tags = options_for_select($cultures, $selected);
return select_tag($name, $option_tags, $options);
}

7. Rebuild model and you’re good to go:

symfony propel:build-model
Share

Test from phone

January 19th, 2009 Posted in geeky stuff | No Comments »

Not much to say, the clue is in the title 😉

Share

Annapurna Circuit

December 2nd, 2008 Posted in travel | No Comments »

Britta suggested doing the Annapurna trail sometime early next year. As part of my initial research, here’s some links with more information :

If you know of any more good sources of information, let me know

Share

The world’s ugliest buildings

November 15th, 2008 Posted in General | No Comments »

Virtual Tourist have just published a press release listing (in their opinion) the worlds ugliest buildings. While you can argue with their choice (I quite like Liverpool Cathedral and I don’t find Tour Montparnasse in Paris that much of an eyesore), it’s a shame they didn’t spend ore time promoting the article on their site. the link from the article at Yahoo ! went straight to the reuters site, and I had to spend a few minutes on VirtualTourist before I found the press release. It would have been nice to have the article promoted in the virtual tourist home page, with links to photos on their site. Yet another missed opportunity I guess.

Hmm what to do today. As I’m in Barcelona, I think I’ll have lunch at Quimet & Quimet, a wonderful little tapas bar in Poble Sec. Or maybe I’ll just spend the rest of the morning looking out over Plaça Vicenç Martorell here at Chelo, with another one of their amazing fruit juices.

Back to work on monday. What joy!

Share

Blind pilot lands plane

November 7th, 2008 Posted in General | No Comments »

A pretty incredible story from the BBC, a blind pilot landed a plane after he had a stroke whilst flying and loosing his sight.

I’ve never been very good at flying, this is the sort of thing that makes me more sure than ever that we’re better off with both feet on the ground.

Share

Vegetarian Paris

October 30th, 2008 Posted in food and drink | No Comments »

Being a vegetarian in France isn’t easy. I have a couple of hardcore (ex-)vegetarian friends who moved to France and have moved back to the dark side. Its more understandable when you realise the almost complete lack of understanding of vegetarianism amongst the local population. Asking for a vegetable salad “sans viande” will often result in a chicken salad, as apparently chicken isn’t meat in the french sense of the word. Vegetarian salad with bacon is another common dish, and when asking for the version ‘sans bacon’ the salad will return with the bacon bits (mostly) picked out by hand.

So it’s good to know that there are more and more vegetarian restaurants appearing in Paris, here are a couple of vegetarian resources I’ve found recently:

I also discovered v3ggie.com, a vegetarian search engine which gives interesting results, and has a greate recipe search feature.

Share

Vacation in Paris

August 2nd, 2008 Posted in General, travel | No Comments »

My studio is available to rent for 4 days in August, so if you fancy a short break in Paris, staying in an apartment by Canal st Martin, let me know.

Share

More great restaurants in Barcelona

July 25th, 2008 Posted in food and drink, travel | No Comments »

I’m back in Barcelona, and have been trying out some more restaurants. I’ve been told that catalonians don’t go in for tapas, and the tapas restaurants in Barcelona are only for tourists, but I’m still a fan. For a great tapas restaurant, try Flauta in eixample, an unpretentious, welcoming place, great for something to eat before going out for a drink in the area. Or for something a little more classy, my two discoveries this week are Botega Sepulveda and Los Caracoles

Share