From aa5b622b7ca43ba809c2b31095cd136ecc13bb8c Mon Sep 17 00:00:00 2001
From: Lloyd Hilaiel <lloyd@hilaiel.com>
Date: Mon, 9 Jul 2012 19:28:18 -0600
Subject: [PATCH] fix broken i18n unit tests, broken with merge of issue #1918

---
 lib/i18n.js         | 2 ++
 tests/i18n-tests.js | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/i18n.js b/lib/i18n.js
index 130f0c94d..c6600cfea 100644
--- a/lib/i18n.js
+++ b/lib/i18n.js
@@ -263,5 +263,7 @@ var format = exports.format = function (fmt, obj, named) {
     return fmt.replace(/%\(\s*([^)]+)\s*\)/g, function(m, v){
       return String(obj[v]);
     });
+  } else {
+    return fmt;
   }
 };
diff --git a/tests/i18n-tests.js b/tests/i18n-tests.js
index 9001546ba..88287ec5d 100755
--- a/tests/i18n-tests.js
+++ b/tests/i18n-tests.js
@@ -27,7 +27,7 @@ suite.addBatch({
   "format a string with named values": {
     topic: function () {
       var params = { salutation: "Hello", place: "World" };
-      return i18n.format("%(salutation)s %(place)s!", params, true);
+      return i18n.format("%(salutation) %(place)!", params);
     },
     "was interpolated": function (err, str) {
       assert.equal(str, "Hello World!");
-- 
GitLab