Parcourir la source

made gettext return the right thing for translation-hint mode

tags/0.4.0
Ben Cherry il y a 15 ans
Parent
révision
deff91a4e0
1 fichiers modifiés avec 6 ajouts et 2 suppressions
  1. +6
    -2
      test/mustache_spec.rb

+ 6
- 2
test/mustache_spec.rb Voir le fichier

@@ -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



Chargement…
Annuler
Enregistrer