aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2025-06-02 10:42:59 +0000
committerWerner Koch <[email protected]>2025-06-02 10:42:59 +0000
commite6463d7fe097b39c9e8952ef9f5758fa0ee0e4bd (patch)
tree38222b8338276d8de0b92130dd43b003ec46754c /doc
parentgpg-mail-tube: Support templates. (diff)
downloadgnupg-e6463d7fe097b39c9e8952ef9f5758fa0ee0e4bd.tar.gz
gnupg-e6463d7fe097b39c9e8952ef9f5758fa0ee0e4bd.zip
wks: Use templates for the server responses.
* common/helpfile.c (gnupg_get_template): Add arg locale_override and adjust all callers. * tools/wks-receive.c (struct receive_ctx_s): Add field ct_language. (get_language): New. (new_part): Call it. (wks_receive): Pass language to the result callback. * tools/gpg-wks-client.c (short_locale): New. (main): Get and store the current locale. (command_create): Fix a glitch for the Posteo hack. Insert the locale into the confirmation request. (send_confirmation_response): Ditto. * tools/gpg-wks-server.c (struct server_ctx_s): Add field language. (only_ascii): New. (struct my_subst_vars_s, my_subst_vars_cb, my_subst_vars): New. (send_confirmation_request): Use a template. (send_congratulation_message): Ditto. (check_and_publish): Pss ctx to send_congratulation_message. (command_receive_cb): Add arg language. * doc/wks-utils.txt, doc/wks-utils.de.txt: New. * doc/Makefile.am (helpfiles): Add them. -- GnuPG-bug-id: 7381 Note that the subject is not yet translated or templated due to a missing header encoding function.
Diffstat (limited to 'doc')
-rw-r--r--doc/Makefile.am3
-rw-r--r--doc/wks-utils.de.txt73
-rw-r--r--doc/wks-utils.txt71
-rw-r--r--doc/wks.texi9
4 files changed, 155 insertions, 1 deletions
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 6d52de830..1e4c6fb64 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -34,7 +34,8 @@ helpfiles = help.txt help.be.txt help.ca.txt help.cs.txt \
help.ja.txt help.nb.txt help.pl.txt help.pt.txt \
help.pt_BR.txt help.ro.txt help.ru.txt help.sk.txt \
help.sv.txt help.tr.txt help.zh_CN.txt help.zh_TW.txt \
- mail-tube.txt mail-tube.de.txt
+ mail-tube.txt mail-tube.de.txt \
+ wks-utils.txt wks-utils.de.txt
EXTRA_DIST = samplekeys.asc mksamplekeys com-certs.pem \
gnupg-logo.pdf gnupg-logo.png gnupg-logo-tr.png \
diff --git a/doc/wks-utils.de.txt b/doc/wks-utils.de.txt
new file mode 100644
index 000000000..02f768476
--- /dev/null
+++ b/doc/wks-utils.de.txt
@@ -0,0 +1,73 @@
+# wks-utils.txt - gpg-wks-server/-client strings (de) -*- default-generic -*-
+# Written in 2025 by g10 Code GmbH
+#
+# To the extent possible under law, the author(s) have dedicated all
+# copyright and related and neighboring rights to this text to the
+# public domain worldwide. This text is distributed without any
+# warranty. You should have received a copy of the CC0 Public Domain
+# Dedication along with this software. If not, see
+# <https://creativecommons.org/publicdomain/zero/1.0/>.
+# SPDX-License-Identifier: CC0-1.0
+#
+# Note that this template file needs to be UTF-8 encoded. When looking
+# for a template item, GnuPG scans the help files in the following order
+# (assuming a standard Unix layout):
+#
+# /etc/gnupg/TEMPLATE.LL_TT.txt
+# /etc/gnupg/TEMPLATE.LL.txt
+# /etc/gnupg/TEMPLATE.txt
+# /usr/share/gnupg/TEMPLATE.LL_TT.txt
+# /usr/share/gnupg/TEMPLATE.LL.txt
+# /usr/share/gnupg/TEMPLATE.txt
+#
+# Here TEMPLATE denotes the name of the template (e.g. "mail-tube"),
+# LL_TT denotes the full name of the current locale with the territory
+# (.e.g. "de_DE"), LL denotes just the locale name (e.g. "de"). The
+# first matching item is returned. To put a dot or a hash mark at the
+# beginning of a text line, it needs to be prefixed with a dot and a
+# space. A single dot may be used to terminated an entry. Depending
+# on the template type certain variables (${NAME}) are expanded.
+# Check the man page of the respective tool.
+
+.server.confirm.body
+
+Diese Nachricht wurde auf Ihre Anforderung gesendet, Ihren Schlüssel
+zu veröffentlichen. Falls Sie solch eine Anforderung nicht gesendet
+haben, so ignorieren Sie bitte diese Nachricht.
+
+[English: This message has been send to confirm your request
+ to publish your key. If you did not request a key
+ publication, simply ignore this message.]
+
+Viele Mail Software ist in der Lage diese Art von Nachrichten
+automatisch zu verarbeiten. In diesem Fall sollten Sie diesen Text
+auch nicht sehen. Falls doch so ist Ihre Mailsoftware veraltet und
+kann mit dieser Nachricht nichts anfangen. Unter
+
+ https://gnupg.org/faq/wkd.html
+
+finden Sie eine Erklärung, wie Sie solche Nachrichten anderweitig
+verarbeiten können.
+
+
+${sigdelim}
+Weitere Informationen zu GnuPG finden Sie hier: https://gnupg.org
+
+.
+
+.server.publish.congrats
+Hallo!
+
+Der Schlüssel für Ihre Mailadresse '${address}' wurde soeben vom
+Web Key Directory akzeptiert. Je nach Konfiguration Ihres Providers kann
+es bis zu 15 Minuten dauern, bis er öffentlich sichtbar wird.
+
+Viele Grüße von Ihrem
+
+ Schlüsselveröffentlichungsdienst
+
+
+${sigdelim}
+Weitere Informationen zu GnuPG finden Sie hier: https://gnupg.org
+
+.
diff --git a/doc/wks-utils.txt b/doc/wks-utils.txt
new file mode 100644
index 000000000..012e46da6
--- /dev/null
+++ b/doc/wks-utils.txt
@@ -0,0 +1,71 @@
+# wks-utils.txt - gpg-wks-server/-client strings (en) -*- default-generic -*-
+# Written in 2025 by g10 Code GmbH
+#
+# To the extent possible under law, the author(s) have dedicated all
+# copyright and related and neighboring rights to this text to the
+# public domain worldwide. This text is distributed without any
+# warranty. You should have received a copy of the CC0 Public Domain
+# Dedication along with this software. If not, see
+# <https://creativecommons.org/publicdomain/zero/1.0/>.
+# SPDX-License-Identifier: CC0-1.0
+#
+# Note that this template file needs to be UTF-8 encoded. When looking
+# for a template item, GnuPG scans the help files in the following order
+# (assuming a standard Unix layout):
+#
+# /etc/gnupg/TEMPLATE.LL_TT.txt
+# /etc/gnupg/TEMPLATE.LL.txt
+# /etc/gnupg/TEMPLATE.txt
+# /usr/share/gnupg/TEMPLATE.LL_TT.txt
+# /usr/share/gnupg/TEMPLATE.LL.txt
+# /usr/share/gnupg/TEMPLATE.txt
+#
+# Here TEMPLATE denotes the name of the template (e.g. "mail-tube"),
+# LL_TT denotes the full name of the current locale with the territory
+# (.e.g. "de_DE"), LL denotes just the locale name (e.g. "de"). The
+# first matching item is returned. To put a dot or a hash mark at the
+# beginning of a text line, it needs to be prefixed with a dot and a
+# space. A single dot may be used to terminated an entry. Depending
+# on the template type certain variables (${NAME}) are expanded.
+# Check the man page of the respective tool.
+
+.server.confirm.body
+This message has been send to confirm your request
+to publish your key. If you did not request a key
+publication, simply ignore this message.
+
+Most mail software can handle this kind of message
+automatically and thus you would not have seen this
+message. It seems that your client does not fully
+support this service. The web page
+
+ https://gnupg.org/faq/wkd.html
+
+explains how you can process this message anyway in
+a few manual steps.
+
+
+${sigdelim}
+For information on GnuPG see: https://gnupg.org
+
+.
+
+.server.publish.congrats
+Hello!
+
+The key for your address '${address}' has been published
+and can now be retrieved from the Web Key Directory.
+
+For more information on this system see:
+
+ https://gnupg.org/faq/wkd.html
+
+Best regards
+
+ GnuPG Key Publisher
+
+
+${sigdelim}
+For information on GnuPG see: https://gnupg.org
+
+.
diff --git a/doc/wks.texi b/doc/wks.texi
index bfdd069f2..a47bdfa92 100644
--- a/doc/wks.texi
+++ b/doc/wks.texi
@@ -358,6 +358,15 @@ use option @option{-q}.
The command @option{--revoke-key} is not yet functional.
+This tool needs to insert strings into the mails which can be
+configured using a plain text file. The installed default files for
+English (@file{wks-utils.txt}) and German (@file{wks-utils.de.txt})
+can be copied to the system configuration directory and changed to
+local needs. Environment variables in these texts are expanded, the
+variable ``sigdelim'' is replaced by two dashes and a blank, the
+variable ``address'' is replaced by the mail address of the key to be
+published.
+
@mansect options
@noindent