]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
doc: fix translation issue in chown/chgrp amalgamation
authorPádraig Brady <P@draigBrady.com>
Sun, 24 Mar 2024 20:12:53 +0000 (20:12 +0000)
committerPádraig Brady <P@draigBrady.com>
Sun, 24 Mar 2024 20:25:37 +0000 (20:25 +0000)
* src/chown-core.h (emit_from_option_description): The conditional
string composition here caused issues for translators.
Instead move to a more general description ...
(src/chown.c (usage): ... here.
Fixes https://bugs.gnu.org/69985

po/POTFILES.in
src/chown-core.h
src/chown.c

index 55aa9cc0a9a9b3bb788b689cddad428990aea839..35c819ac2f12776b3928ef0e6e44251d24a60e5a 100644 (file)
@@ -40,7 +40,6 @@ src/cat.c
 src/chcon.c
 src/chmod.c
 src/chown-core.c
-src/chown-core.h
 src/chown.c
 src/chroot.c
 src/cksum.c
index e1396e3eac12fef1d70a337b5bd65c674bc562f6..4bd68fed4626404a73fb574185e826548d51b71d 100644 (file)
@@ -89,16 +89,4 @@ chown_files (char **files, int bit_flags,
              struct Chown_option const *chopt)
   _GL_ATTRIBUTE_NONNULL ();
 
-static inline void
-emit_from_option_description (bool user)
-{
-  printf (_("\
-      --from=CURRENT_OWNER:CURRENT_GROUP\n\
-                         change the %sgroup of each file only if\n\
-                         its current owner and/or group match those specified\n\
-                         here.  Either may be omitted, in which case a match\n\
-                         is not required for the omitted attribute\n\
-"), user ? "owner and/or " : "");
-}
-
 #endif /* CHOWN_CORE_H */
index 90ce84d678f32329c9e71f643f4fa1c7cf8318b1..10c684b67a03464cc9668f3e846f211761fbd855 100644 (file)
@@ -109,7 +109,13 @@ With --reference, change the group of each FILE to that of RFILE.\n\
                          (useful only on systems that can change the\n\
                          ownership of a symlink)\n\
 "), stdout);
-      emit_from_option_description (chown_mode == CHOWN_CHOWN);
+      fputs (_("\
+      --from=CURRENT_OWNER:CURRENT_GROUP\n\
+                         change the ownership of each file only if\n\
+                         its current owner and/or group match those specified\n\
+                         here. Either may be omitted, in which case a match\n\
+                         is not required for the omitted attribute\n\
+"), stdout);
       fputs (_("\
       --no-preserve-root  do not treat '/' specially (the default)\n\
       --preserve-root    fail to operate recursively on '/'\n\