Merge pull request #2847 from eyal0/always_babel_extract

Remove requirement to have messages.pot to use babel_extract
This commit is contained in:
Gina Häußge authored and GitHub committed 2018-10-18 18:36:42 +02:00
commit e0943527d6
1 file changed
+1 -2
+1 -2
View File
@@ -524,8 +524,7 @@ def create_plugin_setup_parameters(identifier="todo", name="TODO", version="0.1"
translation_dir = os.path.join(source_folder, "translations")
pot_file = os.path.join(translation_dir, "messages.pot")
bundled_dir = os.path.join(source_folder, package, "translations")
if os.path.isdir(translation_dir) and os.path.isfile(pot_file):
cmdclass.update(get_babel_commandclasses(pot_file=pot_file, output_dir=translation_dir, bundled_dir=bundled_dir, pack_name_prefix="{name}-i18n-".format(**locals()), pack_path_prefix="_plugins/{identifier}/".format(**locals())))
cmdclass.update(get_babel_commandclasses(pot_file=pot_file, output_dir=translation_dir, bundled_dir=bundled_dir, pack_name_prefix="{name}-i18n-".format(**locals()), pack_path_prefix="_plugins/{identifier}/".format(**locals())))
from setuptools import find_packages
packages = list(set([package] + filter(lambda x: x.startswith("{package}.".format(package=package)), find_packages(where=source_folder, exclude=ignored_packages)) + additional_packages))