summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/tk/lib/tk/msgcat.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/tk/lib/tk/msgcat.rb b/ext/tk/lib/tk/msgcat.rb
index 361b9a5de3..34f828f768 100644
--- a/ext/tk/lib/tk/msgcat.rb
+++ b/ext/tk/lib/tk/msgcat.rb
@@ -50,7 +50,8 @@ class TkMsgCatalog < TkObject
}
EOL
- def self.callback(namespace, locale, src_str)
+ def self.callback(namespace, locale, src_str, *args)
+ src_str = sprintf(src_str, *args) unless args.empty?
cmd_tbl = TkMsgCatalog::UNKNOWN_CBTBL[TkCore::INTERP.__getip]
cmd = cmd_tbl[namespace]
cmd = cmd_tbl['::'] unless cmd # use global scope as interp default