Re: [PATCH 36/48] i18n: git-stash "unknown option" message
- From
Motiejus Jakštys <desired.mta@gmail.com>
- Date
- May 8, 2011, 15:29 UTC
- Message-ID
- <20110508152948.GB11604@jakstys.lt>
- In-Reply-To
- <1304857280-14773-37-git-send-email-avarab@gmail.com>
On Sun, May 08, 2011 at 12:21:08PM +0000, Ævar Arnfjörð Bjarmason wrote:
Show 10 quoted lines
> Gettextize the "unknown option for 'stash save'" message that's shown > on: > > $ git stash save --blah-blah > error: unknown option for 'stash save': --blah-blah > To provide a message, use git stash save -- '--blah-blah' > Usage: git stash list [<options>] > > In a translation the second line should be aligned with the first > one. I've added a TRANSLATORS comment to indicate this.
I think the commit message should be included to the message for the translators. Like this:
Show 30 quoted lines
>
> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
> ---
> git-stash.sh | 10 ++++++++--
> 1 files changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/git-stash.sh b/git-stash.sh
> index bf4868a..73fa2ce 100755
> --- a/git-stash.sh
> +++ b/git-stash.sh
> @@ -152,8 +152,14 @@ save_stash () {
> break
> ;;
> -*)
> - echo "error: unknown option for 'stash save': $1"
> - echo " To provide a message, use git stash save -- '$1'"
> + option="$1"
> + # TRANSLATORS: $option is an invalid option, like
> + # `--blah-blah'. The 7 spaces at the beginning of the
> + # second line correspond to "error: ". So you should line
> + # up the second line with however many characters the
> + # translation of "error: " takes in your language. In other
> + # words, second line should be aligned with the first one.
> + eval_gettext "$("error: unknown option for 'stash save': \$option
> + To provide a message, use git stash save -- '\$option'")"; echo
> usage
> ;;
> *)
> --
> 1.7.4.4Motiejus