--- b/www/trac/Makefile +++ b/www/trac/Makefile @@ -51,6 +51,7 @@ USE_PYTHON= 2 USE_PYDISTUTILS= yes PYDISTUTILS_AUTOPLIST= yes USE_RC_SUBR= tracd +SUB_LIST= PYTHON_CMD=${PYTHON_CMD} post-install: @${MKDIR} ${STAGEDIR}${EXAMPLESDIR}/sample-plugins --- /dev/null +++ b/www/trac/files/patch-trac_util_translation.py @@ -0,0 +1,32 @@ +Backported from fixes contained in http://trac.edgewall.org/ticket/11345 + +--- trac/util/translation.py.orig ++++ trac/util/translation.py +@@ -150,6 +150,6 @@ + t = self._null_translations + else: +- t.add(Translations.load(locale_dir, locale or 'en_US', +- 'tracini')) ++ self._add(t, Translations.load(locale_dir, locale or 'en_US', ++ 'tracini')) + if env_path: + with self._plugin_domains_lock: +@@ -157,5 +157,6 @@ + domains = domains.items() + for domain, dirname in domains: +- t.add(Translations.load(dirname, locale, domain)) ++ self._add(t, Translations.load(dirname, locale, ++ domain)) + self._current.translations = t + self._activate_failed = False +@@ -184,4 +185,10 @@ + return self._current.translations is not None \ + or self._activate_failed ++ ++ # Internal methods ++ ++ def _add(self, t, translations): ++ if isinstance(translations, Translations): ++ t.add(translations) + + # Delegated methods