all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Julien Lepiller <julien@lepiller.eu>
To: 65541@debbugs.gnu.org
Cc: elaexuotee@wilsonb.com
Subject: bug#65541: New fancy progress bars writing new lines instead of updating original
Date: Sat, 26 Aug 2023 09:06:27 +0200	[thread overview]
Message-ID: <20230826090627.7a3ca507@lepiller.eu> (raw)
In-Reply-To: <25BZCYIUWNSCX.256OI9J50FFCZ@wilsonb.com>

Le Sat, 26 Aug 2023 10:25:53 +0900,
elaexuotee--- via Bug reports for GNU Guix <bug-guix@gnu.org> a écrit :

> The new pretty progress bars are quite nice. One issue I am
> ecountering, however, is demonstrated in the snippet below:
> 
>     オブジェクトにインデックスを付けています  71%
> ▕████████████████████████████████████████████████████████████████████████████████████████████▉
> オブジェクトにインデックスを付けています  74%
> ▕█████████████████████████████████████████████████████████████████████████████████████████████████▏
> オブジェクトにインデックスを付けています  77%
> ▕█████████████████████████████████████████████████████████████████████████████████████████████████████▍
> オブジェクトにインデックスを付けています  81%
> ▕█████████████████████████████████████████████████████████████████████████████████████████████████████████▋
> オブジェクトにインデックスを付けています  84%
> ▕█████████████████████████████████████████████████████████████████████████████████████████████████████████████▊
> オブジェクトにインデックスを付けています  87%
> ▕█████████████████████████████████████████████████████████████████████████████████████████████████████████████████
> オブジェクトにインデックスを付けています  90%
> ▕█████████████████████████████████████████████████████████████████████████████████████████████████████████████████
> 
> When preceeding text contains double-width characters, progress bar
> updates end up printing new lines instead of overwriting the
> original. When the preceeding text is ascii, such as for substitute
> downloads, then the bars work beautifully.
> 
> My guess is that the width-calculation simply forgets to account for
> possible double-width charaters in the text snippet.
> 
> Anyone else seeing this?
> 
> Cheers,
> B. Wilson
> 

I don't think it's specific to the fancy bars, and I was able to
reproduce with "LANG=ja_JP.UTF-8 guix pull".

I sent a patch, now tracked https://issues.guix.gnu.org/65546, which
fixes the issue.

To test it, I did:

msgfmt po/guix/ja.po
cd ../..
mkdir -p ja/LC_MESSAGES
mv messages.mo ja/LC_MESSAGES/guix.mo
./configure --localstatedir=/var --sysconfdir=/etc --localedir=$(pwd)
make
./pre-inst-env guix pull

(if you don't specify a localedir, it'll try to find the translations
in /usr by default)

No more newlines :)




  reply	other threads:[~2023-08-26  7:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-26  1:25 bug#65541: New fancy progress bars writing new lines instead of updating original elaexuotee--- via Bug reports for GNU Guix
2023-08-26  7:06 ` Julien Lepiller [this message]
2023-09-01 16:45 ` bug#65541: want this patch chris

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=20230826090627.7a3ca507@lepiller.eu \
    --to=julien@lepiller.eu \
    --cc=65541@debbugs.gnu.org \
    --cc=elaexuotee@wilsonb.com \
    /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 external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.