* find/fstype.c (file_system_type_uncached): When the file system type is not known, return the literal string "unknown", instead of a translation of that. This allows a find command line like "find . -fstype unknown" to work in a variety of locales, instead of just the C locale. Similarly, for the AFS file system, always return "afs". * NEWS: Mention this change. --- ChangeLog | 11 +++++++++++ NEWS | 7 +++++++ find/fstype.c | 4 ++-- 3 files changed, 20 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog index 412d219..581de09 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2011-07-09 James Youngman <j...@gnu.org> + + File system type names should be untranslated strings. + * find/fstype.c (file_system_type_uncached): When the file system + type is not known, return the literal string "unknown", instead of + a translation of that. This allows a find command line like "find + . -fstype unknown" to work in a variety of locales, instead of + just the C locale. Similarly, for the AFS file system, always + return "afs". + * NEWS: Mention this change. + 2011-06-29 James Youngman <j...@gnu.org> Fix some constness warnings when dealing with -printf formats. diff --git a/NEWS b/NEWS index 2f031d4..2a019d8 100644 --- a/NEWS +++ b/NEWS @@ -51,6 +51,13 @@ last match found in this file, rather than the first, to better deal with implementations which have duplicate entries (for example /proc/mounts on systems running the Linux kernel). +** Translations + +The file system type names "afs" and "unknown" are now always +untranslated strings. This means that a find command lines like "find +. -fstype unknown" and "find . -fstype afs" will work as-is in a +variety of locales, instead of just the C locale. + * Major changes in release 4.5.10, 2011-05-11 ** Documentation Changes diff --git a/find/fstype.c b/find/fstype.c index a47b6d3..f8bb793 100644 --- a/find/fstype.c +++ b/find/fstype.c @@ -206,7 +206,7 @@ file_system_type_uncached (const struct stat *statp, const char *path) if (in_afs (path)) { fstype_known = 1; - return xstrdup ("afs"); + return xstrdup (N_("afs")); } #endif @@ -241,7 +241,7 @@ file_system_type_uncached (const struct stat *statp, const char *path) /* Don't cache unknown values. */ fstype_known = (type != NULL); - return type ? type : xstrdup (_("unknown")); + return type ? type : xstrdup (N_("unknown")); } -- 1.7.2.5 _______________________________________________ Findutils-patches mailing list Findutils-patches@gnu.org https://lists.gnu.org/mailman/listinfo/findutils-patches