JSCS Cleanup - use function syntax for i18n

Changed the declaration of i18n factory to fix the
angular/ng_di violation

Change-Id: I39efe672df8ebb8ea943b47d9f15fed8d9d08b7b
Partially-Implements: blueprint jscs-cleanup
This commit is contained in:
Rajat Vig 2015-07-15 09:06:21 -07:00
parent fa012c21ba
commit b0183de57b

View File

@ -16,7 +16,11 @@
(function () { (function () {
'use strict'; 'use strict';
angular.module('horizon.framework.util.i18n', []) angular
.module('horizon.framework.util.i18n', [])
.factory('horizon.framework.util.i18n.gettext', getText);
getText.$inject = ['$window'];
/* /*
* @name horizon.framework.util.i18n.gettext * @name horizon.framework.util.i18n.gettext
@ -36,7 +40,7 @@
* (translation) from filters, which are arguably more * (translation) from filters, which are arguably more
* presentation-oriented. * presentation-oriented.
*/ */
.factory('horizon.framework.util.i18n.gettext', ['$window', function ($window) { function getText($window) {
// If no global function, revert to just returning given text. // If no global function, revert to just returning given text.
var gettextFunc = $window.gettext || function (x) { return x; }; var gettextFunc = $window.gettext || function (x) { return x; };
@ -45,5 +49,5 @@
return function () { return function () {
return gettextFunc.apply(this, arguments); return gettextFunc.apply(this, arguments);
}; };
}]); }
})(); })();