From 443db69980afb93180505853c30e554d7eefef5c Mon Sep 17 00:00:00 2001 From: Kalle Olavi Niemitalo Date: Fri, 23 Mar 2007 00:51:56 +0200 Subject: [PATCH 1/3] Don't mark undisplayed names of modules for translation. Exclude unneeded header files. This partially reverts commit 90980a944e6db94a97ca7bdb1452f8c1555d52be, with permission. --- src/config/kbdbind.c | 5 ++++- src/document/document.c | 6 ++++-- src/terminal/screen.c | 7 +++++-- src/terminal/terminal.c | 6 ++++-- 4 files changed, 17 insertions(+), 7 deletions(-) diff --git a/src/config/kbdbind.c b/src/config/kbdbind.c index 908127806..6a58773e7 100644 --- a/src/config/kbdbind.c +++ b/src/config/kbdbind.c @@ -989,7 +989,10 @@ bind_config_string(struct string *file) } struct module kbdbind_module = struct_module( - /* name: */ N_("Keyboard Bindings"), + /* Because this module is listed in main_modules rather than + * in builtin_modules, its name does not appear in the user + * interface and so need not be translatable. */ + /* name: */ "Keyboard Bindings", /* options: */ NULL, /* hooks: */ NULL, /* submodules: */ NULL, diff --git a/src/document/document.c b/src/document/document.c index 7dc6b6c18..9c0d4d751 100644 --- a/src/document/document.c +++ b/src/document/document.c @@ -21,7 +21,6 @@ #include "document/html/renderer.h" #include "document/options.h" #include "document/refresh.h" -#include "intl/gettext/libintl.h" #include "main/module.h" #include "main/object.h" #include "protocol/uri.h" @@ -343,7 +342,10 @@ done_documents(struct module *module) } struct module document_module = struct_module( - /* name: */ N_("Document"), + /* Because this module is listed in main_modules rather than + * in builtin_modules, its name does not appear in the user + * interface and so need not be translatable. */ + /* name: */ "Document", /* options: */ NULL, /* hooks: */ NULL, /* submodules: */ NULL, diff --git a/src/terminal/screen.c b/src/terminal/screen.c index 3ab77d47d..0c762fa32 100644 --- a/src/terminal/screen.c +++ b/src/terminal/screen.c @@ -11,7 +11,6 @@ #include "config/options.h" #include "intl/charsets.h" -#include "intl/gettext/libintl.h" #include "main/module.h" #include "osdep/ascii.h" #include "osdep/osdep.h" @@ -1126,7 +1125,11 @@ done_screen(struct terminal_screen *screen) } struct module terminal_screen_module = struct_module( - /* name: */ N_("Terminal Screen"), + /* Because this module is a submodule of terminal_module, + * which is listed main_modules rather than in builtin_modules, + * its name does not appear in the user interface and + * so need not be translatable. */ + /* name: */ "Terminal Screen", /* options: */ NULL, /* hooks: */ NULL, /* submodules: */ NULL, diff --git a/src/terminal/terminal.c b/src/terminal/terminal.c index 454565658..befaa0a1d 100644 --- a/src/terminal/terminal.c +++ b/src/terminal/terminal.c @@ -16,7 +16,6 @@ #include "bookmarks/bookmarks.h" #include "config/options.h" -#include "intl/gettext/libintl.h" #include "main/main.h" #include "main/module.h" #include "main/object.h" @@ -380,7 +379,10 @@ static struct module *terminal_submodules[] = { }; struct module terminal_module = struct_module( - /* name: */ N_("Terminal"), + /* Because this module is listed in main_modules rather than + * in builtin_modules, its name does not appear in the user + * interface and so need not be translatable. */ + /* name: */ "Terminal", /* options: */ NULL, /* hooks: */ NULL, /* submodules: */ terminal_submodules, From 5b4ba3628331ff698afee75746bfec95396ef840 Mon Sep 17 00:00:00 2001 From: Kalle Olavi Niemitalo Date: Fri, 23 Mar 2007 09:44:16 +0200 Subject: [PATCH 2/3] TAGS: Scan *.inc too. Recognize the ACTION_ macro. --- src/Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Makefile b/src/Makefile index 2585b7a69..1aec689b8 100644 --- a/src/Makefile +++ b/src/Makefile @@ -39,10 +39,11 @@ elinks: $(LIB_O_NAME) vernum.o $(call cmd,link) TAGS: - find $(srcdir). -name "*.[ch]" -print \ + find $(srcdir). -name "*.[ch]" -or -name "*.inc" -print \ | etags --regex='{c}/INIT_LIST_HEAD(\([[:alnum:]_]+\))/\1/' \ --regex='{c}/struct_hierbox_browser(\n[ \t]*\([[:alnum:]_]+\),/\1/m' \ - - + --regex='{c}/^ACTION_(\([[:alnum:]_]+\),[^,]*,[ \t]*\([[:alnum:]_]+\),/ACT_\1_\2/' \ + --language=c - .PHONY: TAGS PROGS = elinks From f2f66104d5fbd8cb03f731e9a46e302aeb855d94 Mon Sep 17 00:00:00 2001 From: Kalle Olavi Niemitalo Date: Fri, 23 Mar 2007 09:47:28 +0200 Subject: [PATCH 3/3] TAGS: Doh, don't forget to scan the *.[ch] files. --- src/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Makefile b/src/Makefile index 1aec689b8..3b8387cd6 100644 --- a/src/Makefile +++ b/src/Makefile @@ -39,7 +39,7 @@ elinks: $(LIB_O_NAME) vernum.o $(call cmd,link) TAGS: - find $(srcdir). -name "*.[ch]" -or -name "*.inc" -print \ + find $(srcdir). \( -name "*.[ch]" -o -name "*.inc" \) -print \ | etags --regex='{c}/INIT_LIST_HEAD(\([[:alnum:]_]+\))/\1/' \ --regex='{c}/struct_hierbox_browser(\n[ \t]*\([[:alnum:]_]+\),/\1/m' \ --regex='{c}/^ACTION_(\([[:alnum:]_]+\),[^,]*,[ \t]*\([[:alnum:]_]+\),/ACT_\1_\2/' \