Page MenuHome GnuPG

zh_CN: Fix visual misalignment in 'aka' line
Needs ReviewPublic

Authored by sihuan on Fri, Dec 26, 1:37 PM.

Details

Reviewers
bobwxc
Summary

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.

Test Plan

Verified with gpg --verify under zh_CN.UTF-8 locale in a monospaced terminal.

Diff Detail

Repository
rG GnuPG
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

sihuan created this revision.