From deff91a4e07f75d5edbde8c7ae4753d85d10e60c Mon Sep 17 00:00:00 2001 From: Ben Cherry Date: Mon, 6 Dec 2010 17:51:27 -0800 Subject: [PATCH] made gettext return the right thing for translation-hint mode --- test/mustache_spec.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/test/mustache_spec.rb b/test/mustache_spec.rb index 2e5b098..ff3995d 100644 --- a/test/mustache_spec.rb +++ b/test/mustache_spec.rb @@ -30,8 +30,12 @@ describe "mustache" do mustache = File.read(__DIR__ + "/../mustache.js") stubbed_gettext = <<-JS // Stubbed gettext translation method for {{_i}}{{/i}} tags in Mustache. - function _(text) { - return text; + function _(params) { + if (typeof params === "string") { + return params + } + + return params.text; } JS