From: Frederic Marchal Date: Fri, 12 Dec 2014 16:23:45 +0000 (+0100) Subject: Improve the message helping the user to set the translation up X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2683bb622c1750aaa9d83164b454f57bb8c92d6f;p=thirdparty%2Fsarg.git Improve the message helping the user to set the translation up It isn't easy to figure out where sarg searches for sarg.mo. Running sarg like sarg -x -v display the usual version number and a message giving enough information to know where to put the message file. --- diff --git a/util.c b/util.c index f5c749e..41ca417 100644 --- a/util.c +++ b/util.c @@ -2080,8 +2080,15 @@ void version(void) printf(_("SARG Version: %s\n"),VERSION); #if defined(ENABLE_NLS) && defined(HAVE_LOCALE_H) if (debug) { - printf(_("Translation file should be somewhere under \"%s\" and be named \"%s.mo\"\n"),LOCALEDIR,PACKAGE_NAME); - if (CurrentLocale) printf(_("The currently selected locale is \"%s\"\n"),CurrentLocale); + printf(_("\nFor the translation to work, a valid message file should be installed as " + "\"%s//LC_MESSAGES/%s.mo\" where is derived from the effective locale.\n"),LOCALEDIR,PACKAGE_NAME); + if (CurrentLocale) { + printf(_("Currently effective locale is \"%s\".\n"),CurrentLocale); + } else { + printf(_("Locale is not set in the environment variable.\n")); + } + // TRANSLATORS: You may change this message to tell the reader that the language is correctly supported. + printf(_("If this message is in English, then your language is not supported or not correctly installed.\n")); } #endif exit(EXIT_SUCCESS);