diff options
author | Matthew DeVore <matvore@google.com> | 2019-06-18 15:29:15 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-06-19 08:24:41 -0700 |
commit | 28438e84e046984afc76dc891a49bd0862d555f7 (patch) | |
tree | 5b86305a3fb357865d3868efd65541454f00abd5 /wt-status.h | |
parent | mingw: allow building with an MSYS2 runtime v3.x (diff) | |
download | tgif-28438e84e046984afc76dc891a49bd0862d555f7.tar.xz |
ref-filter: sort detached HEAD lines firstly
Before this patch, "git branch" would put "(HEAD detached...)" and "(no
branch, rebasing...)" lines before all the other branches *in most
cases* except for when using Chinese-language messages. zh_CN generally
uses a full-width "(" symbol (codepoint FF08) to match the full-width
proportions of Chinese characters, and the translated strings we had did
use them. This meant that the detached HEAD line would appear after all
local refs and even after the remote refs if there were any.
AFAIK, it is sometimes not jarring to see the half-width parenthesis in
"full-width" text as in the CJK languages, for instance when there are
no characters preceding or following the parenthesized text fragment. By
removing the parenthesis from the localizable text, we can share strings
with wt-status.c and remove a cautionary comment to translators.
Remove the ( from the localizable portion of messages so the sorting
happens properly regardless of locale.
Helped-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Helped-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Matthew DeVore <matvore@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'wt-status.h')
-rw-r--r-- | wt-status.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/wt-status.h b/wt-status.h index 3a95975032..ecdeb828a1 100644 --- a/wt-status.h +++ b/wt-status.h @@ -65,6 +65,9 @@ enum wt_status_format { STATUS_FORMAT_UNSPECIFIED }; +#define HEAD_DETACHED_AT _("HEAD detached at ") +#define HEAD_DETACHED_FROM _("HEAD detached from ") + struct wt_status_state { int merge_in_progress; int am_in_progress; |