Remove requirement to have messages.pot to use babel_extract

This commit is contained in:
Eyal Soha committed 2018-10-18 11:52:01 -04:00
1 parent ac2354907a
commit 025986794f
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))