source: ps/trunk/source/tools/i18n/pullTranslations.py

Last change on this file was 27965, checked in by Vladislav Belov, 8 months ago

Revert non-ASCII characters from source and configuration files introduced in rP27786.

Fixes #6846

Differential Revision: https://code.wildfiregames.com/D5185

  • Property svn:eol-style set to native
File size: 1.3 KB
Line 
1#!/usr/bin/env python3
2#
3# Copyright (C) 2023 Wildfire Games.
4# This file is part of 0 A.D.
5#
6# 0 A.D. is free software: you can redistribute it and/or modify
7# it under the terms of the GNU General Public License as published by
8# the Free Software Foundation, either version 2 of the License, or
9# (at your option) any later version.
10#
11# 0 A.D. is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14# GNU General Public License for more details.
15#
16# You should have received a copy of the GNU General Public License
17# along with 0 A.D. If not, see <http://www.gnu.org/licenses/>.
18
19import os
20import subprocess
21
22from i18n_helper import l10nFolderName, transifexClientFolder, projectRootDirectory
23
24def main():
25 for root, folders, _ in os.walk(projectRootDirectory):
26 for folder in folders:
27 if folder == l10nFolderName:
28 if os.path.exists(os.path.join(root, folder, transifexClientFolder)):
29 path = os.path.join(root, folder)
30 os.chdir(path)
31 print(f"INFO: Starting to pull translations in {path}...")
32 subprocess.run(["tx", "pull", "-f"])
33
34
35if __name__ == "__main__":
36 main()
Note: See TracBrowser for help on using the repository browser.