def optional_depcheck(): optional = [] if not depcheck.test_unzip(): optional.append({'dependency': 'unzip', 'text': _('Can\'t find the unzip command. Uploading archives is faster if "unzip" is available.')}) if not depcheck.test_iso_codes(): optional.append({'dependency': 'iso-codes', 'text': _("Can't find the ISO codes package. Pootle uses ISO codes to translate language names.")}) if not depcheck.test_lxml(): optional.append({'dependency': 'lxml', 'text': _("Can't find lxml. Pootle uses lxml to parse XML based formats like XLIFF and Qt TS and to make sure HTML tags inserted in news items are safe and correct.")}) if not depcheck.test_gaupol(): optional.append({'dependency': 'gaupol', 'text': _("Can't find Gaupol. Pootle uses Gaupol's parser to support subtitles formats")}) if not depcheck.test_levenshtein(): optional.append({'dependency': 'levenshtein', 'text': _("Can't find python-levenshtein package. Updating from templates is faster with python-levenshtein.")}) if not depcheck.test_indexer(): optional.append({'dependency': 'indexer', 'text': _("No text indexing engine found. Searching is faster if an indexing engine like Xapian or Lucene is installed.")}) return optional
def optional_depcheck(): optional = [] if not depcheck.test_unzip(): optional.append({ 'dependency': 'unzip', 'text': _('Can\'t find the unzip command. Uploading archives is ' 'faster if "unzip" is available.') }) if not depcheck.test_iso_codes(): optional.append({ 'dependency': 'iso-codes', 'text': _("Can't find the ISO codes package. Pootle uses ISO codes" " to translate language names.") }) if not depcheck.test_gaupol(): optional.append({ 'dependency': 'gaupol', 'text': _("Can't find the aeidon package. Pootle requires Gaupol " "or aeidon to support subtitle formats.") }) if not depcheck.test_levenshtein(): optional.append({ 'dependency': 'levenshtein', 'text': _("Can't find python-levenshtein package. Updating against" " templates is faster with python-levenshtein.") }) if not depcheck.test_indexer(): optional.append({ 'dependency': 'indexer', 'text': _("No text indexing engine found. Searching is faster if " "an indexing engine like Xapian or Lucene is installed.") }) filter_name, filter_args = get_markup_filter() if filter_name is None: text = None if filter_args == 'missing': text = _("MARKUP_FILTER is missing. Falling back to HTML.") elif filter_args == 'misconfigured': text = _("MARKUP_FILTER is misconfigured. Falling back to HTML.") elif filter_args == 'uninstalled': text = _("Can't find the package which provides '%s' markup " "support. Falling back to HTML.", settings.MARKUP_FILTER[0]) elif filter_args == 'invalid': text = _("Invalid value '%s' in MARKUP_FILTER. Falling back to " "HTML.", settings.MARKUP_FILTER[0]) if text is not None: optional.append({ 'dependency': filter_args + '-markup', 'text': text }) return optional
def optional_depcheck(): optional = [] if not depcheck.test_unzip(): optional.append( { "dependency": "unzip", "text": _('Can\'t find the unzip command. Uploading archives is faster if "unzip" is available.'), } ) if not depcheck.test_iso_codes(): optional.append( { "dependency": "iso-codes", "text": _("Can't find the ISO codes package. Pootle uses ISO codes to translate language names."), } ) if not depcheck.test_gaupol(): optional.append( { "dependency": "gaupol", "text": _( "Can't find the aeidon package. Pootle requires Gaupol or aeidon to support subtitle formats." ), } ) if not depcheck.test_levenshtein(): optional.append( { "dependency": "levenshtein", "text": _( "Can't find python-levenshtein package. Updating against templates is faster with python-levenshtein." ), } ) if not depcheck.test_indexer(): optional.append( { "dependency": "indexer", "text": _( "No text indexing engine found. Searching is faster if an indexing engine like Xapian or Lucene is installed." ), } ) return optional
def optional_depcheck(): optional = [] if not depcheck.test_unzip(): optional.append({ 'dependency': 'unzip', 'text': _('Can\'t find the unzip command. Uploading archives is faster if "unzip" is available.' ) }) if not depcheck.test_iso_codes(): optional.append({ 'dependency': 'iso-codes', 'text': _("Can't find the ISO codes package. Pootle uses ISO codes to translate language names." ) }) if not depcheck.test_gaupol(): optional.append({ 'dependency': 'gaupol', 'text': _("Can't find the aeidon package. Pootle requires Gaupol or aeidon to support subtitle formats." ) }) if not depcheck.test_levenshtein(): optional.append({ 'dependency': 'levenshtein', 'text': _("Can't find python-levenshtein package. Updating from templates is faster with python-levenshtein." ) }) if not depcheck.test_indexer(): optional.append({ 'dependency': 'indexer', 'text': _("No text indexing engine found. Searching is faster if an indexing engine like Xapian or Lucene is installed." ) }) return optional
def optional_depcheck(): optional = [] if not depcheck.test_iso_codes(): optional.append({ 'dependency': 'iso-codes', 'text': _("Can't find the ISO codes package. Pootle uses ISO codes" " to translate language names.") }) if not depcheck.test_levenshtein(): optional.append({ 'dependency': 'levenshtein', 'text': _("Can't find python-levenshtein package. Updating against" " templates is faster with python-levenshtein.") }) filter_name, filter_args = get_markup_filter() if filter_name is None: text = None if filter_args == 'missing': text = _("MARKUP_FILTER is missing. Falling back to HTML.") elif filter_args == 'misconfigured': text = _("MARKUP_FILTER is misconfigured. Falling back to HTML.") elif filter_args == 'uninstalled': text = _( "Can't find the package which provides '%s' markup " "support. Falling back to HTML.", settings.MARKUP_FILTER[0]) elif filter_args == 'invalid': text = _( "Invalid value '%s' in MARKUP_FILTER. Falling back to " "HTML.", settings.MARKUP_FILTER[0]) if text is not None: optional.append({ 'dependency': filter_args + '-markup', 'text': text }) return optional
def optional_depcheck(): optional = [] if not depcheck.test_iso_codes(): optional.append({ 'dependency': 'iso-codes', 'text': _("Can't find the ISO codes package. Pootle uses ISO codes" " to translate language names.") }) if not depcheck.test_levenshtein(): optional.append({ 'dependency': 'levenshtein', 'text': _("Can't find python-levenshtein package. Updating against" " templates is faster with python-levenshtein.") }) filter_name, filter_args = get_markup_filter() if filter_name is None: text = None if filter_args == 'missing': text = _("MARKUP_FILTER is missing. Falling back to HTML.") elif filter_args == 'misconfigured': text = _("MARKUP_FILTER is misconfigured. Falling back to HTML.") elif filter_args == 'uninstalled': text = _("Can't find the package which provides '%s' markup " "support. Falling back to HTML.", settings.MARKUP_FILTER[0]) elif filter_args == 'invalid': text = _("Invalid value '%s' in MARKUP_FILTER. Falling back to " "HTML.", settings.MARKUP_FILTER[0]) if text is not None: optional.append({ 'dependency': filter_args + '-markup', 'text': text }) return optional
def optional_depcheck(): optional = [] if not depcheck.test_unzip(): optional.append( {'dependency': 'unzip', 'text': _('Can\'t find the unzip command. Uploading archives ' \ 'is faster if "unzip" is available.')}) if not depcheck.test_iso_codes(): optional.append( {'dependency': 'iso-codes', 'text': _("Can't find the ISO codes package. Pootle uses ISO " \ "codes to translate language names.")}) if not depcheck.test_gaupol(): optional.append( {'dependency': 'gaupol', 'text': _("Can't find the aeidon package. Pootle requires " \ "Gaupol or aeidon to support subtitle formats.")}) if not depcheck.test_levenshtein(): optional.append( {'dependency': 'levenshtein', 'text': _("Can't find python-levenshtein package. " \ "Updating from templates is faster with " \ "python-levenshtein.")}) if not depcheck.test_indexer(): optional.append({ 'dependency': 'indexer', 'text': _("No text indexing engine found. Searching is faster " \ "if an indexing engine like Xapian or Lucene is " \ "installed.")}) return optional