Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion client/Application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,6 @@ void Application::loadTranslation( const QString &lang )
Settings::LANGUAGE = d->lang = lang;

if(lang == QLatin1String("en")) QLocale::setDefault(QLocale(QLocale::English, QLocale::UnitedKingdom));
else if(lang == QLatin1String("ru")) QLocale::setDefault(QLocale( QLocale::Russian, QLocale::RussianFederation));
else QLocale::setDefault(QLocale(QLocale::Estonian, QLocale::Estonia));

void(d->appTranslator.load(QLatin1String(":/translations/%1.qm").arg(lang)));
Expand Down
2 changes: 0 additions & 2 deletions client/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,7 @@ add_executable(${PROJECT_NAME} WIN32 MACOSX_BUNDLE
qt_add_translations(${PROJECT_NAME} TS_FILES
translations/en.ts
translations/et.ts
translations/ru.ts
../common/translations/qtbase_et.ts
../common/translations/qtbase_ru.ts
RESOURCE_PREFIX /translations
LUPDATE_OPTIONS -locations none
)
Expand Down
1 change: 0 additions & 1 deletion client/QSmartCard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@ QPCSCReader::Result Card::transfer(bool verify, QByteArray &&apdu,
quint16 language = 0x0000;
if(Settings::LANGUAGE == QLatin1String("en")) language = 0x0409;
else if(Settings::LANGUAGE == QLatin1String("et")) language = 0x0425;
else if(Settings::LANGUAGE == QLatin1String("ru")) language = 0x0419;
return waitFor(&QPCSCReader::transferCTL, &reader,
apdu, verify, language, QSmartCardData::minPinLen(type), newPINOffset, requestCurrentPIN);
}
Expand Down
4 changes: 1 addition & 3 deletions client/Settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,7 @@ const Option<bool, bool (*)()> Settings::TSA_URL_CUSTOM

const Option<QString> Settings::DEFAULT_DIR { QStringLiteral("DefaultDir") };
const Option<QString, QString (*)()> Settings::LANGUAGE { QStringLiteral("Language"), [] {
auto languages = QLocale().uiLanguages();
if(languages.first().contains(QLatin1String("et"), Qt::CaseInsensitive)) return QStringLiteral("et");
if(languages.first().contains(QLatin1String("ru"), Qt::CaseInsensitive)) return QStringLiteral("ru");
if(QLocale().uiLanguages().first().contains(QLatin1String("et"), Qt::CaseInsensitive)) return QStringLiteral("et");
return QStringLiteral("en");
}};
const Option<QString> Settings::LAST_PATH { QStringLiteral("lastPath"), QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation) };
Expand Down
10 changes: 1 addition & 9 deletions client/dialogs/FirstRun.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,20 +42,12 @@ FirstRun::FirstRun(QWidget *parent)
// Page 1: language
ui->lang->addItem(QStringLiteral("Eesti keel"));
ui->lang->addItem(QStringLiteral("English"));
ui->lang->addItem(QString::fromUtf8("Русский язык")); //QStringLiteral breaks windows text

if(Settings::LANGUAGE == QLatin1String("en"))
ui->lang->setCurrentIndex(1);
else if(Settings::LANGUAGE == QLatin1String("ru"))
ui->lang->setCurrentIndex(2);
else
ui->lang->setCurrentIndex(0);
ui->lang->setCurrentIndex(Settings::LANGUAGE == QLatin1String("en") ? 1 : 0);

