Skip to content

Add `python-wcwidth` package to optdepends

Ulices requested to merge hasecilu/translate-toolkit:fix/wcwidth into main

If you don´t have this package installed when you use json2po you get this error

Traceback (most recent call last):
  File "/usr/bin/json2po", line 5, in <module>
    from translate.convert.json2po import main
  File "/usr/lib/python3.12/site-packages/translate/convert/json2po.py", line 28, in <module>
    from translate.storage import po
  File "/usr/lib/python3.12/site-packages/translate/storage/po.py", line 41, in <module>
    from translate.storage.pypo import *  # noqa: F403
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/translate/storage/pypo.py", line 34, in <module>
    from wcwidth import wcswidth, wcwidth
ModuleNotFoundError: No module named 'wcwidth'
Traceback (most recent call last):
  File "/usr/bin/json2po", line 5, in <module>
    from translate.convert.json2po import main
  File "/usr/lib/python3.12/site-packages/translate/convert/json2po.py", line 28, in <module>
    from translate.storage import po
  File "/usr/lib/python3.12/site-packages/translate/storage/po.py", line 41, in <module>
    from translate.storage.pypo import *  # noqa: F403
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/translate/storage/pypo.py", line 34, in <module>
    from wcwidth import wcswidth, wcwidth
ModuleNotFoundError: No module named 'wcwidth'

Merge request reports

Loading