Skip to content

Commit d835c52

Browse files
committed
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 fish-shell#11833
1 parent a53db72 commit d835c52

File tree

77 files changed

+194
-28
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+194
-28
lines changed

share/completions/!.fish

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
# localization: tier1
12
complete ! --wraps not

share/completions/[.fish

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
# localization: tier1
12
complete [ --wraps test

share/completions/fish_opt.fish

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# localization: skip(barely-used)
2+
13
set --local CONDITION '! __fish_seen_argument --short r --long required-val --short o --long optional-val'
24

35
complete --command fish_opt --no-files

share/functions/N_.fish

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1-
function N_ --description No-op
1+
# localization: skip(deprecated)
2+
function N_
23
printf "%s" $argv
34
end

share/functions/__fish_anyeditor.fish

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
function __fish_anyeditor --description "Print a editor to use, or an error message"
1+
# localization: tier1
2+
function __fish_anyeditor
23
set -l editor
34
if set -q VISUAL
45
echo $VISUAL | read -at editor

share/functions/__fish_cmd__complete_args.fish

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
function __fish_cmd__complete_args -d 'Function to generate args'
1+
# localization: tier3
2+
function __fish_cmd__complete_args
23
set -l current_token (commandline -tc)
34

45
switch $current_token

share/functions/__fish_complete_bittorrent.fish

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1+
# localization: tier3
2+
#
13
# Bittorrent commands
2-
34
function __fish_complete_bittorrent
45
complete -c $argv -l max_uploads -x --description "Maximum uploads at once"
56
complete -c $argv -l keepalive_interval -x --description "Number of seconds between keepalives"

share/functions/__fish_complete_docutils.fish

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
function __fish_complete_docutils -d "Completions for Docutils common options" -a cmd
1+
# localization: tier3
2+
function __fish_complete_docutils -a cmd
23
complete -x -c $cmd -k -a "(__fish_complete_suffix .rst .txt)"
34

45
# General Docutils Options

share/functions/__fish_complete_ftp.fish

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
function __fish_complete_ftp -d 'Complete ftp, pftp' --argument-names ftp
1+
# localization: tier3
2+
function __fish_complete_ftp --argument-names ftp
23
# Common across all ftp implementations
34
complete -c $ftp -xa "(__fish_print_hostnames)" -d Hostname
45
complete -c $ftp -s 4 -d 'Use IPv4 only'

share/functions/__fish_complete_gpg.fish

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# localization: tier3
12
#
23
# Completions for the gpg program.
34
#
@@ -15,7 +16,7 @@
1516
# removed. The remaining list of completions is still quite
1617
# impressive.
1718

18-
function __fish_complete_gpg -d "Internal function for gpg completion code deduplication" -a __fish_complete_gpg_command
19+
function __fish_complete_gpg -a __fish_complete_gpg_command
1920
if string match -q 'gpg (GnuPG) 1.*' ($__fish_complete_gpg_command --version 2>/dev/null)
2021
complete -c $__fish_complete_gpg_command -l simple-sk-checksum -d 'Integrity protect secret keys by using a SHA-1 checksum'
2122
complete -c $__fish_complete_gpg_command -l no-sig-create-check -d "Do not verify each signature right after creation"

0 commit comments

Comments
 (0)