{"id":24730,"library":"translation-finder","title":"Translation Finder","description":"A Python library to locate translation files in a project, used by Weblate. Version 2.24 requires Python >=3.11. Released irregularly as needed by Weblate.","status":"active","version":"2.24","language":"python","source_language":"en","source_url":"https://github.com/WeblateOrg/translation-finder","tags":["translations","i18n","l10n","weblate","finder"],"install":[{"cmd":"pip install translation-finder","lang":"bash","label":"Install from PyPI"}],"dependencies":[],"imports":[{"note":"","wrong":"","symbol":"Finding","correct":"from translation_finder.finder import Finding"},{"note":"","wrong":"","symbol":"get_translations","correct":"from translation_finder.finder import get_translations"}],"quickstart":{"code":"from translation_finder.finder import get_translations\n\n# Scan a directory for translation files\nresults = get_translations('/path/to/project')\nfor f in results:\n    print(f.filename, f.language, f.format, f.documentation)","lang":"python","description":"Scans a project directory and returns a list of Finding objects with filename, language, format, and documentation."},"warnings":[{"fix":"Use `from translation_finder.finder import TranslationFinder` and instantiate with the path.","message":"The function `get_translations` may be deprecated in future versions in favor of a class-based API. Check latest docs before upgrading.","severity":"deprecated","affected_versions":"<3.0"},{"fix":"`results = list(get_translations('/path'))`","message":"`get_translations` returns a generator, not a list. If you need to reuse the results, convert to a list explicitly.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Ensure you installed `pip install translation-finder` and import as `import translation_finder`.","cause":"Misspelling: the package is 'translation-finder' with hyphen, but import uses underscore.","error":"ModuleNotFoundError: No module named 'translation_finder'"},{"fix":"Iterate over the generator: `for f in get_translations(path):` then access `f.filename`.","cause":"Trying to access attributes on the generator directly instead of iterating over Findings.","error":"AttributeError: 'generator' object has no attribute 'filename'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}