Sha256: 07e48b168f5d7877548c1fcdcd3f9e212e2e954ed3ccb06a7c052846775477cc

Contents?: true

Size: 1.91 KB

Versions: 1

Compression:

Stored size: 1.91 KB

Contents

o: ActiveSupport::Cache::Entry	:@compressedF:@expires_in0:@created_atf1336549141.4862216A:@value"6{I"
class:EFI"ProcessedAsset;FI"logical_path;FI"i18n_viz/processing.js;FI"
pathname;FI"Q/home/jk/rails/i18n_viz/app/assets/javascripts/i18n_viz/processing.js.coffee;FI"content_type;FI"application/javascript;FI"
mtime;FI"2012-04-20T18:59:57+02:00;FI"length;Fi#I"digest;F"%3a3d6cc3ac5ce2f53d1c9ff7dd3ea423I"source;FI"#(function() {

  $.fn.enrichWithI18nData = function() {
    var i18n_keys;
    i18n_keys = I18nViz.extractI18nKeysFromText($(this).text());
    if (i18n_keys !== null) {
      $(this).addClass("i18n-viz").data("i18n-keys", i18n_keys);
    }
    return $(this);
  };

  $.fn.clearI18nText = function() {
    $(this).textNodes().each(function() {
      return $(this).replaceWith($(this).text().replace(I18nViz.global_regex, ""));
    });
    return $(this);
  };

  I18nViz.extractI18nKeysFromText = function(text) {
    var keys;
    keys = text.match(I18nViz.global_regex);
    if (keys) {
      keys.forEach(function(value, index) {
        return keys[index] = value.replace(/--/g, "");
      });
      return keys;
    } else {
      return null;
    }
  };

  $.extend($.expr[':'], {
    'i18n-textnode': function(el) {
      return I18nViz.regex.test($(el).textNodes().text());
    },
    'i18n-value-placeholder': function(el) {
      return I18nViz.regex.test($(el).val()) || I18nViz.regex.test($(el).attr('placeholder'));
    }
  });

}).call(this);
;TI"dependency_digest;F"%bd0847e8900518c79b2ab92b56874549I"required_paths;F[I"Q/home/jk/rails/i18n_viz/app/assets/javascripts/i18n_viz/processing.js.coffee;FI"dependency_paths;F[{I"	path;FI"Q/home/jk/rails/i18n_viz/app/assets/javascripts/i18n_viz/processing.js.coffee;FI"
mtime;FI"2012-04-20T18:59:57+02:00;FI"digest;F"%9ab584be77952bbcfe470fc00baed98eI"
_version;F"%45a9b34d2c65935f21d8f90f1e1b2836

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
i18n_viz-0.3.0 test/dummy/tmp/cache/assets/D72/290/sprockets%2F7cd08947b83fdbb73ead2613c7f0930e