Get message
@param {string} key - Key to find message (ex: 'net.confirmCreate')
@param {object} [replacements] - Values to replace string
@returns {string} Message
775314
function(key, replacements) {
        var message = messageMap[key];

        if (replacements) {
            message = util.replaceText(message, replacements);
        }

        return message;
    }
51959
protected String message(String key, Object... args) {

        return Messages.get().key(key, args);
    }
1251477
def get(self, key):
        
        if not self.servers:
            return self.miss

        key = self._qualified_key(key)
        hashed_key = self.key_hasher(key)
        entry = self.client.get(hashed_key)

        if isinstance(entry, tuple) and len(entry) == 2:
            key_, result = entry
            if key_ == key:
                self.logger("HIT: %s", key)
                return result

        self.logger("MISS: %s", key)
        return self.miss
215494
def key_exists?
      old_message = !@store.msetnx(msg_id, :status =>"incomplete", :expires => @expires_at, :timeout => now + timeout)
      if old_message
        logger.debug "Beetle: received duplicate message: #{msg_id} on queue: #{@queue}"
      end
      old_message
    end
1139325
protected String translate(String key, Object... objects) {
        return messageSource.getMessage(key, objects, null);
    }
1022991
function(key) {
    if (!key.match(suffixRegex)) {
      return key + '2';
    }

    return key.replace(suffixRegex, function(suffix) {
      return Number(suffix) + 1;
    });
  }
1290784
public function get($key, array $replace = array(), $locale = null, $fallback = true)
    {
        // Get without fallback
        $result = parent::get($key, $replace, $locale, false);
        if($result === $key){
            $this->notifyMissingKey($key);

            // Reget with fallback
            $result = parent::get($key, $replace, $locale, $fallback);
            
        }

        return $result;
    }
107884
public String getMessage(String key, Object[] vars)
        throws MissingResourceException {
        return MessageFormat.format(messages.getString(key), vars);
    }
1178887
function (context) {
        var replacements;
        if (context) {
            replacements = {};
            _gpfObjectForEach(context, function (value, key) {
                replacements["{" + key + "}"] = value.toString();
            });
            this.message = _gpfStringReplaceEx(this.message, replacements);
        }
    }
678667
public static function get($key)
    {
        if (isset(self::$messages[$key]) === true) {
            return self::$messages[$key];
        }
    }
412650
function(message){
							if (!message) // the message is already gone
								return cb();
							var objDeviceMessage = JSON.parse(message);
							//if (objDeviceMessage.to !== row.to)
							//    throw "to mismatch";
							console.log('sending stalled '+row.message_hash);
							sendPreparedMessageToHub(row.hub, row.pubkey, row.message_hash, objDeviceMessage, {ifOk: cb, ifError: function(err){ cb(); }});
						}
174396
function messageItem( text, optionalOptions = {} ) {
      const {
         level = 'ERROR',
         replacements = [],
         sourceInfo = { file: 'a.js', line: 100 }
      } = optionalOptions;
      return { text, level, replacements, sourceInfo };
   }
1257359
def _get_replacement_token(msg):
    """"""
    return (
        None
        if not re.search(r"\*\[[\w|\W]+\]\*", msg)
        else re.search(r"\*\[[\w|\W]+\]\*", msg).group()[2:-2]
    )
354298
function (key, regexp, replacement, editor) {
            key = key.toLowerCase();

            return getPreviousKeyForEditing(key, editor)
            .then(bindr(Result.andThen, editOnlyWhenPreviousKeyExists))
            .then(bindr(Result.andThen, function (description) {
                const old_message = description.message;
                const new_message = old_message
                    .replace(regexp, replacement)
                    .replace(/\s+/, " ");

                if (old_message === new_message) {
                    return Fail("unchanged");
                }

                if (new_message.length > maxMessageLength) {
                    return Fail("message-length-exceeded");
                }

                if (new_message === "") {
                    return Fail("no-message-left");
                }

                description.message = new_message;
                description.editor = editor;
                description.time = now();

                return Ok(description);
            }))
            .then(bindr(Result.andThen, beforeUpdate))
            .then(bindr(Result.map, function (value) {
                db.set(key, value);
                return value;
            }));
        }
556422
public String message(String key, Object... params) {
        if (key == null) {
            return null;
        }
        try {
            String string = (getResourceBundle().containsKey(key)) ? getResourceBundle().getString(key) : key;
            if (params != null) {
                for (int i = 0; i < params.length; i++) {
                    String param = (params[i] == null) ? "" : params[i].toString();
                    string = string.replaceAll("\\{" + i + "\\}", param);
                }
            }
            return string;
        } catch (Exception e) {
            return key;
        }
    }
898538
public function getMessage($key) {
        if (!$this->_loaded) $this->load();
        if (!isset($this->messages[$key])) return "[$key]";
        return $this->messages[$key];
    }
236234
function message(key, args) {
  if (typeof key !== 'string') throw new Error('Error message key must be a string');
  const msg = messages.get(key);
  if (!msg) throw new Error(`An invalid error message key was used: ${key}.`);
  if (typeof msg === 'function') return msg(...args);
  if (args === undefined || args.length === 0) return msg;
  args.unshift(msg);
  return String(...args);
}