Permalink
Browse files

Rename `I18n#t` to `I18n#interpolate`.

  • Loading branch information...
Kit Goncharov
Kit Goncharov committed Apr 27, 2011
1 parent 43426d6 commit 0194e8953d5cab83ef7d575cbe2551fbae5fb4d5
Showing with 6 additions and 7 deletions.
  1. +4 −4 examples/templating.js
  2. +1 −1 lib/i18n.js
  3. +1 −2 package.json
View
@@ -3,7 +3,7 @@ var i18n = require("./../index").i18n,
console.log(instance);
instance.setLocale("en");
-console.log(instance.t("sup") === "hi"); // true
-console.log(instance.t("object.what.is") === "new"); // true
-console.log(instance.t("object.value", { hi: "hello"}) === "testing hello"); // true
-console.log(instance.t("object.value") === "testing hello"); // false
+console.log(instance.interpolate("sup") === "hi"); // true
+console.log(instance.interpolate("object.what.is") === "new"); // true
+console.log(instance.interpolate("object.value", { hi: "hello"}) === "testing hello"); // true
+console.log(instance.interpolate("object.value") === "testing hello"); // false
View
@@ -29,7 +29,7 @@ I18n.prototype.setLocale = function setLocale(language) {
};
// Interpolates a template using the provided locale.
-I18n.prototype.t = function t(item, context) {
+I18n.prototype.interpolate = function interpolate(item, context) {
var result, property = item.split('.'), section, settings;
while ((section = property.shift())) {
View
@@ -4,6 +4,5 @@
"version": "0.1",
"author": "Dan Hansen <mokker1234@gmail.com>",
"keywords": ["i18n", "internationalization", "internationalisation", "translation"],
- "main": "index",
- "engines": { "node": ">= 0.2.0" }
+ "main": "index"
}

0 comments on commit 0194e89

Please sign in to comment.