Closed igavriil closed 3 years ago
Hello igavriil,
Thank you for contacting Transifex support and submitting your request. Regarding your query, I assume by the example you provided that you want to store the file in your locale folder when the file language is the same as the source language, is that right ?
We currently do no support this, You can either store each file on it's own language directory or all files in the locale folder by removing the "
Let's say you want to upload a file by typing "tx push -s" command, this will look for the file in the source_file path you configured:
Config file: [main] host = https://www.transifex.com lang_map = tr_TR: tr-TR
[en_tr.holvikaari-core_controllers_enyml]
filefilter = locale/
Command: tx push -s tx INFO: Pushing resource en_tr.holvikaari-core_controllers_enyml tx INFO: Pushing source file (locale/Global.yml) tx ERROR: Could not upload source file. You can use --skip to ignore this error and continue the execution. tx ERROR: [Errno 2] No such file or directory: 'locale/Global.yml'
As you can see on the example above, I wasn't able to upload the file because it doesn't exist in my locale folder!. In order for me to upload the file successfully I will need to place the source file in the locale folder as my configuration file states.
Let me know if this helps you to understand a little bit better how our CLI works :) Best Regards
When invoking
pull
command, with the--language
argument supplied, it will use the path dictated by thefile_filter
as the download path for each language.This behavior is not altered even when the source language is passed and the source file is downloaded at the path dictated by
file_filter
and thesource_file
path that is present in the configuration.With this commit we can that the language passed is the source language and always store the downloaded file in the
source_file
path that is present in the configurationLet's use an example to better illustrate the issue: config:
Existing behavior:
tx pull --language en
=> download path =locale/en/ui.po
New behavior:
tx pull --language en
=> download path =locale/ui.po