Files
fish-shell/share/functions/__fish_complete_zfs_ro_properties.fish
Johannes Altmanninger a9576d44e3 Prepare to not localize private function descriptions
The overwhelming majority of localizable messages comes from
completions:

	$ ls share/completions/ | wc -l
	$ 1048

OTOH functions also contribute a small amount, mostly via their
descriptions (so usually just one per file).

	$ ls share/functions/ | wc -l
	$ 237

Most of these are private and almost never shown to the user, so it's
not worth bothering translators with them. So:

- Skip private (see the parent commit) and deprecated functions.
- Skip wrapper functions like grep (where the translation seems to
  be provided by apropos), and even the English description is not
  helpful.
  - Assume that most real systems have "seq", "realpath" etc.,
    so it's no use providing our own translations for our fallbacks.
- Mark fish's own functions as tier1, and some barely-used functiosn
  and completions as tier3, so we can order them that way in
  po/*.po. Most translators should only look at tier1 and tier2.
  In future we could disable localization for tier3.

See the explanation at the bottom of
tests/checks/message-localization-tier-is-declared.fish

Part of #11833

(cherry picked from commit d835c5252a)
2025-09-30 11:52:41 +02:00

48 lines
2.3 KiB
Fish

# localization: tier3
function __fish_complete_zfs_ro_properties
echo -e "available\tAvailable space"
echo -e "avail\tAvailable space"
echo -e "compressratio\tAchieved compression ratio"
echo -e "creation\tDataset creation time"
echo -e "clones\tSnapshot clones"
echo -e "defer_destroy\tMarked for deferred destruction"
echo -e "filesystem_count\tTotal lower-level filesystems and volumes"
echo -e "logicalreferenced\tLogical total space"
echo -e "lrefer\tLogical total space"
echo -e "logicalused\tLogical used space"
echo -e "lused\tLogical used space"
echo -e "mounted\tIs currently mounted?"
echo -e "origin\tSource snapshot"
if __fish_is_zfs_feature_enabled "feature@extensible_dataset"
echo -e "receive_resume_token\tToken for interrupted reception resumption"
end
echo -e "referenced\tTotal space"
echo -e "refer\tTotal space"
echo -e "refcompressratio\tAchieved compression ratio of referenced space"
echo -e "snapshot_count\tTotal lower-level snapshots"
echo -e "type\tDataset type"
echo -e "used\tSpace used by dataset and children"
echo -e "usedbychildren\tSpace used by children datasets"
echo -e "usedbydataset\tSpace used by dataset itself"
echo -e "usedbyrefreservation\tSpace used by refreservation"
echo -e "usedbysnapshots\tSpace used by dataset snapshots"
echo -e "userrefs\tHolds count"
echo -e "volblocksize\tVolume block size"
echo -e "written\tReferenced data written since previous snapshot"
# Autogenerate userused@$USER list; only usernames are supported by the completion, but the zfs command supports more formats
for user in (__fish_print_users)
set -l tabAndBefore (echo -e "userused@$user\t")
printf "%sDataset space use by user %s\n" $tabAndBefore $user
end
# Autogenerate groupused@$USER list
for group in (__fish_print_groups)
set -l tabAndBefore (echo -e "groupused@$group\t")
printf "%sDataset space use by group %s\n" $tabAndBefore $group
end
# Autogenerate written@$SNAPSHOT list
for snapshot in (__fish_print_zfs_snapshots)
set -l tabAndBefore (echo -e "written@$snapshot\t")
printf "%sReferenced data written since snapshot %s\n" $tabAndBefore $snapshot
end
end