transifex / cli

The Transifex command-line client
Apache License 2.0
67 stars 25 forks source link

tx add unable to add source file #146

Closed coawazie closed 1 year ago

coawazie commented 1 year ago

Hi 👋

What is happening While upgrading from v2 API to v3, we are following the cli documentation and adding attributes to the .tx/config this way

tx init tx add \ --file-filter=source_file_path \ --type=XLIFF \ --organization=my_organization \ --project=project_name_in_may_organization \ --resource=project_name_in_may_organization.filename \ --resource-name=filename \ source_file_path.xlf

Expected The cli is able to add the source file to .tx/config

Result The cli throws an error: "you need to add a Source File that exists". The file exists as a cat of source_file_path .xlf shows its contents

Environment: cli version: v1.6.4

chenrui333 commented 1 year ago

cc @codegaze

codegaze commented 1 year ago

Hello @chinomnsoawazie !

Thanks for providing steps to reproduce! I tried to follow what you described to see if there is something wrong with the add command and the result was the expected one.

sample

As a first action, I would suggest to make sure that you are in the project folder and you are providing a relative path to the project. The config file needs to work on multiple environments and not the specific machine, and this is why a relative path is needed.

Feel free to close the issue if it is solved :)

codegaze commented 1 year ago

Hello @chinomnsoawazie, I will assume that the issue was resolved so I will close this one for now. If you still have problems with adding this file, please open it again!