connect(ui->lang, QOverload<int>::of(&QComboBox::currentIndexChanged), this, [this](int index) {
switch(index)
{
case 1: emit langChanged(QStringLiteral("en")); break;
case 2: emit langChanged(QStringLiteral("ru")); break;
default: emit langChanged(QStringLiteral("et")); break;
}
ui->retranslateUi(this);
Expand Down
6 changes: 3 additions & 3 deletions client/dialogs/FirstRun.ui
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,10 @@ left: 1px;
}</string>
</property>
<property name="maxVisibleItems">
<number>3</number>
<number>2</number>
</property>
<property name="maxCount">
<number>3</number>
<number>2</number>
</property>
</widget>
<widget class="QPushButton" name="continueBtn">
Expand Down Expand Up @@ -277,7 +277,7 @@ left: 1px;
</rect>
</property>
<property name="text">
<string notr="true">Vali suhtluskeel / Выберите язык / Select language:</string>
<string notr="true">Vali suhtluskeel / Select language:</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
Expand Down
39 changes: 13 additions & 26 deletions client/dialogs/SettingsDialog.ui
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ max-height: 22px;
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="languageBoxLayout" stretch="0,0,1">
<layout class="QHBoxLayout" name="languageBoxLayout" stretch="0,1">
<item>
<widget class="QRadioButton" name="rdGeneralEstonian">
<property name="text">
Expand All @@ -526,19 +526,6 @@ max-height: 22px;
</attribute>
</widget>
</item>
<item>
<widget class="QRadioButton" name="rdGeneralRussian">
<property name="text">
<string notr="true">Русский</string>
</property>
<property name="lang" stdset="0">
<string notr="true">ru</string>
</property>
<attribute name="buttonGroup">
<string notr="true">langGroup</string>
</attribute>
</widget>
</item>
<item>
<widget class="QRadioButton" name="rdGeneralEnglish">
<property name="text">
Expand Down Expand Up @@ -1604,13 +1591,13 @@ background: none;
<number>15</number>
</property>
<property name="leftMargin">
<number>0</number>
<number>32</number>
</property>
<property name="topMargin">
<number>20</number>
</property>
<property name="rightMargin">
<number>0</number>
<number>32</number>
</property>
<property name="bottomMargin">
<number>0</number>
Expand Down Expand Up @@ -1695,16 +1682,16 @@ background: none;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; }
&lt;/style&gt;&lt;/head&gt;&lt;body&gt;
&lt;p align=&quot;center&quot;&gt;&lt;b&gt;Qt cross-platform application and UI framework&lt;/b&gt;&lt;br /&gt;GNU Lesser General Public License (LGPL) version 3&lt;br /&gt;&lt;a href=&quot;http://doc.qt.io/qt-6/licensing.html&quot;&gt;http://doc.qt.io/qt-6/licensing.html&lt;/a&gt;&lt;/p&gt;
&lt;p align=&quot;center&quot;&gt;&lt;b&gt;The OpenSSL project&lt;/b&gt;&lt;br /&gt;This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/)&lt;br /&gt;&lt;a href=&quot;https://www.openssl.org/source/apache-license-2.0.txt&quot;&gt;https://www.openssl.org/source/apache-license-2.0.txt&lt;/a&gt; &lt;/p&gt;
&lt;p align=&quot;center&quot;&gt;&lt;b&gt;OpenLDAP community developed LDAP software&lt;/b&gt;&lt;br /&gt;The OpenLDAP Public License&lt;br /&gt;&lt;a href=&quot;http://www.openldap.org/software/release/license.html&quot;&gt;http://www.openldap.org/software/release/license.html&lt;/a&gt; &lt;/p&gt;
&lt;p align=&quot;center&quot;&gt;&lt;b&gt;libdigidocpp&lt;/b&gt;&lt;br /&gt;GNU Lesser General Public License (LGPL) version 2.1&lt;br /&gt;&lt;a href=&quot;http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html&quot;&gt;http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html&lt;/a&gt; &lt;/p&gt;
&lt;p align=&quot;center&quot;&gt;&lt;b&gt;DigiDoc4 Client&lt;/b&gt;&lt;br /&gt;GNU Lesser General Public License (LGPL) version 2.1&lt;br /&gt;&lt;a href=&quot;http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html&quot;&gt;http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html&lt;/a&gt; &lt;/p&gt;
&lt;p align=&quot;center&quot;&gt;&lt;b&gt;zlib A Massively Spiffy Yet Delicately Unobtrusive Compression Library&lt;/b&gt;&lt;br /&gt;&lt;a href=&quot;http://zlib.net/zlib_license.html&quot;&gt;http://zlib.net/zlib_license.html&lt;/a&gt; &lt;/p&gt;
&lt;p align=&quot;center&quot;&gt;&lt;b&gt;libxml2 is an XML toolkit implemented in C&lt;/b&gt;&lt;br /&gt;MIT License&lt;br /&gt;&lt;a href=&quot;https://gitlab.gnome.org/GNOME/libxml2/-/blob/master/Copyright?ref_type=heads&quot;&gt;https://gitlab.gnome.org/GNOME/libxml2/-/blob/master/Copyright?ref_type=heads&lt;/a&gt; &lt;/p&gt;
&lt;p align=&quot;center&quot;&gt;&lt;b&gt;XML Security Library is a C library based on LibXML2&lt;/b&gt;&lt;br /&gt;MIT License&lt;br /&gt;&lt;a href=&quot;https://github.com/lsh123/xmlsec/blob/master/Copyright&quot;&gt;https://github.com/lsh123/xmlsec/blob/master/Copyright&lt;/a&gt; &lt;/p&gt;
&lt;p align=&quot;center&quot;&gt;&lt;b&gt;JSON for Modern C++&lt;/b&gt;&lt;br /&gt;MIT License&lt;br /&gt;&lt;a href=&quot;https://github.com/nlohmann/json/blob/develop/LICENSE.MIT&quot;&gt;https://github.com/nlohmann/json/blob/develop/LICENSE.MIT&lt;/a&gt; &lt;/p&gt;
&lt;p align=&quot;center&quot;&gt;&lt;b&gt;Roboto: Google’s signature family of fonts&lt;/b&gt;&lt;br /&gt;Apache Software License, Version 2.0&lt;br /&gt;&lt;a href=&quot;https://github.com/google/roboto/blob/master/LICENSE&quot;&gt;https://github.com/google/roboto/blob/master/LICENSE&lt;/a&gt; &lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
&lt;p&gt;&lt;b&gt;Qt cross-platform application and UI framework&lt;/b&gt;&lt;br /&gt;GNU Lesser General Public License (LGPL) version 3&lt;br /&gt;&lt;a href=&quot;http://doc.qt.io/qt-6/licensing.html&quot;&gt;http://doc.qt.io/qt-6/licensing.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;The OpenSSL project&lt;/b&gt;&lt;br /&gt;This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/)&lt;br /&gt;&lt;a href=&quot;https://www.openssl.org/source/apache-license-2.0.txt&quot;&gt;https://www.openssl.org/source/apache-license-2.0.txt&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;&lt;b&gt;OpenLDAP community developed LDAP software&lt;/b&gt;&lt;br /&gt;The OpenLDAP Public License&lt;br /&gt;&lt;a href=&quot;http://www.openldap.org/software/release/license.html&quot;&gt;http://www.openldap.org/software/release/license.html&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;&lt;b&gt;libdigidocpp&lt;/b&gt;&lt;br /&gt;GNU Lesser General Public License (LGPL) version 2.1&lt;br /&gt;&lt;a href=&quot;http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html&quot;&gt;http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;&lt;b&gt;DigiDoc4 Client&lt;/b&gt;&lt;br /&gt;GNU Lesser General Public License (LGPL) version 2.1&lt;br /&gt;&lt;a href=&quot;http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html&quot;&gt;http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;&lt;b&gt;zlib A Massively Spiffy Yet Delicately Unobtrusive Compression Library&lt;/b&gt;&lt;br /&gt;&lt;a href=&quot;http://zlib.net/zlib_license.html&quot;&gt;http://zlib.net/zlib_license.html&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;&lt;b&gt;libxml2 is an XML toolkit implemented in C&lt;/b&gt;&lt;br /&gt;MIT License&lt;br /&gt;&lt;a href=&quot;https://gitlab.gnome.org/GNOME/libxml2/-/blob/master/Copyright?ref_type=heads&quot;&gt;https://gitlab.gnome.org/GNOME/libxml2/-/blob/master/Copyright?ref_type=heads&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;&lt;b&gt;XML Security Library is a C library based on LibXML2&lt;/b&gt;&lt;br /&gt;MIT License&lt;br /&gt;&lt;a href=&quot;https://github.com/lsh123/xmlsec/blob/master/Copyright&quot;&gt;https://github.com/lsh123/xmlsec/blob/master/Copyright&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;&lt;b&gt;JSON for Modern C++&lt;/b&gt;&lt;br /&gt;MIT License&lt;br /&gt;&lt;a href=&quot;https://github.com/nlohmann/json/blob/develop/LICENSE.MIT&quot;&gt;https://github.com/nlohmann/json/blob/develop/LICENSE.MIT&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;&lt;b&gt;Roboto: Google’s signature family of fonts&lt;/b&gt;&lt;br /&gt;Apache Software License, Version 2.0&lt;br /&gt;&lt;a href=&quot;https://github.com/google/roboto/blob/master/LICENSE&quot;&gt;https://github.com/google/roboto/blob/master/LICENSE&lt;/a&gt; &lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="textInteractionFlags">
<set>Qt::TextBrowserInteraction</set>
Expand Down
1 change: 0 additions & 1 deletion client/ee.ria.qdigidoc4.desktop
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,4 @@ Actions=new-window
[Desktop Action new-window]
Name=New Window
Name[et]=Ava uus aken
Name[ru]=Новое окно
Exec=qdigidoc4 -newWindow
6 changes: 0 additions & 6 deletions client/qdigidoc4.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,11 @@
<mime-type type="application/vnd.lt.archyvai.adoc-2008">
<comment>DigiDoc signed document</comment>
<comment xml:lang="et">DigiDoc allkirjastatud dokument</comment>
<comment xml:lang="ru">Подписанный DigiDoc документ</comment>
<glob pattern="*.adoc"/>
</mime-type>
<mime-type type="application/vnd.etsi.asic-e+zip">
<comment>DigiDoc signed document</comment>
<comment xml:lang="et">DigiDoc allkirjastatud dokument</comment>
<comment xml:lang="ru">Подписанный DigiDoc документ</comment>
<glob pattern="*.bdoc"/>
<glob pattern="*.asice"/>
<glob pattern="*.sce"/>
Expand All @@ -18,26 +16,22 @@
<mime-type type="application/x-ddoc">
<comment>DigiDoc signed document</comment>
<comment xml:lang="et">DigiDoc allkirjastatud dokument</comment>
<comment xml:lang="ru">Подписанный DigiDoc документ</comment>
<glob pattern="*.ddoc"/>
</mime-type>
<mime-type type="application/vnd.etsi.asic-s+zip">
<comment>DigiDoc timestamped document</comment>
<comment xml:lang="et">DigiDoc ajatembeldatud dokument</comment>
<comment xml:lang="ru">DigiDoc документ с временным штампом</comment>
<glob pattern="*.asics"/>
<glob pattern="*.scs"/>
</mime-type>
<mime-type type="application/x-cdoc">
<comment>DigiDoc encrypted container</comment>
<comment xml:lang="et">DigiDoc turvaümbrik</comment>
<comment xml:lang="ru">Зашифрованный DigiDoc контейнер</comment>
<glob pattern="*.cdoc"/>
</mime-type>
<mime-type type="application/x-cdoc2">
<comment>DigiDoc encrypted container</comment>
<comment xml:lang="et">DigiDoc turvaümbrik</comment>
<comment xml:lang="ru">Зашифрованный DigiDoc контейнер</comment>
<glob pattern="*.cdoc2"/>
</mime-type>
</mime-info>
Loading
Loading