Skip to content

Commit e7034d6

Browse files
committed
git-gui: Make backporting changes from i18n version easier
This is a very trivial hack to define a global mc procedure that does not actually perform i18n translations on its input strings. By declaring an mc procedure here in our maint version of git-gui we can take patches that are intended for the latest development version of git-gui and easily backport them without needing to tweak the mc calls first. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
1 parent 63c4024 commit e7034d6

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

git-gui.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,18 @@ if {![catch {set _verbose $env(GITGUI_VERBOSE)}]} {
6262
}
6363
}
6464

65+
######################################################################
66+
##
67+
## Fake internationalization to ease backporting of changes.
68+
69+
proc mc {fmt args} {
70+
set cmk [string first @@ $fmt]
71+
if {$cmk > 0} {
72+
set fmt [string range $fmt 0 [expr {$cmk - 1}]]
73+
}
74+
return [eval [list format $fmt] $args]
75+
}
76+
6577
######################################################################
6678
##
6779
## read only globals

0 commit comments

Comments
 (0)