Convert mailman translation to UTF-8

August 17th, 2009 | by David |

Why is the Swedish translation in ISO8859-1? Sooooo 20th century! :-)

Templates

cd /usr/share/mailman/sv
for f in *; do
  mv $f $f.old; iconv -f iso8859-1 -t utf-8 $f.old > $f
done
rm *.old

Translations

cd /var/lib/mailman/messages/sv/LC_MESSAGES
mv mailman.po mailman.po.original
iconv -f iso8859-1 -t utf-8 mailman.po.original > mailman.po
msgfmt mailman.po -o mailman.mo

/etc/mailman/mm_cfg.py

DEFAULT_CHARSET = 'utf-8'

def _(s):
  return s
add_language('sv',    _('Swedish'),       'utf-8')
del _

Update On Ubuntu 8.04 LTS it is also a good idea to apply the patch for Logrotate is noisy with: Re-opening all log files. (It’s a issue with the mailman 2.1.9-9 package, which is the latest one released for Hardy.)

Post a Comment