August 2008
14 posts
Algunas cosas se pueden poner feas muy rápido
(define subst
(lambda (new old slist)
(if (null? slist)
'()
(if (symbol? (car slist))
(if (eqv? (car slist) old)
(cons new (subst new old (cdr slist)))
(cons (car slist) (subst new old (cdr slist))))
(cons (subst new old (car slist)) (subst new old (cdr slist)))))))
make_permalink - a Rails plugin →
Traducciones
Uso
t(:es, “Hello World”)
=> “Hola mundo”
t(:en, “Hola mundo”)
=> “Hello world”
t(:en, “Algo sin traducir”)
=> “Algo sin traducir”
Tabla en base de datos:
translations => { _en_ => text, es => text, fr => text… }
Se usa como llave el texto en uno de los idiomas para no duplicar la...
Como no ha pasado un minuto y ya recibí el primer mensaje IM al respecto, clarifico:
Es un puto chiste y se soluciona con :
export LC_ALL=es_ES.UTF-8
export LANG=es_ES.UTF-8
Ya pueden seguir su vida.
PD: Que cosa más lenta.
Un primer acercamiento a Mercurial
$ hg clone http://hg.germane-software.com/rexml
Traceback (most recent call last):
File "/usr/local/bin/hg", line 18, in
mercurial.util.set_binary(fp)
File "/Library/Python/2.5/site-packages/mercurial/demandimport.py", line 74, in __getattribute__
self._load()
File "/Library/Python/2.5/site-packages/mercurial/demandimport.py", line 46, in _load
mod = _origimport(head, globals,...
El último comentario antes de que esto parezca Twitter: ¿Por qué estaba escribiendo en ingles?
Tip #2
Don’t use gettext.
Seriously, don’t.
Tip #1 - undefined method `untranslate_all?'
Error: undefined method `untranslate_all?’ for #Class:0x24aed34 in Rails with Gettext.
Fix: Add this:
require 'gettext/rails'
to your environment.rb
I’m worried about the present state of programming. Programmers now are...
– Donald Knuth en la CACM de Julio 2008.