Commit c6bd6455 authored by Timothée Giet's avatar Timothée Giet

fix python usage for old distributions where python2 is still the default

parent 5b277b5d
......@@ -208,7 +208,7 @@ include(cmake/rcc.cmake)
# Simple command calling the python script
add_custom_command(
OUTPUT retrievePoFilesFromSvn
COMMAND python tools/l10n-fetch-po-files.py
COMMAND python3 tools/l10n-fetch-po-files.py
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
)
# Install translations
......@@ -217,7 +217,7 @@ add_custom_target(getSvnTranslations
COMMENT "Re-run cmake after this to be able to run BuildTranslations with the latest files"
)
# Get all po files in po/. You can get them doing: python tools/l10n-fetch-po-files.py
# Get all po files in po/. You can get them doing: python3 tools/l10n-fetch-po-files.py
file(GLOB TRANSLATIONS_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "po/*.po")
# Set the output dir for the translation files to /bin
foreach(PoSource ${TRANSLATIONS_FILES})
......@@ -349,7 +349,7 @@ add_custom_target(
set(DOWNLOAD_ASSETS "" CACHE STRING "Download and packages images and voices. use a list like: words,en,fr,pt_BR to retrieve multiple files")
add_custom_command(
OUTPUT predownloadAssets
COMMAND python tools/download-assets.py ${DOWNLOAD_ASSETS} ${COMPRESSED_AUDIO} ${GCOMPRIS_RCC_DIR}
COMMAND python3 tools/download-assets.py ${DOWNLOAD_ASSETS} ${COMPRESSED_AUDIO} ${GCOMPRIS_RCC_DIR}
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
)
......
#!/usr/bin/python
#!/usr/bin/python3
#
# GCompris - mergePo.py
#
......@@ -19,18 +19,18 @@
# Using polib.py from https://bitbucket.org/izi/polib/wiki/Home
# Usage : python mergePo.py qt.po gtk.po
# Usage : python3 mergePo.py qt.po gtk.po
# Find in the first argument po file the translated lines of the gtk po file
# (if existing) and replace the translation for the po file.
# For those not found, no translation is provided.
# something like: python mergePo.py gcompris_fi.po fi.po && sed '/^#|/ d' < gcompris_fi.po > qtgl.po && mv qtgl.po gcompris_fi.po
# something like: python3 mergePo.py gcompris_fi.po fi.po && sed '/^#|/ d' < gcompris_fi.po > qtgl.po && mv qtgl.po gcompris_fi.po
import sys
import polib
if len(sys.argv) < 3:
print('Usage : python mergePo.py gcompris_qt.po gcompris_gtk.po.'
print('Usage : python3 mergePo.py gcompris_qt.po gcompris_gtk.po.'
' Output will be in the input file!')
sys.exit(1)
......
#!/usr/bin/python
#!/usr/bin/python3
#
# GCompris - download-assets.py
#
......
#!/usr/bin/python
#!/usr/bin/python3
#
# GCompris - l10n-fetch-po-files.py
#
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment