From c78e56c50941e71055d3d1d3c4349f349d817993 Mon Sep 17 00:00:00 2001 From: David Adam Date: Sat, 15 Nov 2014 10:21:21 +0800 Subject: [PATCH] Update various strings for translation, avoid _ for non-translations Use __ instead of _ as a placeholder for ignored variables in `read` statements. --- builtin_set.cpp | 2 +- parse_constants.h | 2 +- share/functions/__fish_git_prompt.fish | 2 +- share/functions/__fish_print_help.fish | 4 ++-- share/functions/abbr.fish | 6 +++--- share/functions/type.fish | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/builtin_set.cpp b/builtin_set.cpp index 0434311b3..b1b6b0ea5 100644 --- a/builtin_set.cpp +++ b/builtin_set.cpp @@ -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); 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); diff --git a/parse_constants.h b/parse_constants.h index 0f882408d..b82870ff6 100644 --- a/parse_constants.h +++ b/parse_constants.h @@ -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'.") /** 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 */ #define ILLEGAL_CMD_ERR_MSG _( L"Illegal command name '%ls'") diff --git a/share/functions/__fish_git_prompt.fish b/share/functions/__fish_git_prompt.fish index bc08871c5..0117894f1 100644 --- a/share/functions/__fish_git_prompt.fish +++ b/share/functions/__fish_git_prompt.fish @@ -241,7 +241,7 @@ function __fish_git_prompt_show_upstream --description "Helper function for __fi # (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) 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 -l cur_prefix for i in (seq (count $svn_remote)) diff --git a/share/functions/__fish_print_help.fish b/share/functions/__fish_print_help.fish index 0af723bab..e21de74e8 100644 --- a/share/functions/__fish_print_help.fish +++ b/share/functions/__fish_print_help.fish @@ -32,7 +32,7 @@ function __fish_print_help --description "Print help message for the specified f # different than the stdin of fish. # use fd 3 to copy our stdout because we need to pipe the output of stty begin - stty size 0<&3 | read _ cols + stty size 0<&3 | read __ cols end 3<&1 end if test -n "$cols" @@ -58,7 +58,7 @@ function __fish_print_help --description "Print help message for the specified f switch $line case ' *' \t\* # 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 set line_type normal else diff --git a/share/functions/abbr.fish b/share/functions/abbr.fish index 393e8243e..ce104f12f 100644 --- a/share/functions/abbr.fish +++ b/share/functions/abbr.fish @@ -66,7 +66,7 @@ function abbr --description "Manage abbreviations" __fish_abbr_parse_entry $mode_arg key value # ensure the key contains at least one non-space character set -l IFS \n\ \t - printf '%s' $key | read -lz key_ _ + printf '%s' $key | read -lz key_ __ if test -z "$key_" printf ( _ "%s: abbreviation must have a non-empty key\n" ) abbr >&2 return 1 @@ -144,10 +144,10 @@ end function __fish_abbr_parse_entry -S -a __input __key __value if test -z "$__key" - set __key _ + set __key __ end if test -z "$__value" - set __value _ + set __value __ end set -l IFS '= ' switch $__input diff --git a/share/functions/type.fish b/share/functions/type.fish index 69c151868..5c48dcd03 100644 --- a/share/functions/type.fish +++ b/share/functions/type.fish @@ -23,7 +23,7 @@ function type --description "Print the type of a command" case '-??*' # combined flags set -l IFS - echo -n $flag | read _ flag arg + echo -n $flag | read __ flag arg set flag -$flag set arg -$arg end