zsh-workers
 help / color / mirror / code / Atom feed
From: Oliver Kiddle <okiddle@yahoo.co.uk>
To: zsh-workers@sunsite.dk
Cc: Andy Spiegl <zsh.Andy@spiegl.de>
Subject: Re: simple completion example? (aptitude completion doesn't work)
Date: Mon, 08 Aug 2005 11:06:20 +0200	[thread overview]
Message-ID: <30056.1123491980@trentino.groupinfra.com> (raw)
In-Reply-To: <20050805193652.GA6842@spiegl.de>

On 5 Aug, Andy Spiegl wrote:

> > If aptitude -h is giving you a German (or other) translation, try adding
> > LC_MESSAGES=C in but I don't think that translation would actually break
> > it in this particular case.
> YES, that was it!  Of course, why didn't I think of that!?

We seem to be getting a lot of these translation related problems. Could
do with someone finding the time to look through for any further
instances.

> But there isn't such a big difference...Hm, maybe Verwendung instead of usage?
> Can you think of a workaround for international users like me?

In general, the patch below adding LC_MESSAGES=C does the job.

It's very tempting to try to make the parsing work with the German
output so that people get translated descriptions. However, if the
formats aren't consistent it's probably only asking for trouble. And the
completion code probably wouldn't handle the umlauts too well either.

Oliver

Index: Completion/Debian/Command/_aptitude
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Debian/Command/_aptitude,v
retrieving revision 1.3
diff -u -r1.3 _aptitude
--- Completion/Debian/Command/_aptitude	31 Mar 2005 13:39:18 -0000	1.3
+++ Completion/Debian/Command/_aptitude	8 Aug 2005 08:59:44 -0000
@@ -26,7 +26,7 @@
 
 case $state in
   cmds)
-    cmds=( ${${(M)${(f)"$(aptitude -h 2>/dev/null)"}:#* - *}/(#b) (*[^ ]) #- (*)/$match[1]:$match[2]:l})
+    cmds=( ${${(M)${(f)"$(LC_MESSAGES=C _call_program commands aptitude -h 2>/dev/null)"}:#* - *}/(#b) (*[^ ]) #- (*)/$match[1]:$match[2]:l})
 
     _describe -t commands 'aptitude command' cmds && ret=0
   ;;


This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.


       reply	other threads:[~2005-08-08  9:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20050802180158.GA10402@spiegl.de>
     [not found] ` <19401.1123058911@trentino.groupinfra.com>
     [not found]   ` <20050803101007.GA9755@spiegl.de>
     [not found]     ` <2356.1123064346@trentino.groupinfra.com>
     [not found]       ` <20050805154030.GA16800@spiegl.de>
     [not found]         ` <32449.1123262228@trentino.groupinfra.com>
     [not found]           ` <20050805193652.GA6842@spiegl.de>
2005-08-08  9:06             ` Oliver Kiddle [this message]
2005-08-08 12:19               ` Mikael Magnusson
2005-08-08 13:05                 ` Clint Adams
2005-08-11 14:52                   ` Oliver Kiddle

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=30056.1123491980@trentino.groupinfra.com \
    --to=okiddle@yahoo.co.uk \
    --cc=zsh-workers@sunsite.dk \
    --cc=zsh.Andy@spiegl.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).