transifex / transifex-client

The Transifex command-line tool.
https://www.transifex.com/
GNU General Public License v2.0
136 stars 76 forks source link

Unicode error on non-English file names #254

Open julienmalard opened 5 years ago

julienmalard commented 5 years ago

The TX client seems to break with non-english file names. For example, on the Urdu project taqdir with the following .tx/config:

[main]
host = https://www.transifex.com

[tqdyr._build_gettext_نمونے]
file_filter = locale/<lang>/LC_MESSAGES/نمونے.po
source_file = _build/gettext/نمونے.pot
source_lang = ur
type = PO

I get the following error on both pull and push commands:

tx ERROR: 'ascii' codec can't encode characters in position 49-53: ordinal not in range(128)
tx ERROR: 'ascii' codec can't encode characters in position 49-53: ordinal not in range(128)

Thanks! -Julien Malard

Diontsoumas commented 5 years ago

Hi Julien,

This is an unusual case, and is not supported by the Transifex client at the moment. As far as I am aware we didn't have any requests about this in the past, so not sure what is the best practise here.

In any case, I leave this ticket open for future reference, and I will further update it when it gets the priority in the future.

julienmalard commented 5 years ago

Hello,

Thanks for the quick reply! In case this helps future work, I played around a bit with the code and I think that there are two mistakes: one is the ascii encoding error shown above which happens somewhere in the client before the command gets sent to the server. However, there seems to also be a problem on the server api side, because when I tried accessing the api manually with a browser I also got a "page not found error" (but had no problems with latin alphabet file names).

Thanks! Regards, Julien Malard