text: // Generated by CoffeeScript 1.10.0
  (function() {
    var YAML, _abort, abort, apply, async, binary, curry, deref, flip, identity, join, map, pipe, property, read, reduce, ref, splat, split, t,
      slice = [].slice;
  
    join = require("path").join;
  
    YAML = require("js-yaml");
  
    ref = require("fairmont"), async = ref.async, read = ref.read, abort = ref.abort, curry = ref.curry, binary = ref.binary, flip = ref.flip, property = ref.property, reduce = ref.reduce, apply = ref.apply, pipe = ref.pipe, map = ref.map, identity = ref.identity;
  
    t = function(k, d) {
      return (require("markup-js")).up(k, d);
    };
  
    split = curry(function(d, s) {
      return s.split(d);
    });
  
    splat = function(f) {
      return function() {
        var args;
        args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
        return f(args);
      };
    };
  
    deref = curry(binary(flip(splat(reduce(apply, pipe(split("."), map(property), reduce(pipe, identity)))))));
  
    _abort = abort;
  
    module.exports = async(function*(path) {
      var lookup, message, messages;
      messages = YAML.safeLoad((yield read(path)));
      lookup = deref(messages);
      message = function(key, data) {
        if (data == null) {
          data = {};
        }
        return t(lookup(key), data);
      };
      abort = function(key, data) {
        if (data == null) {
          data = {};
        }
        return _abort(message(key, data));
      };
      return {
        lookup: lookup,
        message: message,
        abort: abort
      };
    });
  
  }).call(this);
  