Explorar el Código

made gettext return the right thing for translation-hint mode

tags/0.4.0
Ben Cherry hace 15 años
padre
commit
deff91a4e0
Se han modificado 1 ficheros con 6 adiciones y 2 borrados
  1. +6
    -2
      test/mustache_spec.rb

+ 6
- 2
test/mustache_spec.rb Ver fichero

@@ -30,8 +30,12 @@ describe "mustache" do
mustache = File.read(__DIR__ + "/../mustache.js") mustache = File.read(__DIR__ + "/../mustache.js")
stubbed_gettext = <<-JS stubbed_gettext = <<-JS
// Stubbed gettext translation method for {{_i}}{{/i}} tags in Mustache. // 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 JS




Cargando…
Cancelar
Guardar