summaryrefslogtreecommitdiff
path: root/git-gui.sh
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2007-09-13 23:04:14 (GMT)
committerShawn O. Pearce <spearce@spearce.org>2007-09-13 23:04:14 (GMT)
commite7034d66ecd9c16ae8bd8d331fc41efc48e925f1 (patch)
tree8b81c45ae69ea244609291f8f18eb29a26150546 /git-gui.sh
parent63c4024ff080430004967fa27b8af8fe243e2ea3 (diff)
downloadgit-e7034d66ecd9c16ae8bd8d331fc41efc48e925f1.zip
git-e7034d66ecd9c16ae8bd8d331fc41efc48e925f1.tar.gz
git-e7034d66ecd9c16ae8bd8d331fc41efc48e925f1.tar.bz2
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>
Diffstat (limited to 'git-gui.sh')
-rwxr-xr-xgit-gui.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/git-gui.sh b/git-gui.sh
index e221d5b..31a36cb 100755
--- a/git-gui.sh
+++ b/git-gui.sh
@@ -64,6 +64,18 @@ if {![catch {set _verbose $env(GITGUI_VERBOSE)}]} {
######################################################################
##
+## Fake internationalization to ease backporting of changes.
+
+proc mc {fmt args} {
+ set cmk [string first @@ $fmt]
+ if {$cmk > 0} {
+ set fmt [string range $fmt 0 [expr {$cmk - 1}]]
+ }
+ return [eval [list format $fmt] $args]
+}
+
+######################################################################
+##
## read only globals
set _appname [lindex [file split $argv0] end]