Use the new client for the pull script.

This was SVN commit r27620.
This commit is contained in:
Stan 2023-04-27 14:20:26 +00:00
parent 69f01932c7
commit eb29373ba7
2 changed files with 6 additions and 9 deletions

View File

@ -1,6 +1,6 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
# #
# Copyright (C) 2022 Wildfire Games. # Copyright (C) 2023 Wildfire Games.
# This file is part of 0 A.D. # This file is part of 0 A.D.
# #
# 0 A.D. is free software: you can redistribute it and/or modify # 0 A.D. is free software: you can redistribute it and/or modify
@ -16,21 +16,20 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with 0 A.D. If not, see <http://www.gnu.org/licenses/>. # along with 0 A.D. If not, see <http://www.gnu.org/licenses/>.
import os, sys import os
import subprocess
from txclib.project import Project
from i18n_helper import l10nFolderName, transifexClientFolder, projectRootDirectory from i18n_helper import l10nFolderName, transifexClientFolder, projectRootDirectory
def main(): def main():
for root, folders, filenames in os.walk(projectRootDirectory): for root, folders, _ in os.walk(projectRootDirectory):
for folder in folders: for folder in folders:
if folder == l10nFolderName: if folder == l10nFolderName:
if os.path.exists(os.path.join(root, folder, transifexClientFolder)): if os.path.exists(os.path.join(root, folder, transifexClientFolder)):
path = os.path.join(root, folder) path = os.path.join(root, folder)
os.chdir(path) os.chdir(path)
project = Project(path) print(f"INFO: Starting to pull translations in {path}...")
project.pull(fetchall=True, force=True, parallel=True) subprocess.run("tx pull -f")
if __name__ == "__main__": if __name__ == "__main__":

View File

@ -1,3 +1 @@
babel~=2.6
lxml~=4.5 lxml~=4.5
transifex-client>=0.14