Skip to content
Snippets Groups Projects
Commit 0ba7a8c6 authored by Guillaume Roguez's avatar Guillaume Roguez
Browse files

update i18n auto-update script

* set mininum-perc to 1 (was 30)
* update from sources first
* add push source file after update and before pull
* correct copyrights and cosmetics

Change-Id: If9cc92c99bb7d9b3cfbdf23f40de4470453454d1
parent af8f2826
Branches
No related tags found
No related merge requests found
#!/usr/bin/python
##
## Copyright (C) 2016-2017 Savoir-faire Linux Inc.
##
## Author: Edric Milaret <edric.ladent-milaret@savoirfairelinux.com>
## Author: Guillaume Roguez <guillaume.roguez@savoirfairelinux.com>
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation; either version 3 of the License, or
## (at your option) any later version.
##
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with this program; if not, write to the Free Software
## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
##
import os
import shutil
print ("Pulling translations")
print("== Updating from sources")
if os.system("lupdate RingWinClient.pro -no-obsolete"):
print("trying with 'lupdate-qt5'")
os.system("lupdate-qt5 RingWinClient.pro -no-obsolete")
else:
raise RuntimeError("unable to find any suitable lupdate Qt tool on this system. Stopping")
print("== Pushing sources")
os.system("tx push -s")
os.system("tx pull -af --minimum-perc=30")
print("== Pulling translations")
os.system("tx pull -af --minimum-perc=1")
print("Updating .pro file")
......@@ -30,8 +60,4 @@ source.close()
destination.close()
os.remove(proFile + "~")
print ("Updating translations")
os.system("lupdate RingWinClient.pro")
print ("All done you can commit now")
print("== All done you can commit now")
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment