zh_CN: Fix visual misalignment in signature verification output for CJK terminals
Testing, LowPublic

Assigned To
Authored By
sihuan
Dec 26 2025, 1:31 PM
Tags
Subscribers

Description

When using GnuPG in a Chinese locale (zh_CN), the signature verification output (gpg --verify) displays a visual misalignment between the "Good signature" (完好的签名) line and the "aka" (亦即) lines. This is caused by the difference in visual width between CJK characters and ASCII characters in monospaced terminals.

Current (Misaligned):

gpg: 完好的签名,来自于 “Secondary User <secondary@example.com>” [未知]
gpg:                 亦即 “Primary User <primary@example.com>” [绝对]

After Fix (Aligned):

gpg: 完好的签名,来自于 “Secondary User <secondary@example.com>” [未知]
gpg:               亦即 “Primary User <primary@example.com>” [绝对]

In English, the strings are:

"Good signature from " (19 columns)
" aka " (16 spaces + 3 chars = 19 columns)

In Chinese (zh_CN):

"完好的签名,来自于 " (9 CJK chars * 2 = 18 columns)
" 亦即 " (16 spaces + 2 CJK chars * 2 = 20 columns)

The 2-column discrepancy causes the misalignment. This patch reduces the leading spaces in po/zh_CN.po by 2 units to restore visual alignment for standard CJK monospaced fonts.

Revisions and Commits

Event Timeline

sihuan created this task.
sihuan created this object in space S1 Public.
gniibe changed the task status from Open to Testing.Tue, May 26, 4:40 AM
gniibe added a project: gnupg.
gniibe added a subscriber: gniibe.

I don't see your patch, but I can fix the misalignment.

Note that we also care about "Expired signature from..." and "Bad signature from..." together.

Pushed: rG920463d2e361: po: Fix Chinese Translations. in master.