public/javascripts/i18n.js
File i18n.js
has 505 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
// I18n.js
// =======
//
// This small library provides the Rails I18n API on the Javascript.
// You don't actually have to use Rails (or even Ruby) to use I18n.js.
Function strftime
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
I18n.strftime = function(date, format) {
var options = this.lookup("date")
, meridianOptions = I18n.meridian()
;
Function lookup
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
I18n.lookup = function(scope, options) {
options = this.prepareOptions(options);
var locales = this.locales.get(options.locale).slice()
, requestedLocale = locales[0]
Function parseDate
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
I18n.parseDate = function(date) {
var matches, convertedDate, fraction;
// we have a date, so just return it.
if (typeof(date) == "object") {
return date;
Function toNumber
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
I18n.toNumber = function(number, options) {
options = this.prepareOptions(
options
, this.lookup("number.format")
, NUMBER_FORMAT
Function toHumanSize
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
I18n.toHumanSize = function(number, options) {
var kb = 1024
, size = number
, iterations = 0
, unit