diff options
author | Pádraig Brady <P@draigBrady.com> | 2009-09-18 23:06:21 +0100 |
---|---|---|
committer | Pádraig Brady <P@draigBrady.com> | 2009-09-21 12:37:57 +0100 |
commit | 5d4f09d83a7c69110b4db97443759e9046c149e1 (patch) | |
tree | 150048d2ed16477e5259502ef1df2569e39bab94 /src/system.h | |
parent | c48003a53cbeee75dd34f5c3932a60ee97defb28 (diff) | |
download | coreutils-5d4f09d83a7c69110b4db97443759e9046c149e1.tar.xz |
doc: mention the texinfo documentation in --help
* src/system.h: Rename emit_bug_reporting_address() to
emit_ancillary_info() and update it to not print the translation
project address in en_* locales, and _do_ print it in the 'C'
(and other) locales so that it's included in the default man page.
Also mention how to invoke the texinfo documentation for each command.
Also move the "hard-locale.h" include to the 8 files that now use it.
* man/help2man: Strip the newly added texinfo reference from the
--help output as a more verbose version is already added by help2man.
Suggestion from C de-Avillez
Diffstat (limited to 'src/system.h')
-rw-r--r-- | src/system.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/system.h b/src/system.h index a15c298b8..ce7114891 100644 --- a/src/system.h +++ b/src/system.h @@ -635,9 +635,8 @@ Otherwise, units default to 1024 bytes (or 512 if POSIXLY_CORRECT is set).\n\ "), program); } -#include "hard-locale.h" static inline void -emit_bug_reporting_address (void) +emit_ancillary_info (void) { printf (_("\nReport %s bugs to %s\n"), last_component (program_name), PACKAGE_BUGREPORT); @@ -646,8 +645,10 @@ emit_bug_reporting_address (void) PACKAGE_NAME, PACKAGE); fputs (_("General help using GNU software: <http://www.gnu.org/gethelp/>\n"), stdout); - - if (hard_locale (LC_MESSAGES)) + /* Don't output this redundant message for English locales. + Note we still output for 'C' so that it gets included in the man page. */ + const char *lc_messages = setlocale (LC_MESSAGES, NULL); + if (lc_messages && strncmp (lc_messages, "en_", 3)) { /* TRANSLATORS: Replace LANG_CODE in this URL with your language code <http://translationproject.org/team/LANG_CODE.html> to form one of @@ -657,6 +658,8 @@ emit_bug_reporting_address (void) "<http://translationproject.org/team/>\n"), last_component (program_name)); } + printf (_("For complete documentation, run: " + "info coreutils '%s invocation'\n"), last_component (program_name)); } #include "inttostr.h" |