Update various strings for translation, avoid _ for non-translations

Use __ instead of _ as a placeholder for ignored variables in `read`
statements.
This commit is contained in:
David Adam 2014-11-15 10:21:21 +08:00
parent 190cac07a3
commit c78e56c509
6 changed files with 9 additions and 9 deletions

View file

@ -814,7 +814,7 @@ static int builtin_set(parser_t &parser, wchar_t **argv)
env_var_t global_dest = env_get_string(dest, ENV_GLOBAL); env_var_t global_dest = env_get_string(dest, ENV_GLOBAL);
if (universal && ! global_dest.missing()) if (universal && ! global_dest.missing())
{ {
append_format(stderr_buffer, _(L"%ls: Warning: universal scope selected, but a global variable %ls exists.\n"), L"set", dest); append_format(stderr_buffer, _(L"%ls: Warning: universal scope selected, but a global variable '%ls' exists.\n"), L"set", dest);
} }
free(dest); free(dest);

View file

@ -190,7 +190,7 @@ void parse_error_offset_source_start(parse_error_list_t *errors, size_t amt);
#define CMD_OR_ERR_MSG _( L"Expected a command, but instead found a pipe. Did you mean 'COMMAND; or COMMAND'? See the help section for the 'or' builtin command by typing 'help or'.") #define CMD_OR_ERR_MSG _( L"Expected a command, but instead found a pipe. Did you mean 'COMMAND; or COMMAND'? See the help section for the 'or' builtin command by typing 'help or'.")
/** Error message when a non-string token is found when expecting a command name */ /** Error message when a non-string token is found when expecting a command name */
#define CMD_AND_ERR_MSG _( L"Expected a command, but instead found a '&'. Did you mean 'COMMAND; and COMMAND'? See the help section for the 'and' builtin command by typing 'help and'.") #define CMD_AND_ERR_MSG _( L"Expected a command, but instead found an '&'. Did you mean 'COMMAND; and COMMAND'? See the help section for the 'and' builtin command by typing 'help and'.")
/** Error message when encountering an illegal command name */ /** Error message when encountering an illegal command name */
#define ILLEGAL_CMD_ERR_MSG _( L"Illegal command name '%ls'") #define ILLEGAL_CMD_ERR_MSG _( L"Illegal command name '%ls'")

View file

@ -241,7 +241,7 @@ function __fish_git_prompt_show_upstream --description "Helper function for __fi
# (git-svn uses essentially the same procedure internally) # (git-svn uses essentially the same procedure internally)
set -l svn_upstream (git log --first-parent -1 --grep="^git-svn-id: \($svn_url_pattern\)" ^/dev/null) set -l svn_upstream (git log --first-parent -1 --grep="^git-svn-id: \($svn_url_pattern\)" ^/dev/null)
if test (count $svn_upstream) -ne 0 if test (count $svn_upstream) -ne 0
echo $svn_upstream[-1] | read -l _ svn_upstream _ echo $svn_upstream[-1] | read -l __ svn_upstream __
set svn_upstream (echo $svn_upstream | sed 's/@.*//') set svn_upstream (echo $svn_upstream | sed 's/@.*//')
set -l cur_prefix set -l cur_prefix
for i in (seq (count $svn_remote)) for i in (seq (count $svn_remote))

View file

@ -32,7 +32,7 @@ function __fish_print_help --description "Print help message for the specified f
# different than the stdin of fish. # different than the stdin of fish.
# use fd 3 to copy our stdout because we need to pipe the output of stty # use fd 3 to copy our stdout because we need to pipe the output of stty
begin begin
stty size 0<&3 | read _ cols stty size 0<&3 | read __ cols
end 3<&1 end 3<&1
end end
if test -n "$cols" if test -n "$cols"
@ -58,7 +58,7 @@ function __fish_print_help --description "Print help message for the specified f
switch $line switch $line
case ' *' \t\* case ' *' \t\*
# starts with whitespace, check if it has non-whitespace # starts with whitespace, check if it has non-whitespace
printf "%s\n" $line | read -l word _ printf "%s\n" $line | read -l word __
if test -n $word if test -n $word
set line_type normal set line_type normal
else else

View file

@ -66,7 +66,7 @@ function abbr --description "Manage abbreviations"
__fish_abbr_parse_entry $mode_arg key value __fish_abbr_parse_entry $mode_arg key value
# ensure the key contains at least one non-space character # ensure the key contains at least one non-space character
set -l IFS \n\ \t set -l IFS \n\ \t
printf '%s' $key | read -lz key_ _ printf '%s' $key | read -lz key_ __
if test -z "$key_" if test -z "$key_"
printf ( _ "%s: abbreviation must have a non-empty key\n" ) abbr >&2 printf ( _ "%s: abbreviation must have a non-empty key\n" ) abbr >&2
return 1 return 1
@ -144,10 +144,10 @@ end
function __fish_abbr_parse_entry -S -a __input __key __value function __fish_abbr_parse_entry -S -a __input __key __value
if test -z "$__key" if test -z "$__key"
set __key _ set __key __
end end
if test -z "$__value" if test -z "$__value"
set __value _ set __value __
end end
set -l IFS '= ' set -l IFS '= '
switch $__input switch $__input

View file

@ -23,7 +23,7 @@ function type --description "Print the type of a command"
case '-??*' case '-??*'
# combined flags # combined flags
set -l IFS set -l IFS
echo -n $flag | read _ flag arg echo -n $flag | read __ flag arg
set flag -$flag set flag -$flag
set arg -$arg set arg -$arg
end end