summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorKevin McCarthy <kevin@8t8.us>2022-01-10 14:00:40 -0800
committerKevin McCarthy <kevin@8t8.us>2022-01-13 13:29:54 -0800
commit466d3b8bf328f611c9812b301907db69917f0bd0 (patch)
tree3bf231c8a0f0c91427f00b2016567a75f7663390 /doc
parentcd3a5c8510303b4efb9e6ef882a6a179ae92e92c (diff)
Localize $reply_regexp.
This will allow translators to add additional reply prefixes common to their locale. Add more documentation to the option, to explain the parts of the regular expression. Give an example of adding more prefixes. Note that the result of this is stored in the header cache. Probably people rarely were affected by this before, but with the new localization, people may experiment and need to be aware to turn the header cache off while testing.
Diffstat (limited to 'doc')
-rw-r--r--doc/makedoc.pl24
1 files changed, 18 insertions, 6 deletions
diff --git a/doc/makedoc.pl b/doc/makedoc.pl
index 265d3a64..e26b05a9 100644
--- a/doc/makedoc.pl
+++ b/doc/makedoc.pl
@@ -109,7 +109,8 @@ my %type2human = ("DT_NONE" => "-none-",
"DT_MAGIC" => "folder magic",
"DT_ADDR" => "e-mail address",
"DT_MBCHARTBL" => "string",
- "DT_L10N_STR" => "string (localized)");
+ "DT_L10N_STR" => "string (localized)",
+ "DT_L10N_RX" => "regular expression (localized)");
my %string_types = ("DT_STR" => 1,
"DT_RX" => 1,
@@ -117,7 +118,8 @@ my %string_types = ("DT_STR" => 1,
"DT_PATH" => 1,
"DT_CMD_PATH" => 1,
"DT_MBCHARTBL" => 1,
- "DT_L10N_STR" => 1);
+ "DT_L10N_STR" => 1,
+ "DT_L10N_RX" => 1);
my %quad2human = ("MUTT_YES" => "yes",
"MUTT_NO" => "no",
@@ -304,11 +306,21 @@ sub handle_confline($) {
if ($type =~ /DT_L10N_STR/) {
$localized = 1;
- $type = "DT_L10N_STR";
}
- else {
- $type =~ s/\|(.*)//;
- $subtype = $1;
+
+ $type =~ s/\|(.*)//;
+ $subtype = $1;
+
+ if ($localized) {
+ if ($type eq "DT_STR") {
+ $type = "DT_L10N_STR";
+ }
+ elsif ($type eq "DT_RX") {
+ $type = "DT_L10N_RX";
+ }
+ else {
+ die "Unknown localized type: $type\n"
+ }
}
$val =~ s/^{\s*\.[lp]\s*=\s*"?//;