From 5e891c2caa539571224e0675a30233232fe916a3 Mon Sep 17 00:00:00 2001 From: Janek Bevendorff Date: Fri, 7 Jul 2017 01:07:50 +0200 Subject: [PATCH 1/4] Improve update tool to allow either updating source files, pushing or pulling changes without doing the other --- share/translations/update.sh | 65 +++++++++++++++++++++++++++++------- 1 file changed, 53 insertions(+), 12 deletions(-) diff --git a/share/translations/update.sh b/share/translations/update.sh index eaa1179d..c2cdeacb 100755 --- a/share/translations/update.sh +++ b/share/translations/update.sh @@ -1,17 +1,58 @@ -#!/bin/sh +#!/usr/bin/env bash +# +# Copyright (C) 2017 KeePassXC Team +# +# 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 2 or (at your option) +# version 3 of the License. +# +# 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, see . +# -BASEDIR=$(dirname $0) +BASEDIR="$(dirname $0)" -cd $BASEDIR/../.. +PUSH=true +PULL=true +UPDATE=true -echo Updating source file -lupdate-qt5 -no-ui-lines -disable-heuristic similartext -locations none -no-obsolete src -ts share/translations/keepassx_en.ts -lupdate-qt5 -no-ui-lines -disable-heuristic similartext -locations none -pluralonly src -ts share/translations/keepassx_en_plurals.ts +if [ "$1" == "push" ]; then + PULL=false +elif [ "$1" == "pull" ]; then + PUSH=false + UPDATE=false +elif [ "$1" == "update" ]; then + PUSH=false + PULL=false +elif [ "$1" != "" ]; then + echo "Unknown command '${1}'" + echo "Usage: $(basename $0) [update|pull|push]" + exit 1 +fi -echo -echo Pushing English translation file to Transifex -tx push -s +cd "${BASEDIR}/../.." -echo -echo Pulling translations from Transifex -tx pull -af --minimum-perc=40 +if $UPDATE; then + echo "Updating source files..." + lupdate-qt5 -no-ui-lines -disable-heuristic similartext -locations none -no-obsolete src -ts share/translations/keepassx_en.ts + lupdate-qt5 -no-ui-lines -disable-heuristic similartext -locations none -pluralonly src -ts share/translations/keepassx_en_plurals.ts + echo +fi + +if $PUSH; then + echo "Pushing English source files to Transifex..." + tx push -s + echo +fi + +if $PULL; then + echo "Pulling translations from Transifex..." + tx pull -af --minimum-perc=40 + echo +fi From e4ae2f9176364a8c03b08cbd71e7fdad25f842ca Mon Sep 17 00:00:00 2001 From: Janek Bevendorff Date: Fri, 7 Jul 2017 01:14:20 +0200 Subject: [PATCH 2/4] Remove HTML garbage from GitHub contributors link --- src/gui/AboutDialog.ui | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/src/gui/AboutDialog.ui b/src/gui/AboutDialog.ui index 13224366..ad3d28cc 100644 --- a/src/gui/AboutDialog.ui +++ b/src/gui/AboutDialog.ui @@ -2,6 +2,14 @@ AboutDialog + + + 0 + 0 + 652 + 516 + + About KeePassXC @@ -204,8 +212,8 @@ 0 0 - 418 - 848 + 591 + 760 @@ -275,7 +283,10 @@ - <html><head/><body><p align="center"><a href="https://github.com/keepassxreboot/keepassxc/graphs/contributors"><span style=" font-size:10pt; text-decoration: underline; color:#0000ff;">See Contributions on GitHub</span></a></p></body></html> + <a href="https://github.com/keepassxreboot/keepassxc/graphs/contributors">See Contributions on GitHub</a> + + + Qt::AlignCenter true From fab9f2a9fb9d97fa8acf7e823320e19c10c27385 Mon Sep 17 00:00:00 2001 From: Janek Bevendorff Date: Fri, 7 Jul 2017 01:15:03 +0200 Subject: [PATCH 3/4] Update English translation source files --- share/translations/keepassx_en.ts | 95 ++++++++++++------------------- 1 file changed, 36 insertions(+), 59 deletions(-) diff --git a/share/translations/keepassx_en.ts b/share/translations/keepassx_en.ts index 7b014b63..edfd337e 100644 --- a/share/translations/keepassx_en.ts +++ b/share/translations/keepassx_en.ts @@ -11,73 +11,14 @@ About - - <html><head/><body><p>Report bugs at: <a href="https://github.com/keepassxreboot/keepassxc/issues"><span style="text-decoration: underline; color:#0000ff;">https://github.com</span></a></p></body></html> - - - - <html><head/><body><p>KeePassXC is distributed under the terms of the GNU General Public License (GPL) version 2 or (at your option) version 3.</p></body></html> - - - - <html><head><style>li {font-size: 10pt}</style></head><body><p><span style=" font-size:10pt;">Project Maintainers:</span></p><ul><li>droidmonkey</li><li>phoerious</li><li>TheZ3ro</li><li>louib</li><li>Weslly</li><li>debfx (KeePassX)</li></ul></body></html> - - Contributors - - <html><body> - <p style="font-size:x-large; font-weight:600;">Code:</p> - <ul> - <li style="font-size:10pt">debfx (KeePassX)</li> - <li style="font-size:10pt">BlueIce (KeePassX)</li> - <li style="font-size:10pt">droidmonkey</li> - <li style="font-size:10pt">phoerious</li> - <li style="font-size:10pt">TheZ3ro</li> - <li style="font-size:10pt">louib</li> - <li style="font-size:10pt">weslly</li> - <li style="font-size:10pt">keithbennett (KeePassHTTP)</li> - <li style="font-size:10pt">Typz (KeePassHTTP)</li> - <li style="font-size:10pt">denk-mal (KeePassHTTP)</li> - <li style="font-size:10pt">kylemanna (YubiKey)</li> - <li style="font-size:10pt">seatedscribe (CSV Importer)</li> - <li style="font-size:10pt">pgalves (Inline Messages)</li> - </ul> - <p style="font-size:x-large; font-weight:600;">Translations:</p> - <ul> - <li style="font-size:10pt"><span style="font-weight:600;">Chinese:</span> Biggulu, ligyxy, BestSteve</li> - <li style="font-size:10pt"><span style="font-weight:600;">Czech:</span> pavelb, JosefVitu</li> - <li style="font-size:10pt"><span style="font-weight:600;">Dutch:</span> Vistaus, KnooL, apie</li> - <li style="font-size:10pt"><span style="font-weight:600;">Finnish:</span> MawKKe</li> - <li style="font-size:10pt"><span style="font-weight:600;">French:</span> Scrat15, frgnca, gilbsgilbs, gtalbot, iannick, kyodev, logut</li> - <li style="font-size:10pt"><span style="font-weight:600;">German:</span> Calyrx, DavidHamburg, antsas, codejunky, jensrutschmann, montilo, omnisome4, origin_de, pcrcoding, phoerious, rgloor, vlenzer</li> - <li style="font-size:10pt"><span style="font-weight:600;">Greek:</span> nplatis</li> - <li style="font-size:10pt"><span style="font-weight:600;">Italian:</span> TheZ3ro, FranzMari, Mte90, tosky</li> - <li style="font-size:10pt"><span style="font-weight:600;">Kazakh:</span> sotrud_nik</li> - <li style="font-size:10pt"><span style="font-weight:600;">Lithuanian:</span> Moo</li> - <li style="font-size:10pt"><span style="font-weight:600;">Polish:</span> konradmb, mrerexx</li> - <li style="font-size:10pt"><span style="font-weight:600;">Portuguese: </span>vitor895, weslly, American_Jesus, mihai.ile</li> - <li style="font-size:10pt"><span style="font-weight:600;">Russian:</span> vsvyatski, KekcuHa, wkill95</li> - <li style="font-size:10pt"><span style="font-weight:600;">Spanish:</span> EdwardNavarro, antifaz, piegope, pquin, vsvyatski</li> - <li style="font-size:10pt"><span style="font-weight:600;">Swedish:</span> henziger</li> - </ul> - </body></html> - - - - <html><head/><body><p align="center"><a href="https://github.com/keepassxreboot/keepassxc/graphs/contributors"><span style=" font-size:10pt; text-decoration: underline; color:#0000ff;">See Contributions on GitHub</span></a></p></body></html> - - Debug Info - - <html><head/><body><p>Include the following information whenever you report a bug:</p></body></html> - - Copy to clipboard @@ -105,6 +46,26 @@ Kernel: %3 %4 Enabled extensions: + + Report bugs at: <a href="https://github.com/keepassxreboot/keepassxc/issues" style="text-decoration: underline;">https://github.com</a> + + + + KeePassXC is distributed under the terms of the GNU General Public License (GPL) version 2 or (at your option) version 3. + + + + Project Maintainers: + + + + <a href="https://github.com/keepassxreboot/keepassxc/graphs/contributors">See Contributions on GitHub</a> + + + + Include the following information whenever you report a bug: + + AccessControlDialog @@ -2159,6 +2120,14 @@ give it a unique name to identify and accept it. Always ask before performing Auto-Type + + Auto-Type delay + + + + ms + + SettingsWidgetSecurity @@ -2198,6 +2167,14 @@ give it a unique name to identify and accept it. Lock databases when session is locked or lid is closed + + Privacy + + + + Use Google as fallback for downloading website icons + + SetupTotpDialog From 8a0085f0f890746f463104f4e78fef46b2c997e5 Mon Sep 17 00:00:00 2001 From: Janek Bevendorff Date: Fri, 7 Jul 2017 17:43:15 +0200 Subject: [PATCH 4/4] Query lupdate-qt5 first and fall back to lupdate if it does not exist --- share/translations/update.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/share/translations/update.sh b/share/translations/update.sh index c2cdeacb..134d7b99 100755 --- a/share/translations/update.sh +++ b/share/translations/update.sh @@ -40,8 +40,14 @@ cd "${BASEDIR}/../.." if $UPDATE; then echo "Updating source files..." - lupdate-qt5 -no-ui-lines -disable-heuristic similartext -locations none -no-obsolete src -ts share/translations/keepassx_en.ts - lupdate-qt5 -no-ui-lines -disable-heuristic similartext -locations none -pluralonly src -ts share/translations/keepassx_en_plurals.ts + + LUPDATE=lupdate-qt5 + command -v $LUPDATE > /dev/null + if [ $? -ne 0 ]; then + LUPDATE=lupdate + fi + $LUPDATE -no-ui-lines -disable-heuristic similartext -locations none -no-obsolete src -ts share/translations/keepassx_en.ts + $LUPDATE -no-ui-lines -disable-heuristic similartext -locations none -pluralonly src -ts share/translations/keepassx_en_plurals.ts echo fi