[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 1/9] File system type names should be untranslated strings.
From: |
James Youngman |
Subject: |
[PATCH 1/9] File system type names should be untranslated strings. |
Date: |
Sat, 9 Jul 2011 23:15:43 +0100 |
* 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 <address@hidden>
+
+ 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 <address@hidden>
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
- [PATCH 1/9] File system type names should be untranslated strings.,
James Youngman <=
- [PATCH 3/9] Indicate predicates and debug strings don't need translation., James Youngman, 2011/07/09
- [PATCH 4/9] Annotate strings as needing translation or not as appropriate., James Youngman, 2011/07/09
- [PATCH 9/9] Disable the noisy but not useful -Wswitch-default warning., James Youngman, 2011/07/09
- [PATCH 5/9] Translate error messages, mark other strings as not needing it., James Youngman, 2011/07/09
- [PATCH 6/9] Mark strings in ftsfind.c as not needing translation., James Youngman, 2011/07/09
- [PATCH 7/9] Mark strings in find.c as not needing translation., James Youngman, 2011/07/09
- [PATCH 2/9] Predicate names and trivial formats don't need translation., James Youngman, 2011/07/09
- [PATCH 8/9] Fix a number of compiler warnings (mostly const-correctness)., James Youngman, 2011/07/09