yay icon indicating copy to clipboard operation
yay copied to clipboard

[Localization] Chinese characters make the colons out of order

Open SamLukeYes opened this issue 3 years ago • 2 comments

Affected Version

yay v10.3.0.r0.g4a93199 - libalpm v13.0.0

Describe the bug

When using yay -Si to display the infomation of a package from AUR in Chinese, the colons are out of order. Each Chinese character is twice as wide as a common English letter, making the colon moving 1 space rightwards.

Reproduction Steps

Run yay -Sia yay with zh_CN locale setting.

Expected behavior

The colons should be in order. For example, when running yay in English, the colons are in order:

$ LANG=en_US.utf-8 yay -Sia yay
:: Querying AUR...
Repository      : aur
Name            : yay
Keywords        : arm  AUR  go  helper  pacman  wrapper  x86
Version         : 10.3.0-1
Description     : Yet another yogurt. Pacman wrapper and AUR helper written in go.
URL             : https://github.com/Jguer/yay
AUR URL         : https://aur.archlinux.org/packages/yay
Groups          : None
Licenses        : GPL3
Provides        : None
Depends On      : pacman>5  git
Make Deps       : go
Check Deps      : None
Optional Deps   : sudo
Conflicts With  : None
Maintainer      : jguer
Votes           : 1513
Popularity      : 48.939978
First Submitted : Thu 06 Oct 2016 01:20:04 AM CST
Last Modified   : Wed 14 Jul 2021 12:51:50 AM CST
Out-of-date     : No

Also, packages in repositories are not affected, as pacman deals with Chinese characters properly: The markdown preview of GitHub also breaks the order of colons when Chinese characters are included, so I have to use a screenshot. image

Output

image

SamLukeYes avatar Jul 14 '21 02:07 SamLukeYes

Duplicate of #1332 (part of fixes) #1416 (stale)

Not sure it is helpful, pacman fixed this by commit#4533c6a, see FS#59229 for more detail.

zhmars avatar Jul 14 '21 05:07 zhmars

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Nov 11 '21 08:11 stale[bot]

This seems to be fixed for me now. I am using Alacritty with the wqy-zenhei font. Here is the output I get: 2022-12-20-090201_1182x739_scrot 2022-12-20-090320_1364x626_scrot @SamLukeYes can you check if this error occurs on the latest version of yay? This issue could be terminal specific

jdholtz avatar Dec 20 '22 03:12 jdholtz

This issue actually seems to be duplicated by #1799, which is fixed, so I think this can be closed now.

jdholtz avatar Dec 27 '22 04:12 jdholtz

I've been not using yay for a long time. Closing as it seems to be fixed.

SamLukeYes avatar Dec 27 '22 04:12 SamLukeYes