kodgemisi/confdeck

View on GitHub
public/javascripts/i18n.js

Summary

Maintainability
D
1 day
Test Coverage

File i18n.js has 505 lines of code (exceeds 250 allowed). Consider refactoring.
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.
Severity: Major
Found in public/javascripts/i18n.js - About 1 day to fix

    Function strftime has 52 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      I18n.strftime = function(date, format) {
        var options = this.lookup("date")
          , meridianOptions = I18n.meridian()
        ;
    
    
    Severity: Major
    Found in public/javascripts/i18n.js - About 2 hrs to fix

      Function lookup has 33 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        I18n.lookup = function(scope, options) {
          options = this.prepareOptions(options);
      
          var locales = this.locales.get(options.locale).slice()
            , requestedLocale = locales[0]
      Severity: Minor
      Found in public/javascripts/i18n.js - About 1 hr to fix

        Function parseDate has 32 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          I18n.parseDate = function(date) {
            var matches, convertedDate, fraction;
            // we have a date, so just return it.
            if (typeof(date) == "object") {
              return date;
        Severity: Minor
        Found in public/javascripts/i18n.js - About 1 hr to fix

          Function toNumber has 29 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            I18n.toNumber = function(number, options) {
              options = this.prepareOptions(
                  options
                , this.lookup("number.format")
                , NUMBER_FORMAT
          Severity: Minor
          Found in public/javascripts/i18n.js - About 1 hr to fix

            Function toHumanSize has 27 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              I18n.toHumanSize = function(number, options) {
                var kb = 1024
                  , size = number
                  , iterations = 0
                  , unit
            Severity: Minor
            Found in public/javascripts/i18n.js - About 1 hr to fix

              There are no issues that match your filters.

              Category
              Status