View | Details | Raw Unified | Return to bug 187133
Collapse All | Expand All

(-)b/www/trac/Makefile (+1 lines)
Lines 51-56 USE_PYTHON= 2 Link Here
51
USE_PYDISTUTILS=	yes
51
USE_PYDISTUTILS=	yes
52
PYDISTUTILS_AUTOPLIST=	yes
52
PYDISTUTILS_AUTOPLIST=	yes
53
USE_RC_SUBR=		tracd
53
USE_RC_SUBR=		tracd
54
SUB_LIST=		PYTHON_CMD=${PYTHON_CMD}
54
55
55
post-install:
56
post-install:
56
	@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}/sample-plugins
57
	@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}/sample-plugins
(-)b/www/trac/files/patch-trac_util_translation.py (+32 lines)
Added Link Here
1
Backported from fixes contained in http://trac.edgewall.org/ticket/11345
2
3
--- trac/util/translation.py.orig
4
+++ trac/util/translation.py
5
@@ -150,6 +150,6 @@
6
                 t = self._null_translations
7
             else:
8
-                t.add(Translations.load(locale_dir, locale or 'en_US',
9
-                                        'tracini'))
10
+                self._add(t, Translations.load(locale_dir, locale or 'en_US',
11
+                                               'tracini'))
12
                 if env_path:
13
                     with self._plugin_domains_lock:
14
@@ -157,5 +157,6 @@
15
                         domains = domains.items()
16
                     for domain, dirname in domains:
17
-                        t.add(Translations.load(dirname, locale, domain))
18
+                        self._add(t, Translations.load(dirname, locale,
19
+                                                       domain))
20
             self._current.translations = t
21
             self._activate_failed = False
22
@@ -184,4 +185,10 @@
23
             return self._current.translations is not None \
24
                    or self._activate_failed
25
+
26
+        # Internal methods
27
+
28
+        def _add(self, t, translations):
29
+            if isinstance(translations, Translations):
30
+                t.add(translations)
31
 
32
         # Delegated methods

Return to bug 187133