(lambda ()
(dired-mark-if
(member (dired-get-filename nil t) file-list2) nil)))
- (message "Marked in dir1: %s files, in dir2: %s files"
- (length file-list1)
- (length file-list2))))
+ (message "Marked in dir1: %s, in dir2: %s"
+ (format-message (ngettext "%d file" "%d files" (length file-list1))
+ (length file-list1))
+ (format-message (ngettext "%d file" "%d files" (length file-list2))
+ (length file-list2)))))
(defun dired-file-set-difference (list1 list2 predicate)
"Combine LIST1 and LIST2 using a set-difference operation.
(shell-quote-argument (file-name-nondirectory
file-desc)))
in-files " "))))))
- (message "Compressed %d file(s) to %s"
+ (message (ngettext "Compressed %d file to %s"
+ "Compressed %d files to %s"
+ (length in-files))
(length in-files)
(file-name-nondirectory out-file)))))))
(string (if (eq op-symbol 'compress) "Compress or uncompress"
(capitalize (symbol-name op-symbol)))))
(if (not failures)
- (message "%s: %d file%s."
- string total (dired-plural-s total))
+ (message (ngettext "%s: %d file." "%s: %d files." total)
+ string total)
;; end this bunch of errors:
(dired-log-summary
- (format "Failed to %s %d of %d file%s"
- (downcase string) count total (dired-plural-s total))
+ (format (ngettext "Failed to %s %d of %d file"
+ "Failed to %s %d of %d files"
+ total)
+ (downcase string) count total)
failures)))))
;;;###autoload
(progn
(push (dired-make-relative from)
failures)
- (dired-log "%s `%s' to `%s' failed:\n%s\n"
+ (dired-log "%s: `%s' to `%s' failed:\n%s\n"
operation from to err))))))))
(cond
(dired-create-files-failures
(setq failures (nconc failures dired-create-files-failures))
(dired-log-summary
- (format "%s failed for %d file%s in %d requests"
- operation (length failures)
- (dired-plural-s (length failures))
- total)
+ (format (ngettext "%s failed for %d file in %d requests"
+ "%s failed for %d files in %d requests"
+ (length failures))
+ operation (length failures) total)
failures))
(failures
(dired-log-summary
- (format "%s failed for %d of %d file%s"
- operation (length failures)
- total (dired-plural-s total))
+ (format (ngettext "%s: %d of %d file failed"
+ "%s: %d of %d files failed"
+ total)
+ operation (length failures) total)
failures))
(skipped
(dired-log-summary
- (format "%s: %d of %d file%s skipped"
- operation (length skipped) total
- (dired-plural-s total))
+ (format (ngettext "%s: %d of %d file skipped"
+ "%s: %d of %d files skipped"
+ total)
+ operation (length skipped) total)
skipped))
(t
- (message "%s: %s file%s"
- operation success-count (dired-plural-s success-count)))))
+ (message (ngettext "%s: %d file done"
+ "%s: %d files done"
+ success-count)
+ operation success-count))))
(dired-move-to-filename))
\f
(defun dired-do-create-files (op-symbol file-creator operation arg
(if (not failures)
(progress-reporter-done progress-reporter)
(dired-log-summary
- (format "%d of %d deletion%s failed"
- (length failures) count
- (dired-plural-s count))
+ (format (ngettext "%d of %d deletion failed"
+ "%d of %d deletions failed"
+ count)
+ (length failures) count)
failures)))))
(message "(No deletions performed)")))
(dired-move-to-filename))
(let ((buf-list (dired-buffers-for-dir (expand-file-name fn))))
(and buf-list
(and dired-clean-confirm-killing-deleted-buffers
- (y-or-n-p (format "Kill Dired buffer%s of %s, too? "
- (dired-plural-s (length buf-list))
+ (y-or-n-p (format (ngettext "Kill Dired buffer of %s, too? "
+ "Kill Dired buffers of %s, too? "
+ (length buf-list))
(file-name-nondirectory fn))))
(dolist (buf buf-list)
(kill-buffer buf))))))