diff --git a/share/translations/update.sh b/share/translations/update.sh index 134d7b99..ed8a69f5 100755 --- a/share/translations/update.sh +++ b/share/translations/update.sh @@ -32,10 +32,12 @@ elif [ "$1" == "update" ]; then PULL=false elif [ "$1" != "" ]; then echo "Unknown command '${1}'" - echo "Usage: $(basename $0) [update|pull|push]" + echo "Usage: $(basename $0) [update|pull|push] [additional tx options]" exit 1 fi +shift + cd "${BASEDIR}/../.." if $UPDATE; then @@ -53,12 +55,12 @@ fi if $PUSH; then echo "Pushing English source files to Transifex..." - tx push -s + tx push -s $@ echo fi if $PULL; then echo "Pulling translations from Transifex..." - tx pull -af --minimum-perc=40 + tx pull -af --minimum-perc=40 $@ echo fi diff --git a/src/format/Kdbx3Reader.h b/src/format/Kdbx3Reader.h index bd6a794d..e6290157 100644 --- a/src/format/Kdbx3Reader.h +++ b/src/format/Kdbx3Reader.h @@ -26,6 +26,8 @@ */ class Kdbx3Reader: public KdbxReader { +Q_DECLARE_TR_FUNCTIONS(Kdbx3Reader) + public: Database* readDatabaseImpl(QIODevice* device, const QByteArray& headerData, const CompositeKey& key, bool keepDatabase) override; diff --git a/src/format/Kdbx3Writer.h b/src/format/Kdbx3Writer.h index 88c4d16a..8acc198a 100644 --- a/src/format/Kdbx3Writer.h +++ b/src/format/Kdbx3Writer.h @@ -25,6 +25,8 @@ */ class Kdbx3Writer: public KdbxWriter { +Q_DECLARE_TR_FUNCTIONS(Kdbx3Writer) + public: bool writeDatabase(QIODevice* device, Database* db) override; }; diff --git a/src/format/Kdbx3XmlWriter.h b/src/format/Kdbx3XmlWriter.h deleted file mode 100644 index 6eaf32f3..00000000 --- a/src/format/Kdbx3XmlWriter.h +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright (C) 2017 KeePassXC Team - * Copyright (C) 2010 Felix Geyer - * - * 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 . - */ - -#ifndef KEEPASSX_KDBX3XMLWRITER_H -#define KEEPASSX_KDBX3XMLWRITER_H - -#include -#include -#include -#include - -#include "core/Database.h" -#include "core/Entry.h" -#include "core/Group.h" -#include "core/TimeInfo.h" -#include "core/Uuid.h" - -class KeePass2RandomStream; -class Metadata; - -class Kdbx3XmlWriter -{ -public: - Kdbx3XmlWriter(); - void writeDatabase(QIODevice* device, Database* db, KeePass2RandomStream* randomStream = nullptr, - const QByteArray& headerHash = QByteArray()); - void writeDatabase(const QString& filename, Database* db); - bool hasError(); - QString errorString(); - -private: - void generateIdMap(); - - void writeMetadata(); - void writeMemoryProtection(); - void writeCustomIcons(); - void writeIcon(const Uuid& uuid, const QImage& icon); - void writeBinaries(); - void writeCustomData(); - void writeCustomDataItem(const QString& key, const QString& value); - void writeRoot(); - void writeGroup(const Group* group); - void writeTimes(const TimeInfo& ti); - void writeDeletedObjects(); - void writeDeletedObject(const DeletedObject& delObj); - void writeEntry(const Entry* entry); - void writeAutoType(const Entry* entry); - void writeAutoTypeAssoc(const AutoTypeAssociations::Association& assoc); - void writeEntryHistory(const Entry* entry); - - void writeString(const QString& qualifiedName, const QString& string); - void writeNumber(const QString& qualifiedName, int number); - void writeBool(const QString& qualifiedName, bool b); - void writeDateTime(const QString& qualifiedName, const QDateTime& dateTime); - void writeUuid(const QString& qualifiedName, const Uuid& uuid); - void writeUuid(const QString& qualifiedName, const Group* group); - void writeUuid(const QString& qualifiedName, const Entry* entry); - void writeBinary(const QString& qualifiedName, const QByteArray& ba); - void writeColor(const QString& qualifiedName, const QColor& color); - void writeTriState(const QString& qualifiedName, Group::TriState triState); - QString colorPartToString(int value); - QString stripInvalidXml10Chars(QString str); - - void raiseError(const QString& errorMessage); - - QXmlStreamWriter m_xml; - Database* m_db; - Metadata* m_meta; - KeePass2RandomStream* m_randomStream; - QByteArray m_headerHash; - QHash m_idMap; - bool m_error; - QString m_errorStr; -}; - -#endif // KEEPASSX_KDBX3XMLWRITER_H diff --git a/src/format/Kdbx4Reader.h b/src/format/Kdbx4Reader.h index 175af941..9764ed88 100644 --- a/src/format/Kdbx4Reader.h +++ b/src/format/Kdbx4Reader.h @@ -27,6 +27,8 @@ */ class Kdbx4Reader : public KdbxReader { +Q_DECLARE_TR_FUNCTIONS(Kdbx4Reader) + public: Database* readDatabaseImpl(QIODevice* device, const QByteArray& headerData, const CompositeKey& key, bool keepDatabase) override; diff --git a/src/format/Kdbx4Writer.h b/src/format/Kdbx4Writer.h index f05ad21a..90a8e658 100644 --- a/src/format/Kdbx4Writer.h +++ b/src/format/Kdbx4Writer.h @@ -25,6 +25,8 @@ */ class Kdbx4Writer : public KdbxWriter { +Q_DECLARE_TR_FUNCTIONS(Kdbx4Writer) + public: bool writeDatabase(QIODevice* device, Database* db) override;