Uploaded messages.pot using config file
This commit is contained in:
parent
5c88231081
commit
52cac358b4
9
.tx/config
Normal file
9
.tx/config
Normal file
|
@ -0,0 +1,9 @@
|
|||
[main]
|
||||
host = https://www.transifex.com
|
||||
api_token = 1/6e168158bf4c122556d028e38a0cb6016fcb0688
|
||||
[pybitmessage-test.messages-pot]
|
||||
file_filter = <lang>po
|
||||
minimum_perc = 0
|
||||
source_file = messages.pot
|
||||
source_lang = en
|
||||
type = PO
|
|
@ -88,9 +88,21 @@ def async_job(id):
|
|||
language = transifex_api.Language.get(code="fr")
|
||||
resource = project.fetch('resources').get(slug="messagespot")
|
||||
content = "The new source file content"
|
||||
transifex_api.ResourceStringsAsyncUpload.upload(resource, content)
|
||||
with open(resource,'rb') as f:
|
||||
upload = transifex_api.ResourceStringsAsyncUpload.create_with_form(
|
||||
data={'resource': resource.id},
|
||||
files={'content': f},
|
||||
)
|
||||
return "done"
|
||||
# transifex_api.ResourceStringsAsyncUpload.upload(resource, content)
|
||||
while not response:
|
||||
time.sleep(1)
|
||||
sleep_time = time.sleep(1)
|
||||
sleep_time+=1
|
||||
if sleep_time == 600:
|
||||
return False
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
3
transifex_upload.sh
Executable file
3
transifex_upload.sh
Executable file
|
@ -0,0 +1,3 @@
|
|||
pip install transifex-client
|
||||
# chmod 777 '/home/cis/PyBitmessage/transifex/transifex-webhook/.tx/config'
|
||||
tx init
|
Reference in New Issue
Block a user