changeset 3685:79a7c1432121

xapian search: clean up some code, add i18n for 'about'
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sun, 08 Jun 2008 20:03:51 +0200
parents 810eb9c0f79a
children d28127d353fa
files MoinMoin/search/builtin.py
diffstat 1 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/search/builtin.py	Sun Jun 08 19:55:11 2008 +0200
+++ b/MoinMoin/search/builtin.py	Sun Jun 08 20:03:51 2008 +0200
@@ -469,13 +469,13 @@
         # when xapian was used, we can estimate the numer of matches
         # Note: hits can't be estimated by xapian with historysearch enabled
         if not self.request.cfg.xapian_index_history and hasattr(self, '_xapianMset'):
+            _ = self.request.getText
             mset = self._xapianMset
-            estimated_hits = (
-                (mset.get_matches_estimated() == mset.get_matches_upper_bound()
-                    and
-                 mset.get_matches_estimated() == mset.get_matches_lower_bound())
-                and '' or 'about',
-                mset.get_matches_estimated())
+            m_lower = mset.get_matches_lower_bound()
+            m_estimated = mset.get_matches_estimated()
+            m_upper = mset.get_matches_upper_bound()
+            estimated_hits = (m_estimated == m_upper and m_estimated == m_lower
+                              and '' or _('about'), m_estimated)
         else:
             estimated_hits = None