summaryrefslogtreecommitdiffstats
path: root/doc
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 /doc
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 'doc')
-rw-r--r--doc/gen-map-doc4
1 files changed, 2 insertions, 2 deletions
diff --git a/doc/gen-map-doc b/doc/gen-map-doc
index 2c424943..4f58f13f 100644
--- a/doc/gen-map-doc
+++ b/doc/gen-map-doc
@@ -8,8 +8,8 @@ my $xml = shift @ARGV;
open F, "cat @ARGV |" or die "OPS*: $!";
while (<F>) {
- next if /^\/\*/;
- /(\w+) "(.+)"/ or die "$.: parse error";
+ next if ! /^OP_/;
+ /(\w+)\s+N_\("(.+)"\)/ or die "$.: parse error";
$OPS{$1} = $2;
}
close F;