예제 #1
0
 def add(self, stats, name, level):
     """Add item to the list."""
     self.append((
         FILTERS.get_filter_query(name),
         FILTERS.get_filter_name(name),
         getattr(stats, name),
         level,
         getattr(stats, '{}_words'.format(name)),
     ))
예제 #2
0
파일: forms.py 프로젝트: zzazang/weblate
 def get_search_query_choices(self):
     """Return all filtering choices for query field."""
     filter_keys = [
         "nottranslated",
         "todo",
         "translated",
         "fuzzy",
         "suggestions",
         "variants",
         "labels",
         "context",
         "nosuggestions",
         "comments",
         "allchecks",
         "approved",
         "unapproved",
     ]
     result = [(key, FILTERS.get_filter_name(key),
                FILTERS.get_filter_query(key)) for key in filter_keys]
     return result
예제 #3
0
def search_name(query):
    """Returns name for a query string."""
    return FILTERS.get_search_name(query)