Sha256: 3f19b0811779cb2db5d72e2b09d539330e67869cac03a7e883d9fc3d44e51c41

Contents?: true

Size: 660 Bytes

Versions: 10

Compression:

Stored size: 660 Bytes

Contents

(function() {
  var Locale;

  this.RailsAdmin || (this.RailsAdmin = {});

  this.RailsAdmin.I18n = Locale = (function() {
    function Locale() {}

    Locale.init = function(locale, translations) {
      this.locale = locale;
      this.translations = translations;
      moment.locale(this.locale);
      if (typeof this.translations === "string") {
        this.translations = JSON.parse(this.translations);
      }
    };

    Locale.t = function(key) {
      var humanize;
      humanize = key.charAt(0).toUpperCase() + key.replace(/_/g, " ").slice(1);
      return this.translations[key] || humanize;
    };

    return Locale;

  })();

}).call(this);

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
rails_admin-2.3.1 app/assets/javascripts/rails_admin/ra.i18n.js
rails_admin-2.3.0 app/assets/javascripts/rails_admin/ra.i18n.js
rails_admin-2.2.1 app/assets/javascripts/rails_admin/ra.i18n.js
rails_admin-2.2.0 app/assets/javascripts/rails_admin/ra.i18n.js
rails_admin-2.1.1 app/assets/javascripts/rails_admin/ra.i18n.js
rails_admin-2.1.0 app/assets/javascripts/rails_admin/ra.i18n.js
rails_admin-2.0.2 app/assets/javascripts/rails_admin/ra.i18n.js
rails_admin-2.0.1 app/assets/javascripts/rails_admin/ra.i18n.js
rails_admin-2.0.0 app/assets/javascripts/rails_admin/ra.i18n.js
rails_admin-2.0.0.rc app/assets/javascripts/rails_admin/ra.i18n.js