summaryrefslogtreecommitdiffstats
path: root/OPS.PGP
diff options
context:
space:
mode:
authorKevin McCarthy <kevin@8t8.us>2021-02-20 13:08:54 -0800
committerKevin McCarthy <kevin@8t8.us>2021-02-21 14:47:25 -0800
commit7fd331fd980f01b81765cf949c0fa1eb518d0b34 (patch)
tree22199d5f18930092cdf2b8fe94b8e4a6f30ad7a9 /OPS.PGP
parentd4e13e4b1fb809105c19da1001179a7c9b6919d1 (diff)
Scan OPS files directly for gettext translation strings.
Previously, gettext's po/Makefile.in.in was modified to separately scan and merge a generated file: keymap_alldefs.h. Gettext doesn't recommend nor provide support for scanning generated files. However, there is no reason we have to scan the generated file. Instead move the N_() markers and L10N comments into the OPS files. Then simply add the OPS files to po/POTFILES.in. Add a '--language=C' option to xgettext to avoid a warning about the OPS files not have any known language suffix. Modify gen_defs and doc/gen-map-doc to deal with the new format of the OPS files.
Diffstat (limited to 'OPS.PGP')
-rw-r--r--OPS.PGP55
1 files changed, 49 insertions, 6 deletions
diff --git a/OPS.PGP b/OPS.PGP
index 0558ed79..802dbdda 100644
--- a/OPS.PGP
+++ b/OPS.PGP
@@ -1,6 +1,49 @@
-OP_COMPOSE_ATTACH_KEY "attach a PGP public key"
-OP_COMPOSE_PGP_MENU "show PGP options"
-OP_MAIL_KEY "mail a PGP public key"
-OP_VERIFY_KEY "verify a PGP public key"
-OP_VIEW_ID "view the key's user id"
-OP_CHECK_TRADITIONAL "check for classic PGP"
+/* This file is used to generate keymap_defs.h and the manual.
+ *
+ * The Mutt parser scripts scan lines that start with 'OP_'
+ * So please ensure multi-line comments have leading whitespace,
+ * or at least don't start with OP_.
+ *
+ * Gettext also scans this file for translation strings, so
+ * help strings should be surrounded by N_("....")
+ * and have a translator comment line above them.
+ *
+ * All OPS* files (but not keymap_defs.h) should be listed
+ * in po/POTFILES.in.
+ */
+
+/* L10N: Help screen description for OP_COMPOSE_ATTACH_KEY
+ compose menu: <attach-key>
+ */
+OP_COMPOSE_ATTACH_KEY N_("attach a PGP public key")
+
+/* L10N: Help screen description for OP_COMPOSE_PGP_MENU
+ compose menu: <pgp-menu>
+ */
+OP_COMPOSE_PGP_MENU N_("show PGP options")
+
+/* L10N: Help screen description for OP_MAIL_KEY
+ index menu: <mail-key>
+ pager menu: <mail-key>
+ */
+OP_MAIL_KEY N_("mail a PGP public key")
+
+/* L10N: Help screen description for OP_VERIFY_KEY
+ pgp menu: <verify-key>
+ smime menu: <verify-key>
+ */
+OP_VERIFY_KEY N_("verify a PGP public key")
+
+/* L10N: Help screen description for OP_VIEW_ID
+ pgp menu: <view-name>
+ smime menu: <view-name>
+ */
+OP_VIEW_ID N_("view the key's user id")
+
+/* L10N: Help screen description for OP_CHECK_TRADITIONAL
+ index menu: <check-traditional-pgp>
+ pager menu: <check-traditional-pgp>
+ attachment menu: <check-traditional-pgp>
+ */
+OP_CHECK_TRADITIONAL N_("check for classic PGP")
+