* find/ftsfind.c (get_fts_info_name): Mark a debug message as not needing translation. Remove unused macros STRINGIFY and USE_SAFE_CHDIR. (partial_quotearg_n): Mark the empty string as not needing translation. (show_outstanding_execdirs): Mark debug messages as not needing translation. Likewise predicate names. (consider_visiting): Likewise. (process_all_startpoints): Mark the name of the current directory as not needing translation. (main): The default name of the program also doesn't need translation, so annotate that accordingly. --- ChangeLog | 14 ++++++++++++++ find/ftsfind.c | 39 +++++++++++++++++++-------------------- 2 files changed, 33 insertions(+), 20 deletions(-)
diff --git a/ChangeLog b/ChangeLog index 1c00220..df77b4a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,19 @@ 2011-07-09 James Youngman <j...@gnu.org> + Mark strings in ftsfind.c as not needing translation. + * find/ftsfind.c (get_fts_info_name): Mark a debug message as not + needing translation. + Remove unused macros STRINGIFY and USE_SAFE_CHDIR. + (partial_quotearg_n): Mark the empty string as not needing + translation. + (show_outstanding_execdirs): Mark debug messages as not needing + translation. Likewise predicate names. + (consider_visiting): Likewise. + (process_all_startpoints): Mark the name of the current directory + as not needing translation. + (main): The default name of the program also doesn't need + translation, so annotate that accordingly. + Translate error messages, mark other strings as not needing it. * find/print.c (get_format_flags_length): Mark printf format flags as not needing translation. diff --git a/find/ftsfind.c b/find/ftsfind.c index cce2f40..f4c1250 100644 --- a/find/ftsfind.c +++ b/find/ftsfind.c @@ -56,7 +56,6 @@ #include "fdleak.h" #include "unused-result.h" -#define USE_SAFE_CHDIR 1 #undef STAT_MOUNTPOINTS @@ -155,7 +154,6 @@ inside_dir (int dir_fd) static void init_mounted_dev_list (void); #endif -#define STRINGIFY(X) #X #define HANDLECASE(N) case N: return #N; static char * @@ -179,7 +177,7 @@ get_fts_info_name (int info) HANDLECASE(FTS_SLNONE); HANDLECASE(FTS_W); default: - sprintf (buf, "[%d]", info); + sprintf (buf, N_("[%d]"), info); return buf; } } @@ -209,7 +207,7 @@ partial_quotearg_n (int n, char *s, size_t len, enum quoting_style style) { if (0 == len) { - return quotearg_n_style (n, style, ""); + return quotearg_n_style (n, style, N_("")); } else { @@ -289,16 +287,16 @@ show_outstanding_execdirs (FILE *fp) int seen=0; struct predicate *p; p = get_eval_tree (); - fprintf (fp, "Outstanding execdirs:"); + fprintf (fp, N_("Outstanding execdirs:")); while (p) { const char *pfx; if (pred_is (p, pred_execdir)) - pfx = "-execdir"; + pfx = N_("-execdir"); else if (pred_is (p, pred_okdir)) - pfx = "-okdir"; + pfx = N_("-okdir"); else pfx = NULL; if (pfx) @@ -307,20 +305,21 @@ show_outstanding_execdirs (FILE *fp) const struct exec_val *execp = &p->args.exec_vec; ++seen; - fprintf (fp, "%s ", pfx); + fprintf (fp, N_("%s "), pfx); if (execp->multiple) - fprintf (fp, "multiple "); - fprintf (fp, "%" PRIuMAX " args: ", (uintmax_t) execp->state.cmd_argc); + fprintf (fp, N_("multiple ")); + fprintf (fp, N_("%" PRIuMAX " args: "), + (uintmax_t) execp->state.cmd_argc); for (i=0; i<execp->state.cmd_argc; ++i) { - fprintf (fp, "%s ", execp->state.cmd_argv[i]); + fprintf (fp, N_("%s "), execp->state.cmd_argv[i]); } - fprintf (fp, "\n"); + fprintf (fp, N_("\n")); } p = p->pred_next; } if (!seen) - fprintf (fp, " none\n"); + fprintf (fp, N_(" none\n")); } else { @@ -337,9 +336,9 @@ consider_visiting (FTS *p, FTSENT *ent) if (options.debug_options & DebugSearch) fprintf (stderr, - "consider_visiting (early): %s: " - "fts_info=%-6s, fts_level=%2d, prev_depth=%d " - "fts_path=%s, fts_accpath=%s\n", + N_("consider_visiting (early): %s: " + "fts_info=%-6s, fts_level=%2d, prev_depth=%d " + "fts_path=%s, fts_accpath=%s\n"), quotearg_n_style (0, options.err_quoting_style, ent->fts_path), get_fts_info_name (ent->fts_info), (int)ent->fts_level, prev_depth, @@ -502,8 +501,8 @@ consider_visiting (FTS *p, FTSENT *ent) if (options.debug_options & DebugSearch) fprintf (stderr, - "consider_visiting (late): %s: " - "fts_info=%-6s, isdir=%d ignore=%d have_stat=%d have_type=%d \n", + N_("consider_visiting (late): %s: " + "fts_info=%-6s, isdir=%d ignore=%d have_stat=%d have_type=%d \n"), quotearg_n_style (0, options.err_quoting_style, ent->fts_path), get_fts_info_name (ent->fts_info), isdir, ignore, state.have_stat, state.have_type); @@ -628,7 +627,7 @@ process_all_startpoints (int argc, char *argv[]) * we get a coredump. The best example of this is if we say * "find -printf %H" (note, not "find . -printf %H"). */ - char defaultpath[2] = "."; + char defaultpath[2] = N_("."); return find (defaultpath); } return true; @@ -646,7 +645,7 @@ main (int argc, char **argv) if (argv[0]) set_program_name (argv[0]); else - set_program_name ("find"); + set_program_name (N_("find")); record_initial_cwd (); -- 1.7.2.5 _______________________________________________ Findutils-patches mailing list Findutils-patches@gnu.org https://lists.gnu.org/mailman/listinfo/findutils-patches