Hello community, here is the log from the commit of package dtkcore for openSUSE:Factory checked in at 2019-07-21 11:35:25 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/dtkcore (Old) and /work/SRC/openSUSE:Factory/.dtkcore.new.4126 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "dtkcore" Sun Jul 21 11:35:25 2019 rev:8 rq:717231 version:2.0.16.1 Changes: -------- --- /work/SRC/openSUSE:Factory/dtkcore/dtkcore.changes 2019-07-11 13:18:12.494770892 +0200 +++ /work/SRC/openSUSE:Factory/.dtkcore.new.4126/dtkcore.changes 2019-07-21 11:35:26.124764879 +0200 @@ -1,0 +2,7 @@ +Tue Jul 16 15:15:57 UTC 2019 - Hillwood Yang <hillw...@opensuse.org> + +- Update version to 2.0.16.1 + * feat: allow dtk-settings-tools skip json key translation + * refactor: use commit count for the package version + +------------------------------------------------------------------- Old: ---- dtkcore-2.0.15.tar.gz New: ---- dtkcore-2.0.16.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ dtkcore.spec ++++++ --- /var/tmp/diff_new_pack.VVTFwD/_old 2019-07-21 11:35:27.264764645 +0200 +++ /var/tmp/diff_new_pack.VVTFwD/_new 2019-07-21 11:35:27.264764645 +0200 @@ -20,7 +20,7 @@ %define libver 2 Name: dtkcore -Version: 2.0.15 +Version: 2.0.16.1 Release: 0 Summary: Deepin Tool Kit Core License: GPL-3.0-or-later ++++++ dtkcore-2.0.15.tar.gz -> dtkcore-2.0.16.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dtkcore-2.0.15/tools/settings/main.cpp new/dtkcore-2.0.16.1/tools/settings/main.cpp --- old/dtkcore-2.0.15/tools/settings/main.cpp 2019-07-05 08:42:48.000000000 +0200 +++ new/dtkcore-2.0.16.1/tools/settings/main.cpp 2019-07-06 10:38:43.000000000 +0200 @@ -33,7 +33,13 @@ #include <QDomDocument> +#ifndef DTK_SETTINGS_TOOLS_VERSION +#define DTK_SETTINGS_TOOLS_VERSION "0.1.2" +#endif // DTK_SETTINGS_TOOLS_VERSION + static QString CppTemplate = + "// This file was generated by dtk-settings-tools version " DTK_SETTINGS_TOOLS_VERSION " \n" + "\n" "#include <DSettings>\n" "\n" "void GenerateSettingTranslate()\n" @@ -185,7 +191,7 @@ QCoreApplication app(argc, argv); app.setOrganizationName("deepin"); app.setApplicationName("dtk-settings-tools"); - app.setApplicationVersion("0.1.2"); + app.setApplicationVersion(DTK_SETTINGS_TOOLS_VERSION); QCommandLineParser parser; parser.setApplicationDescription("Generate translation of dtksetting."); @@ -238,18 +244,24 @@ auto codeKey = QString(key).replace(".", "_"); auto opt = settings->option(key); + QStringList skipI18nKeys = opt->data("i18n_skip_keys").toStringList(); + + if (skipI18nKeys.contains("all")) { + continue; + } + // add Name - if (!opt->name().isEmpty()) { + if (!opt->name().isEmpty() && !skipI18nKeys.contains("name")) { transtaleMaps.insert(codeKey + "Name", opt->name()); } // add text - if (!opt->data("text").toString().isEmpty()) { + if (!opt->data("text").toString().isEmpty() && !skipI18nKeys.contains("text")) { transtaleMaps.insert(codeKey + "Text", opt->data("text").toString()); } // add items - if (!opt->data("items").toStringList().isEmpty()) { + if (!opt->data("items").toStringList().isEmpty() && !skipI18nKeys.contains("items")) { auto items = opt->data("items").toStringList(); for (int i = 0; i < items.length(); ++i) { transtaleMaps.insert(codeKey + QString("Text%1").arg(i), items.value(i)); @@ -257,8 +269,6 @@ } } - transtaleMaps.insert("reset_button_name", "Restore Defaults"); - QString cppCode; for (auto key : transtaleMaps.keys()) { auto stringCode = QString(" auto %1 = QObject::tr(\"%2\");\n").arg(key).arg(transtaleMaps.value(key));