Index: ./source/tools/i18n/maintenanceTasks.sh =================================================================== --- ./source/tools/i18n/maintenanceTasks.sh +++ ./source/tools/i18n/maintenanceTasks.sh @@ -30,19 +30,16 @@ echo ":: Updating sources…" ${VCS_UPDATE} - # POT Generation ############################################################## echo ":: Regenerating the translation templates…" python2 "${SCRIPT_PATH}/updateTemplates.py" - # PO Download ################################################################# echo ":: Downloading translations from Transifex…" -python2 "${SCRIPT_PATH}/pullTranslations.py" +python "${SCRIPT_PATH}/pullTranslations.py" - # Pre-Commit Cleanup ######################################################### # Note: I (Gallaecio) tried using GNU parallel for this, the problem is that Index: ./source/tools/i18n/pullTranslations.py =================================================================== --- ./source/tools/i18n/pullTranslations.py +++ ./source/tools/i18n/pullTranslations.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python2 +#!/usr/bin/env python # -*- coding:utf-8 -*- # # Copyright (C) 2014 Wildfire Games. @@ -17,23 +17,10 @@ # You should have received a copy of the GNU General Public License # along with 0 A.D. If not, see . -""" - Although this script itself should work with both Python 2 and Python 3, it relies on the Transifex Client, which at - this moment (2014-10-23) does not support Python 3 in the latest stable release (0.10). - - As soon as Transifex Client supports Python 3, simply updating its folder should be enough to make this script work - with Python 3 as well. -""" - from __future__ import absolute_import, division, print_function, unicode_literals import os, sys -# Python version check. -if sys.version_info[0] != 2: - print(__doc__) - sys.exit() - from txclib.project import Project @@ -46,7 +33,8 @@ transifexClientFolder = ".tx" for root, folders, filenames in os.walk(projectRootDirectory): - root = root.decode('utf-8') + if sys.version_info[0] == 2: + root = root.decode('utf-8') for folder in folders: if folder == l10nFolderName: if os.path.exists(os.path.join(root, folder, transifexClientFolder)):