Oh, yes. I just work on it!
This issue occurs when compiled catalog file is missing for the locale, introduced in babel:r651.
$ find trac/locale -name '*.mo' -exec /bin/rm -- '{}' + # Remove all *.mo files
$ make python=25-babel1.0 clean Trac.egg-info unit-test
find -name \*.py[co] -exec rm {} \;
rm -f .figleaf* *.figleaf
...
File "/home/jun66j5/src/trac/edgewall/svn/branches/1.0-stable/trac/util/translation.py", line 152, in activate
t.add(Translations.load(locale_dir, locale or 'en_US',
AttributeError: 'NullTranslations' object has no attribute 'add'
make: *** [unit-test] Error 1
Verified my patch with our tests:
- Babel 1.0dev-r661 with compiled catalogs and without catalogs
- Babel 0.9.6 with compiled catalogs and without catalogs
- Babel is not installed
Committed in [11783].