From 5620f007ea8789b0c32850fba0320b432afb53a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20Bonveh=C3=AD?= Date: Wed, 29 Oct 2014 13:13:54 -0300 Subject: [PATCH] Fix locale set during initialize not being used in utils.translation --- converse.js | 2 +- src/utils.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/converse.js b/converse.js index 2a79366a6..ca6e759d7 100644 --- a/converse.js +++ b/converse.js @@ -300,7 +300,7 @@ // Translation machinery // --------------------- - var __ = utils.__; + var __ = $.proxy(utils.__, this); var ___ = utils.___; // Translation aware constants // --------------------------- diff --git a/src/utils.js b/src/utils.js index 61716d902..fb6cafa0a 100644 --- a/src/utils.js +++ b/src/utils.js @@ -30,7 +30,7 @@ define(["jquery"], function ($) { var utils = { // Translation machinery // --------------------- - __: $.proxy(function (str) { + __: function (str) { // Translation factory if (this.i18n === undefined) { this.i18n = locales.en; @@ -41,7 +41,7 @@ define(["jquery"], function ($) { } else { return t.fetch(); } - }, this), + }, ___: function (str) { /* XXX: This is part of a hack to get gettext to scan strings to be