mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-05-01 03:24:43 +00:00
Only print missing polib message during build as a warning
This commit is contained in:
parent
3aad37b86e
commit
2f40fe8415
1 changed files with 4 additions and 1 deletions
5
setup.py
5
setup.py
|
|
@ -41,7 +41,6 @@ from setuptools.command.sdist import sdist
|
|||
try:
|
||||
import polib
|
||||
except ImportError:
|
||||
print("polib package not found. Translations not compiled.")
|
||||
COMPILE_TRANSLATIONS = False
|
||||
else:
|
||||
COMPILE_TRANSLATIONS = True
|
||||
|
|
@ -101,6 +100,10 @@ class MyBuild(build):
|
|||
pofile = polib.pofile(str(po))
|
||||
mo.parent.mkdir(exist_ok=True, parents=True)
|
||||
pofile.save_as_mofile(str(mo))
|
||||
else:
|
||||
print(
|
||||
"warning: polib package not found: translations not compiled",
|
||||
file=sys.stderr)
|
||||
super().run()
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue