aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/codeql-analysis.yml2
-rw-r--r--README.md30
-rw-r--r--manual/translate-interface.md32
-rw-r--r--src/pinentry/pinentrydialog.cpp2
-rw-r--r--src/pinentry/util.cpp84
-rw-r--r--src/pinentry/util.h35
6 files changed, 23 insertions, 162 deletions
diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml
index 7177a301..d0e9c778 100644
--- a/.github/workflows/codeql-analysis.yml
+++ b/.github/workflows/codeql-analysis.yml
@@ -51,7 +51,7 @@ jobs:
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
- uses: github/codeql-action/init@v1
+ uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
diff --git a/README.md b/README.md
index e992e8c9..5271ccf6 100644
--- a/README.md
+++ b/README.md
@@ -28,7 +28,7 @@ When using GpgFrontend, you can:
GpgFrontend is **PERMANENTLY FREE** of charge. However, you can support us by
"starring" this project. Your contributions are highly appreciated!
-[Language Supported](#language-support) by GpgFrontend including English, Chinese, French, Russian, German, Spanish, Portuguese, Arabic, etc.
+[Language Supported](#language-support) by GpgFrontend including English, Chinese, French, German, Italian, etc.
[>> Download <<](https://github.com/saturneric/GpgFrontend/releases/latest)
| [>> User Manual <<](https://www.gpgfrontend.bktus.com/#/overview)
@@ -253,38 +253,12 @@ link](https://gpgfrontend.bktus.com/#/translate-interface).
GpgFrontend currently supports a wide array of languages including:
- Chinese
-- Spanish: 'es_ES'
- French: 'fr_FR'
- German: 'de_DE'
-- Polish: 'pl_PL'
-- Russian: 'ru_RU'
-- Japanese: 'ja_JP'
- Italian: 'it_IT'
-- Korean: 'ko_KR'
-- Brazilian Portuguese: 'pt_BR'
-- Arabic: 'ar_SA'
-- Hindi: 'hi_IN'
-- Afrikaans: 'af_ZA'
-- Albanian: 'sq_AL'
-- Belarusian: 'be_BY'
-- Bulgarian: 'bg_BG'
-- Catalan: 'ca_ES'
-- Croatian: 'hr_HR'
-- Czech: 'cs_CZ'
-- Danish: 'da_DK'
-- Dutch: 'nl_NL'
-- Estonian: 'et_EE'
-- Persian: 'fa_IR'
-- Finnish: 'fi_FI'
-- Hebrew: 'he_IL'
-- Indonesian: 'id_ID'
-- Lithuanian: 'lt_LT'
-- Greek: 'el_GR'
-- Ukrainian: 'uk_UA'
- English: 'en_US'
-**Notice:** Please note that most translations are generated by Google's
-automatic translation service. If you find an error in any of the translations,
+**Notice:** If you find an error in any of the translations or need to add a new one,
we welcome you to [join our translation
work](https://www.gpgfrontend.bktus.com/#/translate-interface) to provide a more
accurate human translation.
diff --git a/manual/translate-interface.md b/manual/translate-interface.md
index a3d6d608..7f09da54 100644
--- a/manual/translate-interface.md
+++ b/manual/translate-interface.md
@@ -7,22 +7,19 @@ their fingers to complete.
## Work Offline
-Most of the translation work is carried out by Google Translate. In most cases,
-what you have to do is to correct some of the bad aspects of Google Translate.
-
### What you need to know about translation work
-From v2.0.1, Gpg Frontend uses the popular translation support library [GNU
-gettext](https://www.gnu.org/software/gettext/) in the GNU project. Before
-starting everything, you need to know something about this library. After you
-are sure about the content of the document, you can first try to see how
-GpgFrontned uses the tools provided by this library.
+From v2.1.2, GpgFrontend uses the Qt translation support library [Qt
+Linguist](https://doc.qt.io/qt-6/qtlinguist-index.html) in the Qt project.
+Before starting everything, you need to know something about this library. After
+you are sure about the content of the document, you can first try to see how
+GpgFrontend uses the tools provided by this library.
### About translation files
-1. Download or clone source code [HERE](https://github.com/saturneric/GpgFrontend)
-2. You will find some po files(.po) at path `resource/lfs/locale/po`
-3. You will find some template file(.pot) at path `resource/lfs/locale/template`
+1. Download or clone source code
+ [HERE](https://github.com/saturneric/GpgFrontend)
+2. You will find some ts files(.ts) at path `resource/lfs/locale/ts`
### Before starting your work
@@ -30,10 +27,19 @@ In order to facilitate coordination, please contact me via email before you
start this work. This is very important, please contact me first so that the
work you do can be better used by GpgFrontend.
+### Updates to Translation Work Process
+
+- **For correcting existing translations**: You can directly modify the ts files
+ and then send them to me via email.
+- **For adding a new language translation**: If you're unfamiliar with the
+ process, you can request a new ts file by emailing me. I will provide you with
+ the necessary file to start the translation for the new language.
+
### Hand in your work
You can submit your great work in two ways:
-1. Raise a pull request and merge the changed translation file(s) to the repository.
-2. [Email ME](mailto:[email protected]). Please attach the changed ts file on the
+1. Raise a pull request and merge the changed translation file(s) to the
+ repository.
+2. [Email ME](mailto:[email protected]). Please attach the changed ts file in the
email.
diff --git a/src/pinentry/pinentrydialog.cpp b/src/pinentry/pinentrydialog.cpp
index 0eafeb42..1b08f1ab 100644
--- a/src/pinentry/pinentrydialog.cpp
+++ b/src/pinentry/pinentrydialog.cpp
@@ -532,7 +532,7 @@ void PinEntryDialog::textChanged(const QString &text) {
}
void PinEntryDialog::generatePin() {
- unique_malloced_ptr<char> pin{pinentry_inq_genpin(_pinentry_info.get())};
+ std::unique_ptr<char> pin{pinentry_inq_genpin(_pinentry_info.get())};
if (pin) {
if (_edit->echoMode() == QLineEdit::Password) {
if (mVisiActionEdit != nullptr) {
diff --git a/src/pinentry/util.cpp b/src/pinentry/util.cpp
deleted file mode 100644
index 5b4a4e80..00000000
--- a/src/pinentry/util.cpp
+++ /dev/null
@@ -1,84 +0,0 @@
-/* Quintuple Agent
- * Copyright (C) 1999 Robert Bihlmeyer <[email protected]>
- *
- * 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 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, see <https://www.gnu.org/licenses/>.
- * SPDX-License-Identifier: GPL-2.0+
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#define _GNU_SOURCE 1
-
-#include <unistd.h>
-#ifndef WINDOWS
-#include <errno.h>
-#endif
-#include <assert.h>
-#include <stdarg.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "util.h"
-
-#ifndef HAVE_DOSISH_SYSTEM
-static int uid_set = 0;
-static uid_t real_uid, file_uid;
-#endif /*!HAVE_DOSISH_SYSTEM*/
-
-#if 0
-extern int debug;
-
-int
-debugmsg(const char *fmt, ...)
-{
- va_list va;
- int ret;
-
- if (debug) {
- va_start(va, fmt);
- fprintf(stderr, "\e[4m");
- ret = vfprintf(stderr, fmt, va);
- fprintf(stderr, "\e[24m");
- va_end(va);
- return ret;
- } else
- return 0;
-}
-#endif
-
-/* initialize uid variables */
-#ifndef HAVE_DOSISH_SYSTEM
-static void init_uids(void) {
- real_uid = getuid();
- file_uid = geteuid();
- uid_set = 1;
-}
-#endif
-
-/* drop all additional privileges */
-void drop_privs(void) {
-#ifndef HAVE_DOSISH_SYSTEM
- if (!uid_set) init_uids();
- if (real_uid != file_uid) {
- if (setuid(real_uid) < 0) {
- perror("dropping privileges failed");
- exit(EXIT_FAILURE);
- }
- file_uid = real_uid;
- }
-#endif
-}
diff --git a/src/pinentry/util.h b/src/pinentry/util.h
deleted file mode 100644
index e6ad1dad..00000000
--- a/src/pinentry/util.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/* util.h - Helper for managing malloced pointers
- * Copyright (C) 2021 g10 Code GmbH
- *
- * Software engineering by Ingo Klöcker <[email protected]>
- *
- * 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 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, see <https://www.gnu.org/licenses/>.
- * SPDX-License-Identifier: GPL-2.0+
- */
-
-#ifndef __PINENTRY_QT_UTIL_H__
-#define __PINENTRY_QT_UTIL_H__
-
-#include <stdlib.h>
-
-namespace _detail {
-struct FreeDeleter {
- void operator()(void *ptr) const { free(ptr); }
-};
-} // namespace _detail
-
-template <class T>
-using unique_malloced_ptr = std::unique_ptr<T, _detail::FreeDeleter>;
-
-#endif // __PINENTRY_QT_UTIL_H__